@infomaximum/widget-sdk 4.0.0-beta7 → 4.0.0-next1
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 +768 -421
- package/dist/index.esm.js +334 -194
- package/dist/index.js +345 -198
- package/package.json +12 -8
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,40 @@ function getTransitionMeasureFormula(_a, process) {
|
|
|
737
723
|
return "";
|
|
738
724
|
}
|
|
739
725
|
|
|
726
|
+
/** Удалить из строки символы экранирования */
|
|
727
|
+
function unescapeSpecialCharacters(str) {
|
|
728
|
+
return str.replace(/\\(?!\\)/g, "").replace(/\\\\/g, "\\");
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Регулярное выражение для поиска имени ссылки внутри формулы.
|
|
733
|
+
* Учитывает, что имя внутри формулы содержит экраны.
|
|
734
|
+
*
|
|
735
|
+
* Принцип работы:
|
|
736
|
+
* Пробовать следующие вхождения:
|
|
737
|
+
* - \\\\ - экранированный символ обратного слэша.
|
|
738
|
+
* - Иначе \\" - экранированный символ кавычки.
|
|
739
|
+
* - Иначе [^"] - любой символ кроме кавычки.
|
|
740
|
+
* Если встречается любой другой символ, то это закрывающая кавычка имени переменной.
|
|
741
|
+
*/
|
|
742
|
+
var linkNameRegExp = "(?:\\\\\\\\|\\\\\"|[^\"])+";
|
|
743
|
+
var dashboardLinkRegExp = new RegExp("link: \"(".concat(linkNameRegExp, ")\"(?!\\.\"").concat(linkNameRegExp, "\")"), "g");
|
|
744
|
+
var workspaceLinkRegExp = new RegExp("link: \"(".concat(linkNameRegExp, ")\"\\.\"(").concat(linkNameRegExp, ")\""), "g");
|
|
745
|
+
var parseIndicatorLink = function (formula) {
|
|
746
|
+
var dashboardMatch = formula.match(dashboardLinkRegExp.source);
|
|
747
|
+
if (dashboardMatch) {
|
|
748
|
+
return { scopeName: null, indicatorName: dashboardMatch[1] };
|
|
749
|
+
}
|
|
750
|
+
var workspaceMatch = formula.match(workspaceLinkRegExp.source);
|
|
751
|
+
if (workspaceMatch) {
|
|
752
|
+
return {
|
|
753
|
+
scopeName: unescapeSpecialCharacters(workspaceMatch[1]),
|
|
754
|
+
indicatorName: unescapeSpecialCharacters(workspaceMatch[2]),
|
|
755
|
+
};
|
|
756
|
+
}
|
|
757
|
+
return null;
|
|
758
|
+
};
|
|
759
|
+
|
|
740
760
|
function mapMeasureToInput(measure, variables, addFormulas) {
|
|
741
761
|
if (addFormulas === void 0) { addFormulas = function () { return new Map(); }; }
|
|
742
762
|
var mainFormula = getMeasureFormula(measure);
|
|
@@ -756,9 +776,7 @@ function mapMeasureToInput(measure, variables, addFormulas) {
|
|
|
756
776
|
}
|
|
757
777
|
/** Конвертировать меры виджета во входы для вычислителя */
|
|
758
778
|
function mapMeasuresToInputs(measures, variables, addFormulas) {
|
|
759
|
-
return compactMap(measures, function (measure) {
|
|
760
|
-
return mapMeasureToInput(measure, variables, addFormulas);
|
|
761
|
-
});
|
|
779
|
+
return compactMap(measures, function (measure) { return mapMeasureToInput(measure, variables, addFormulas); });
|
|
762
780
|
}
|
|
763
781
|
|
|
764
782
|
function mapDimensionToInput(dimension, variables) {
|
|
@@ -779,9 +797,7 @@ function mapDimensionToInput(dimension, variables) {
|
|
|
779
797
|
}
|
|
780
798
|
/** Конвертировать разрезы виджета во входы для вычислителя */
|
|
781
799
|
function mapDimensionsToInputs(dimensions, variables) {
|
|
782
|
-
return compactMap(dimensions, function (dimension) {
|
|
783
|
-
return mapDimensionToInput(dimension, variables);
|
|
784
|
-
});
|
|
800
|
+
return compactMap(dimensions, function (dimension) { return mapDimensionToInput(dimension, variables); });
|
|
785
801
|
}
|
|
786
802
|
|
|
787
803
|
function mapTransitionMeasureToInput(indicator, process, variables, addFormulas) {
|
|
@@ -832,36 +848,13 @@ function mapEventMeasuresToInputs(indicators, process, variables, addFormulas) {
|
|
|
832
848
|
});
|
|
833
849
|
}
|
|
834
850
|
|
|
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
|
-
}
|
|
851
|
+
exports.ESortDirection = void 0;
|
|
852
|
+
(function (ESortDirection) {
|
|
853
|
+
ESortDirection["descend"] = "DESC";
|
|
854
|
+
ESortDirection["ascend"] = "ASC";
|
|
855
|
+
ESortDirection["ASC"] = "ascend";
|
|
856
|
+
ESortDirection["DESC"] = "descend";
|
|
857
|
+
})(exports.ESortDirection || (exports.ESortDirection = {}));
|
|
865
858
|
|
|
866
859
|
/**
|
|
867
860
|
* Выбрать активный разрез иерархии на основе активных фильтров.
|
|
@@ -870,9 +863,9 @@ function mapSortingToInputs(sortingIndicators, dimensionsInOriginalOrder, measur
|
|
|
870
863
|
* Если к разрезу иерархии применяется INCLUDE-фильтр с несколькими значениями - выбираем данный разрез
|
|
871
864
|
*/
|
|
872
865
|
function selectDimensionFromHierarchy(_a, filters) {
|
|
873
|
-
var
|
|
866
|
+
var hierarchyDimensions = _a.hierarchyDimensions;
|
|
874
867
|
var _loop_1 = function (i) {
|
|
875
|
-
var dimension =
|
|
868
|
+
var dimension = hierarchyDimensions[i];
|
|
876
869
|
// todo: widgets - возможно, стоит использовать Map фильтров для быстрого поиска
|
|
877
870
|
var matchedFilter = filters.find(function (_a) {
|
|
878
871
|
var formula = _a.formula, filteringMethod = _a.filteringMethod;
|
|
@@ -882,25 +875,123 @@ function selectDimensionFromHierarchy(_a, filters) {
|
|
|
882
875
|
if (!matchedFilter) {
|
|
883
876
|
return "continue";
|
|
884
877
|
}
|
|
885
|
-
var selectionIndex = matchedFilter.values.length > 1
|
|
886
|
-
|
|
887
|
-
: Math.min(i + 1, dimensions.length - 1);
|
|
888
|
-
return { value: dimensions[selectionIndex] };
|
|
878
|
+
var selectionIndex = matchedFilter.values.length > 1 ? i : Math.min(i + 1, hierarchyDimensions.length - 1);
|
|
879
|
+
return { value: hierarchyDimensions[selectionIndex] };
|
|
889
880
|
};
|
|
890
|
-
for (var i =
|
|
881
|
+
for (var i = hierarchyDimensions.length - 1; i >= 0; i--) {
|
|
891
882
|
var state_1 = _loop_1(i);
|
|
892
883
|
if (typeof state_1 === "object")
|
|
893
884
|
return state_1.value;
|
|
894
885
|
}
|
|
895
|
-
return
|
|
886
|
+
return hierarchyDimensions[0];
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
var getDefaultSortOrder = function (dimensions, measures) {
|
|
890
|
+
/** Если есть условие отображения, то не делаем авто-сортировку */
|
|
891
|
+
if (dimensions.some(function (dimension) {
|
|
892
|
+
return dimension.displayCondition &&
|
|
893
|
+
dimension.displayCondition.mode !== exports.EDisplayConditionMode.DISABLED;
|
|
894
|
+
})) {
|
|
895
|
+
return [];
|
|
896
|
+
}
|
|
897
|
+
/** Если есть временной разрез, то авто-сортировка по первому такому разрезу (по возрастанию) */
|
|
898
|
+
var timeDimension = dimensions.find(function (dimension) {
|
|
899
|
+
return dimension.format &&
|
|
900
|
+
[
|
|
901
|
+
exports.EFormatTypes.DATE,
|
|
902
|
+
exports.EFormatTypes.MONTH,
|
|
903
|
+
exports.EFormatTypes.DATETIME,
|
|
904
|
+
exports.EFormatTypes.DAY_OF_WEEK,
|
|
905
|
+
exports.EFormatTypes.HOUR,
|
|
906
|
+
exports.EFormatTypes.MONTH_YEAR,
|
|
907
|
+
exports.EFormatTypes.YEAR,
|
|
908
|
+
exports.EFormatTypes.QUARTER,
|
|
909
|
+
exports.EFormatTypes.QUARTER_YEAR,
|
|
910
|
+
exports.EFormatTypes.DAY_OF_MONTH,
|
|
911
|
+
exports.EFormatTypes.WEEK,
|
|
912
|
+
].includes(dimension.format);
|
|
913
|
+
});
|
|
914
|
+
if (timeDimension) {
|
|
915
|
+
return [{ formula: getDimensionFormula(timeDimension), direction: exports.ESortDirection.ascend }];
|
|
916
|
+
}
|
|
917
|
+
if (measures.length > 0) {
|
|
918
|
+
var firstMeasure = measures[0];
|
|
919
|
+
if (firstMeasure) {
|
|
920
|
+
return [
|
|
921
|
+
{
|
|
922
|
+
direction: exports.ESortDirection.descend,
|
|
923
|
+
formula: getMeasureFormula(firstMeasure),
|
|
924
|
+
},
|
|
925
|
+
];
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
return [];
|
|
929
|
+
};
|
|
930
|
+
function mapSortingToInputs(_a) {
|
|
931
|
+
var _b;
|
|
932
|
+
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;
|
|
933
|
+
var sortOrder = compactMap((_b = settings["sorting"]) !== null && _b !== void 0 ? _b : [], function (_a) {
|
|
934
|
+
var _b;
|
|
935
|
+
var direction = _a.direction, value = _a.value;
|
|
936
|
+
if (value.mode === exports.ESortingValueModes.FORMULA) {
|
|
937
|
+
return value.formula ? { formula: value.formula, direction: direction } : undefined;
|
|
938
|
+
}
|
|
939
|
+
var indicatorsGroup = settings[value.group];
|
|
940
|
+
var indicator = indicatorsGroup === null || indicatorsGroup === void 0 ? void 0 : indicatorsGroup[value.index];
|
|
941
|
+
if (!indicator) {
|
|
942
|
+
return;
|
|
943
|
+
}
|
|
944
|
+
if (getIndicatorType(value.group, indicator) === exports.EWidgetIndicatorType.DIMENSION) {
|
|
945
|
+
var activeDimensions = isDimensionsHierarchy(indicator)
|
|
946
|
+
? selectDimensionFromHierarchy(indicator, filters)
|
|
947
|
+
: indicator;
|
|
948
|
+
var formula = activeDimensions && getDimensionFormula(activeDimensions);
|
|
949
|
+
if (!formula || !checkDisplayCondition(indicator.displayCondition, variables)) {
|
|
950
|
+
return;
|
|
951
|
+
}
|
|
952
|
+
return {
|
|
953
|
+
formula: formula,
|
|
954
|
+
direction: direction,
|
|
955
|
+
displayCondition: ((_b = indicator.displayCondition) === null || _b === void 0 ? void 0 : _b.mode) === exports.EDisplayConditionMode.FORMULA
|
|
956
|
+
? indicator.displayCondition.formula
|
|
957
|
+
: undefined,
|
|
958
|
+
};
|
|
959
|
+
}
|
|
960
|
+
return {
|
|
961
|
+
formula: getMeasureFormula(indicator),
|
|
962
|
+
direction: direction,
|
|
963
|
+
};
|
|
964
|
+
});
|
|
965
|
+
if (sortOrder.length > 0) {
|
|
966
|
+
return sortOrder;
|
|
967
|
+
}
|
|
968
|
+
if (sortableIndicatorsKeys.length === 0 || withDefaultSortOrder === false) {
|
|
969
|
+
return [];
|
|
970
|
+
}
|
|
971
|
+
var dimensions = [];
|
|
972
|
+
var measures = [];
|
|
973
|
+
sortableIndicatorsKeys.forEach(function (key) {
|
|
974
|
+
var indicatorsGroup = settings[key];
|
|
975
|
+
indicatorsGroup === null || indicatorsGroup === void 0 ? void 0 : indicatorsGroup.forEach(function (indicator) {
|
|
976
|
+
if (getIndicatorType(key, indicator) === exports.EWidgetIndicatorType.DIMENSION) {
|
|
977
|
+
var activeDimensions = isDimensionsHierarchy(indicator)
|
|
978
|
+
? selectDimensionFromHierarchy(indicator, filters)
|
|
979
|
+
: indicator;
|
|
980
|
+
activeDimensions && dimensions.push(activeDimensions);
|
|
981
|
+
}
|
|
982
|
+
else {
|
|
983
|
+
measures.push(indicator);
|
|
984
|
+
}
|
|
985
|
+
});
|
|
986
|
+
});
|
|
987
|
+
return getDefaultSortOrder(dimensions, measures);
|
|
896
988
|
}
|
|
897
989
|
|
|
898
990
|
var replaceHierarchiesWithDimensions = function (dimensions, filters) {
|
|
899
991
|
return compactMap(dimensions, function (indicator) {
|
|
900
|
-
if (
|
|
992
|
+
if (isDimensionsHierarchy(indicator)) {
|
|
901
993
|
var selectedDimension = selectDimensionFromHierarchy(indicator, filters);
|
|
902
|
-
return (selectedDimension &&
|
|
903
|
-
replaceDisplayCondition(selectedDimension, indicator.displayCondition));
|
|
994
|
+
return (selectedDimension && replaceDisplayCondition(selectedDimension, indicator.displayCondition));
|
|
904
995
|
}
|
|
905
996
|
return indicator;
|
|
906
997
|
});
|
|
@@ -917,11 +1008,14 @@ function bindContentWithIndicator(outputs, indicator) {
|
|
|
917
1008
|
* Массив объектов, каждый из которых содержит показатель и его контент
|
|
918
1009
|
*/
|
|
919
1010
|
function bindContentsWithIndicators(outputs, indicators) {
|
|
920
|
-
return compactMap(indicators, function (indicator) {
|
|
921
|
-
return bindContentWithIndicator(outputs, indicator);
|
|
922
|
-
});
|
|
1011
|
+
return compactMap(indicators, function (indicator) { return bindContentWithIndicator(outputs, indicator); });
|
|
923
1012
|
}
|
|
924
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,23 +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";
|
|
945
1037
|
EControlType["eventsPicker"] = "eventsPicker";
|
|
1038
|
+
EControlType["size"] = "size";
|
|
946
1039
|
})(exports.EControlType || (exports.EControlType = {}));
|
|
947
1040
|
|
|
948
|
-
exports.
|
|
949
|
-
(function (
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
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 = {}));
|
|
955
1054
|
|
|
956
1055
|
var findFilterByFormula = function (filters, formula) {
|
|
957
1056
|
var _a;
|
|
@@ -1047,17 +1146,59 @@ var getLocalizedText = function (language, locObj, props) {
|
|
|
1047
1146
|
return localization.getLocalized(locObj, props);
|
|
1048
1147
|
};
|
|
1049
1148
|
|
|
1050
|
-
|
|
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", {
|
|
1051
1191
|
enumerable: true,
|
|
1052
1192
|
get: function () { return localization$1.ELanguages; }
|
|
1053
1193
|
});
|
|
1054
|
-
Object.defineProperty(exports,
|
|
1194
|
+
Object.defineProperty(exports, "EFilteringMethodValues", {
|
|
1055
1195
|
enumerable: true,
|
|
1056
1196
|
get: function () { return baseFilter.EFilteringMethodValues; }
|
|
1057
1197
|
});
|
|
1058
1198
|
exports.bindContentWithIndicator = bindContentWithIndicator;
|
|
1059
1199
|
exports.bindContentsWithIndicators = bindContentsWithIndicators;
|
|
1060
1200
|
exports.checkDisplayCondition = checkDisplayCondition;
|
|
1201
|
+
exports.dashboardLinkRegExp = dashboardLinkRegExp;
|
|
1061
1202
|
exports.dimensionTemplateFormulas = dimensionTemplateFormulas;
|
|
1062
1203
|
exports.escapeSpecialCharacters = escapeSpecialCharacters;
|
|
1063
1204
|
exports.eventMeasureTemplateFormulas = eventMeasureTemplateFormulas;
|
|
@@ -1069,9 +1210,13 @@ exports.getDisplayConditionFormula = getDisplayConditionFormula;
|
|
|
1069
1210
|
exports.getEventMeasureFormula = getEventMeasureFormula;
|
|
1070
1211
|
exports.getLocalizedText = getLocalizedText;
|
|
1071
1212
|
exports.getMeasureFormula = getMeasureFormula;
|
|
1213
|
+
exports.getRuleColor = getRuleColor;
|
|
1072
1214
|
exports.getTransitionMeasureFormula = getTransitionMeasureFormula;
|
|
1073
|
-
exports.
|
|
1074
|
-
exports.
|
|
1215
|
+
exports.isDimensionsHierarchy = isDimensionsHierarchy;
|
|
1216
|
+
exports.isExecuteScriptActionValid = isExecuteScriptActionValid;
|
|
1217
|
+
exports.isFormulaFilterValue = isFormulaFilterValue;
|
|
1218
|
+
exports.isValidColor = isValidColor;
|
|
1219
|
+
exports.linkNameRegExp = linkNameRegExp;
|
|
1075
1220
|
exports.mapDimensionsToInputs = mapDimensionsToInputs;
|
|
1076
1221
|
exports.mapEventMeasuresToInputs = mapEventMeasuresToInputs;
|
|
1077
1222
|
exports.mapFormulaFilterToCalculatorInput = mapFormulaFilterToCalculatorInput;
|
|
@@ -1079,14 +1224,16 @@ exports.mapFormulaFiltersToInputs = mapFormulaFiltersToInputs;
|
|
|
1079
1224
|
exports.mapMeasuresToInputs = mapMeasuresToInputs;
|
|
1080
1225
|
exports.mapSortingToInputs = mapSortingToInputs;
|
|
1081
1226
|
exports.mapTransitionMeasuresToInputs = mapTransitionMeasuresToInputs;
|
|
1082
|
-
exports.mapVariablesToInputs = mapVariablesToInputs;
|
|
1083
1227
|
exports.measureTemplateFormulas = measureTemplateFormulas;
|
|
1228
|
+
exports.parseIndicatorLink = parseIndicatorLink;
|
|
1084
1229
|
exports.prepareValuesForSql = prepareValuesForSql;
|
|
1085
1230
|
exports.replaceDisplayCondition = replaceDisplayCondition;
|
|
1086
1231
|
exports.replaceFiltersBySelection = replaceFiltersBySelection;
|
|
1087
1232
|
exports.replaceHierarchiesWithDimensions = replaceHierarchiesWithDimensions;
|
|
1088
1233
|
exports.selectDimensionFromHierarchy = selectDimensionFromHierarchy;
|
|
1089
1234
|
exports.transitionMeasureTemplateFormulas = transitionMeasureTemplateFormulas;
|
|
1235
|
+
exports.unescapeSpecialCharacters = unescapeSpecialCharacters;
|
|
1090
1236
|
exports.updateDefaultModeSelection = updateDefaultModeSelection;
|
|
1091
1237
|
exports.updateMultiModeSelection = updateMultiModeSelection;
|
|
1092
1238
|
exports.updateSingleModeSelection = updateSingleModeSelection;
|
|
1239
|
+
exports.workspaceLinkRegExp = workspaceLinkRegExp;
|