@infomaximum/widget-sdk 6.0.0-view-theme.5 → 6.0.0-view-theme.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/index.d.ts +8296 -828
- package/dist/index.esm.js +1040 -416
- package/dist/index.js +1092 -415
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -65,6 +65,40 @@ exports.EActionButtonsTypes = void 0;
|
|
|
65
65
|
EActionButtonsTypes["SECONDARY"] = "primary-outlined";
|
|
66
66
|
})(exports.EActionButtonsTypes || (exports.EActionButtonsTypes = {}));
|
|
67
67
|
|
|
68
|
+
var id = 1;
|
|
69
|
+
var AutoIdentifiedArrayItemSchema = function (z) {
|
|
70
|
+
return z.object({
|
|
71
|
+
/**
|
|
72
|
+
* Идентификатор, добавляемый системой "на лету" для удобства разработки, не сохраняется на сервер.
|
|
73
|
+
* Гарантируется уникальность id в пределах settings виджета.
|
|
74
|
+
*/
|
|
75
|
+
id: z
|
|
76
|
+
.number()
|
|
77
|
+
.default(-1)
|
|
78
|
+
.transform(function (currentId) { return (currentId === -1 ? id++ : currentId); }),
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
var BaseWidgetSettingsSchema = function (z) {
|
|
82
|
+
return z.object({
|
|
83
|
+
title: z.string().optional(),
|
|
84
|
+
titleSize: z.number().optional(),
|
|
85
|
+
titleColor: ColorSchema(z).optional(),
|
|
86
|
+
titleWeight: z.enum(exports.EFontWeight).optional(),
|
|
87
|
+
stateName: z.string().nullable().optional(),
|
|
88
|
+
showMarkdown: z.boolean().optional(),
|
|
89
|
+
markdownMeasures: z.array(MarkdownMeasureSchema(z)).optional(),
|
|
90
|
+
markdownText: z.string().optional(),
|
|
91
|
+
markdownTextSize: z.number().optional(),
|
|
92
|
+
filters: z.array(SettingsFilterSchema(z)).optional(),
|
|
93
|
+
filterMode: z.enum(exports.EWidgetFilterMode).optional(),
|
|
94
|
+
ignoreFilters: z.boolean().optional(),
|
|
95
|
+
sorting: z.array(WidgetSortingIndicatorSchema(z)).optional(),
|
|
96
|
+
actionButtons: z.array(ActionButtonSchema(z)).optional(),
|
|
97
|
+
paddings: z.union([z.number(), z.string()]).optional(),
|
|
98
|
+
viewTheme: z.boolean().optional(),
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
|
|
68
102
|
exports.ESimpleDataType = void 0;
|
|
69
103
|
(function (ESimpleDataType) {
|
|
70
104
|
ESimpleDataType["OTHER"] = "OTHER";
|
|
@@ -77,285 +111,6 @@ exports.ESimpleDataType = void 0;
|
|
|
77
111
|
ESimpleDataType["BOOLEAN"] = "BOOLEAN";
|
|
78
112
|
})(exports.ESimpleDataType || (exports.ESimpleDataType = {}));
|
|
79
113
|
|
|
80
|
-
var prepareValuesForSql = function (simpleType, values) {
|
|
81
|
-
return simpleType === exports.ESimpleDataType.INTEGER ||
|
|
82
|
-
simpleType === exports.ESimpleDataType.FLOAT ||
|
|
83
|
-
simpleType === exports.ESimpleDataType.BOOLEAN
|
|
84
|
-
? values
|
|
85
|
-
: values.map(function (value) {
|
|
86
|
-
return value === null ? null : "'".concat(escapeSingularQuotes$1(escapeReverseSlash(value)), "'");
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
var escapeReverseSlash = function (formula) {
|
|
90
|
-
return formula.replaceAll(/\\/gm, "\\\\");
|
|
91
|
-
};
|
|
92
|
-
var escapeSingularQuotes$1 = function (formula) {
|
|
93
|
-
return formula.replaceAll("'", "\\'");
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
/******************************************************************************
|
|
97
|
-
Copyright (c) Microsoft Corporation.
|
|
98
|
-
|
|
99
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
100
|
-
purpose with or without fee is hereby granted.
|
|
101
|
-
|
|
102
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
103
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
104
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
105
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
106
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
107
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
108
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
109
|
-
***************************************************************************** */
|
|
110
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
var __assign = function() {
|
|
114
|
-
__assign = Object.assign || function __assign(t) {
|
|
115
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
116
|
-
s = arguments[i];
|
|
117
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
118
|
-
}
|
|
119
|
-
return t;
|
|
120
|
-
};
|
|
121
|
-
return __assign.apply(this, arguments);
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
function __rest(s, e) {
|
|
125
|
-
var t = {};
|
|
126
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
127
|
-
t[p] = s[p];
|
|
128
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
129
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
130
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
131
|
-
t[p[i]] = s[p[i]];
|
|
132
|
-
}
|
|
133
|
-
return t;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function __values(o) {
|
|
137
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
138
|
-
if (m) return m.call(o);
|
|
139
|
-
if (o && typeof o.length === "number") return {
|
|
140
|
-
next: function () {
|
|
141
|
-
if (o && i >= o.length) o = void 0;
|
|
142
|
-
return { value: o && o[i++], done: !o };
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function __read(o, n) {
|
|
149
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
150
|
-
if (!m) return o;
|
|
151
|
-
var i = m.call(o), r, ar = [], e;
|
|
152
|
-
try {
|
|
153
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
154
|
-
}
|
|
155
|
-
catch (error) { e = { error: error }; }
|
|
156
|
-
finally {
|
|
157
|
-
try {
|
|
158
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
159
|
-
}
|
|
160
|
-
finally { if (e) throw e.error; }
|
|
161
|
-
}
|
|
162
|
-
return ar;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
function __makeTemplateObject(cooked, raw) {
|
|
166
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
167
|
-
return cooked;
|
|
168
|
-
}
|
|
169
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
170
|
-
var e = new Error(message);
|
|
171
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
exports.ECalculatorFilterMethods = void 0;
|
|
175
|
-
(function (ECalculatorFilterMethods) {
|
|
176
|
-
ECalculatorFilterMethods["EQUAL_TO"] = "EQUAL_TO";
|
|
177
|
-
ECalculatorFilterMethods["NOT_EQUAL_TO"] = "NOT_EQUAL_TO";
|
|
178
|
-
ECalculatorFilterMethods["GREATER_THAN"] = "GREATER_THAN";
|
|
179
|
-
ECalculatorFilterMethods["LESS_THAN"] = "LESS_THAN";
|
|
180
|
-
ECalculatorFilterMethods["GREATER_THAN_OR_EQUAL_TO"] = "GREATER_THAN_OR_EQUAL_TO";
|
|
181
|
-
ECalculatorFilterMethods["LESS_THAN_OR_EQUAL_TO"] = "LESS_THAN_OR_EQUAL_TO";
|
|
182
|
-
ECalculatorFilterMethods["STARTS_WITH"] = "STARTS_WITH";
|
|
183
|
-
ECalculatorFilterMethods["ENDS_WITH"] = "ENDS_WITH";
|
|
184
|
-
ECalculatorFilterMethods["CONTAINS"] = "CONTAINS";
|
|
185
|
-
ECalculatorFilterMethods["NOT_CONTAINS"] = "NOT_CONTAINS";
|
|
186
|
-
ECalculatorFilterMethods["IN_RANGE"] = "IN_RANGE";
|
|
187
|
-
ECalculatorFilterMethods["NOT_IN_RANGE"] = "NOT_IN_RANGE";
|
|
188
|
-
ECalculatorFilterMethods["INCLUDE"] = "INCLUDE";
|
|
189
|
-
ECalculatorFilterMethods["EXCLUDE"] = "EXCLUDE";
|
|
190
|
-
ECalculatorFilterMethods["NONEMPTY"] = "NONEMPTY";
|
|
191
|
-
ECalculatorFilterMethods["EMPTY"] = "EMPTY";
|
|
192
|
-
})(exports.ECalculatorFilterMethods || (exports.ECalculatorFilterMethods = {}));
|
|
193
|
-
|
|
194
|
-
var formulaFilterMethods = __assign(__assign({}, exports.ECalculatorFilterMethods), { LAST_TIME: "LAST_TIME" });
|
|
195
|
-
exports.EProcessFilterNames = void 0;
|
|
196
|
-
(function (EProcessFilterNames) {
|
|
197
|
-
/** Наличие события */
|
|
198
|
-
EProcessFilterNames["presenceOfEvent"] = "presenceOfEvent";
|
|
199
|
-
/** Количество повторов события */
|
|
200
|
-
EProcessFilterNames["repetitionOfEvent"] = "repetitionOfEvent";
|
|
201
|
-
/** Наличие перехода */
|
|
202
|
-
EProcessFilterNames["presenceOfTransition"] = "presenceOfTransition";
|
|
203
|
-
/** Длительность перехода */
|
|
204
|
-
EProcessFilterNames["durationOfTransition"] = "durationOfTransition";
|
|
205
|
-
})(exports.EProcessFilterNames || (exports.EProcessFilterNames = {}));
|
|
206
|
-
exports.EFormulaFilterFieldKeys = void 0;
|
|
207
|
-
(function (EFormulaFilterFieldKeys) {
|
|
208
|
-
EFormulaFilterFieldKeys["date"] = "date";
|
|
209
|
-
EFormulaFilterFieldKeys["dateRange"] = "dateRange";
|
|
210
|
-
EFormulaFilterFieldKeys["numberRange"] = "numberRange";
|
|
211
|
-
EFormulaFilterFieldKeys["string"] = "string";
|
|
212
|
-
EFormulaFilterFieldKeys["lastTimeValue"] = "lastTimeValue";
|
|
213
|
-
EFormulaFilterFieldKeys["lastTimeUnit"] = "lastTimeUnit";
|
|
214
|
-
EFormulaFilterFieldKeys["durationUnit"] = "durationUnit";
|
|
215
|
-
})(exports.EFormulaFilterFieldKeys || (exports.EFormulaFilterFieldKeys = {}));
|
|
216
|
-
exports.EDimensionProcessFilterTimeUnit = void 0;
|
|
217
|
-
(function (EDimensionProcessFilterTimeUnit) {
|
|
218
|
-
EDimensionProcessFilterTimeUnit["YEARS"] = "YEARS";
|
|
219
|
-
EDimensionProcessFilterTimeUnit["MONTHS"] = "MONTHS";
|
|
220
|
-
EDimensionProcessFilterTimeUnit["HOURS"] = "HOURS";
|
|
221
|
-
EDimensionProcessFilterTimeUnit["DAYS"] = "DAYS";
|
|
222
|
-
EDimensionProcessFilterTimeUnit["MINUTES"] = "MINUTES";
|
|
223
|
-
})(exports.EDimensionProcessFilterTimeUnit || (exports.EDimensionProcessFilterTimeUnit = {}));
|
|
224
|
-
var isFormulaFilterValue = function (value) {
|
|
225
|
-
return "filteringMethod" in value;
|
|
226
|
-
};
|
|
227
|
-
var isDimensionProcessFilter = function (filter) { return "value" in filter && "condition" in filter; };
|
|
228
|
-
|
|
229
|
-
var compact = function (items) { return ((items === null || items === void 0 ? void 0 : items.filter(Boolean)) || []); };
|
|
230
|
-
var compactMap = function (items, f) {
|
|
231
|
-
return compact(items === null || items === void 0 ? void 0 : items.map(f));
|
|
232
|
-
};
|
|
233
|
-
var isNil = function (value) {
|
|
234
|
-
return value === null || value === undefined;
|
|
235
|
-
};
|
|
236
|
-
function memoize(fn) {
|
|
237
|
-
var cache = new Map();
|
|
238
|
-
return function (arg) {
|
|
239
|
-
if (cache.has(arg)) {
|
|
240
|
-
return cache.get(arg);
|
|
241
|
-
}
|
|
242
|
-
var result = fn(arg);
|
|
243
|
-
cache.set(arg, result);
|
|
244
|
-
return result;
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
exports.EClickHouseBaseTypes = void 0;
|
|
249
|
-
(function (EClickHouseBaseTypes) {
|
|
250
|
-
// DATE
|
|
251
|
-
EClickHouseBaseTypes["Date"] = "Date";
|
|
252
|
-
EClickHouseBaseTypes["Date32"] = "Date32";
|
|
253
|
-
// DATETIME
|
|
254
|
-
EClickHouseBaseTypes["DateTime"] = "DateTime";
|
|
255
|
-
EClickHouseBaseTypes["DateTime32"] = "DateTime32";
|
|
256
|
-
// DATETIME64
|
|
257
|
-
EClickHouseBaseTypes["DateTime64"] = "DateTime64";
|
|
258
|
-
// STRING
|
|
259
|
-
EClickHouseBaseTypes["FixedString"] = "FixedString";
|
|
260
|
-
EClickHouseBaseTypes["String"] = "String";
|
|
261
|
-
// FLOAT
|
|
262
|
-
EClickHouseBaseTypes["Decimal"] = "Decimal";
|
|
263
|
-
EClickHouseBaseTypes["Decimal32"] = "Decimal32";
|
|
264
|
-
EClickHouseBaseTypes["Decimal64"] = "Decimal64";
|
|
265
|
-
EClickHouseBaseTypes["Decimal128"] = "Decimal128";
|
|
266
|
-
EClickHouseBaseTypes["Decimal256"] = "Decimal256";
|
|
267
|
-
EClickHouseBaseTypes["Float32"] = "Float32";
|
|
268
|
-
EClickHouseBaseTypes["Float64"] = "Float64";
|
|
269
|
-
// INTEGER
|
|
270
|
-
EClickHouseBaseTypes["Int8"] = "Int8";
|
|
271
|
-
EClickHouseBaseTypes["Int16"] = "Int16";
|
|
272
|
-
EClickHouseBaseTypes["Int32"] = "Int32";
|
|
273
|
-
EClickHouseBaseTypes["Int64"] = "Int64";
|
|
274
|
-
EClickHouseBaseTypes["Int128"] = "Int128";
|
|
275
|
-
EClickHouseBaseTypes["Int256"] = "Int256";
|
|
276
|
-
EClickHouseBaseTypes["UInt8"] = "UInt8";
|
|
277
|
-
EClickHouseBaseTypes["UInt16"] = "UInt16";
|
|
278
|
-
EClickHouseBaseTypes["UInt32"] = "UInt32";
|
|
279
|
-
EClickHouseBaseTypes["UInt64"] = "UInt64";
|
|
280
|
-
EClickHouseBaseTypes["UInt128"] = "UInt128";
|
|
281
|
-
EClickHouseBaseTypes["UInt256"] = "UInt256";
|
|
282
|
-
// BOOLEAN
|
|
283
|
-
EClickHouseBaseTypes["Bool"] = "Bool";
|
|
284
|
-
})(exports.EClickHouseBaseTypes || (exports.EClickHouseBaseTypes = {}));
|
|
285
|
-
var stringTypes = ["String", "FixedString"];
|
|
286
|
-
var parseClickHouseType = memoize(function (type) {
|
|
287
|
-
if (isNil(type)) {
|
|
288
|
-
return {
|
|
289
|
-
simpleBaseType: exports.ESimpleDataType.OTHER,
|
|
290
|
-
dbBaseDataType: undefined,
|
|
291
|
-
containers: [],
|
|
292
|
-
simpleType: exports.ESimpleDataType.OTHER,
|
|
293
|
-
};
|
|
294
|
-
}
|
|
295
|
-
var _a = extractInnerType(type), containers = _a.containers, dbBaseDataType = _a.dbBaseDataType;
|
|
296
|
-
if (!dbBaseDataType) {
|
|
297
|
-
throw new Error("Invalid ClickHouse type: ".concat(type));
|
|
298
|
-
}
|
|
299
|
-
return {
|
|
300
|
-
dbBaseDataType: dbBaseDataType,
|
|
301
|
-
simpleBaseType: simplifyBaseType(dbBaseDataType),
|
|
302
|
-
containers: containers,
|
|
303
|
-
get simpleType() {
|
|
304
|
-
return containers.includes("Array") ? exports.ESimpleDataType.OTHER : this.simpleBaseType;
|
|
305
|
-
},
|
|
306
|
-
};
|
|
307
|
-
});
|
|
308
|
-
/** 'A(B(C))' -> ['A', 'B', 'C'] */
|
|
309
|
-
var splitByBrackets = function (input) { return input.split(/[\(\)]/).filter(Boolean); };
|
|
310
|
-
/**
|
|
311
|
-
* Отделить внутренний тип от оберток.
|
|
312
|
-
* Не поддерживаются обертки Tuple и LowCardinality.
|
|
313
|
-
*/
|
|
314
|
-
var extractInnerType = function (type) {
|
|
315
|
-
var tokens = splitByBrackets(type);
|
|
316
|
-
// Удаление параметров типа.
|
|
317
|
-
if (tokens.length > 0 && isTypeParameters(tokens.at(-1))) {
|
|
318
|
-
tokens.pop();
|
|
319
|
-
}
|
|
320
|
-
var dbBaseDataType = tokens.pop();
|
|
321
|
-
return { containers: tokens, dbBaseDataType: dbBaseDataType };
|
|
322
|
-
};
|
|
323
|
-
var simplifyBaseType = function (dbBaseType) {
|
|
324
|
-
var isSourceTypeStartsWith = function (prefix) { return dbBaseType.startsWith(prefix); };
|
|
325
|
-
if (isSourceTypeStartsWith("Int") || isSourceTypeStartsWith("UInt")) {
|
|
326
|
-
return exports.ESimpleDataType.INTEGER;
|
|
327
|
-
}
|
|
328
|
-
if (isSourceTypeStartsWith("Decimal") || isSourceTypeStartsWith("Float")) {
|
|
329
|
-
return exports.ESimpleDataType.FLOAT;
|
|
330
|
-
}
|
|
331
|
-
if (stringTypes.some(isSourceTypeStartsWith)) {
|
|
332
|
-
return exports.ESimpleDataType.STRING;
|
|
333
|
-
}
|
|
334
|
-
if (isSourceTypeStartsWith("DateTime64")) {
|
|
335
|
-
return exports.ESimpleDataType.DATETIME64;
|
|
336
|
-
}
|
|
337
|
-
if (isSourceTypeStartsWith("DateTime")) {
|
|
338
|
-
return exports.ESimpleDataType.DATETIME;
|
|
339
|
-
}
|
|
340
|
-
if (isSourceTypeStartsWith("Date")) {
|
|
341
|
-
return exports.ESimpleDataType.DATE;
|
|
342
|
-
}
|
|
343
|
-
if (isSourceTypeStartsWith("Bool")) {
|
|
344
|
-
return exports.ESimpleDataType.BOOLEAN;
|
|
345
|
-
}
|
|
346
|
-
return exports.ESimpleDataType.OTHER;
|
|
347
|
-
};
|
|
348
|
-
/**
|
|
349
|
-
* - `3` -> true
|
|
350
|
-
* - `3, 'Europe/Moscow'` -> true
|
|
351
|
-
* - `3, Europe/Moscow` -> false
|
|
352
|
-
*
|
|
353
|
-
* Пример типа с параметрами: `DateTime64(3, 'Europe/Moscow')`
|
|
354
|
-
*/
|
|
355
|
-
var isTypeParameters = function (stringifiedParameters) {
|
|
356
|
-
return stringifiedParameters.split(", ").some(function (p) { return !Number.isNaN(Number(p)) || p.startsWith("'"); });
|
|
357
|
-
};
|
|
358
|
-
|
|
359
114
|
exports.EFormatTypes = void 0;
|
|
360
115
|
(function (EFormatTypes) {
|
|
361
116
|
/** Дата */
|
|
@@ -649,6 +404,942 @@ var formattingConfig = {
|
|
|
649
404
|
},
|
|
650
405
|
};
|
|
651
406
|
|
|
407
|
+
exports.EWidgetIndicatorType = void 0;
|
|
408
|
+
(function (EWidgetIndicatorType) {
|
|
409
|
+
EWidgetIndicatorType["MEASURE"] = "MEASURE";
|
|
410
|
+
EWidgetIndicatorType["EVENT_INDICATOR"] = "EVENT_INDICATOR";
|
|
411
|
+
EWidgetIndicatorType["TRANSITION_INDICATOR"] = "TRANSITION_INDICATOR";
|
|
412
|
+
EWidgetIndicatorType["DIMENSION"] = "DIMENSION";
|
|
413
|
+
EWidgetIndicatorType["SORTING"] = "SORTING";
|
|
414
|
+
})(exports.EWidgetIndicatorType || (exports.EWidgetIndicatorType = {}));
|
|
415
|
+
exports.EOuterAggregation = void 0;
|
|
416
|
+
(function (EOuterAggregation) {
|
|
417
|
+
EOuterAggregation["avg"] = "avg";
|
|
418
|
+
EOuterAggregation["median"] = "median";
|
|
419
|
+
EOuterAggregation["count"] = "count";
|
|
420
|
+
EOuterAggregation["countDistinct"] = "countDistinct";
|
|
421
|
+
EOuterAggregation["min"] = "min";
|
|
422
|
+
EOuterAggregation["max"] = "max";
|
|
423
|
+
EOuterAggregation["sum"] = "sum";
|
|
424
|
+
EOuterAggregation["top"] = "top";
|
|
425
|
+
})(exports.EOuterAggregation || (exports.EOuterAggregation = {}));
|
|
426
|
+
/** Режимы значения показателя (на основе чего генерируется формула) */
|
|
427
|
+
exports.EWidgetIndicatorValueModes = void 0;
|
|
428
|
+
(function (EWidgetIndicatorValueModes) {
|
|
429
|
+
/** Готовая формула (как правило, введенная пользователем через редактор формул) */
|
|
430
|
+
EWidgetIndicatorValueModes["FORMULA"] = "FORMULA";
|
|
431
|
+
/** Шаблон формулы, предоставляемый системой */
|
|
432
|
+
EWidgetIndicatorValueModes["TEMPLATE"] = "TEMPLATE";
|
|
433
|
+
EWidgetIndicatorValueModes["AGGREGATION"] = "AGGREGATION";
|
|
434
|
+
EWidgetIndicatorValueModes["DURATION"] = "DURATION";
|
|
435
|
+
EWidgetIndicatorValueModes["CONVERSION"] = "CONVERSION";
|
|
436
|
+
EWidgetIndicatorValueModes["START_TIME"] = "START_TIME";
|
|
437
|
+
EWidgetIndicatorValueModes["END_TIME"] = "END_TIME";
|
|
438
|
+
})(exports.EWidgetIndicatorValueModes || (exports.EWidgetIndicatorValueModes = {}));
|
|
439
|
+
/** Режимы сортировки (на что ссылается сортировка) */
|
|
440
|
+
exports.ESortingValueModes = void 0;
|
|
441
|
+
(function (ESortingValueModes) {
|
|
442
|
+
/** Сортировка по формуле */
|
|
443
|
+
ESortingValueModes["FORMULA"] = "FORMULA";
|
|
444
|
+
/** Сортировка по показателю(разрезу или мере) виджета */
|
|
445
|
+
ESortingValueModes["IN_WIDGET"] = "IN_WIDGET";
|
|
446
|
+
})(exports.ESortingValueModes || (exports.ESortingValueModes = {}));
|
|
447
|
+
exports.EFormatOrFormattingMode = void 0;
|
|
448
|
+
(function (EFormatOrFormattingMode) {
|
|
449
|
+
EFormatOrFormattingMode["BASE"] = "BASE";
|
|
450
|
+
EFormatOrFormattingMode["TEMPLATE"] = "TEMPLATE";
|
|
451
|
+
})(exports.EFormatOrFormattingMode || (exports.EFormatOrFormattingMode = {}));
|
|
452
|
+
/** Тип показателя */
|
|
453
|
+
exports.EIndicatorType = void 0;
|
|
454
|
+
(function (EIndicatorType) {
|
|
455
|
+
/** Показатели процесса */
|
|
456
|
+
EIndicatorType["PROCESS_MEASURE"] = "PROCESS_MEASURE";
|
|
457
|
+
/** Вводимое значение */
|
|
458
|
+
EIndicatorType["STATIC"] = "STATIC";
|
|
459
|
+
/** Статический список */
|
|
460
|
+
EIndicatorType["STATIC_LIST"] = "STATIC_LIST";
|
|
461
|
+
/** Динамический список */
|
|
462
|
+
EIndicatorType["DYNAMIC_LIST"] = "DYNAMIC_LIST";
|
|
463
|
+
/** Список колонок */
|
|
464
|
+
EIndicatorType["COLUMN_LIST"] = "COLUMN_LIST";
|
|
465
|
+
/** Разрез */
|
|
466
|
+
EIndicatorType["DIMENSION"] = "DIMENSION";
|
|
467
|
+
/** Мера */
|
|
468
|
+
EIndicatorType["MEASURE"] = "MEASURE";
|
|
469
|
+
/** Иерархия */
|
|
470
|
+
EIndicatorType["DYNAMIC_DIMENSION"] = "DYNAMIC_DIMENSION";
|
|
471
|
+
/** Пользовательская сортировка */
|
|
472
|
+
EIndicatorType["USER_SORTING"] = "USER_SORTING";
|
|
473
|
+
})(exports.EIndicatorType || (exports.EIndicatorType = {}));
|
|
474
|
+
/** Обобщенные типы значений переменных */
|
|
475
|
+
exports.ESimpleInputType = void 0;
|
|
476
|
+
(function (ESimpleInputType) {
|
|
477
|
+
/** Число (точность Float64) */
|
|
478
|
+
ESimpleInputType["NUMBER"] = "FLOAT";
|
|
479
|
+
/** Целое число (точность Int64) */
|
|
480
|
+
ESimpleInputType["INTEGER_NUMBER"] = "INTEGER";
|
|
481
|
+
/** Текст */
|
|
482
|
+
ESimpleInputType["TEXT"] = "STRING";
|
|
483
|
+
/** Дата (точность Date) */
|
|
484
|
+
ESimpleInputType["DATE"] = "DATE";
|
|
485
|
+
/** Дата и время (точность DateTime64) */
|
|
486
|
+
ESimpleInputType["DATE_AND_TIME"] = "DATETIME";
|
|
487
|
+
/** Логический тип */
|
|
488
|
+
ESimpleInputType["BOOLEAN"] = "BOOLEAN";
|
|
489
|
+
})(exports.ESimpleInputType || (exports.ESimpleInputType = {}));
|
|
490
|
+
function isDimensionsHierarchy(indicator) {
|
|
491
|
+
return "hierarchyDimensions" in indicator;
|
|
492
|
+
}
|
|
493
|
+
exports.OuterAggregation = void 0;
|
|
494
|
+
(function (OuterAggregation) {
|
|
495
|
+
OuterAggregation["avg"] = "avgIf";
|
|
496
|
+
OuterAggregation["median"] = "medianIf";
|
|
497
|
+
OuterAggregation["count"] = "countIf";
|
|
498
|
+
OuterAggregation["countDistinct"] = "countIfDistinct";
|
|
499
|
+
OuterAggregation["min"] = "minIf";
|
|
500
|
+
OuterAggregation["max"] = "maxIf";
|
|
501
|
+
OuterAggregation["sum"] = "sumIf";
|
|
502
|
+
})(exports.OuterAggregation || (exports.OuterAggregation = {}));
|
|
503
|
+
exports.EDurationTemplateName = void 0;
|
|
504
|
+
(function (EDurationTemplateName) {
|
|
505
|
+
EDurationTemplateName["avg"] = "avg";
|
|
506
|
+
EDurationTemplateName["median"] = "median";
|
|
507
|
+
})(exports.EDurationTemplateName || (exports.EDurationTemplateName = {}));
|
|
508
|
+
exports.EEventAppearances = void 0;
|
|
509
|
+
(function (EEventAppearances) {
|
|
510
|
+
EEventAppearances["FIRST"] = "FIRST";
|
|
511
|
+
EEventAppearances["LAST"] = "LAST";
|
|
512
|
+
})(exports.EEventAppearances || (exports.EEventAppearances = {}));
|
|
513
|
+
|
|
514
|
+
// Типы, используемые в значениях элементов управления.
|
|
515
|
+
exports.EWidgetFilterMode = void 0;
|
|
516
|
+
(function (EWidgetFilterMode) {
|
|
517
|
+
EWidgetFilterMode["DEFAULT"] = "DEFAULT";
|
|
518
|
+
EWidgetFilterMode["SINGLE"] = "SINGLE";
|
|
519
|
+
EWidgetFilterMode["DISABLED"] = "DISABLED";
|
|
520
|
+
})(exports.EWidgetFilterMode || (exports.EWidgetFilterMode = {}));
|
|
521
|
+
exports.EMarkdownDisplayMode = void 0;
|
|
522
|
+
(function (EMarkdownDisplayMode) {
|
|
523
|
+
EMarkdownDisplayMode["NONE"] = "NONE";
|
|
524
|
+
EMarkdownDisplayMode["INDICATOR"] = "INDICATOR";
|
|
525
|
+
})(exports.EMarkdownDisplayMode || (exports.EMarkdownDisplayMode = {}));
|
|
526
|
+
exports.EDisplayConditionMode = void 0;
|
|
527
|
+
(function (EDisplayConditionMode) {
|
|
528
|
+
EDisplayConditionMode["DISABLED"] = "DISABLED";
|
|
529
|
+
EDisplayConditionMode["FORMULA"] = "FORMULA";
|
|
530
|
+
EDisplayConditionMode["VARIABLE"] = "VARIABLE";
|
|
531
|
+
})(exports.EDisplayConditionMode || (exports.EDisplayConditionMode = {}));
|
|
532
|
+
exports.EFontWeight = void 0;
|
|
533
|
+
(function (EFontWeight) {
|
|
534
|
+
EFontWeight["NORMAL"] = "NORMAL";
|
|
535
|
+
EFontWeight["BOLD"] = "BOLD";
|
|
536
|
+
})(exports.EFontWeight || (exports.EFontWeight = {}));
|
|
537
|
+
exports.EHeightMode = void 0;
|
|
538
|
+
(function (EHeightMode) {
|
|
539
|
+
EHeightMode["FIXED"] = "FIXED";
|
|
540
|
+
EHeightMode["PERCENT"] = "PERCENT";
|
|
541
|
+
})(exports.EHeightMode || (exports.EHeightMode = {}));
|
|
542
|
+
|
|
543
|
+
var SortDirectionSchema = function (z) {
|
|
544
|
+
return z.union([z.literal(exports.ESortDirection.ascend), z.literal(exports.ESortDirection.descend)]);
|
|
545
|
+
};
|
|
546
|
+
var WidgetSortingValueSchema = function (z) {
|
|
547
|
+
return z.discriminatedUnion("mode", [
|
|
548
|
+
z.object({
|
|
549
|
+
mode: z.literal(exports.ESortingValueModes.FORMULA),
|
|
550
|
+
formula: z.string(),
|
|
551
|
+
dbDataType: z.string(),
|
|
552
|
+
}),
|
|
553
|
+
z.object({
|
|
554
|
+
mode: z.literal(exports.ESortingValueModes.IN_WIDGET),
|
|
555
|
+
group: z.string(),
|
|
556
|
+
index: z.number(),
|
|
557
|
+
}),
|
|
558
|
+
]);
|
|
559
|
+
};
|
|
560
|
+
|
|
561
|
+
var RangeSchema = function (z) {
|
|
562
|
+
return z.object({
|
|
563
|
+
unit: z.string().optional(),
|
|
564
|
+
min: z.number().optional(),
|
|
565
|
+
max: z.number().optional(),
|
|
566
|
+
});
|
|
567
|
+
};
|
|
568
|
+
var DisplayConditionSchema = function (z) {
|
|
569
|
+
return z.discriminatedUnion("mode", [
|
|
570
|
+
z.object({
|
|
571
|
+
mode: z.literal(exports.EDisplayConditionMode.DISABLED),
|
|
572
|
+
}),
|
|
573
|
+
z.object({
|
|
574
|
+
mode: z.literal(exports.EDisplayConditionMode.FORMULA),
|
|
575
|
+
formula: z.string().nullish(),
|
|
576
|
+
}),
|
|
577
|
+
z.object({
|
|
578
|
+
mode: z.literal(exports.EDisplayConditionMode.VARIABLE),
|
|
579
|
+
variableName: z.string().nullish(),
|
|
580
|
+
variableValue: z.string().nullish(),
|
|
581
|
+
}),
|
|
582
|
+
]);
|
|
583
|
+
};
|
|
584
|
+
|
|
585
|
+
var WidgetIndicatorSchema = function (z) {
|
|
586
|
+
return AutoIdentifiedArrayItemSchema(z).extend({
|
|
587
|
+
name: z.string(),
|
|
588
|
+
});
|
|
589
|
+
};
|
|
590
|
+
var FormatSchema = function (z) {
|
|
591
|
+
return z.object({
|
|
592
|
+
value: z.enum(exports.EFormatTypes).optional(),
|
|
593
|
+
mode: z.enum(exports.EFormatOrFormattingMode).default(exports.EFormatOrFormattingMode.BASE),
|
|
594
|
+
});
|
|
595
|
+
};
|
|
596
|
+
var FormattingSchema = function (z) {
|
|
597
|
+
return z.object({
|
|
598
|
+
value: z.enum(exports.EFormattingPresets).optional(),
|
|
599
|
+
mode: z.enum(exports.EFormatOrFormattingMode),
|
|
600
|
+
});
|
|
601
|
+
};
|
|
602
|
+
var WidgetColumnIndicatorSchema = function (z) {
|
|
603
|
+
return WidgetIndicatorSchema(z).extend({
|
|
604
|
+
dbDataType: z.string().optional(),
|
|
605
|
+
format: FormatSchema(z).optional(),
|
|
606
|
+
formatting: FormattingSchema(z).optional(),
|
|
607
|
+
displayCondition: DisplayConditionSchema(z).optional(),
|
|
608
|
+
onClick: z.array(ActionsOnClickSchema(z)).optional(),
|
|
609
|
+
});
|
|
610
|
+
};
|
|
611
|
+
var ColumnIndicatorValueSchema = function (z) {
|
|
612
|
+
return z.discriminatedUnion("mode", [
|
|
613
|
+
z.object({
|
|
614
|
+
mode: z.literal(exports.EWidgetIndicatorValueModes.FORMULA),
|
|
615
|
+
formula: z.string().optional(),
|
|
616
|
+
}),
|
|
617
|
+
z.object({
|
|
618
|
+
mode: z.literal(exports.EWidgetIndicatorValueModes.TEMPLATE),
|
|
619
|
+
/** Имя шаблонной формулы, использующей колонку таблицы */
|
|
620
|
+
templateName: z.string().optional(),
|
|
621
|
+
/** Имя таблицы */
|
|
622
|
+
tableName: z.string().optional(),
|
|
623
|
+
/** Имя колонки */
|
|
624
|
+
columnName: z.string().optional(),
|
|
625
|
+
}),
|
|
626
|
+
]);
|
|
627
|
+
};
|
|
628
|
+
var WidgetIndicatorAggregationValueSchema = function (z) {
|
|
629
|
+
return z.object({
|
|
630
|
+
mode: z.literal(exports.EWidgetIndicatorValueModes.AGGREGATION),
|
|
631
|
+
templateName: z.string(),
|
|
632
|
+
processKey: z.string().nullable(),
|
|
633
|
+
eventName: z.string().nullable(),
|
|
634
|
+
eventNameFormula: z.string().nullable(),
|
|
635
|
+
anyEvent: z.literal(true).optional(),
|
|
636
|
+
caseCaseIdFormula: z.string().nullable(),
|
|
637
|
+
filters: z.array(ExtendedFormulaFilterValueSchema(z)),
|
|
638
|
+
tableName: z.string().optional(),
|
|
639
|
+
columnName: z.string().optional(),
|
|
640
|
+
eventTimeFormula: z.string().nullable().optional(),
|
|
641
|
+
});
|
|
642
|
+
};
|
|
643
|
+
var WidgetIndicatorTimeValueSchema = function (z) {
|
|
644
|
+
return z.object({
|
|
645
|
+
templateName: z.string(),
|
|
646
|
+
mode: z.union([
|
|
647
|
+
z.literal(exports.EWidgetIndicatorValueModes.START_TIME),
|
|
648
|
+
z.literal(exports.EWidgetIndicatorValueModes.END_TIME),
|
|
649
|
+
]),
|
|
650
|
+
processKey: z.string().nullable(),
|
|
651
|
+
eventName: z.string().nullable(),
|
|
652
|
+
eventTimeFormula: z.string().nullable(),
|
|
653
|
+
caseCaseIdFormula: z.string().nullable(),
|
|
654
|
+
eventNameFormula: z.string().nullable(),
|
|
655
|
+
filters: z.array(ExtendedFormulaFilterValueSchema(z)),
|
|
656
|
+
});
|
|
657
|
+
};
|
|
658
|
+
var WidgetDimensionSchema = function (z) {
|
|
659
|
+
return WidgetColumnIndicatorSchema(z).extend({
|
|
660
|
+
value: z
|
|
661
|
+
.discriminatedUnion("mode", [
|
|
662
|
+
ColumnIndicatorValueSchema(z),
|
|
663
|
+
WidgetIndicatorAggregationValueSchema(z).extend({
|
|
664
|
+
innerTemplateName: z.string().optional(),
|
|
665
|
+
}),
|
|
666
|
+
WidgetIndicatorTimeValueSchema(z),
|
|
667
|
+
])
|
|
668
|
+
.optional(),
|
|
669
|
+
hideEmptyValues: z.boolean(),
|
|
670
|
+
});
|
|
671
|
+
};
|
|
672
|
+
var WidgetDimensionHierarchySchema = function (z, dimensionSchema) {
|
|
673
|
+
return AutoIdentifiedArrayItemSchema(z).extend({
|
|
674
|
+
name: z.string(),
|
|
675
|
+
hierarchyDimensions: z.array(dimensionSchema),
|
|
676
|
+
displayCondition: DisplayConditionSchema(z).optional(),
|
|
677
|
+
});
|
|
678
|
+
};
|
|
679
|
+
var WidgetIndicatorConversionValue = function (z) {
|
|
680
|
+
return z.object({
|
|
681
|
+
mode: z.literal(exports.EWidgetIndicatorValueModes.CONVERSION),
|
|
682
|
+
startEventNameFormula: z.string().nullable(),
|
|
683
|
+
startEventProcessKey: z.string().nullable(),
|
|
684
|
+
startEventName: z.string().nullable(),
|
|
685
|
+
startEventFilters: z.array(ExtendedFormulaFilterValueSchema(z)),
|
|
686
|
+
startEventTimeFormula: z.string().nullable(),
|
|
687
|
+
endEventNameFormula: z.string().nullable(),
|
|
688
|
+
endEventProcessKey: z.string().nullable(),
|
|
689
|
+
endEventName: z.string().nullable(),
|
|
690
|
+
endEventFilters: z.array(ExtendedFormulaFilterValueSchema(z)),
|
|
691
|
+
endCaseCaseIdFormula: z.string().nullable(),
|
|
692
|
+
endEventTimeFormula: z.string().nullable(),
|
|
693
|
+
});
|
|
694
|
+
};
|
|
695
|
+
var WidgetIndicatorDurationValue = function (z) {
|
|
696
|
+
return WidgetIndicatorConversionValue(z).extend({
|
|
697
|
+
mode: z.literal(exports.EWidgetIndicatorValueModes.DURATION),
|
|
698
|
+
templateName: z.string(),
|
|
699
|
+
startEventAppearances: z.enum(exports.EEventAppearances),
|
|
700
|
+
endEventAppearances: z.enum(exports.EEventAppearances),
|
|
701
|
+
});
|
|
702
|
+
};
|
|
703
|
+
var WidgetMeasureSchema = function (z) {
|
|
704
|
+
return WidgetColumnIndicatorSchema(z).extend({
|
|
705
|
+
value: z
|
|
706
|
+
.discriminatedUnion("mode", [
|
|
707
|
+
ColumnIndicatorValueSchema(z),
|
|
708
|
+
WidgetIndicatorAggregationValueSchema(z).extend({
|
|
709
|
+
outerAggregation: z.enum(exports.EOuterAggregation),
|
|
710
|
+
}),
|
|
711
|
+
WidgetIndicatorConversionValue(z),
|
|
712
|
+
WidgetIndicatorDurationValue(z),
|
|
713
|
+
])
|
|
714
|
+
.optional(),
|
|
715
|
+
});
|
|
716
|
+
};
|
|
717
|
+
var MarkdownMeasureSchema = function (z) {
|
|
718
|
+
return WidgetMeasureSchema(z).extend({
|
|
719
|
+
displaySign: z.enum(exports.EMarkdownDisplayMode),
|
|
720
|
+
});
|
|
721
|
+
};
|
|
722
|
+
var WidgetSortingIndicatorSchema = function (z) {
|
|
723
|
+
return WidgetIndicatorSchema(z).extend({
|
|
724
|
+
direction: SortDirectionSchema(z),
|
|
725
|
+
value: WidgetSortingValueSchema(z),
|
|
726
|
+
});
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
var FormulaFilterValueSchema = function (z) {
|
|
730
|
+
var _a;
|
|
731
|
+
return z.object({
|
|
732
|
+
name: z.string().nullish(),
|
|
733
|
+
formula: z.string(),
|
|
734
|
+
sliceIndex: z.number().optional(),
|
|
735
|
+
dbDataType: z.string(),
|
|
736
|
+
format: z.enum(exports.EFormatTypes),
|
|
737
|
+
filteringMethod: z.enum(Object.values(formulaFilterMethods)),
|
|
738
|
+
checkedValues: z.array(z.string().nullable()).optional(),
|
|
739
|
+
formValues: z
|
|
740
|
+
.object((_a = {},
|
|
741
|
+
_a[exports.EFormulaFilterFieldKeys.date] = z.string().nullable(),
|
|
742
|
+
_a[exports.EFormulaFilterFieldKeys.dateRange] = z.tuple([z.string(), z.string()]),
|
|
743
|
+
_a[exports.EFormulaFilterFieldKeys.numberRange] = z.tuple([
|
|
744
|
+
z.number().optional(),
|
|
745
|
+
z.number().optional(),
|
|
746
|
+
]),
|
|
747
|
+
_a[exports.EFormulaFilterFieldKeys.string] = z.string(),
|
|
748
|
+
_a[exports.EFormulaFilterFieldKeys.lastTimeValue] = z.number(),
|
|
749
|
+
_a[exports.EFormulaFilterFieldKeys.lastTimeUnit] = z.enum(exports.ELastTimeUnit),
|
|
750
|
+
_a[exports.EFormulaFilterFieldKeys.durationUnit] = z.enum(exports.EDurationUnit),
|
|
751
|
+
_a))
|
|
752
|
+
.partial()
|
|
753
|
+
.optional(),
|
|
754
|
+
});
|
|
755
|
+
};
|
|
756
|
+
var ExtendedFormulaFilterValueSchema = function (z) {
|
|
757
|
+
return z.union([z.object({ formula: z.string() }), FormulaFilterValueSchema(z)]);
|
|
758
|
+
};
|
|
759
|
+
var DimensionProcessFilterSchema = function (z) {
|
|
760
|
+
return z.object({
|
|
761
|
+
value: z.discriminatedUnion("mode", [
|
|
762
|
+
WidgetIndicatorAggregationValueSchema(z).extend({
|
|
763
|
+
outerAggregation: z.enum(exports.EOuterAggregation),
|
|
764
|
+
}),
|
|
765
|
+
WidgetIndicatorAggregationValueSchema(z).extend({
|
|
766
|
+
innerTemplateName: z.string().optional(),
|
|
767
|
+
}),
|
|
768
|
+
WidgetIndicatorTimeValueSchema(z),
|
|
769
|
+
z.object({
|
|
770
|
+
mode: z.literal(exports.EWidgetIndicatorValueModes.FORMULA),
|
|
771
|
+
formula: z.string().optional(),
|
|
772
|
+
}),
|
|
773
|
+
]),
|
|
774
|
+
dbDataType: z.string(),
|
|
775
|
+
condition: z.object({
|
|
776
|
+
filteringMethod: z.enum(Object.values(formulaFilterMethods)),
|
|
777
|
+
timeUnit: z.enum(exports.EDimensionProcessFilterTimeUnit).optional(),
|
|
778
|
+
values: z.array(z.string().nullable()),
|
|
779
|
+
}),
|
|
780
|
+
});
|
|
781
|
+
};
|
|
782
|
+
var SettingsFilterSchema = function (z) {
|
|
783
|
+
return z.union([ExtendedFormulaFilterValueSchema(z), DimensionProcessFilterSchema(z)]);
|
|
784
|
+
};
|
|
785
|
+
|
|
786
|
+
var ActionOnClickParameterCommonSchema = function (z) {
|
|
787
|
+
return AutoIdentifiedArrayItemSchema(z).extend({
|
|
788
|
+
name: z.string(),
|
|
789
|
+
});
|
|
790
|
+
};
|
|
791
|
+
var ParameterFromColumnSchema = function (z) {
|
|
792
|
+
return z.object({
|
|
793
|
+
inputMethod: z.literal(exports.EWidgetActionInputMethod.COLUMN),
|
|
794
|
+
tableName: z.string(),
|
|
795
|
+
columnName: z.string(),
|
|
796
|
+
dbDataType: z.string().optional(),
|
|
797
|
+
});
|
|
798
|
+
};
|
|
799
|
+
var ParameterFromVariableSchema = function (z) {
|
|
800
|
+
return z.object({
|
|
801
|
+
inputMethod: z.literal(exports.EWidgetActionInputMethod.VARIABLE),
|
|
802
|
+
sourceVariable: z.string(),
|
|
803
|
+
});
|
|
804
|
+
};
|
|
805
|
+
var ParameterFromFormulaSchema = function (z) {
|
|
806
|
+
return z.object({
|
|
807
|
+
inputMethod: z.literal(exports.EWidgetActionInputMethod.FORMULA),
|
|
808
|
+
formula: z.string(),
|
|
809
|
+
considerFilters: z.boolean(),
|
|
810
|
+
dbDataType: z.string().optional(),
|
|
811
|
+
});
|
|
812
|
+
};
|
|
813
|
+
var ParameterFromEventSchema = function (z) {
|
|
814
|
+
return z.object({
|
|
815
|
+
inputMethod: z.literal(exports.EWidgetActionInputMethod.EVENT),
|
|
816
|
+
});
|
|
817
|
+
};
|
|
818
|
+
var ParameterFromStartEventSchema = function (z) {
|
|
819
|
+
return z.object({
|
|
820
|
+
inputMethod: z.literal(exports.EWidgetActionInputMethod.START_EVENT),
|
|
821
|
+
});
|
|
822
|
+
};
|
|
823
|
+
var ParameterFromEndEventSchema = function (z) {
|
|
824
|
+
return z.object({
|
|
825
|
+
inputMethod: z.literal(exports.EWidgetActionInputMethod.FINISH_EVENT),
|
|
826
|
+
});
|
|
827
|
+
};
|
|
828
|
+
var ParameterFromAggregationSchema = function (z) {
|
|
829
|
+
return z.object({
|
|
830
|
+
inputMethod: z.literal(exports.EWidgetActionInputMethod.AGGREGATION),
|
|
831
|
+
formula: z.string(),
|
|
832
|
+
considerFilters: z.boolean(),
|
|
833
|
+
dbDataType: z.string().optional(),
|
|
834
|
+
});
|
|
835
|
+
};
|
|
836
|
+
var ParameterFromManualInputSchema = function (z) {
|
|
837
|
+
return z.object({
|
|
838
|
+
inputMethod: z.literal(exports.EWidgetActionInputMethod.MANUALLY),
|
|
839
|
+
description: z.string(),
|
|
840
|
+
defaultValue: z.string().optional(),
|
|
841
|
+
dbDataType: z.string().optional(),
|
|
842
|
+
filterByRows: z.boolean().optional(),
|
|
843
|
+
validation: z.string().optional(),
|
|
844
|
+
acceptEmptyValue: z.boolean().optional(),
|
|
845
|
+
});
|
|
846
|
+
};
|
|
847
|
+
var ParameterFromStaticListSchema = function (z) {
|
|
848
|
+
return z.object({
|
|
849
|
+
inputMethod: z.literal(exports.EWidgetActionInputMethod.STATIC_LIST),
|
|
850
|
+
options: z.string(),
|
|
851
|
+
defaultValue: z.union([z.string(), z.array(z.string())]),
|
|
852
|
+
acceptEmptyValue: z.boolean().optional(),
|
|
853
|
+
});
|
|
854
|
+
};
|
|
855
|
+
var ParameterFromDynamicListSchema = function (z) {
|
|
856
|
+
return z.object({
|
|
857
|
+
inputMethod: z.literal(exports.EWidgetActionInputMethod.DYNAMIC_LIST),
|
|
858
|
+
options: z.string(),
|
|
859
|
+
defaultValue: z.string(),
|
|
860
|
+
dbDataType: z.string().optional(),
|
|
861
|
+
displayOptions: z.string(),
|
|
862
|
+
filters: z.array(ExtendedFormulaFilterValueSchema(z)),
|
|
863
|
+
filterByRows: z.boolean().optional(),
|
|
864
|
+
considerFilters: z.boolean(),
|
|
865
|
+
insertAnyValues: z.boolean().optional(),
|
|
866
|
+
validation: z.string().optional(),
|
|
867
|
+
acceptEmptyValue: z.boolean().optional(),
|
|
868
|
+
});
|
|
869
|
+
};
|
|
870
|
+
var ParameterFromDataModelBaseSchema = function (z) {
|
|
871
|
+
return z.object({
|
|
872
|
+
inputMethod: z.literal(exports.EWidgetActionInputMethod.DATA_MODEL),
|
|
873
|
+
option: z.enum(exports.EDataModelOption),
|
|
874
|
+
});
|
|
875
|
+
};
|
|
876
|
+
var ParameterColumnListSchema = function (z) {
|
|
877
|
+
return ParameterFromDataModelBaseSchema(z).extend({
|
|
878
|
+
option: z.literal(exports.EDataModelOption.COLUMN_LIST),
|
|
879
|
+
/* Название параметра, содержащего имя таблицы, от которой зависит текущий параметр */
|
|
880
|
+
parent: z.string(),
|
|
881
|
+
});
|
|
882
|
+
};
|
|
883
|
+
var ParameterTableListSchema = function (z) {
|
|
884
|
+
return ParameterFromDataModelBaseSchema(z).extend({
|
|
885
|
+
option: z.literal(exports.EDataModelOption.TABLE_LIST),
|
|
886
|
+
});
|
|
887
|
+
};
|
|
888
|
+
var ParameterFromDataModelSchema = function (z) {
|
|
889
|
+
return z.discriminatedUnion("option", [ParameterColumnListSchema(z), ParameterTableListSchema(z)]);
|
|
890
|
+
};
|
|
891
|
+
var ActionOnClickParameterSchema = function (z) {
|
|
892
|
+
return z.intersection(ActionOnClickParameterCommonSchema(z), z.discriminatedUnion("inputMethod", [
|
|
893
|
+
ParameterFromColumnSchema(z),
|
|
894
|
+
ParameterFromVariableSchema(z),
|
|
895
|
+
ParameterFromFormulaSchema(z),
|
|
896
|
+
ParameterFromEventSchema(z),
|
|
897
|
+
ParameterFromStartEventSchema(z),
|
|
898
|
+
ParameterFromEndEventSchema(z),
|
|
899
|
+
ParameterFromAggregationSchema(z),
|
|
900
|
+
ParameterFromManualInputSchema(z),
|
|
901
|
+
ParameterFromStaticListSchema(z),
|
|
902
|
+
ParameterFromDynamicListSchema(z),
|
|
903
|
+
ParameterFromDataModelSchema(z),
|
|
904
|
+
]));
|
|
905
|
+
};
|
|
906
|
+
var ActionCommonSchema = function (z) {
|
|
907
|
+
return AutoIdentifiedArrayItemSchema(z).extend({
|
|
908
|
+
name: z.string(),
|
|
909
|
+
});
|
|
910
|
+
};
|
|
911
|
+
var ActionGoToURLSchema = function (z) {
|
|
912
|
+
return ActionCommonSchema(z).extend({
|
|
913
|
+
type: z.literal(exports.EActionTypes.OPEN_URL),
|
|
914
|
+
url: z.string(),
|
|
915
|
+
newWindow: z.boolean(),
|
|
916
|
+
});
|
|
917
|
+
};
|
|
918
|
+
var ActivateConditionSchema = function (z) {
|
|
919
|
+
return z.discriminatedUnion("mode", [
|
|
920
|
+
z.object({
|
|
921
|
+
mode: z.literal(exports.EActivateConditionMode.FORMULA),
|
|
922
|
+
formula: z.string(),
|
|
923
|
+
}),
|
|
924
|
+
z.object({
|
|
925
|
+
mode: z.literal(exports.EActivateConditionMode.VARIABLE),
|
|
926
|
+
variableName: z.string(),
|
|
927
|
+
variableValue: z.string(),
|
|
928
|
+
}),
|
|
929
|
+
]);
|
|
930
|
+
};
|
|
931
|
+
var ActionRunScriptSchema = function (z) {
|
|
932
|
+
return ActionCommonSchema(z).extend({
|
|
933
|
+
type: z.literal(exports.EActionTypes.EXECUTE_SCRIPT),
|
|
934
|
+
parameters: z.array(ActionOnClickParameterSchema(z)),
|
|
935
|
+
scriptKey: z.string(),
|
|
936
|
+
autoUpdate: z.enum(exports.EAutoUpdateMode),
|
|
937
|
+
hideInactiveButton: z.boolean().optional(),
|
|
938
|
+
activateCondition: ActivateConditionSchema(z).optional(),
|
|
939
|
+
hint: z.string().optional(),
|
|
940
|
+
});
|
|
941
|
+
};
|
|
942
|
+
var ActionUpdateVariableSchema = function (z) {
|
|
943
|
+
return ActionCommonSchema(z).extend({
|
|
944
|
+
type: z.literal(exports.EActionTypes.UPDATE_VARIABLE),
|
|
945
|
+
variables: z.array(ActionOnClickParameterSchema(z)),
|
|
946
|
+
});
|
|
947
|
+
};
|
|
948
|
+
var ActionOpenInSchema = function (z) {
|
|
949
|
+
return z.discriminatedUnion("openIn", [
|
|
950
|
+
z.object({
|
|
951
|
+
openIn: z.literal(exports.EViewOpenIn.DRAWER_WINDOW),
|
|
952
|
+
alignment: z.enum(exports.EDrawerPlacement),
|
|
953
|
+
}),
|
|
954
|
+
z.object({
|
|
955
|
+
openIn: z.literal(exports.EViewOpenIn.PLACEHOLDER),
|
|
956
|
+
placeholderName: z.string(),
|
|
957
|
+
}),
|
|
958
|
+
z.object({
|
|
959
|
+
openIn: z.literal(exports.EViewOpenIn.MODAL_WINDOW),
|
|
960
|
+
positionByClick: z.boolean().optional(),
|
|
961
|
+
}),
|
|
962
|
+
z.object({
|
|
963
|
+
openIn: z.literal(exports.EViewOpenIn.WINDOW),
|
|
964
|
+
newWindow: z.boolean(),
|
|
965
|
+
}),
|
|
966
|
+
]);
|
|
967
|
+
};
|
|
968
|
+
var ActionOpenViewCommonSchema = function (z) {
|
|
969
|
+
return ActionCommonSchema(z).extend({ type: z.literal(exports.EActionTypes.OPEN_VIEW) });
|
|
970
|
+
};
|
|
971
|
+
var ActionOpenViewSchema = function (z) {
|
|
972
|
+
return z.intersection(z.discriminatedUnion("mode", [
|
|
973
|
+
ActionOpenViewCommonSchema(z).extend({
|
|
974
|
+
mode: z.literal(exports.EViewMode.GENERATED_BY_SCRIPT),
|
|
975
|
+
scriptKey: z.string(),
|
|
976
|
+
parameters: z.array(ActionOnClickParameterSchema(z)),
|
|
977
|
+
displayName: z.string(),
|
|
978
|
+
}),
|
|
979
|
+
ActionOpenViewCommonSchema(z).extend({
|
|
980
|
+
mode: z.literal(exports.EViewMode.EXISTED_VIEW),
|
|
981
|
+
viewKey: z.string(),
|
|
982
|
+
parameters: z.array(ActionOnClickParameterSchema(z)),
|
|
983
|
+
}),
|
|
984
|
+
ActionOpenViewCommonSchema(z).extend({
|
|
985
|
+
mode: z.literal(exports.EViewMode.EMPTY),
|
|
986
|
+
placeholderName: z.string(),
|
|
987
|
+
openIn: z.literal(exports.EViewOpenIn.PLACEHOLDER),
|
|
988
|
+
}),
|
|
989
|
+
]), ActionOpenInSchema(z));
|
|
990
|
+
};
|
|
991
|
+
var ActionsOnClickSchema = function (z) {
|
|
992
|
+
return z.union([
|
|
993
|
+
ActionGoToURLSchema(z),
|
|
994
|
+
ActionRunScriptSchema(z),
|
|
995
|
+
ActionUpdateVariableSchema(z),
|
|
996
|
+
ActionOpenViewSchema(z),
|
|
997
|
+
]);
|
|
998
|
+
};
|
|
999
|
+
var WidgetActionParameterCommonSchema = function (z) {
|
|
1000
|
+
return z.object({
|
|
1001
|
+
name: z.string(),
|
|
1002
|
+
displayName: z.string(),
|
|
1003
|
+
isHidden: z.boolean(),
|
|
1004
|
+
});
|
|
1005
|
+
};
|
|
1006
|
+
var WidgetActionParameterSchema = function (z) {
|
|
1007
|
+
return z.intersection(WidgetActionParameterCommonSchema(z), z.discriminatedUnion("inputMethod", [
|
|
1008
|
+
ParameterFromColumnSchema(z),
|
|
1009
|
+
ParameterFromVariableSchema(z),
|
|
1010
|
+
ParameterFromFormulaSchema(z),
|
|
1011
|
+
ParameterFromManualInputSchema(z),
|
|
1012
|
+
ParameterFromStaticListSchema(z),
|
|
1013
|
+
ParameterFromDynamicListSchema(z),
|
|
1014
|
+
ParameterFromAggregationSchema(z),
|
|
1015
|
+
ParameterFromDataModelSchema(z),
|
|
1016
|
+
]));
|
|
1017
|
+
};
|
|
1018
|
+
var WidgetActionSchema = function (z) {
|
|
1019
|
+
return ActionCommonSchema(z).extend({
|
|
1020
|
+
parameters: z.array(WidgetActionParameterSchema(z)),
|
|
1021
|
+
type: z.literal(exports.EActionTypes.EXECUTE_SCRIPT),
|
|
1022
|
+
scriptKey: z.string(),
|
|
1023
|
+
autoUpdate: z.enum(exports.EAutoUpdateMode),
|
|
1024
|
+
description: z.string(),
|
|
1025
|
+
hideInactiveButton: z.boolean().optional(),
|
|
1026
|
+
hint: z.string().optional(),
|
|
1027
|
+
activateCondition: ActivateConditionSchema(z),
|
|
1028
|
+
});
|
|
1029
|
+
};
|
|
1030
|
+
var ViewActionParameterSchema = function (z) {
|
|
1031
|
+
return z.intersection(AutoIdentifiedArrayItemSchema(z).extend({ name: z.string() }), z.discriminatedUnion("inputMethod", [
|
|
1032
|
+
ParameterFromAggregationSchema(z),
|
|
1033
|
+
ParameterFromVariableSchema(z),
|
|
1034
|
+
]));
|
|
1035
|
+
};
|
|
1036
|
+
var ViewActionSchema = function (z) {
|
|
1037
|
+
return z.object({
|
|
1038
|
+
name: z.string(),
|
|
1039
|
+
buttonType: z.enum(exports.EActionButtonsTypes),
|
|
1040
|
+
type: z.literal(exports.EActionTypes.EXECUTE_SCRIPT),
|
|
1041
|
+
parameters: z.array(ViewActionParameterSchema(z)),
|
|
1042
|
+
scriptKey: z.string(),
|
|
1043
|
+
id: z.number().optional(),
|
|
1044
|
+
autoUpdate: z
|
|
1045
|
+
.union([z.literal(exports.EAutoUpdateMode.NONE), z.literal(exports.EAutoUpdateMode.ALL_VIEWS)])
|
|
1046
|
+
.optional(),
|
|
1047
|
+
});
|
|
1048
|
+
};
|
|
1049
|
+
var ActionSchema = function (z) {
|
|
1050
|
+
return z.union([ActionsOnClickSchema(z), WidgetActionSchema(z), ViewActionSchema(z)]);
|
|
1051
|
+
};
|
|
1052
|
+
var ActionButtonSchema = function (z) {
|
|
1053
|
+
return AutoIdentifiedArrayItemSchema(z).extend({
|
|
1054
|
+
name: z.string(),
|
|
1055
|
+
onClick: z.array(WidgetActionSchema(z)),
|
|
1056
|
+
buttonType: z.enum(exports.EActionButtonsTypes),
|
|
1057
|
+
backgroundColor: ColorSchema(z).optional(),
|
|
1058
|
+
borderColor: ColorSchema(z).optional(),
|
|
1059
|
+
color: ColorSchema(z),
|
|
1060
|
+
hint: z.string().optional(),
|
|
1061
|
+
});
|
|
1062
|
+
};
|
|
1063
|
+
|
|
1064
|
+
var prepareValuesForSql = function (simpleType, values) {
|
|
1065
|
+
return simpleType === exports.ESimpleDataType.INTEGER ||
|
|
1066
|
+
simpleType === exports.ESimpleDataType.FLOAT ||
|
|
1067
|
+
simpleType === exports.ESimpleDataType.BOOLEAN
|
|
1068
|
+
? values
|
|
1069
|
+
: values.map(function (value) {
|
|
1070
|
+
return value === null ? null : "'".concat(escapeSingularQuotes$1(escapeReverseSlash(value)), "'");
|
|
1071
|
+
});
|
|
1072
|
+
};
|
|
1073
|
+
var escapeReverseSlash = function (formula) {
|
|
1074
|
+
return formula.replaceAll(/\\/gm, "\\\\");
|
|
1075
|
+
};
|
|
1076
|
+
var escapeSingularQuotes$1 = function (formula) {
|
|
1077
|
+
return formula.replaceAll("'", "\\'");
|
|
1078
|
+
};
|
|
1079
|
+
|
|
1080
|
+
/******************************************************************************
|
|
1081
|
+
Copyright (c) Microsoft Corporation.
|
|
1082
|
+
|
|
1083
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
1084
|
+
purpose with or without fee is hereby granted.
|
|
1085
|
+
|
|
1086
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1087
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1088
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1089
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1090
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1091
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1092
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
1093
|
+
***************************************************************************** */
|
|
1094
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
1095
|
+
|
|
1096
|
+
|
|
1097
|
+
var __assign = function() {
|
|
1098
|
+
__assign = Object.assign || function __assign(t) {
|
|
1099
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
1100
|
+
s = arguments[i];
|
|
1101
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
1102
|
+
}
|
|
1103
|
+
return t;
|
|
1104
|
+
};
|
|
1105
|
+
return __assign.apply(this, arguments);
|
|
1106
|
+
};
|
|
1107
|
+
|
|
1108
|
+
function __rest(s, e) {
|
|
1109
|
+
var t = {};
|
|
1110
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1111
|
+
t[p] = s[p];
|
|
1112
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1113
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1114
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1115
|
+
t[p[i]] = s[p[i]];
|
|
1116
|
+
}
|
|
1117
|
+
return t;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
function __values(o) {
|
|
1121
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1122
|
+
if (m) return m.call(o);
|
|
1123
|
+
if (o && typeof o.length === "number") return {
|
|
1124
|
+
next: function () {
|
|
1125
|
+
if (o && i >= o.length) o = void 0;
|
|
1126
|
+
return { value: o && o[i++], done: !o };
|
|
1127
|
+
}
|
|
1128
|
+
};
|
|
1129
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
function __read(o, n) {
|
|
1133
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
1134
|
+
if (!m) return o;
|
|
1135
|
+
var i = m.call(o), r, ar = [], e;
|
|
1136
|
+
try {
|
|
1137
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
1138
|
+
}
|
|
1139
|
+
catch (error) { e = { error: error }; }
|
|
1140
|
+
finally {
|
|
1141
|
+
try {
|
|
1142
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
1143
|
+
}
|
|
1144
|
+
finally { if (e) throw e.error; }
|
|
1145
|
+
}
|
|
1146
|
+
return ar;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
function __makeTemplateObject(cooked, raw) {
|
|
1150
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
1151
|
+
return cooked;
|
|
1152
|
+
}
|
|
1153
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
1154
|
+
var e = new Error(message);
|
|
1155
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1156
|
+
};
|
|
1157
|
+
|
|
1158
|
+
exports.ECalculatorFilterMethods = void 0;
|
|
1159
|
+
(function (ECalculatorFilterMethods) {
|
|
1160
|
+
ECalculatorFilterMethods["EQUAL_TO"] = "EQUAL_TO";
|
|
1161
|
+
ECalculatorFilterMethods["NOT_EQUAL_TO"] = "NOT_EQUAL_TO";
|
|
1162
|
+
ECalculatorFilterMethods["GREATER_THAN"] = "GREATER_THAN";
|
|
1163
|
+
ECalculatorFilterMethods["LESS_THAN"] = "LESS_THAN";
|
|
1164
|
+
ECalculatorFilterMethods["GREATER_THAN_OR_EQUAL_TO"] = "GREATER_THAN_OR_EQUAL_TO";
|
|
1165
|
+
ECalculatorFilterMethods["LESS_THAN_OR_EQUAL_TO"] = "LESS_THAN_OR_EQUAL_TO";
|
|
1166
|
+
ECalculatorFilterMethods["STARTS_WITH"] = "STARTS_WITH";
|
|
1167
|
+
ECalculatorFilterMethods["ENDS_WITH"] = "ENDS_WITH";
|
|
1168
|
+
ECalculatorFilterMethods["CONTAINS"] = "CONTAINS";
|
|
1169
|
+
ECalculatorFilterMethods["NOT_CONTAINS"] = "NOT_CONTAINS";
|
|
1170
|
+
ECalculatorFilterMethods["IN_RANGE"] = "IN_RANGE";
|
|
1171
|
+
ECalculatorFilterMethods["NOT_IN_RANGE"] = "NOT_IN_RANGE";
|
|
1172
|
+
ECalculatorFilterMethods["INCLUDE"] = "INCLUDE";
|
|
1173
|
+
ECalculatorFilterMethods["EXCLUDE"] = "EXCLUDE";
|
|
1174
|
+
ECalculatorFilterMethods["NONEMPTY"] = "NONEMPTY";
|
|
1175
|
+
ECalculatorFilterMethods["EMPTY"] = "EMPTY";
|
|
1176
|
+
})(exports.ECalculatorFilterMethods || (exports.ECalculatorFilterMethods = {}));
|
|
1177
|
+
|
|
1178
|
+
var formulaFilterMethods = __assign(__assign({}, exports.ECalculatorFilterMethods), { LAST_TIME: "LAST_TIME" });
|
|
1179
|
+
exports.EProcessFilterNames = void 0;
|
|
1180
|
+
(function (EProcessFilterNames) {
|
|
1181
|
+
/** Наличие события */
|
|
1182
|
+
EProcessFilterNames["presenceOfEvent"] = "presenceOfEvent";
|
|
1183
|
+
/** Количество повторов события */
|
|
1184
|
+
EProcessFilterNames["repetitionOfEvent"] = "repetitionOfEvent";
|
|
1185
|
+
/** Наличие перехода */
|
|
1186
|
+
EProcessFilterNames["presenceOfTransition"] = "presenceOfTransition";
|
|
1187
|
+
/** Длительность перехода */
|
|
1188
|
+
EProcessFilterNames["durationOfTransition"] = "durationOfTransition";
|
|
1189
|
+
})(exports.EProcessFilterNames || (exports.EProcessFilterNames = {}));
|
|
1190
|
+
exports.EFormulaFilterFieldKeys = void 0;
|
|
1191
|
+
(function (EFormulaFilterFieldKeys) {
|
|
1192
|
+
EFormulaFilterFieldKeys["date"] = "date";
|
|
1193
|
+
EFormulaFilterFieldKeys["dateRange"] = "dateRange";
|
|
1194
|
+
EFormulaFilterFieldKeys["numberRange"] = "numberRange";
|
|
1195
|
+
EFormulaFilterFieldKeys["string"] = "string";
|
|
1196
|
+
EFormulaFilterFieldKeys["lastTimeValue"] = "lastTimeValue";
|
|
1197
|
+
EFormulaFilterFieldKeys["lastTimeUnit"] = "lastTimeUnit";
|
|
1198
|
+
EFormulaFilterFieldKeys["durationUnit"] = "durationUnit";
|
|
1199
|
+
})(exports.EFormulaFilterFieldKeys || (exports.EFormulaFilterFieldKeys = {}));
|
|
1200
|
+
exports.EDimensionProcessFilterTimeUnit = void 0;
|
|
1201
|
+
(function (EDimensionProcessFilterTimeUnit) {
|
|
1202
|
+
EDimensionProcessFilterTimeUnit["YEARS"] = "YEARS";
|
|
1203
|
+
EDimensionProcessFilterTimeUnit["MONTHS"] = "MONTHS";
|
|
1204
|
+
EDimensionProcessFilterTimeUnit["HOURS"] = "HOURS";
|
|
1205
|
+
EDimensionProcessFilterTimeUnit["DAYS"] = "DAYS";
|
|
1206
|
+
EDimensionProcessFilterTimeUnit["MINUTES"] = "MINUTES";
|
|
1207
|
+
})(exports.EDimensionProcessFilterTimeUnit || (exports.EDimensionProcessFilterTimeUnit = {}));
|
|
1208
|
+
var isFormulaFilterValue = function (value) {
|
|
1209
|
+
return "filteringMethod" in value;
|
|
1210
|
+
};
|
|
1211
|
+
var isDimensionProcessFilter = function (filter) { return "value" in filter && "condition" in filter; };
|
|
1212
|
+
|
|
1213
|
+
var compact = function (items) { return ((items === null || items === void 0 ? void 0 : items.filter(Boolean)) || []); };
|
|
1214
|
+
var compactMap = function (items, f) {
|
|
1215
|
+
return compact(items === null || items === void 0 ? void 0 : items.map(f));
|
|
1216
|
+
};
|
|
1217
|
+
var isNil = function (value) {
|
|
1218
|
+
return value === null || value === undefined;
|
|
1219
|
+
};
|
|
1220
|
+
function memoize(fn) {
|
|
1221
|
+
var cache = new Map();
|
|
1222
|
+
return function (arg) {
|
|
1223
|
+
if (cache.has(arg)) {
|
|
1224
|
+
return cache.get(arg);
|
|
1225
|
+
}
|
|
1226
|
+
var result = fn(arg);
|
|
1227
|
+
cache.set(arg, result);
|
|
1228
|
+
return result;
|
|
1229
|
+
};
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
exports.EClickHouseBaseTypes = void 0;
|
|
1233
|
+
(function (EClickHouseBaseTypes) {
|
|
1234
|
+
// DATE
|
|
1235
|
+
EClickHouseBaseTypes["Date"] = "Date";
|
|
1236
|
+
EClickHouseBaseTypes["Date32"] = "Date32";
|
|
1237
|
+
// DATETIME
|
|
1238
|
+
EClickHouseBaseTypes["DateTime"] = "DateTime";
|
|
1239
|
+
EClickHouseBaseTypes["DateTime32"] = "DateTime32";
|
|
1240
|
+
// DATETIME64
|
|
1241
|
+
EClickHouseBaseTypes["DateTime64"] = "DateTime64";
|
|
1242
|
+
// STRING
|
|
1243
|
+
EClickHouseBaseTypes["FixedString"] = "FixedString";
|
|
1244
|
+
EClickHouseBaseTypes["String"] = "String";
|
|
1245
|
+
// FLOAT
|
|
1246
|
+
EClickHouseBaseTypes["Decimal"] = "Decimal";
|
|
1247
|
+
EClickHouseBaseTypes["Decimal32"] = "Decimal32";
|
|
1248
|
+
EClickHouseBaseTypes["Decimal64"] = "Decimal64";
|
|
1249
|
+
EClickHouseBaseTypes["Decimal128"] = "Decimal128";
|
|
1250
|
+
EClickHouseBaseTypes["Decimal256"] = "Decimal256";
|
|
1251
|
+
EClickHouseBaseTypes["Float32"] = "Float32";
|
|
1252
|
+
EClickHouseBaseTypes["Float64"] = "Float64";
|
|
1253
|
+
// INTEGER
|
|
1254
|
+
EClickHouseBaseTypes["Int8"] = "Int8";
|
|
1255
|
+
EClickHouseBaseTypes["Int16"] = "Int16";
|
|
1256
|
+
EClickHouseBaseTypes["Int32"] = "Int32";
|
|
1257
|
+
EClickHouseBaseTypes["Int64"] = "Int64";
|
|
1258
|
+
EClickHouseBaseTypes["Int128"] = "Int128";
|
|
1259
|
+
EClickHouseBaseTypes["Int256"] = "Int256";
|
|
1260
|
+
EClickHouseBaseTypes["UInt8"] = "UInt8";
|
|
1261
|
+
EClickHouseBaseTypes["UInt16"] = "UInt16";
|
|
1262
|
+
EClickHouseBaseTypes["UInt32"] = "UInt32";
|
|
1263
|
+
EClickHouseBaseTypes["UInt64"] = "UInt64";
|
|
1264
|
+
EClickHouseBaseTypes["UInt128"] = "UInt128";
|
|
1265
|
+
EClickHouseBaseTypes["UInt256"] = "UInt256";
|
|
1266
|
+
// BOOLEAN
|
|
1267
|
+
EClickHouseBaseTypes["Bool"] = "Bool";
|
|
1268
|
+
})(exports.EClickHouseBaseTypes || (exports.EClickHouseBaseTypes = {}));
|
|
1269
|
+
var stringTypes = ["String", "FixedString"];
|
|
1270
|
+
var parseClickHouseType = memoize(function (type) {
|
|
1271
|
+
if (isNil(type)) {
|
|
1272
|
+
return {
|
|
1273
|
+
simpleBaseType: exports.ESimpleDataType.OTHER,
|
|
1274
|
+
dbBaseDataType: undefined,
|
|
1275
|
+
containers: [],
|
|
1276
|
+
simpleType: exports.ESimpleDataType.OTHER,
|
|
1277
|
+
};
|
|
1278
|
+
}
|
|
1279
|
+
var _a = extractInnerType(type), containers = _a.containers, dbBaseDataType = _a.dbBaseDataType;
|
|
1280
|
+
if (!dbBaseDataType) {
|
|
1281
|
+
throw new Error("Invalid ClickHouse type: ".concat(type));
|
|
1282
|
+
}
|
|
1283
|
+
return {
|
|
1284
|
+
dbBaseDataType: dbBaseDataType,
|
|
1285
|
+
simpleBaseType: simplifyBaseType(dbBaseDataType),
|
|
1286
|
+
containers: containers,
|
|
1287
|
+
get simpleType() {
|
|
1288
|
+
return containers.includes("Array") ? exports.ESimpleDataType.OTHER : this.simpleBaseType;
|
|
1289
|
+
},
|
|
1290
|
+
};
|
|
1291
|
+
});
|
|
1292
|
+
/** 'A(B(C))' -> ['A', 'B', 'C'] */
|
|
1293
|
+
var splitByBrackets = function (input) { return input.split(/[\(\)]/).filter(Boolean); };
|
|
1294
|
+
/**
|
|
1295
|
+
* Отделить внутренний тип от оберток.
|
|
1296
|
+
* Не поддерживаются обертки Tuple и LowCardinality.
|
|
1297
|
+
*/
|
|
1298
|
+
var extractInnerType = function (type) {
|
|
1299
|
+
var tokens = splitByBrackets(type);
|
|
1300
|
+
// Удаление параметров типа.
|
|
1301
|
+
if (tokens.length > 0 && isTypeParameters(tokens.at(-1))) {
|
|
1302
|
+
tokens.pop();
|
|
1303
|
+
}
|
|
1304
|
+
var dbBaseDataType = tokens.pop();
|
|
1305
|
+
return { containers: tokens, dbBaseDataType: dbBaseDataType };
|
|
1306
|
+
};
|
|
1307
|
+
var simplifyBaseType = function (dbBaseType) {
|
|
1308
|
+
var isSourceTypeStartsWith = function (prefix) { return dbBaseType.startsWith(prefix); };
|
|
1309
|
+
if (isSourceTypeStartsWith("Int") || isSourceTypeStartsWith("UInt")) {
|
|
1310
|
+
return exports.ESimpleDataType.INTEGER;
|
|
1311
|
+
}
|
|
1312
|
+
if (isSourceTypeStartsWith("Decimal") || isSourceTypeStartsWith("Float")) {
|
|
1313
|
+
return exports.ESimpleDataType.FLOAT;
|
|
1314
|
+
}
|
|
1315
|
+
if (stringTypes.some(isSourceTypeStartsWith)) {
|
|
1316
|
+
return exports.ESimpleDataType.STRING;
|
|
1317
|
+
}
|
|
1318
|
+
if (isSourceTypeStartsWith("DateTime64")) {
|
|
1319
|
+
return exports.ESimpleDataType.DATETIME64;
|
|
1320
|
+
}
|
|
1321
|
+
if (isSourceTypeStartsWith("DateTime")) {
|
|
1322
|
+
return exports.ESimpleDataType.DATETIME;
|
|
1323
|
+
}
|
|
1324
|
+
if (isSourceTypeStartsWith("Date")) {
|
|
1325
|
+
return exports.ESimpleDataType.DATE;
|
|
1326
|
+
}
|
|
1327
|
+
if (isSourceTypeStartsWith("Bool")) {
|
|
1328
|
+
return exports.ESimpleDataType.BOOLEAN;
|
|
1329
|
+
}
|
|
1330
|
+
return exports.ESimpleDataType.OTHER;
|
|
1331
|
+
};
|
|
1332
|
+
/**
|
|
1333
|
+
* - `3` -> true
|
|
1334
|
+
* - `3, 'Europe/Moscow'` -> true
|
|
1335
|
+
* - `3, Europe/Moscow` -> false
|
|
1336
|
+
*
|
|
1337
|
+
* Пример типа с параметрами: `DateTime64(3, 'Europe/Moscow')`
|
|
1338
|
+
*/
|
|
1339
|
+
var isTypeParameters = function (stringifiedParameters) {
|
|
1340
|
+
return stringifiedParameters.split(", ").some(function (p) { return !Number.isNaN(Number(p)) || p.startsWith("'"); });
|
|
1341
|
+
};
|
|
1342
|
+
|
|
652
1343
|
var _a$5;
|
|
653
1344
|
exports.EDimensionTemplateNames = void 0;
|
|
654
1345
|
(function (EDimensionTemplateNames) {
|
|
@@ -679,113 +1370,6 @@ var dimensionTemplateFormulas = (_a$5 = {},
|
|
|
679
1370
|
_a$5[exports.EDimensionTemplateNames.hour] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toHour({columnFormula}))",
|
|
680
1371
|
_a$5);
|
|
681
1372
|
|
|
682
|
-
exports.EWidgetIndicatorType = void 0;
|
|
683
|
-
(function (EWidgetIndicatorType) {
|
|
684
|
-
EWidgetIndicatorType["MEASURE"] = "MEASURE";
|
|
685
|
-
EWidgetIndicatorType["EVENT_INDICATOR"] = "EVENT_INDICATOR";
|
|
686
|
-
EWidgetIndicatorType["TRANSITION_INDICATOR"] = "TRANSITION_INDICATOR";
|
|
687
|
-
EWidgetIndicatorType["DIMENSION"] = "DIMENSION";
|
|
688
|
-
EWidgetIndicatorType["SORTING"] = "SORTING";
|
|
689
|
-
})(exports.EWidgetIndicatorType || (exports.EWidgetIndicatorType = {}));
|
|
690
|
-
exports.EOuterAggregation = void 0;
|
|
691
|
-
(function (EOuterAggregation) {
|
|
692
|
-
EOuterAggregation["avg"] = "avg";
|
|
693
|
-
EOuterAggregation["median"] = "median";
|
|
694
|
-
EOuterAggregation["count"] = "count";
|
|
695
|
-
EOuterAggregation["countDistinct"] = "countDistinct";
|
|
696
|
-
EOuterAggregation["min"] = "min";
|
|
697
|
-
EOuterAggregation["max"] = "max";
|
|
698
|
-
EOuterAggregation["sum"] = "sum";
|
|
699
|
-
EOuterAggregation["top"] = "top";
|
|
700
|
-
})(exports.EOuterAggregation || (exports.EOuterAggregation = {}));
|
|
701
|
-
/** Режимы значения показателя (на основе чего генерируется формула) */
|
|
702
|
-
exports.EWidgetIndicatorValueModes = void 0;
|
|
703
|
-
(function (EWidgetIndicatorValueModes) {
|
|
704
|
-
/** Готовая формула (как правило, введенная пользователем через редактор формул) */
|
|
705
|
-
EWidgetIndicatorValueModes["FORMULA"] = "FORMULA";
|
|
706
|
-
/** Шаблон формулы, предоставляемый системой */
|
|
707
|
-
EWidgetIndicatorValueModes["TEMPLATE"] = "TEMPLATE";
|
|
708
|
-
EWidgetIndicatorValueModes["AGGREGATION"] = "AGGREGATION";
|
|
709
|
-
EWidgetIndicatorValueModes["DURATION"] = "DURATION";
|
|
710
|
-
EWidgetIndicatorValueModes["CONVERSION"] = "CONVERSION";
|
|
711
|
-
EWidgetIndicatorValueModes["START_TIME"] = "START_TIME";
|
|
712
|
-
EWidgetIndicatorValueModes["END_TIME"] = "END_TIME";
|
|
713
|
-
})(exports.EWidgetIndicatorValueModes || (exports.EWidgetIndicatorValueModes = {}));
|
|
714
|
-
/** Режимы сортировки (на что ссылается сортировка) */
|
|
715
|
-
exports.ESortingValueModes = void 0;
|
|
716
|
-
(function (ESortingValueModes) {
|
|
717
|
-
/** Сортировка по формуле */
|
|
718
|
-
ESortingValueModes["FORMULA"] = "FORMULA";
|
|
719
|
-
/** Сортировка по показателю(разрезу или мере) виджета */
|
|
720
|
-
ESortingValueModes["IN_WIDGET"] = "IN_WIDGET";
|
|
721
|
-
})(exports.ESortingValueModes || (exports.ESortingValueModes = {}));
|
|
722
|
-
exports.EFormatOrFormattingMode = void 0;
|
|
723
|
-
(function (EFormatOrFormattingMode) {
|
|
724
|
-
EFormatOrFormattingMode["BASE"] = "BASE";
|
|
725
|
-
EFormatOrFormattingMode["TEMPLATE"] = "TEMPLATE";
|
|
726
|
-
})(exports.EFormatOrFormattingMode || (exports.EFormatOrFormattingMode = {}));
|
|
727
|
-
/** Тип показателя */
|
|
728
|
-
exports.EIndicatorType = void 0;
|
|
729
|
-
(function (EIndicatorType) {
|
|
730
|
-
/** Показатели процесса */
|
|
731
|
-
EIndicatorType["PROCESS_MEASURE"] = "PROCESS_MEASURE";
|
|
732
|
-
/** Вводимое значение */
|
|
733
|
-
EIndicatorType["STATIC"] = "STATIC";
|
|
734
|
-
/** Статический список */
|
|
735
|
-
EIndicatorType["STATIC_LIST"] = "STATIC_LIST";
|
|
736
|
-
/** Динамический список */
|
|
737
|
-
EIndicatorType["DYNAMIC_LIST"] = "DYNAMIC_LIST";
|
|
738
|
-
/** Список колонок */
|
|
739
|
-
EIndicatorType["COLUMN_LIST"] = "COLUMN_LIST";
|
|
740
|
-
/** Разрез */
|
|
741
|
-
EIndicatorType["DIMENSION"] = "DIMENSION";
|
|
742
|
-
/** Мера */
|
|
743
|
-
EIndicatorType["MEASURE"] = "MEASURE";
|
|
744
|
-
/** Иерархия */
|
|
745
|
-
EIndicatorType["DYNAMIC_DIMENSION"] = "DYNAMIC_DIMENSION";
|
|
746
|
-
/** Пользовательская сортировка */
|
|
747
|
-
EIndicatorType["USER_SORTING"] = "USER_SORTING";
|
|
748
|
-
})(exports.EIndicatorType || (exports.EIndicatorType = {}));
|
|
749
|
-
/** Обобщенные типы значений переменных */
|
|
750
|
-
exports.ESimpleInputType = void 0;
|
|
751
|
-
(function (ESimpleInputType) {
|
|
752
|
-
/** Число (точность Float64) */
|
|
753
|
-
ESimpleInputType["NUMBER"] = "FLOAT";
|
|
754
|
-
/** Целое число (точность Int64) */
|
|
755
|
-
ESimpleInputType["INTEGER_NUMBER"] = "INTEGER";
|
|
756
|
-
/** Текст */
|
|
757
|
-
ESimpleInputType["TEXT"] = "STRING";
|
|
758
|
-
/** Дата (точность Date) */
|
|
759
|
-
ESimpleInputType["DATE"] = "DATE";
|
|
760
|
-
/** Дата и время (точность DateTime64) */
|
|
761
|
-
ESimpleInputType["DATE_AND_TIME"] = "DATETIME";
|
|
762
|
-
/** Логический тип */
|
|
763
|
-
ESimpleInputType["BOOLEAN"] = "BOOLEAN";
|
|
764
|
-
})(exports.ESimpleInputType || (exports.ESimpleInputType = {}));
|
|
765
|
-
function isDimensionsHierarchy(indicator) {
|
|
766
|
-
return "hierarchyDimensions" in indicator;
|
|
767
|
-
}
|
|
768
|
-
exports.OuterAggregation = void 0;
|
|
769
|
-
(function (OuterAggregation) {
|
|
770
|
-
OuterAggregation["avg"] = "avgIf";
|
|
771
|
-
OuterAggregation["median"] = "medianIf";
|
|
772
|
-
OuterAggregation["count"] = "countIf";
|
|
773
|
-
OuterAggregation["countDistinct"] = "countIfDistinct";
|
|
774
|
-
OuterAggregation["min"] = "minIf";
|
|
775
|
-
OuterAggregation["max"] = "maxIf";
|
|
776
|
-
OuterAggregation["sum"] = "sumIf";
|
|
777
|
-
})(exports.OuterAggregation || (exports.OuterAggregation = {}));
|
|
778
|
-
exports.EDurationTemplateName = void 0;
|
|
779
|
-
(function (EDurationTemplateName) {
|
|
780
|
-
EDurationTemplateName["avg"] = "avg";
|
|
781
|
-
EDurationTemplateName["median"] = "median";
|
|
782
|
-
})(exports.EDurationTemplateName || (exports.EDurationTemplateName = {}));
|
|
783
|
-
exports.EEventAppearances = void 0;
|
|
784
|
-
(function (EEventAppearances) {
|
|
785
|
-
EEventAppearances["FIRST"] = "FIRST";
|
|
786
|
-
EEventAppearances["LAST"] = "LAST";
|
|
787
|
-
})(exports.EEventAppearances || (exports.EEventAppearances = {}));
|
|
788
|
-
|
|
789
1373
|
function createAggregationTemplate$1(functionName, options) {
|
|
790
1374
|
return "process(".concat(functionName, "(").concat((options === null || options === void 0 ? void 0 : options.distinct) ? "distinct " : "", "{columnFormula}, {eventNameFormula} ={eventName}{filters}), {caseCaseIdFormula})");
|
|
791
1375
|
}
|
|
@@ -1454,35 +2038,6 @@ function getTransitionMeasureFormula(_a, process) {
|
|
|
1454
2038
|
return "";
|
|
1455
2039
|
}
|
|
1456
2040
|
|
|
1457
|
-
// Типы, используемые в значениях элементов управления.
|
|
1458
|
-
exports.EWidgetFilterMode = void 0;
|
|
1459
|
-
(function (EWidgetFilterMode) {
|
|
1460
|
-
EWidgetFilterMode["DEFAULT"] = "DEFAULT";
|
|
1461
|
-
EWidgetFilterMode["SINGLE"] = "SINGLE";
|
|
1462
|
-
EWidgetFilterMode["DISABLED"] = "DISABLED";
|
|
1463
|
-
})(exports.EWidgetFilterMode || (exports.EWidgetFilterMode = {}));
|
|
1464
|
-
exports.EMarkdownDisplayMode = void 0;
|
|
1465
|
-
(function (EMarkdownDisplayMode) {
|
|
1466
|
-
EMarkdownDisplayMode["NONE"] = "NONE";
|
|
1467
|
-
EMarkdownDisplayMode["INDICATOR"] = "INDICATOR";
|
|
1468
|
-
})(exports.EMarkdownDisplayMode || (exports.EMarkdownDisplayMode = {}));
|
|
1469
|
-
exports.EDisplayConditionMode = void 0;
|
|
1470
|
-
(function (EDisplayConditionMode) {
|
|
1471
|
-
EDisplayConditionMode["DISABLED"] = "DISABLED";
|
|
1472
|
-
EDisplayConditionMode["FORMULA"] = "FORMULA";
|
|
1473
|
-
EDisplayConditionMode["VARIABLE"] = "VARIABLE";
|
|
1474
|
-
})(exports.EDisplayConditionMode || (exports.EDisplayConditionMode = {}));
|
|
1475
|
-
exports.EFontWeight = void 0;
|
|
1476
|
-
(function (EFontWeight) {
|
|
1477
|
-
EFontWeight["NORMAL"] = "NORMAL";
|
|
1478
|
-
EFontWeight["BOLD"] = "BOLD";
|
|
1479
|
-
})(exports.EFontWeight || (exports.EFontWeight = {}));
|
|
1480
|
-
exports.EHeightMode = void 0;
|
|
1481
|
-
(function (EHeightMode) {
|
|
1482
|
-
EHeightMode["FIXED"] = "FIXED";
|
|
1483
|
-
EHeightMode["PERCENT"] = "PERCENT";
|
|
1484
|
-
})(exports.EHeightMode || (exports.EHeightMode = {}));
|
|
1485
|
-
|
|
1486
2041
|
function checkDisplayCondition(displayCondition, variables) {
|
|
1487
2042
|
var _a;
|
|
1488
2043
|
if ((displayCondition === null || displayCondition === void 0 ? void 0 : displayCondition.mode) === exports.EDisplayConditionMode.VARIABLE) {
|
|
@@ -2239,6 +2794,75 @@ var themed = function (scheme, selectThemeValue) {
|
|
|
2239
2794
|
return scheme.meta((_a = {}, _a[themeValueMetaKey] = selectThemeValue, _a));
|
|
2240
2795
|
};
|
|
2241
2796
|
|
|
2797
|
+
var ColorBaseSchema = function (z) {
|
|
2798
|
+
return z.object({
|
|
2799
|
+
mode: z.literal(exports.EColorMode.BASE),
|
|
2800
|
+
value: z.string(),
|
|
2801
|
+
});
|
|
2802
|
+
};
|
|
2803
|
+
var ColorRuleSchema = function (z) {
|
|
2804
|
+
return z.object({
|
|
2805
|
+
mode: z.literal(exports.EColorMode.RULE),
|
|
2806
|
+
formula: z.string(),
|
|
2807
|
+
});
|
|
2808
|
+
};
|
|
2809
|
+
var ColorAutoSchema = function (z) {
|
|
2810
|
+
return z.object({
|
|
2811
|
+
mode: z.literal(exports.EColorMode.AUTO),
|
|
2812
|
+
});
|
|
2813
|
+
};
|
|
2814
|
+
var ColorDisabledSchema = function (z) {
|
|
2815
|
+
return z.object({
|
|
2816
|
+
mode: z.literal(exports.EColorMode.DISABLED),
|
|
2817
|
+
});
|
|
2818
|
+
};
|
|
2819
|
+
var ColorGradientSchema = function (z) {
|
|
2820
|
+
return z.object({
|
|
2821
|
+
mode: z.literal(exports.EColorMode.GRADIENT),
|
|
2822
|
+
startValue: z.string(),
|
|
2823
|
+
endValue: z.string(),
|
|
2824
|
+
classCount: z.number().min(3).max(10).nullish(),
|
|
2825
|
+
});
|
|
2826
|
+
};
|
|
2827
|
+
var ColorFormulaSchema = function (z) {
|
|
2828
|
+
return z.object({
|
|
2829
|
+
mode: z.literal(exports.EColorMode.FORMULA),
|
|
2830
|
+
formula: z.string(),
|
|
2831
|
+
});
|
|
2832
|
+
};
|
|
2833
|
+
var ColorValuesSchema = function (z) {
|
|
2834
|
+
return z.object({
|
|
2835
|
+
mode: z.literal(exports.EColorMode.VALUES),
|
|
2836
|
+
items: z.array(z.object({ value: z.string(), color: z.union([ColorBaseSchema(z), ColorRuleSchema(z)]) })),
|
|
2837
|
+
});
|
|
2838
|
+
};
|
|
2839
|
+
var ColorByDimensionSchema = function (z) {
|
|
2840
|
+
return z.object({
|
|
2841
|
+
mode: z.literal(exports.EColorMode.BY_DIMENSION),
|
|
2842
|
+
/** Имя разреза из области видимости правила отображения */
|
|
2843
|
+
dimensionName: z.string(),
|
|
2844
|
+
items: z.array(z.object({ value: z.string(), color: z.union([ColorBaseSchema(z), ColorRuleSchema(z)]) })),
|
|
2845
|
+
});
|
|
2846
|
+
};
|
|
2847
|
+
var ColoredValueSchema = function (z) {
|
|
2848
|
+
return z.object({
|
|
2849
|
+
value: z.string(),
|
|
2850
|
+
color: z.union([ColorBaseSchema(z), ColorRuleSchema(z)]),
|
|
2851
|
+
});
|
|
2852
|
+
};
|
|
2853
|
+
var ColorSchema = function (z) {
|
|
2854
|
+
return z.discriminatedUnion("mode", [
|
|
2855
|
+
ColorAutoSchema(z),
|
|
2856
|
+
ColorDisabledSchema(z),
|
|
2857
|
+
ColorBaseSchema(z),
|
|
2858
|
+
ColorRuleSchema(z),
|
|
2859
|
+
ColorGradientSchema(z),
|
|
2860
|
+
ColorFormulaSchema(z),
|
|
2861
|
+
ColorValuesSchema(z),
|
|
2862
|
+
ColorByDimensionSchema(z),
|
|
2863
|
+
]);
|
|
2864
|
+
};
|
|
2865
|
+
|
|
2242
2866
|
Object.defineProperty(exports, "ELanguages", {
|
|
2243
2867
|
enumerable: true,
|
|
2244
2868
|
get: function () { return localization$1.ELanguages; }
|
|
@@ -2247,6 +2871,59 @@ Object.defineProperty(exports, "EFilteringMethodValues", {
|
|
|
2247
2871
|
enumerable: true,
|
|
2248
2872
|
get: function () { return baseFilter.EFilteringMethodValues; }
|
|
2249
2873
|
});
|
|
2874
|
+
exports.ActionButtonSchema = ActionButtonSchema;
|
|
2875
|
+
exports.ActionGoToURLSchema = ActionGoToURLSchema;
|
|
2876
|
+
exports.ActionOnClickParameterSchema = ActionOnClickParameterSchema;
|
|
2877
|
+
exports.ActionOpenInSchema = ActionOpenInSchema;
|
|
2878
|
+
exports.ActionOpenViewSchema = ActionOpenViewSchema;
|
|
2879
|
+
exports.ActionRunScriptSchema = ActionRunScriptSchema;
|
|
2880
|
+
exports.ActionSchema = ActionSchema;
|
|
2881
|
+
exports.ActionUpdateVariableSchema = ActionUpdateVariableSchema;
|
|
2882
|
+
exports.ActionsOnClickSchema = ActionsOnClickSchema;
|
|
2883
|
+
exports.AutoIdentifiedArrayItemSchema = AutoIdentifiedArrayItemSchema;
|
|
2884
|
+
exports.BaseWidgetSettingsSchema = BaseWidgetSettingsSchema;
|
|
2885
|
+
exports.ColorAutoSchema = ColorAutoSchema;
|
|
2886
|
+
exports.ColorBaseSchema = ColorBaseSchema;
|
|
2887
|
+
exports.ColorByDimensionSchema = ColorByDimensionSchema;
|
|
2888
|
+
exports.ColorDisabledSchema = ColorDisabledSchema;
|
|
2889
|
+
exports.ColorFormulaSchema = ColorFormulaSchema;
|
|
2890
|
+
exports.ColorGradientSchema = ColorGradientSchema;
|
|
2891
|
+
exports.ColorRuleSchema = ColorRuleSchema;
|
|
2892
|
+
exports.ColorSchema = ColorSchema;
|
|
2893
|
+
exports.ColorValuesSchema = ColorValuesSchema;
|
|
2894
|
+
exports.ColoredValueSchema = ColoredValueSchema;
|
|
2895
|
+
exports.ColumnIndicatorValueSchema = ColumnIndicatorValueSchema;
|
|
2896
|
+
exports.DisplayConditionSchema = DisplayConditionSchema;
|
|
2897
|
+
exports.FormatSchema = FormatSchema;
|
|
2898
|
+
exports.FormattingSchema = FormattingSchema;
|
|
2899
|
+
exports.MarkdownMeasureSchema = MarkdownMeasureSchema;
|
|
2900
|
+
exports.ParameterColumnListSchema = ParameterColumnListSchema;
|
|
2901
|
+
exports.ParameterFromAggregationSchema = ParameterFromAggregationSchema;
|
|
2902
|
+
exports.ParameterFromColumnSchema = ParameterFromColumnSchema;
|
|
2903
|
+
exports.ParameterFromDynamicListSchema = ParameterFromDynamicListSchema;
|
|
2904
|
+
exports.ParameterFromEndEventSchema = ParameterFromEndEventSchema;
|
|
2905
|
+
exports.ParameterFromEventSchema = ParameterFromEventSchema;
|
|
2906
|
+
exports.ParameterFromFormulaSchema = ParameterFromFormulaSchema;
|
|
2907
|
+
exports.ParameterFromManualInputSchema = ParameterFromManualInputSchema;
|
|
2908
|
+
exports.ParameterFromStartEventSchema = ParameterFromStartEventSchema;
|
|
2909
|
+
exports.ParameterFromStaticListSchema = ParameterFromStaticListSchema;
|
|
2910
|
+
exports.ParameterFromVariableSchema = ParameterFromVariableSchema;
|
|
2911
|
+
exports.ParameterTableListSchema = ParameterTableListSchema;
|
|
2912
|
+
exports.RangeSchema = RangeSchema;
|
|
2913
|
+
exports.ViewActionParameterSchema = ViewActionParameterSchema;
|
|
2914
|
+
exports.ViewActionSchema = ViewActionSchema;
|
|
2915
|
+
exports.WidgetActionParameterSchema = WidgetActionParameterSchema;
|
|
2916
|
+
exports.WidgetActionSchema = WidgetActionSchema;
|
|
2917
|
+
exports.WidgetColumnIndicatorSchema = WidgetColumnIndicatorSchema;
|
|
2918
|
+
exports.WidgetDimensionHierarchySchema = WidgetDimensionHierarchySchema;
|
|
2919
|
+
exports.WidgetDimensionSchema = WidgetDimensionSchema;
|
|
2920
|
+
exports.WidgetIndicatorAggregationValueSchema = WidgetIndicatorAggregationValueSchema;
|
|
2921
|
+
exports.WidgetIndicatorConversionValue = WidgetIndicatorConversionValue;
|
|
2922
|
+
exports.WidgetIndicatorDurationValue = WidgetIndicatorDurationValue;
|
|
2923
|
+
exports.WidgetIndicatorSchema = WidgetIndicatorSchema;
|
|
2924
|
+
exports.WidgetIndicatorTimeValueSchema = WidgetIndicatorTimeValueSchema;
|
|
2925
|
+
exports.WidgetMeasureSchema = WidgetMeasureSchema;
|
|
2926
|
+
exports.WidgetSortingIndicatorSchema = WidgetSortingIndicatorSchema;
|
|
2250
2927
|
exports.applyIndexToArrayFormula = applyIndexToArrayFormula;
|
|
2251
2928
|
exports.bindContentWithIndicator = bindContentWithIndicator;
|
|
2252
2929
|
exports.bindContentsWithIndicators = bindContentsWithIndicators;
|