@infomaximum/widget-sdk 4.0.0-beta6 → 4.0.0-beta61
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 +335 -194
- package/dist/index.js +346 -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,35 @@ 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 {
|
|
748
|
+
scopeName: unescapeSpecialCharacters(workspaceMatch[1]),
|
|
749
|
+
indicatorName: unescapeSpecialCharacters(workspaceMatch[2]),
|
|
750
|
+
};
|
|
751
|
+
}
|
|
752
|
+
return null;
|
|
753
|
+
};
|
|
754
|
+
|
|
740
755
|
function mapMeasureToInput(measure, variables, addFormulas) {
|
|
741
756
|
if (addFormulas === void 0) { addFormulas = function () { return new Map(); }; }
|
|
742
757
|
var mainFormula = getMeasureFormula(measure);
|
|
@@ -756,9 +771,7 @@ function mapMeasureToInput(measure, variables, addFormulas) {
|
|
|
756
771
|
}
|
|
757
772
|
/** Конвертировать меры виджета во входы для вычислителя */
|
|
758
773
|
function mapMeasuresToInputs(measures, variables, addFormulas) {
|
|
759
|
-
return compactMap(measures, function (measure) {
|
|
760
|
-
return mapMeasureToInput(measure, variables, addFormulas);
|
|
761
|
-
});
|
|
774
|
+
return compactMap(measures, function (measure) { return mapMeasureToInput(measure, variables, addFormulas); });
|
|
762
775
|
}
|
|
763
776
|
|
|
764
777
|
function mapDimensionToInput(dimension, variables) {
|
|
@@ -779,9 +792,7 @@ function mapDimensionToInput(dimension, variables) {
|
|
|
779
792
|
}
|
|
780
793
|
/** Конвертировать разрезы виджета во входы для вычислителя */
|
|
781
794
|
function mapDimensionsToInputs(dimensions, variables) {
|
|
782
|
-
return compactMap(dimensions, function (dimension) {
|
|
783
|
-
return mapDimensionToInput(dimension, variables);
|
|
784
|
-
});
|
|
795
|
+
return compactMap(dimensions, function (dimension) { return mapDimensionToInput(dimension, variables); });
|
|
785
796
|
}
|
|
786
797
|
|
|
787
798
|
function mapTransitionMeasureToInput(indicator, process, variables, addFormulas) {
|
|
@@ -832,36 +843,13 @@ function mapEventMeasuresToInputs(indicators, process, variables, addFormulas) {
|
|
|
832
843
|
});
|
|
833
844
|
}
|
|
834
845
|
|
|
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
|
-
}
|
|
846
|
+
exports.ESortDirection = void 0;
|
|
847
|
+
(function (ESortDirection) {
|
|
848
|
+
ESortDirection["descend"] = "DESC";
|
|
849
|
+
ESortDirection["ascend"] = "ASC";
|
|
850
|
+
ESortDirection["ASC"] = "ascend";
|
|
851
|
+
ESortDirection["DESC"] = "descend";
|
|
852
|
+
})(exports.ESortDirection || (exports.ESortDirection = {}));
|
|
865
853
|
|
|
866
854
|
/**
|
|
867
855
|
* Выбрать активный разрез иерархии на основе активных фильтров.
|
|
@@ -870,9 +858,9 @@ function mapSortingToInputs(sortingIndicators, dimensionsInOriginalOrder, measur
|
|
|
870
858
|
* Если к разрезу иерархии применяется INCLUDE-фильтр с несколькими значениями - выбираем данный разрез
|
|
871
859
|
*/
|
|
872
860
|
function selectDimensionFromHierarchy(_a, filters) {
|
|
873
|
-
var
|
|
861
|
+
var hierarchyDimensions = _a.hierarchyDimensions;
|
|
874
862
|
var _loop_1 = function (i) {
|
|
875
|
-
var dimension =
|
|
863
|
+
var dimension = hierarchyDimensions[i];
|
|
876
864
|
// todo: widgets - возможно, стоит использовать Map фильтров для быстрого поиска
|
|
877
865
|
var matchedFilter = filters.find(function (_a) {
|
|
878
866
|
var formula = _a.formula, filteringMethod = _a.filteringMethod;
|
|
@@ -882,25 +870,123 @@ function selectDimensionFromHierarchy(_a, filters) {
|
|
|
882
870
|
if (!matchedFilter) {
|
|
883
871
|
return "continue";
|
|
884
872
|
}
|
|
885
|
-
var selectionIndex = matchedFilter.values.length > 1
|
|
886
|
-
|
|
887
|
-
: Math.min(i + 1, dimensions.length - 1);
|
|
888
|
-
return { value: dimensions[selectionIndex] };
|
|
873
|
+
var selectionIndex = matchedFilter.values.length > 1 ? i : Math.min(i + 1, hierarchyDimensions.length - 1);
|
|
874
|
+
return { value: hierarchyDimensions[selectionIndex] };
|
|
889
875
|
};
|
|
890
|
-
for (var i =
|
|
876
|
+
for (var i = hierarchyDimensions.length - 1; i >= 0; i--) {
|
|
891
877
|
var state_1 = _loop_1(i);
|
|
892
878
|
if (typeof state_1 === "object")
|
|
893
879
|
return state_1.value;
|
|
894
880
|
}
|
|
895
|
-
return
|
|
881
|
+
return hierarchyDimensions[0];
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
var getDefaultSortOrder = function (dimensions, measures) {
|
|
885
|
+
/** Если есть условие отображения, то не делаем авто-сортировку */
|
|
886
|
+
if (dimensions.some(function (dimension) {
|
|
887
|
+
return dimension.displayCondition &&
|
|
888
|
+
dimension.displayCondition.mode !== exports.EDisplayConditionMode.DISABLED;
|
|
889
|
+
})) {
|
|
890
|
+
return [];
|
|
891
|
+
}
|
|
892
|
+
/** Если есть временной разрез, то авто-сортировка по первому такому разрезу (по возрастанию) */
|
|
893
|
+
var timeDimension = dimensions.find(function (dimension) {
|
|
894
|
+
return dimension.format &&
|
|
895
|
+
[
|
|
896
|
+
exports.EFormatTypes.DATE,
|
|
897
|
+
exports.EFormatTypes.MONTH,
|
|
898
|
+
exports.EFormatTypes.DATETIME,
|
|
899
|
+
exports.EFormatTypes.DAY_OF_WEEK,
|
|
900
|
+
exports.EFormatTypes.HOUR,
|
|
901
|
+
exports.EFormatTypes.MONTH_YEAR,
|
|
902
|
+
exports.EFormatTypes.YEAR,
|
|
903
|
+
exports.EFormatTypes.QUARTER,
|
|
904
|
+
exports.EFormatTypes.QUARTER_YEAR,
|
|
905
|
+
exports.EFormatTypes.DAY_OF_MONTH,
|
|
906
|
+
exports.EFormatTypes.WEEK,
|
|
907
|
+
].includes(dimension.format);
|
|
908
|
+
});
|
|
909
|
+
if (timeDimension) {
|
|
910
|
+
return [{ formula: getDimensionFormula(timeDimension), direction: exports.ESortDirection.ascend }];
|
|
911
|
+
}
|
|
912
|
+
if (measures.length > 0) {
|
|
913
|
+
var firstMeasure = measures[0];
|
|
914
|
+
if (firstMeasure) {
|
|
915
|
+
return [
|
|
916
|
+
{
|
|
917
|
+
direction: exports.ESortDirection.descend,
|
|
918
|
+
formula: getMeasureFormula(firstMeasure),
|
|
919
|
+
},
|
|
920
|
+
];
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
return [];
|
|
924
|
+
};
|
|
925
|
+
function mapSortingToInputs(_a) {
|
|
926
|
+
var _b;
|
|
927
|
+
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;
|
|
928
|
+
var sortOrder = compactMap((_b = settings["sorting"]) !== null && _b !== void 0 ? _b : [], function (_a) {
|
|
929
|
+
var _b;
|
|
930
|
+
var direction = _a.direction, value = _a.value;
|
|
931
|
+
if (value.mode === exports.ESortingValueModes.FORMULA) {
|
|
932
|
+
return value.formula ? { formula: value.formula, direction: direction } : undefined;
|
|
933
|
+
}
|
|
934
|
+
var indicatorsGroup = settings[value.group];
|
|
935
|
+
var indicator = indicatorsGroup === null || indicatorsGroup === void 0 ? void 0 : indicatorsGroup[value.index];
|
|
936
|
+
if (!indicator) {
|
|
937
|
+
return;
|
|
938
|
+
}
|
|
939
|
+
if (getIndicatorType(value.group, indicator) === exports.EWidgetIndicatorType.DIMENSION) {
|
|
940
|
+
var activeDimensions = isDimensionsHierarchy(indicator)
|
|
941
|
+
? selectDimensionFromHierarchy(indicator, filters)
|
|
942
|
+
: indicator;
|
|
943
|
+
var formula = activeDimensions && getDimensionFormula(activeDimensions);
|
|
944
|
+
if (!formula || !checkDisplayCondition(indicator.displayCondition, variables)) {
|
|
945
|
+
return;
|
|
946
|
+
}
|
|
947
|
+
return {
|
|
948
|
+
formula: formula,
|
|
949
|
+
direction: direction,
|
|
950
|
+
displayCondition: ((_b = indicator.displayCondition) === null || _b === void 0 ? void 0 : _b.mode) === exports.EDisplayConditionMode.FORMULA
|
|
951
|
+
? indicator.displayCondition.formula
|
|
952
|
+
: undefined,
|
|
953
|
+
};
|
|
954
|
+
}
|
|
955
|
+
return {
|
|
956
|
+
formula: getMeasureFormula(indicator),
|
|
957
|
+
direction: direction,
|
|
958
|
+
};
|
|
959
|
+
});
|
|
960
|
+
if (sortOrder.length > 0) {
|
|
961
|
+
return sortOrder;
|
|
962
|
+
}
|
|
963
|
+
if (sortableIndicatorsKeys.length === 0 || withDefaultSortOrder === false) {
|
|
964
|
+
return [];
|
|
965
|
+
}
|
|
966
|
+
var dimensions = [];
|
|
967
|
+
var measures = [];
|
|
968
|
+
sortableIndicatorsKeys.forEach(function (key) {
|
|
969
|
+
var indicatorsGroup = settings[key];
|
|
970
|
+
indicatorsGroup === null || indicatorsGroup === void 0 ? void 0 : indicatorsGroup.forEach(function (indicator) {
|
|
971
|
+
if (getIndicatorType(key, indicator) === exports.EWidgetIndicatorType.DIMENSION) {
|
|
972
|
+
var activeDimensions = isDimensionsHierarchy(indicator)
|
|
973
|
+
? selectDimensionFromHierarchy(indicator, filters)
|
|
974
|
+
: indicator;
|
|
975
|
+
activeDimensions && dimensions.push(activeDimensions);
|
|
976
|
+
}
|
|
977
|
+
else {
|
|
978
|
+
measures.push(indicator);
|
|
979
|
+
}
|
|
980
|
+
});
|
|
981
|
+
});
|
|
982
|
+
return getDefaultSortOrder(dimensions, measures);
|
|
896
983
|
}
|
|
897
984
|
|
|
898
985
|
var replaceHierarchiesWithDimensions = function (dimensions, filters) {
|
|
899
986
|
return compactMap(dimensions, function (indicator) {
|
|
900
|
-
if (
|
|
987
|
+
if (isDimensionsHierarchy(indicator)) {
|
|
901
988
|
var selectedDimension = selectDimensionFromHierarchy(indicator, filters);
|
|
902
|
-
return (selectedDimension &&
|
|
903
|
-
replaceDisplayCondition(selectedDimension, indicator.displayCondition));
|
|
989
|
+
return (selectedDimension && replaceDisplayCondition(selectedDimension, indicator.displayCondition));
|
|
904
990
|
}
|
|
905
991
|
return indicator;
|
|
906
992
|
});
|
|
@@ -917,11 +1003,19 @@ function bindContentWithIndicator(outputs, indicator) {
|
|
|
917
1003
|
* Массив объектов, каждый из которых содержит показатель и его контент
|
|
918
1004
|
*/
|
|
919
1005
|
function bindContentsWithIndicators(outputs, indicators) {
|
|
920
|
-
return compactMap(indicators, function (indicator) {
|
|
921
|
-
return bindContentWithIndicator(outputs, indicator);
|
|
922
|
-
});
|
|
1006
|
+
return compactMap(indicators, function (indicator) { return bindContentWithIndicator(outputs, indicator); });
|
|
923
1007
|
}
|
|
924
1008
|
|
|
1009
|
+
/** Удалить из строки символы экранирования */
|
|
1010
|
+
function unescapeSpecialCharacters(str) {
|
|
1011
|
+
return str.replace(/\\(?!\\)/g, "").replace(/\\\\/g, "\\");
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
exports.EUnitMode = void 0;
|
|
1015
|
+
(function (EUnitMode) {
|
|
1016
|
+
EUnitMode["PIXEL"] = "PIXEL";
|
|
1017
|
+
EUnitMode["PERCENT"] = "PERCENT";
|
|
1018
|
+
})(exports.EUnitMode || (exports.EUnitMode = {}));
|
|
925
1019
|
exports.EControlType = void 0;
|
|
926
1020
|
(function (EControlType) {
|
|
927
1021
|
EControlType["inputNumber"] = "inputNumber";
|
|
@@ -935,22 +1029,28 @@ exports.EControlType = void 0;
|
|
|
935
1029
|
EControlType["typedFormula"] = "typedFormula";
|
|
936
1030
|
EControlType["inputRange"] = "inputRange";
|
|
937
1031
|
EControlType["colorPicker"] = "colorPicker";
|
|
938
|
-
/** @deprecated - удалится в ближайшее время */
|
|
939
|
-
EControlType["filterMode"] = "filterMode";
|
|
940
1032
|
EControlType["displayCondition"] = "displayCondition";
|
|
941
1033
|
EControlType["eventsColor"] = "eventsColor";
|
|
942
1034
|
EControlType["inputMarkdown"] = "inputMarkdown";
|
|
943
1035
|
EControlType["filter"] = "filter";
|
|
944
1036
|
EControlType["actionOnClick"] = "actionOnClick";
|
|
1037
|
+
EControlType["eventsPicker"] = "eventsPicker";
|
|
1038
|
+
EControlType["size"] = "size";
|
|
945
1039
|
})(exports.EControlType || (exports.EControlType = {}));
|
|
946
1040
|
|
|
947
|
-
exports.
|
|
948
|
-
(function (
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
1041
|
+
exports.ESelectOptionTypes = void 0;
|
|
1042
|
+
(function (ESelectOptionTypes) {
|
|
1043
|
+
ESelectOptionTypes["DIVIDER"] = "DIVIDER";
|
|
1044
|
+
ESelectOptionTypes["SYSTEM"] = "SYSTEM";
|
|
1045
|
+
ESelectOptionTypes["GROUP"] = "GROUP";
|
|
1046
|
+
ESelectOptionTypes["BRANCH"] = "BRANCH";
|
|
1047
|
+
ESelectOptionTypes["LEAF"] = "LEAF";
|
|
1048
|
+
})(exports.ESelectOptionTypes || (exports.ESelectOptionTypes = {}));
|
|
1049
|
+
exports.ECustomSelectTemplates = void 0;
|
|
1050
|
+
(function (ECustomSelectTemplates) {
|
|
1051
|
+
ECustomSelectTemplates["FORMULA"] = "FORMULA";
|
|
1052
|
+
ECustomSelectTemplates["DIMENSION_GROUPS"] = "DIMENSION_GROUPS";
|
|
1053
|
+
})(exports.ECustomSelectTemplates || (exports.ECustomSelectTemplates = {}));
|
|
954
1054
|
|
|
955
1055
|
var findFilterByFormula = function (filters, formula) {
|
|
956
1056
|
var _a;
|
|
@@ -1046,17 +1146,59 @@ var getLocalizedText = function (language, locObj, props) {
|
|
|
1046
1146
|
return localization.getLocalized(locObj, props);
|
|
1047
1147
|
};
|
|
1048
1148
|
|
|
1049
|
-
|
|
1149
|
+
exports.EColorMode = void 0;
|
|
1150
|
+
(function (EColorMode) {
|
|
1151
|
+
/** Окрашивание отключено */
|
|
1152
|
+
EColorMode["DISABLED"] = "DISABLED";
|
|
1153
|
+
/** Цвет каждого значения вычисляется по формуле */
|
|
1154
|
+
EColorMode["FORMULA"] = "FORMULA";
|
|
1155
|
+
/** Один цвет для всех значений */
|
|
1156
|
+
EColorMode["BASE"] = "BASE";
|
|
1157
|
+
/** Окрашивание каждого значения по градиенту относительно минимального и максимального значений */
|
|
1158
|
+
EColorMode["GRADIENT"] = "GRADIENT";
|
|
1159
|
+
/** Использовать автоматический цвет: по умолчанию определяется порядковым номером показателя */
|
|
1160
|
+
EColorMode["AUTO"] = "AUTO";
|
|
1161
|
+
/** Использовать цвет из правила отображения (в правиле отображения рекурсивно определен цвет) */
|
|
1162
|
+
EColorMode["RULE"] = "RULE";
|
|
1163
|
+
/** Задать цвет конкретным значениям разреза */
|
|
1164
|
+
EColorMode["VALUES"] = "VALUES";
|
|
1165
|
+
/** Задать цвет конкретным значениям общего разреза. Режим используется только для настроек правила отображения */
|
|
1166
|
+
EColorMode["BY_DIMENSION"] = "BY_DIMENSION";
|
|
1167
|
+
})(exports.EColorMode || (exports.EColorMode = {}));
|
|
1168
|
+
var getRuleColor = function (ruleFormula, globalContext) {
|
|
1169
|
+
var _a, _b;
|
|
1170
|
+
var link = parseIndicatorLink(ruleFormula);
|
|
1171
|
+
if (!link) {
|
|
1172
|
+
return;
|
|
1173
|
+
}
|
|
1174
|
+
var _c = link.scopeName, scopeName = _c === void 0 ? null : _c, ruleName = link.indicatorName;
|
|
1175
|
+
var rulesByScope = isNil(scopeName)
|
|
1176
|
+
? globalContext.reportDisplayRules
|
|
1177
|
+
: (_a = globalContext.workspaceDisplayRules) === null || _a === void 0 ? void 0 : _a.get(scopeName);
|
|
1178
|
+
return (_b = rulesByScope === null || rulesByScope === void 0 ? void 0 : rulesByScope.get(ruleName)) === null || _b === void 0 ? void 0 : _b.color;
|
|
1179
|
+
};
|
|
1180
|
+
var isValidColor = function (color, globalContext) {
|
|
1181
|
+
if (color.mode === exports.EColorMode.RULE) {
|
|
1182
|
+
return !color.formula || Boolean(getRuleColor(color.formula, globalContext));
|
|
1183
|
+
}
|
|
1184
|
+
if (color.mode === exports.EColorMode.VALUES) {
|
|
1185
|
+
return color.items.every(function (item) { return isValidColor(item.color, globalContext); });
|
|
1186
|
+
}
|
|
1187
|
+
return true;
|
|
1188
|
+
};
|
|
1189
|
+
|
|
1190
|
+
Object.defineProperty(exports, "ELanguages", {
|
|
1050
1191
|
enumerable: true,
|
|
1051
1192
|
get: function () { return localization$1.ELanguages; }
|
|
1052
1193
|
});
|
|
1053
|
-
Object.defineProperty(exports,
|
|
1194
|
+
Object.defineProperty(exports, "EFilteringMethodValues", {
|
|
1054
1195
|
enumerable: true,
|
|
1055
1196
|
get: function () { return baseFilter.EFilteringMethodValues; }
|
|
1056
1197
|
});
|
|
1057
1198
|
exports.bindContentWithIndicator = bindContentWithIndicator;
|
|
1058
1199
|
exports.bindContentsWithIndicators = bindContentsWithIndicators;
|
|
1059
1200
|
exports.checkDisplayCondition = checkDisplayCondition;
|
|
1201
|
+
exports.dashboardLinkRegExp = dashboardLinkRegExp;
|
|
1060
1202
|
exports.dimensionTemplateFormulas = dimensionTemplateFormulas;
|
|
1061
1203
|
exports.escapeSpecialCharacters = escapeSpecialCharacters;
|
|
1062
1204
|
exports.eventMeasureTemplateFormulas = eventMeasureTemplateFormulas;
|
|
@@ -1068,9 +1210,13 @@ exports.getDisplayConditionFormula = getDisplayConditionFormula;
|
|
|
1068
1210
|
exports.getEventMeasureFormula = getEventMeasureFormula;
|
|
1069
1211
|
exports.getLocalizedText = getLocalizedText;
|
|
1070
1212
|
exports.getMeasureFormula = getMeasureFormula;
|
|
1213
|
+
exports.getRuleColor = getRuleColor;
|
|
1071
1214
|
exports.getTransitionMeasureFormula = getTransitionMeasureFormula;
|
|
1072
|
-
exports.
|
|
1073
|
-
exports.
|
|
1215
|
+
exports.isDimensionsHierarchy = isDimensionsHierarchy;
|
|
1216
|
+
exports.isExecuteScriptActionValid = isExecuteScriptActionValid;
|
|
1217
|
+
exports.isFormulaFilterValue = isFormulaFilterValue;
|
|
1218
|
+
exports.isValidColor = isValidColor;
|
|
1219
|
+
exports.linkNameRegExp = linkNameRegExp;
|
|
1074
1220
|
exports.mapDimensionsToInputs = mapDimensionsToInputs;
|
|
1075
1221
|
exports.mapEventMeasuresToInputs = mapEventMeasuresToInputs;
|
|
1076
1222
|
exports.mapFormulaFilterToCalculatorInput = mapFormulaFilterToCalculatorInput;
|
|
@@ -1078,14 +1224,16 @@ exports.mapFormulaFiltersToInputs = mapFormulaFiltersToInputs;
|
|
|
1078
1224
|
exports.mapMeasuresToInputs = mapMeasuresToInputs;
|
|
1079
1225
|
exports.mapSortingToInputs = mapSortingToInputs;
|
|
1080
1226
|
exports.mapTransitionMeasuresToInputs = mapTransitionMeasuresToInputs;
|
|
1081
|
-
exports.mapVariablesToInputs = mapVariablesToInputs;
|
|
1082
1227
|
exports.measureTemplateFormulas = measureTemplateFormulas;
|
|
1228
|
+
exports.parseIndicatorLink = parseIndicatorLink;
|
|
1083
1229
|
exports.prepareValuesForSql = prepareValuesForSql;
|
|
1084
1230
|
exports.replaceDisplayCondition = replaceDisplayCondition;
|
|
1085
1231
|
exports.replaceFiltersBySelection = replaceFiltersBySelection;
|
|
1086
1232
|
exports.replaceHierarchiesWithDimensions = replaceHierarchiesWithDimensions;
|
|
1087
1233
|
exports.selectDimensionFromHierarchy = selectDimensionFromHierarchy;
|
|
1088
1234
|
exports.transitionMeasureTemplateFormulas = transitionMeasureTemplateFormulas;
|
|
1235
|
+
exports.unescapeSpecialCharacters = unescapeSpecialCharacters;
|
|
1089
1236
|
exports.updateDefaultModeSelection = updateDefaultModeSelection;
|
|
1090
1237
|
exports.updateMultiModeSelection = updateMultiModeSelection;
|
|
1091
1238
|
exports.updateSingleModeSelection = updateSingleModeSelection;
|
|
1239
|
+
exports.workspaceLinkRegExp = workspaceLinkRegExp;
|