@infomaximum/widget-sdk 6.0.0-2 → 6.0.0-2508.0

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 CHANGED
@@ -73,377 +73,14 @@ interface IExportColumnOrder {
73
73
  exportName: string;
74
74
  }
75
75
 
76
- declare enum EFormatTypes {
77
- /** Дата */
78
- DATE = "DATE",
79
- /** Число */
80
- NUMBER = "NUMBER",
81
- /** Месяц */
82
- MONTH = "MONTH",
83
- /** Дата и время */
84
- DATETIME = "DATETIME",
85
- /** Строка */
86
- STRING = "STRING",
87
- /** День недели */
88
- DAY_OF_WEEK = "DAY_OF_WEEK",
89
- /** Длительность */
90
- DURATION = "DURATION",
91
- /** Час */
92
- HOUR = "HOUR",
93
- /** Месяц и год */
94
- MONTH_YEAR = "MONTH_YEAR",
95
- /** Год */
96
- YEAR = "YEAR",
97
- /** Квартал */
98
- QUARTER = "QUARTER",
99
- /** Квартал и год */
100
- QUARTER_YEAR = "QUARTER_YEAR",
101
- /** День месяца */
102
- DAY_OF_MONTH = "DAY_OF_MONTH",
103
- /** Неделя */
104
- WEEK = "WEEK",
105
- /** Логический */
106
- BOOLEAN = "BOOLEAN",
107
- PERCENT = "PERCENT"
108
- }
109
- declare enum EFormattingPresets {
110
- "AUTO" = "AUTO",
111
- "CUSTOM" = "CUSTOM",
112
- "DD/M/YYYY" = "DD/M/YYYY",
113
- "DD-MM-YYYY" = "DD-MM-YYYY",
114
- "DD-MM-YY" = "DD-MM-YY",
115
- "YYYY-MM-DD" = "YYYY-MM-DD",
116
- "YY-MM-DD" = "YY-MM-DD",
117
- "DD MM YYYY" = "DD MM YYYY",
118
- "DD MMM YYYY" = "DD MMM YYYY",
119
- "DD MMM YY" = "DD MMM YY",
120
- "MM.DD.YYYY" = "MM.DD.YYYY",
121
- "MM.DD.YY" = "MM.DD.YY",
122
- "DD MMMM YYYY" = "DD MMMM YYYY",
123
- "DD MMMM YY" = "DD MMMM YY",
124
- "DD/MM/YYYY" = "DD/MM/YYYY",
125
- "DD/MM/YY" = "DD/MM/YY",
126
- "MM/DD/YYYY" = "MM/DD/YYYY",
127
- "MM/DD/YY" = "MM/DD/YY",
128
- "MMMM DD, YYYY" = "MMMM DD, YYYY",
129
- "MMMM DD, YY" = "MMMM DD, YY",
130
- "DD.MM.YYYY" = "DD.MM.YYYY",
131
- "DD.MM.YY" = "DD.MM.YY",
132
- "MM-DD-YY" = "MM-DD-YY",
133
- "MM-DD-YYYY" = "MM-DD-YYYY",
134
- "DD/M/YYYY HH:mm" = "DD/M/YYYY HH:mm",
135
- "DD/MM/YYYY, HH:mm" = "DD/MM/YYYY, HH:mm",
136
- "DD/MM/YY, HH:mm" = "DD/MM/YY, HH:mm",
137
- "MM/DD/YY, hh:mm a" = "MM/DD/YY, hh:mm a",
138
- "MM/DD/YYYY, hh:mm a" = "MM/DD/YYYY, hh:mm a",
139
- "YYYY-MM-DD HH:mm" = "YYYY-MM-DD HH:mm",
140
- "YY-MM-DD, HH:mm" = "YY-MM-DD, HH:mm",
141
- "YYYY-MM-DD, HH:mm" = "YYYY-MM-DD, HH:mm",
142
- "YYYY-MM-DD HH:mm:ss" = "YYYY-MM-DD HH:mm:ss",
143
- "DD MM YYYY HH:mm" = "DD MM YYYY HH:mm",
144
- "DD MMMM YYYY, HH:mm" = "DD MMMM YYYY, HH:mm",
145
- "DD.MM.YY, HH:mm" = "DD.MM.YY, HH:mm",
146
- "DD.MM.YYYY, HH:mm" = "DD.MM.YYYY, HH:mm",
147
- "MM-DD-YY, hh:mm a" = "MM-DD-YY, hh:mm a",
148
- "MM-DD-YYYY, hh:mm a" = "MM-DD-YYYY, hh:mm a",
149
- "MM.DD.YY, hh:mm a" = "MM.DD.YY, hh:mm a",
150
- "MM.DD.YYYY, hh:mm a" = "MM.DD.YYYY, hh:mm a",
151
- "MM.DD.YYYY hh:mm a" = "MM.DD.YYYY hh:mm a",
152
- "DD MMM YY, HH:mm" = "DD MMM YY, HH:mm",
153
- "DD MMM YYYY, HH:mm" = "DD MMM YYYY, HH:mm",
154
- "MMMM DD, YY, HH:mm" = "MMMM DD, YY, HH:mm",
155
- "MMMM DD, YYYY, HH:mm" = "MMMM DD, YYYY, HH:mm",
156
- "DD MMMM YY, HH:mm" = "DD MMMM YY, HH:mm",
157
- "DD.MM.YYYY, HH:mm:ss" = "DD.MM.YYYY, HH:mm:ss",
158
- "DD.MM.YYYY HH:mm:ss" = "DD.MM.YYYY HH:mm:ss",
159
- "DD/MM/YYYY HH:mm:ss" = "DD/MM/YYYY HH:mm:ss",
160
- "DD" = "DD",
161
- "D" = "D",
162
- "DDDD" = "DDDD",
163
- "MMM" = "MMM",
164
- "MM" = "MM",
165
- "MMMM" = "MMMM",
166
- "k" = "k",
167
- "x" = "x",
168
- "#,##x" = "#,##x",
169
- "#,##x.x" = "#,##x.x",
170
- "#,##x.xx" = "#,##x.xx",
171
- "x[%]" = "x[%]",
172
- "x.x[%]" = "x.x[%]",
173
- "[$]x" = "[$]x",
174
- "zx.xx[%]" = "zx.xx[%]",
175
- "hh:mm:ss" = "hh:mm:ss",
176
- "dd:hh:mm:ss" = "dd:hh:mm:ss",
177
- "d" = "d",
178
- "h" = "h",
179
- "dk" = "dk",
180
- "hk" = "hk",
181
- "dd" = "dd",
182
- "HH" = "HH",
183
- "hh a" = "hh a",
184
- "MMM, YYYY" = "MMM, YYYY",
185
- "MMM, YY" = "MMM, YY",
186
- "MM.YYYY" = "MM.YYYY",
187
- "MM.YY" = "MM.YY",
188
- "MMMM YYYY" = "MMMM YYYY",
189
- "MMMM YY" = "MMMM YY",
190
- "[Q]q" = "[Q]q",
191
- "R" = "R",
192
- "[Q]q[-]YYYY" = "[Q]q[-]YYYY",
193
- "[Q]q[-]YY" = "[Q]q[-]YY",
194
- "R[-]YYYY" = "R[-]YYYY",
195
- "R[-]YY" = "R[-]YY"
196
- }
197
- interface IWidgetFormatting {
198
- getFormattedValue: (value: string, formatType: EFormatTypes, formatting: EFormattingPresets, formatTemplate: TNullable<string>) => string;
199
- }
200
- declare const formattingConfig: {
201
- readonly availableFormatsBySimpleType: {
202
- OTHER: EFormatTypes[];
203
- STRING: EFormatTypes[];
204
- FLOAT: EFormatTypes[];
205
- INTEGER: EFormatTypes[];
206
- DATE: EFormatTypes[];
207
- DATETIME: EFormatTypes[];
208
- DATETIME64: EFormatTypes[];
209
- BOOLEAN: EFormatTypes[];
210
- };
211
- readonly availableFormattingByFormat: {
212
- DATE: EFormattingPresets[];
213
- DATETIME: EFormattingPresets[];
214
- DAY_OF_WEEK: EFormattingPresets[];
215
- MONTH: EFormattingPresets[];
216
- NUMBER: EFormattingPresets[];
217
- DURATION: EFormattingPresets[];
218
- HOUR: EFormattingPresets[];
219
- MONTH_YEAR: EFormattingPresets[];
220
- QUARTER: EFormattingPresets[];
221
- QUARTER_YEAR: EFormattingPresets[];
222
- STRING: never[];
223
- DAY_OF_MONTH: never[];
224
- WEEK: never[];
225
- YEAR: never[];
226
- BOOLEAN: never[];
227
- PERCENT: EFormattingPresets[];
228
- };
229
- };
230
-
231
- declare enum ELastTimeUnit {
232
- DAYS = "DAYS",
233
- MONTHS = "MONTHS",
234
- YEARS = "YEARS"
235
- }
236
- declare enum EDurationUnit {
237
- DAYS = "DAYS",
238
- HOURS = "HOURS",
239
- MINUTES = "MINUTES",
240
- SECONDS = "SECONDS"
241
- }
242
- declare const applyIndexToArrayFormula: (formula: string, index: number) => string;
243
- declare const mapFormulaFilterToCalculatorInput: (filterValue: TExtendedFormulaFilterValue) => TNullable<ICalculatorFilter>;
244
- declare const mapFormulaFiltersToInputs: (filters: TExtendedFormulaFilterValue[]) => ICalculatorFilter[];
245
-
246
- type TSelectivePartial<T, Keys extends keyof T> = Omit<T, Keys> & Partial<Pick<T, Keys>>;
247
- declare const formulaFilterMethods: {
248
- readonly LAST_TIME: "LAST_TIME";
249
- readonly EQUAL_TO: ECalculatorFilterMethods.EQUAL_TO;
250
- readonly NOT_EQUAL_TO: ECalculatorFilterMethods.NOT_EQUAL_TO;
251
- readonly GREATER_THAN: ECalculatorFilterMethods.GREATER_THAN;
252
- readonly LESS_THAN: ECalculatorFilterMethods.LESS_THAN;
253
- readonly GREATER_THAN_OR_EQUAL_TO: ECalculatorFilterMethods.GREATER_THAN_OR_EQUAL_TO;
254
- readonly LESS_THAN_OR_EQUAL_TO: ECalculatorFilterMethods.LESS_THAN_OR_EQUAL_TO;
255
- readonly STARTS_WITH: ECalculatorFilterMethods.STARTS_WITH;
256
- readonly ENDS_WITH: ECalculatorFilterMethods.ENDS_WITH;
257
- readonly CONTAINS: ECalculatorFilterMethods.CONTAINS;
258
- readonly NOT_CONTAINS: ECalculatorFilterMethods.NOT_CONTAINS;
259
- readonly IN_RANGE: ECalculatorFilterMethods.IN_RANGE;
260
- readonly NOT_IN_RANGE: ECalculatorFilterMethods.NOT_IN_RANGE;
261
- readonly INCLUDE: ECalculatorFilterMethods.INCLUDE;
262
- readonly EXCLUDE: ECalculatorFilterMethods.EXCLUDE;
263
- readonly NONEMPTY: ECalculatorFilterMethods.NONEMPTY;
264
- readonly EMPTY: ECalculatorFilterMethods.EMPTY;
265
- };
266
- declare enum EProcessFilterNames {
267
- /** Наличие события */
268
- presenceOfEvent = "presenceOfEvent",
269
- /** Количество повторов события */
270
- repetitionOfEvent = "repetitionOfEvent",
271
- /** Наличие перехода */
272
- presenceOfTransition = "presenceOfTransition",
273
- /** Длительность перехода */
274
- durationOfTransition = "durationOfTransition"
275
- }
276
- interface IProcessFilterValue {
277
- /** @deprecated необходимо передавать посредством IProcessFilterPreviewParams [2502] */
278
- eventsNamesByProcessNameMap?: Map<string, (string | null)[]>;
279
- }
280
- /**
281
- * Параметры, которые влияют на отображаемый контент в окне настройки процессного фильтра,
282
- * но не учитываются при применении фильтра.
283
- */
284
- interface IProcessFilterPreviewParams {
285
- /** @deprecated необходимо использовать eventsNamesByProcessKey */
286
- eventsNamesByProcessName?: Map<string, (string | null)[]>;
287
- /**
288
- * События, доступные при выборе процесса.
289
- * Если параметр не передан, используются все события процесса на основе запроса к вычислителю.
290
- */
291
- eventsNamesByProcessKey?: Map<string, (string | null)[]>;
292
- /** Фильтры событий */
293
- eventFilters?: TExtendedFormulaFilterValue[];
294
- }
295
- interface IProcessEventFilterValue extends IProcessFilterValue {
296
- /** @deprecated необходимо использовать processKey */
297
- processName?: string;
298
- processKey: string;
299
- eventName: string;
300
- }
301
- interface IProcessTransitionFilterValue extends IProcessFilterValue {
302
- /** @deprecated необходимо использовать startEventProcessKey */
303
- startEventProcessName?: string;
304
- startEventProcessKey: string;
305
- startEventName: string;
306
- /** @deprecated необходимо использовать endEventProcessKey */
307
- endEventProcessName?: string;
308
- endEventProcessKey: string;
309
- endEventName: string;
310
- }
311
- interface IClickPosition {
312
- x: number;
313
- y: number;
314
- elementWidth?: number;
315
- elementHeight?: number;
316
- }
317
- interface IPositionConfig extends IClickPosition {
318
- offsetX?: number;
319
- offsetY?: number;
320
- }
321
- interface IAddPresenceOfEventFilter {
322
- (name: EProcessFilterNames.presenceOfEvent, value: IProcessEventFilterValue, positionConfig?: IPositionConfig, previewParams?: IProcessFilterPreviewParams): void;
323
- }
324
- interface IAddRepetitionOfEventFilter {
325
- (name: EProcessFilterNames.repetitionOfEvent, value: IProcessEventFilterValue, positionConfig?: IPositionConfig, previewParams?: IProcessFilterPreviewParams): void;
326
- }
327
- interface IAddPresenceOfTransitionFilter {
328
- (name: EProcessFilterNames.presenceOfTransition, value: IProcessTransitionFilterValue, positionConfig?: IPositionConfig, previewParams?: IProcessFilterPreviewParams): void;
329
- }
330
- interface IAddDurationOfTransitionFilter {
331
- (name: EProcessFilterNames.durationOfTransition, value: IProcessTransitionFilterValue, positionConfig?: IPositionConfig, previewParams?: IProcessFilterPreviewParams): void;
332
- }
333
- declare enum EFormulaFilterFieldKeys {
334
- date = "date",
335
- dateRange = "dateRange",
336
- numberRange = "numberRange",
337
- string = "string",
338
- lastTimeValue = "lastTimeValue",
339
- lastTimeUnit = "lastTimeUnit",
340
- durationUnit = "durationUnit"
341
- }
342
- interface IFormulaFilterValue {
343
- /** Заголовок фильтра */
344
- name: TNullable<string>;
345
- /** Формула */
346
- formula: string;
347
- /**
348
- * Индекс элемента в результате вычисления формулы (если результат - массив).
349
- *
350
- * Используется, когда формула возвращает массив значений, но требуется работать только с одним конкретным элементом.
351
- * Индекс добавляется к вычисляемой формуле, позволяя выбрать нужный элемент из результирующего массива.
352
- *
353
- * **Важно:** Индексация начинается с 1, т.к. используется ClickHouse (1-based).
354
- */
355
- sliceIndex?: number;
356
- /** Тип данных формулы (без учета `sliceIndex`) */
357
- dbDataType: string;
358
- /** Формат */
359
- format: EFormatTypes;
360
- /** Метод фильтрации */
361
- filteringMethod: valueof<typeof formulaFilterMethods>;
362
- /** Выбранные в списке значения в виде моделей */
363
- checkedValues?: (string | null)[];
364
- /** Значения полей формы редактора */
365
- formValues?: Partial<{
366
- [EFormulaFilterFieldKeys.date]: string | null;
367
- [EFormulaFilterFieldKeys.dateRange]: [string, string];
368
- [EFormulaFilterFieldKeys.numberRange]: Partial<[number, number]>;
369
- [EFormulaFilterFieldKeys.string]: string;
370
- [EFormulaFilterFieldKeys.lastTimeValue]: number;
371
- [EFormulaFilterFieldKeys.lastTimeUnit]: ELastTimeUnit;
372
- [EFormulaFilterFieldKeys.durationUnit]: EDurationUnit;
373
- }>;
374
- }
375
- type TExtendedFormulaFilterValue = {
376
- formula: string;
377
- } | IFormulaFilterValue;
378
- interface IStagesFilterItem {
379
- id: number;
380
- /** Название этапа */
381
- name: string;
382
- /** Формула фильтра этапа */
383
- formula: string;
384
- isSelected: boolean;
385
- }
386
- interface IStagesFilterValue {
387
- /** Ключ виджета */
388
- widgetKey: string;
389
- /** Заголовок фильтра */
390
- name: TNullable<string>;
391
- /** Этапы */
392
- stages: IStagesFilterItem[];
393
- }
394
- type TWidgetFilterValue = TExtendedFormulaFilterValue | IStagesFilterValue | IProcessEventFilterValue | IProcessTransitionFilterValue;
395
- interface IWidgetFilter {
396
- /** Значение фильтра */
397
- filterValue: TWidgetFilterValue;
398
- /** Значение фильтра, подготовленное для передачи в вычислитель */
399
- preparedFilterValue: ICalculatorFilter;
400
- /** Информация о возможности менять фильтр из виджета */
401
- isReadonly: boolean;
402
- }
403
- interface IWidgetFiltration {
404
- /** Информация о внешних фильтрах виджета */
405
- filters: IWidgetFilter[];
406
- /**
407
- * Значения внешних фильтров виджета, подготовленные для передачи в вычислитель.
408
- * Использует данные из filters, но предоставлено отдельным полем для удобства разработки.
409
- */
410
- preparedFilterValues: ICalculatorFilter[];
411
- /** Добавить фильтр по формуле */
412
- addFormulaFilter(value: TSelectivePartial<IFormulaFilterValue, "format" | "formValues">): void;
413
- /**
414
- * Удалить фильтр, заданный формулой, из текущего набора фильтров
415
- *
416
- * @param formula Формула фильтра, который необходимо удалить. Должна точно соответствовать
417
- * формуле ранее добавленного фильтра (с учетом регистра и пробелов).
418
- * @param [sliceIndex] Опциональный индекс элемента массива. См. {@link IFormulaFilterValue.sliceIndex}.
419
- *
420
- * @remarks
421
- * - Если фильтр был добавлен без указания индекса, его нужно удалять без указания индекса.
422
- * - Если фильтр был добавлен с индексом, тот же индекс должен быть указан при удалении.
423
- * - Удаление происходит по точному совпадению формулы и индекса (если он был указан).
424
- */
425
- removeFormulaFilter(formula: string, sliceIndex?: number): void;
426
- /** Добавить процессный фильтр */
427
- addProcessFilter(...args: Parameters<IAddPresenceOfEventFilter> | Parameters<IAddRepetitionOfEventFilter> | Parameters<IAddPresenceOfTransitionFilter> | Parameters<IAddDurationOfTransitionFilter>): void;
428
- /** Добавить фильтр по этапам */
429
- addStagesFilter(value: Omit<IStagesFilterValue, "widgetKey">): void;
430
- /** Удалить фильтр по этапам */
431
- removeStagesFilter(widgetKey: string): void;
432
- }
433
- declare const isFormulaFilterValue: (value: TExtendedFormulaFilterValue) => value is IFormulaFilterValue;
434
-
435
76
  declare enum EWidgetFilterMode {
436
77
  DEFAULT = "DEFAULT",
437
78
  SINGLE = "SINGLE",
438
- /** @deprecated Отказ от режима фильтрации "Множественный выбор"*/
439
- MULTI = "MULTI",
440
79
  DISABLED = "DISABLED"
441
80
  }
442
81
  type TWidgetFiltering = {
443
82
  ignore: true;
444
- mode: EWidgetFilterMode.SINGLE
445
- /** @deprecated Отказ от режима фильтрации "Множественный выбор"*/
446
- | EWidgetFilterMode.MULTI;
83
+ mode: EWidgetFilterMode.SINGLE;
447
84
  } | {
448
85
  ignore: false;
449
86
  mode: EWidgetFilterMode;
@@ -473,9 +110,157 @@ interface IRange {
473
110
  min?: number;
474
111
  max?: number;
475
112
  }
476
- declare enum EFontWeight {
477
- NORMAL = "NORMAL",
478
- BOLD = "BOLD"
113
+ declare enum EFontWeight {
114
+ NORMAL = "NORMAL",
115
+ BOLD = "BOLD"
116
+ }
117
+
118
+ interface IWidgetTableColumn {
119
+ /** Имя колонки */
120
+ name: string;
121
+ /** Тип данных колонки */
122
+ dbDataType: string;
123
+ }
124
+ interface IScriptField {
125
+ name: string;
126
+ isRequired: boolean;
127
+ isArray: boolean;
128
+ }
129
+ interface IActionScript {
130
+ key: string;
131
+ name: string;
132
+ fields: IScriptField[];
133
+ }
134
+ interface IWidgetTable {
135
+ /** Имя таблицы */
136
+ name: string;
137
+ /** Колонки таблицы */
138
+ columns: Map<string, IWidgetTableColumn>;
139
+ }
140
+ interface IDisplayRule {
141
+ color: TColor;
142
+ }
143
+ interface IGlobalContext {
144
+ /** Используемый язык системы */
145
+ language: ELanguages;
146
+ /** Имя отчета */
147
+ reportName: string;
148
+ /** Имена образов по их ключу(в текущем отчете) */
149
+ viewNameByKey: Map<string, string>;
150
+ /** Меры уровня отчета */
151
+ reportMeasures: TNullable<Map<string, ICommonMeasures>>;
152
+ /** Меры уровня пространства(из модели данных) */
153
+ workspaceMeasures: TNullable<Map<string, Map<string, ICommonMeasures>>>;
154
+ /** Разрезы уровня отчета */
155
+ reportDimensions: TNullable<Map<string, ICommonDimensions>>;
156
+ /** Разрезы уровня пространства(из модели данных) */
157
+ workspaceDimensions: TNullable<Map<string, Map<string, ICommonDimensions>>>;
158
+ /** Правила отображения уровня */
159
+ reportDisplayRules: Map<string, IDisplayRule>;
160
+ /** Правила отображения уровня пространства(из модели данных) */
161
+ workspaceDisplayRules: Map<string, Map<string, IDisplayRule>>;
162
+ /** Пользовательские переменные уровня отчета */
163
+ variables: Map<string, TWidgetVariable>;
164
+ /** Метод установки значения пользовательской переменной уровня отчета */
165
+ setVariableValue(name: string, value: TWidgetVariable["value"]): TWidgetVariable["value"];
166
+ /** Метод очистки значения пользовательской переменной уровня отчета */
167
+ unsetVariableValue(name: string): TWidgetVariable["value"];
168
+ /** Состояния(название сущности) отчета */
169
+ states: Map<string, ICommonState>;
170
+ /** Процессы из модели данных (по ключу) */
171
+ processByKey: Map<string, IWidgetProcess>;
172
+ /** Имена таблиц из модели данных */
173
+ tables: Set<string>;
174
+ /** Функция для запроса информации о колонках таблицы из модели данных */
175
+ fetchColumnsByTableName(tableName: string): Promise<IWidgetTableColumn[] | undefined>;
176
+ /** Скрипты, доступные для запуска из отчета */
177
+ scripts: Map<string, IActionScript>;
178
+ }
179
+
180
+ declare enum EColorMode {
181
+ /** Окрашивание отключено */
182
+ DISABLED = "DISABLED",
183
+ /** Цвет каждого значения вычисляется по формуле */
184
+ FORMULA = "FORMULA",
185
+ /** Один цвет для всех значений */
186
+ BASE = "BASE",
187
+ /** Окрашивание каждого значения по градиенту относительно минимального и максимального значений */
188
+ GRADIENT = "GRADIENT",
189
+ /** Использовать автоматический цвет: по умолчанию определяется порядковым номером показателя */
190
+ AUTO = "AUTO",
191
+ /** Использовать цвет из правила отображения (в правиле отображения рекурсивно определен цвет) */
192
+ RULE = "RULE",
193
+ /** Задать цвет конкретным значениям разреза */
194
+ VALUES = "VALUES",
195
+ /** Задать цвет конкретным значениям общего разреза. Режим используется только для настроек правила отображения */
196
+ BY_DIMENSION = "BY_DIMENSION"
197
+ }
198
+ type TColorBase = {
199
+ mode: EColorMode.BASE;
200
+ value?: string;
201
+ };
202
+ type TColorRule = {
203
+ mode: EColorMode.RULE;
204
+ formula: string;
205
+ };
206
+ interface IColoredValue {
207
+ value: string;
208
+ color: TColorBase | TColorRule;
209
+ }
210
+ /** Настройка цвета */
211
+ type TColor = {
212
+ mode: EColorMode.FORMULA;
213
+ formula: string;
214
+ } | TColorBase | {
215
+ mode: EColorMode.GRADIENT;
216
+ startValue: string;
217
+ endValue: string;
218
+ classCount?: TNullable<number>;
219
+ } | {
220
+ mode: EColorMode.AUTO;
221
+ } | TColorRule | {
222
+ mode: EColorMode.VALUES;
223
+ items: IColoredValue[];
224
+ } | {
225
+ mode: EColorMode.BY_DIMENSION;
226
+ /** Имя разреза из области видимости правила отображения */
227
+ dimensionName: string;
228
+ items: IColoredValue[];
229
+ } | {
230
+ mode: EColorMode.DISABLED;
231
+ };
232
+ declare const getRuleColor: (ruleFormula: string, globalContext: Pick<IGlobalContext, "reportDisplayRules" | "workspaceDisplayRules">) => TColor | undefined;
233
+ declare const isValidColor: (color: TColor, globalContext: Pick<IGlobalContext, "reportDisplayRules" | "workspaceDisplayRules">) => boolean;
234
+ declare const colors: string[];
235
+ /**
236
+ * Получить цвет по индексу элемента
237
+ * @param index - индекс элемента, которому требуется цвет
238
+ */
239
+ declare const getColorByIndex: (index: number) => string;
240
+
241
+ interface IAutoIdentifiedArrayItem {
242
+ /**
243
+ * Идентификатор, добавляемый системой "на лету" для удобства разработки, не сохраняется на сервер.
244
+ * Гарантируется уникальность id в пределах settings виджета.
245
+ */
246
+ id: number;
247
+ }
248
+ interface IBaseWidgetSettings {
249
+ title?: string;
250
+ titleSize?: number;
251
+ titleColor?: TColor;
252
+ titleWeight?: EFontWeight;
253
+ stateName?: string | null;
254
+ showMarkdown?: boolean;
255
+ markdownMeasures?: IMarkdownMeasure[];
256
+ markdownText?: string;
257
+ markdownTextSize?: number;
258
+ filters?: TExtendedFormulaFilterValue[];
259
+ filterMode?: EWidgetFilterMode;
260
+ ignoreFilters?: boolean;
261
+ sorting?: IWidgetSortingIndicator[];
262
+ actionButtons?: IActionButton[];
263
+ paddings?: number | string;
479
264
  }
480
265
 
481
266
  declare enum ESortDirection {
@@ -536,9 +321,8 @@ type TProcessIndicatorValue = {
536
321
  interface IProcessIndicator extends IWidgetIndicator {
537
322
  value?: TProcessIndicatorValue;
538
323
  dbDataType?: string;
539
- format?: EFormatTypes;
540
- formatting?: EFormattingPresets;
541
- formattingTemplate?: string;
324
+ format?: IWidgetColumnIndicator["format"];
325
+ formatting?: IWidgetColumnIndicator["formatting"];
542
326
  displayCondition?: TDisplayCondition;
543
327
  }
544
328
  interface IProcessEventIndicator extends IProcessIndicator {
@@ -592,12 +376,21 @@ type TColumnIndicatorValue = {
592
376
  /** Имя колонки */
593
377
  columnName?: string;
594
378
  };
379
+ declare enum EFormatOrFormattingMode {
380
+ BASE = "BASE",
381
+ TEMPLATE = "TEMPLATE"
382
+ }
595
383
  /** Общий интерфейс разреза и меры */
596
384
  interface IWidgetColumnIndicator extends IWidgetIndicator {
597
385
  dbDataType?: string;
598
- format?: EFormatTypes;
599
- formatting?: EFormattingPresets;
600
- formattingTemplate?: string;
386
+ format?: {
387
+ value?: EFormatTypes;
388
+ mode: EFormatOrFormattingMode;
389
+ };
390
+ formatting?: {
391
+ value?: EFormattingPresets;
392
+ mode: EFormatOrFormattingMode;
393
+ };
601
394
  displayCondition?: TDisplayCondition;
602
395
  onClick?: TActionsOnClick[];
603
396
  }
@@ -618,7 +411,6 @@ interface IWidgetMeasure extends Omit<IWidgetColumnIndicator, "value"> {
618
411
  }) | TWidgetIndicatorConversionValue | TWidgetIndicatorDurationValue;
619
412
  }
620
413
  interface IMarkdownMeasure extends IWidgetMeasure {
621
- format: EFormatTypes;
622
414
  displaySign: EMarkdownDisplayMode;
623
415
  }
624
416
  /** Тип показателя */
@@ -678,9 +470,6 @@ interface IWidgetStaticListVariable extends IBaseWidgetVariable {
678
470
  type: EIndicatorType.STATIC_LIST;
679
471
  /** Значение */
680
472
  value: string | string[] | null;
681
- /** Элементы статического списка */
682
- /** @deprecated поле будет удалено, необходимо использовать labeledOptions */
683
- options: string[];
684
473
  /** Объект ключ значение для статического списка */
685
474
  labeledOptions: IStaticListLabeledOption[];
686
475
  /** Множественный выбор */
@@ -738,190 +527,387 @@ type TWidgetIndicatorAggregationValue = {
738
527
  columnName?: string;
739
528
  eventTimeFormula?: string | null;
740
529
  };
741
- declare enum EEventAppearances {
742
- FIRST = "FIRST",
743
- LAST = "LAST"
530
+ declare enum EEventAppearances {
531
+ FIRST = "FIRST",
532
+ LAST = "LAST"
533
+ }
534
+ type TWidgetIndicatorConversionValue = {
535
+ mode: EWidgetIndicatorValueModes.CONVERSION;
536
+ startEventNameFormula: string | null;
537
+ startEventProcessKey: string | null;
538
+ startEventName: string | null;
539
+ startEventFilters: TExtendedFormulaFilterValue[];
540
+ startEventTimeFormula: string | null;
541
+ endEventNameFormula: string | null;
542
+ endEventProcessKey: string | null;
543
+ endEventName: string | null;
544
+ endEventFilters: TExtendedFormulaFilterValue[];
545
+ endCaseCaseIdFormula: string | null;
546
+ endEventTimeFormula: string | null;
547
+ };
548
+ type TWidgetIndicatorDurationValue = {
549
+ mode: EWidgetIndicatorValueModes.DURATION;
550
+ templateName: string;
551
+ startEventAppearances: EEventAppearances;
552
+ endEventAppearances: EEventAppearances;
553
+ } & Omit<TWidgetIndicatorConversionValue, "mode">;
554
+ type TWidgetIndicatorTimeValue = {
555
+ templateName: string;
556
+ mode: EWidgetIndicatorValueModes.START_TIME | EWidgetIndicatorValueModes.END_TIME;
557
+ processKey: string;
558
+ eventName: string;
559
+ eventTimeFormula: string;
560
+ caseCaseIdFormula: string;
561
+ eventNameFormula: string;
562
+ filters: TExtendedFormulaFilterValue[];
563
+ };
564
+
565
+ declare enum EFormatTypes {
566
+ /** Дата */
567
+ DATE = "DATE",
568
+ /** Число */
569
+ NUMBER = "NUMBER",
570
+ /** Месяц */
571
+ MONTH = "MONTH",
572
+ /** Дата и время */
573
+ DATETIME = "DATETIME",
574
+ /** Строка */
575
+ STRING = "STRING",
576
+ /** День недели */
577
+ DAY_OF_WEEK = "DAY_OF_WEEK",
578
+ /** Длительность */
579
+ DURATION = "DURATION",
580
+ /** Час */
581
+ HOUR = "HOUR",
582
+ /** Месяц и год */
583
+ MONTH_YEAR = "MONTH_YEAR",
584
+ /** Год */
585
+ YEAR = "YEAR",
586
+ /** Квартал */
587
+ QUARTER = "QUARTER",
588
+ /** Квартал и год */
589
+ QUARTER_YEAR = "QUARTER_YEAR",
590
+ /** День месяца */
591
+ DAY_OF_MONTH = "DAY_OF_MONTH",
592
+ /** Неделя */
593
+ WEEK = "WEEK",
594
+ /** Логический */
595
+ BOOLEAN = "BOOLEAN",
596
+ PERCENT = "PERCENT"
597
+ }
598
+ declare enum EFormattingPresets {
599
+ "AUTO" = "AUTO",
600
+ "CUSTOM" = "CUSTOM",
601
+ "DD/M/YYYY" = "DD/M/YYYY",
602
+ "DD-MM-YYYY" = "DD-MM-YYYY",
603
+ "DD-MM-YY" = "DD-MM-YY",
604
+ "YYYY-MM-DD" = "YYYY-MM-DD",
605
+ "YY-MM-DD" = "YY-MM-DD",
606
+ "DD MM YYYY" = "DD MM YYYY",
607
+ "DD MMM YYYY" = "DD MMM YYYY",
608
+ "DD MMM YY" = "DD MMM YY",
609
+ "MM.DD.YYYY" = "MM.DD.YYYY",
610
+ "MM.DD.YY" = "MM.DD.YY",
611
+ "DD MMMM YYYY" = "DD MMMM YYYY",
612
+ "DD MMMM YY" = "DD MMMM YY",
613
+ "DD/MM/YYYY" = "DD/MM/YYYY",
614
+ "DD/MM/YY" = "DD/MM/YY",
615
+ "MM/DD/YYYY" = "MM/DD/YYYY",
616
+ "MM/DD/YY" = "MM/DD/YY",
617
+ "MMMM DD, YYYY" = "MMMM DD, YYYY",
618
+ "MMMM DD, YY" = "MMMM DD, YY",
619
+ "DD.MM.YYYY" = "DD.MM.YYYY",
620
+ "DD.MM.YY" = "DD.MM.YY",
621
+ "MM-DD-YY" = "MM-DD-YY",
622
+ "MM-DD-YYYY" = "MM-DD-YYYY",
623
+ "DD/M/YYYY HH:mm" = "DD/M/YYYY HH:mm",
624
+ "DD/MM/YYYY, HH:mm" = "DD/MM/YYYY, HH:mm",
625
+ "DD/MM/YY, HH:mm" = "DD/MM/YY, HH:mm",
626
+ "MM/DD/YY, hh:mm a" = "MM/DD/YY, hh:mm a",
627
+ "MM/DD/YYYY, hh:mm a" = "MM/DD/YYYY, hh:mm a",
628
+ "YYYY-MM-DD HH:mm" = "YYYY-MM-DD HH:mm",
629
+ "YY-MM-DD, HH:mm" = "YY-MM-DD, HH:mm",
630
+ "YYYY-MM-DD, HH:mm" = "YYYY-MM-DD, HH:mm",
631
+ "YYYY-MM-DD HH:mm:ss" = "YYYY-MM-DD HH:mm:ss",
632
+ "DD MM YYYY HH:mm" = "DD MM YYYY HH:mm",
633
+ "DD MMMM YYYY, HH:mm" = "DD MMMM YYYY, HH:mm",
634
+ "DD.MM.YY, HH:mm" = "DD.MM.YY, HH:mm",
635
+ "DD.MM.YYYY, HH:mm" = "DD.MM.YYYY, HH:mm",
636
+ "MM-DD-YY, hh:mm a" = "MM-DD-YY, hh:mm a",
637
+ "MM-DD-YYYY, hh:mm a" = "MM-DD-YYYY, hh:mm a",
638
+ "MM.DD.YY, hh:mm a" = "MM.DD.YY, hh:mm a",
639
+ "MM.DD.YYYY, hh:mm a" = "MM.DD.YYYY, hh:mm a",
640
+ "MM.DD.YYYY hh:mm a" = "MM.DD.YYYY hh:mm a",
641
+ "DD MMM YY, HH:mm" = "DD MMM YY, HH:mm",
642
+ "DD MMM YYYY, HH:mm" = "DD MMM YYYY, HH:mm",
643
+ "MMMM DD, YY, HH:mm" = "MMMM DD, YY, HH:mm",
644
+ "MMMM DD, YYYY, HH:mm" = "MMMM DD, YYYY, HH:mm",
645
+ "DD MMMM YY, HH:mm" = "DD MMMM YY, HH:mm",
646
+ "DD.MM.YYYY, HH:mm:ss" = "DD.MM.YYYY, HH:mm:ss",
647
+ "DD.MM.YYYY HH:mm:ss" = "DD.MM.YYYY HH:mm:ss",
648
+ "DD/MM/YYYY HH:mm:ss" = "DD/MM/YYYY HH:mm:ss",
649
+ "DD" = "DD",
650
+ "D" = "D",
651
+ "DDDD" = "DDDD",
652
+ "MMM" = "MMM",
653
+ "MM" = "MM",
654
+ "MMMM" = "MMMM",
655
+ "k" = "k",
656
+ "x" = "x",
657
+ "#,##x" = "#,##x",
658
+ "#,##x.x" = "#,##x.x",
659
+ "#,##x.xx" = "#,##x.xx",
660
+ "x[%]" = "x[%]",
661
+ "x.x[%]" = "x.x[%]",
662
+ "[$]x" = "[$]x",
663
+ "zx.xx[%]" = "zx.xx[%]",
664
+ "hh:mm:ss" = "hh:mm:ss",
665
+ "dd:hh:mm:ss" = "dd:hh:mm:ss",
666
+ "d" = "d",
667
+ "h" = "h",
668
+ "dk" = "dk",
669
+ "hk" = "hk",
670
+ "dd" = "dd",
671
+ "HH" = "HH",
672
+ "hh a" = "hh a",
673
+ "MMM, YYYY" = "MMM, YYYY",
674
+ "MMM, YY" = "MMM, YY",
675
+ "MM.YYYY" = "MM.YYYY",
676
+ "MM.YY" = "MM.YY",
677
+ "MMMM YYYY" = "MMMM YYYY",
678
+ "MMMM YY" = "MMMM YY",
679
+ "[Q]q" = "[Q]q",
680
+ "R" = "R",
681
+ "[Q]q[-]YYYY" = "[Q]q[-]YYYY",
682
+ "[Q]q[-]YY" = "[Q]q[-]YY",
683
+ "R[-]YYYY" = "R[-]YYYY",
684
+ "R[-]YY" = "R[-]YY"
685
+ }
686
+ interface IWidgetFormatting {
687
+ getFormattedValue: (value: string, formatType: EFormatTypes, formatting: IWidgetColumnIndicator["formatting"]) => string;
688
+ }
689
+ declare const formattingConfig: {
690
+ readonly availableFormatsBySimpleType: {
691
+ OTHER: EFormatTypes[];
692
+ STRING: EFormatTypes[];
693
+ FLOAT: EFormatTypes[];
694
+ INTEGER: EFormatTypes[];
695
+ DATE: EFormatTypes[];
696
+ DATETIME: EFormatTypes[];
697
+ DATETIME64: EFormatTypes[];
698
+ BOOLEAN: EFormatTypes[];
699
+ };
700
+ readonly availableFormattingByFormat: {
701
+ DATE: EFormattingPresets[];
702
+ DATETIME: EFormattingPresets[];
703
+ DAY_OF_WEEK: EFormattingPresets[];
704
+ MONTH: EFormattingPresets[];
705
+ NUMBER: EFormattingPresets[];
706
+ DURATION: EFormattingPresets[];
707
+ HOUR: EFormattingPresets[];
708
+ MONTH_YEAR: EFormattingPresets[];
709
+ QUARTER: EFormattingPresets[];
710
+ QUARTER_YEAR: EFormattingPresets[];
711
+ STRING: never[];
712
+ DAY_OF_MONTH: never[];
713
+ WEEK: never[];
714
+ YEAR: never[];
715
+ BOOLEAN: never[];
716
+ PERCENT: EFormattingPresets[];
717
+ };
718
+ };
719
+
720
+ declare enum ELastTimeUnit {
721
+ DAYS = "DAYS",
722
+ MONTHS = "MONTHS",
723
+ YEARS = "YEARS"
724
+ }
725
+ declare enum EDurationUnit {
726
+ DAYS = "DAYS",
727
+ HOURS = "HOURS",
728
+ MINUTES = "MINUTES",
729
+ SECONDS = "SECONDS"
730
+ }
731
+ declare const applyIndexToArrayFormula: (formula: string, index: number) => string;
732
+ declare const mapFormulaFilterToCalculatorInput: (filterValue: TExtendedFormulaFilterValue) => TNullable<ICalculatorFilter>;
733
+ declare const mapFormulaFiltersToInputs: (filters: TExtendedFormulaFilterValue[]) => ICalculatorFilter[];
734
+
735
+ type TSelectivePartial<T, Keys extends keyof T> = Omit<T, Keys> & Partial<Pick<T, Keys>>;
736
+ declare const formulaFilterMethods: {
737
+ readonly LAST_TIME: "LAST_TIME";
738
+ readonly EQUAL_TO: ECalculatorFilterMethods.EQUAL_TO;
739
+ readonly NOT_EQUAL_TO: ECalculatorFilterMethods.NOT_EQUAL_TO;
740
+ readonly GREATER_THAN: ECalculatorFilterMethods.GREATER_THAN;
741
+ readonly LESS_THAN: ECalculatorFilterMethods.LESS_THAN;
742
+ readonly GREATER_THAN_OR_EQUAL_TO: ECalculatorFilterMethods.GREATER_THAN_OR_EQUAL_TO;
743
+ readonly LESS_THAN_OR_EQUAL_TO: ECalculatorFilterMethods.LESS_THAN_OR_EQUAL_TO;
744
+ readonly STARTS_WITH: ECalculatorFilterMethods.STARTS_WITH;
745
+ readonly ENDS_WITH: ECalculatorFilterMethods.ENDS_WITH;
746
+ readonly CONTAINS: ECalculatorFilterMethods.CONTAINS;
747
+ readonly NOT_CONTAINS: ECalculatorFilterMethods.NOT_CONTAINS;
748
+ readonly IN_RANGE: ECalculatorFilterMethods.IN_RANGE;
749
+ readonly NOT_IN_RANGE: ECalculatorFilterMethods.NOT_IN_RANGE;
750
+ readonly INCLUDE: ECalculatorFilterMethods.INCLUDE;
751
+ readonly EXCLUDE: ECalculatorFilterMethods.EXCLUDE;
752
+ readonly NONEMPTY: ECalculatorFilterMethods.NONEMPTY;
753
+ readonly EMPTY: ECalculatorFilterMethods.EMPTY;
754
+ };
755
+ declare enum EProcessFilterNames {
756
+ /** Наличие события */
757
+ presenceOfEvent = "presenceOfEvent",
758
+ /** Количество повторов события */
759
+ repetitionOfEvent = "repetitionOfEvent",
760
+ /** Наличие перехода */
761
+ presenceOfTransition = "presenceOfTransition",
762
+ /** Длительность перехода */
763
+ durationOfTransition = "durationOfTransition"
744
764
  }
745
- type TWidgetIndicatorConversionValue = {
746
- mode: EWidgetIndicatorValueModes.CONVERSION;
747
- startEventNameFormula: string | null;
748
- startEventProcessKey: string | null;
749
- startEventName: string | null;
750
- startEventFilters: TExtendedFormulaFilterValue[];
751
- startEventTimeFormula: string | null;
752
- endEventNameFormula: string | null;
753
- endEventProcessKey: string | null;
754
- endEventName: string | null;
755
- endEventFilters: TExtendedFormulaFilterValue[];
756
- endCaseCaseIdFormula: string | null;
757
- endEventTimeFormula: string | null;
758
- };
759
- type TWidgetIndicatorDurationValue = {
760
- mode: EWidgetIndicatorValueModes.DURATION;
761
- templateName: string;
762
- startEventAppearances: EEventAppearances;
763
- endEventAppearances: EEventAppearances;
764
- } & Omit<TWidgetIndicatorConversionValue, "mode">;
765
- type TWidgetIndicatorTimeValue = {
766
- templateName: string;
767
- mode: EWidgetIndicatorValueModes.START_TIME | EWidgetIndicatorValueModes.END_TIME;
765
+ /**
766
+ * Параметры, которые влияют на отображаемый контент в окне настройки процессного фильтра,
767
+ * но не учитываются при применении фильтра.
768
+ */
769
+ interface IProcessFilterPreviewParams {
770
+ /**
771
+ * События, доступные при выборе процесса.
772
+ * Если параметр не передан, используются все события процесса на основе запроса к вычислителю.
773
+ */
774
+ eventsNamesByProcessKey?: Map<string, (string | null)[]>;
775
+ /** Фильтры событий */
776
+ eventFilters?: TExtendedFormulaFilterValue[];
777
+ }
778
+ interface IProcessEventFilterValue {
768
779
  processKey: string;
769
780
  eventName: string;
770
- eventTimeFormula: string;
771
- caseCaseIdFormula: string;
772
- eventNameFormula: string;
773
- filters: TExtendedFormulaFilterValue[];
774
- };
775
-
776
- interface IWidgetTableColumn {
777
- /** Имя колонки */
778
- name: string;
779
- /** Тип данных колонки */
780
- dbDataType: string;
781
781
  }
782
- interface IScriptField {
783
- name: string;
784
- isRequired: boolean;
785
- isArray: boolean;
782
+ interface IProcessTransitionFilterValue {
783
+ startEventProcessKey: string;
784
+ startEventName: string;
785
+ endEventProcessKey: string;
786
+ endEventName: string;
786
787
  }
787
- interface IActionScript {
788
- key: string;
789
- name: string;
790
- fields: IScriptField[];
788
+ interface IClickPosition {
789
+ x: number;
790
+ y: number;
791
+ elementWidth?: number;
792
+ elementHeight?: number;
791
793
  }
792
- interface IWidgetTable {
793
- /** Имя таблицы */
794
- name: string;
795
- /** Колонки таблицы */
796
- columns: Map<string, IWidgetTableColumn>;
794
+ interface IPositionConfig extends IClickPosition {
795
+ offsetX?: number;
796
+ offsetY?: number;
797
797
  }
798
- interface IDisplayRule {
799
- color: TColor;
798
+ interface IAddPresenceOfEventFilter {
799
+ (name: EProcessFilterNames.presenceOfEvent, value: IProcessEventFilterValue, positionConfig?: IPositionConfig, previewParams?: IProcessFilterPreviewParams): void;
800
800
  }
801
- interface IGlobalContext {
802
- /** Используемый язык системы */
803
- language: ELanguages;
804
- /** Имя отчета */
805
- reportName: string;
806
- /** Имена образов по их ключу(в текущем отчете) */
807
- viewNameByKey: Map<string, string>;
808
- /** Меры уровня отчета */
809
- reportMeasures: TNullable<Map<string, ICommonMeasures>>;
810
- /** Меры уровня пространства(из модели данных) */
811
- workspaceMeasures: TNullable<Map<string, Map<string, ICommonMeasures>>>;
812
- /** Разрезы уровня отчета */
813
- reportDimensions: TNullable<Map<string, ICommonDimensions>>;
814
- /** Разрезы уровня пространства(из модели данных) */
815
- workspaceDimensions: TNullable<Map<string, Map<string, ICommonDimensions>>>;
816
- /** Правила отображения уровня */
817
- reportDisplayRules: Map<string, IDisplayRule>;
818
- /** Правила отображения уровня пространства(из модели данных) */
819
- workspaceDisplayRules: Map<string, Map<string, IDisplayRule>>;
820
- /** Пользовательские переменные уровня отчета */
821
- variables: Map<string, TWidgetVariable>;
822
- /** Метод установки значения пользовательской переменной уровня отчета */
823
- setVariableValue(name: string, value: TWidgetVariable["value"]): TWidgetVariable["value"];
824
- /** Метод очистки значения пользовательской переменной уровня отчета */
825
- unsetVariableValue(name: string): TWidgetVariable["value"];
826
- /** Состояния(название сущности) отчета */
827
- states: Map<string, ICommonState>;
828
- /** @deprecated Процессы из модели данных (по имени) */
829
- processes: Map<string, IWidgetProcess>;
830
- /** Процессы из модели данных (по ключу) */
831
- processByKey: Map<string, IWidgetProcess>;
832
- /** Имена таблиц из модели данных */
833
- tables: Set<string>;
834
- /** Функция для запроса информации о колонках таблицы из модели данных */
835
- fetchColumnsByTableName(tableName: string): Promise<IWidgetTableColumn[] | undefined>;
836
- /** Скрипты, доступные для запуска из отчета */
837
- scripts: Map<string, IActionScript>;
801
+ interface IAddRepetitionOfEventFilter {
802
+ (name: EProcessFilterNames.repetitionOfEvent, value: IProcessEventFilterValue, positionConfig?: IPositionConfig, previewParams?: IProcessFilterPreviewParams): void;
838
803
  }
839
-
840
- declare enum EColorMode {
841
- /** Окрашивание отключено */
842
- DISABLED = "DISABLED",
843
- /** Цвет каждого значения вычисляется по формуле */
844
- FORMULA = "FORMULA",
845
- /** Один цвет для всех значений */
846
- BASE = "BASE",
847
- /** Окрашивание каждого значения по градиенту относительно минимального и максимального значений */
848
- GRADIENT = "GRADIENT",
849
- /** Использовать автоматический цвет: по умолчанию определяется порядковым номером показателя */
850
- AUTO = "AUTO",
851
- /** Использовать цвет из правила отображения (в правиле отображения рекурсивно определен цвет) */
852
- RULE = "RULE",
853
- /** Задать цвет конкретным значениям разреза */
854
- VALUES = "VALUES",
855
- /** Задать цвет конкретным значениям общего разреза. Режим используется только для настроек правила отображения */
856
- BY_DIMENSION = "BY_DIMENSION"
804
+ interface IAddPresenceOfTransitionFilter {
805
+ (name: EProcessFilterNames.presenceOfTransition, value: IProcessTransitionFilterValue, positionConfig?: IPositionConfig, previewParams?: IProcessFilterPreviewParams): void;
857
806
  }
858
- type TColorBase = {
859
- mode: EColorMode.BASE;
860
- value?: string;
861
- };
862
- type TColorRule = {
863
- mode: EColorMode.RULE;
807
+ interface IAddDurationOfTransitionFilter {
808
+ (name: EProcessFilterNames.durationOfTransition, value: IProcessTransitionFilterValue, positionConfig?: IPositionConfig, previewParams?: IProcessFilterPreviewParams): void;
809
+ }
810
+ declare enum EFormulaFilterFieldKeys {
811
+ date = "date",
812
+ dateRange = "dateRange",
813
+ numberRange = "numberRange",
814
+ string = "string",
815
+ lastTimeValue = "lastTimeValue",
816
+ lastTimeUnit = "lastTimeUnit",
817
+ durationUnit = "durationUnit"
818
+ }
819
+ interface IFormulaFilterValue {
820
+ /** Заголовок фильтра */
821
+ name: TNullable<string>;
822
+ /** Формула */
864
823
  formula: string;
865
- };
866
- interface IColoredValue {
867
- value: string;
868
- color: TColorBase | TColorRule;
824
+ /**
825
+ * Индекс элемента в результате вычисления формулы (если результат - массив).
826
+ *
827
+ * Используется, когда формула возвращает массив значений, но требуется работать только с одним конкретным элементом.
828
+ * Индекс добавляется к вычисляемой формуле, позволяя выбрать нужный элемент из результирующего массива.
829
+ *
830
+ * **Важно:** Индексация начинается с 1, т.к. используется ClickHouse (1-based).
831
+ */
832
+ sliceIndex?: number;
833
+ /** Тип данных формулы (без учета `sliceIndex`) */
834
+ dbDataType: string;
835
+ /** Формат */
836
+ format: EFormatTypes;
837
+ /** Метод фильтрации */
838
+ filteringMethod: valueof<typeof formulaFilterMethods>;
839
+ /** Выбранные в списке значения в виде моделей */
840
+ checkedValues?: (string | null)[];
841
+ /** Значения полей формы редактора */
842
+ formValues?: Partial<{
843
+ [EFormulaFilterFieldKeys.date]: string | null;
844
+ [EFormulaFilterFieldKeys.dateRange]: [string, string];
845
+ [EFormulaFilterFieldKeys.numberRange]: Partial<[number, number]>;
846
+ [EFormulaFilterFieldKeys.string]: string;
847
+ [EFormulaFilterFieldKeys.lastTimeValue]: number;
848
+ [EFormulaFilterFieldKeys.lastTimeUnit]: ELastTimeUnit;
849
+ [EFormulaFilterFieldKeys.durationUnit]: EDurationUnit;
850
+ }>;
869
851
  }
870
- /** Настройка цвета */
871
- type TColor = {
872
- mode: EColorMode.FORMULA;
852
+ type TExtendedFormulaFilterValue = {
873
853
  formula: string;
874
- } | TColorBase | {
875
- mode: EColorMode.GRADIENT;
876
- startValue: string;
877
- endValue: string;
878
- classCount?: TNullable<number>;
879
- } | {
880
- mode: EColorMode.AUTO;
881
- } | TColorRule | {
882
- mode: EColorMode.VALUES;
883
- items: IColoredValue[];
884
- } | {
885
- mode: EColorMode.BY_DIMENSION;
886
- /** Имя разреза из области видимости правила отображения */
887
- dimensionName: string;
888
- items: IColoredValue[];
889
- } | {
890
- mode: EColorMode.DISABLED;
891
- };
892
- declare const getRuleColor: (ruleFormula: string, globalContext: Pick<IGlobalContext, "reportDisplayRules" | "workspaceDisplayRules">) => TColor | undefined;
893
- declare const isValidColor: (color: TColor, globalContext: Pick<IGlobalContext, "reportDisplayRules" | "workspaceDisplayRules">) => boolean;
894
- declare const colors: string[];
895
- /**
896
- * Получить цвет по индексу элемента
897
- * @param index - индекс элемента, которому требуется цвет
898
- */
899
- declare const getColorByIndex: (index: number) => string;
900
-
901
- interface IAutoIdentifiedArrayItem {
854
+ } | IFormulaFilterValue;
855
+ interface IStagesFilterItem {
856
+ id: number;
857
+ /** Название этапа */
858
+ name: string;
859
+ /** Формула фильтра этапа */
860
+ formula: string;
861
+ isSelected: boolean;
862
+ }
863
+ interface IStagesFilterValue {
864
+ /** Ключ виджета */
865
+ widgetKey: string;
866
+ /** Заголовок фильтра */
867
+ name: TNullable<string>;
868
+ /** Этапы */
869
+ stages: IStagesFilterItem[];
870
+ }
871
+ type TWidgetFilterValue = TExtendedFormulaFilterValue | IStagesFilterValue | IProcessEventFilterValue | IProcessTransitionFilterValue;
872
+ interface IWidgetFilter {
873
+ /** Значение фильтра */
874
+ filterValue: TWidgetFilterValue;
875
+ /** Значение фильтра, подготовленное для передачи в вычислитель */
876
+ preparedFilterValue: ICalculatorFilter;
877
+ /** Информация о возможности менять фильтр из виджета */
878
+ isReadonly: boolean;
879
+ }
880
+ interface IWidgetFiltration {
881
+ /** Информация о внешних фильтрах виджета */
882
+ filters: IWidgetFilter[];
902
883
  /**
903
- * Идентификатор, добавляемый системой "на лету" для удобства разработки, не сохраняется на сервер.
904
- * Гарантируется уникальность id в пределах settings виджета.
884
+ * Значения внешних фильтров виджета, подготовленные для передачи в вычислитель.
885
+ * Использует данные из filters, но предоставлено отдельным полем для удобства разработки.
905
886
  */
906
- id: number;
907
- }
908
- interface IBaseWidgetSettings {
909
- title?: string;
910
- titleSize?: number;
911
- titleColor?: TColor;
912
- titleWeight?: EFontWeight;
913
- stateName?: string | null;
914
- showMarkdown?: boolean;
915
- markdownMeasures?: IMarkdownMeasure[];
916
- markdownText?: string;
917
- markdownTextSize?: number;
918
- filters?: TExtendedFormulaFilterValue[];
919
- filterMode?: EWidgetFilterMode;
920
- ignoreFilters?: boolean;
921
- sorting?: IWidgetSortingIndicator[];
922
- actionButtons?: IActionButton[];
923
- paddings?: number | string;
887
+ preparedFilterValues: ICalculatorFilter[];
888
+ /** Добавить фильтр по формуле */
889
+ addFormulaFilter(value: TSelectivePartial<IFormulaFilterValue, "format" | "formValues">): void;
890
+ /**
891
+ * Удалить фильтр, заданный формулой, из текущего набора фильтров
892
+ *
893
+ * @param formula Формула фильтра, который необходимо удалить. Должна точно соответствовать
894
+ * формуле ранее добавленного фильтра (с учетом регистра и пробелов).
895
+ * @param [sliceIndex] Опциональный индекс элемента массива. См. {@link IFormulaFilterValue.sliceIndex}.
896
+ *
897
+ * @remarks
898
+ * - Если фильтр был добавлен без указания индекса, его нужно удалять без указания индекса.
899
+ * - Если фильтр был добавлен с индексом, тот же индекс должен быть указан при удалении.
900
+ * - Удаление происходит по точному совпадению формулы и индекса (если он был указан).
901
+ */
902
+ removeFormulaFilter(formula: string, sliceIndex?: number): void;
903
+ /** Добавить процессный фильтр */
904
+ addProcessFilter(...args: Parameters<IAddPresenceOfEventFilter> | Parameters<IAddRepetitionOfEventFilter> | Parameters<IAddPresenceOfTransitionFilter> | Parameters<IAddDurationOfTransitionFilter>): void;
905
+ /** Добавить фильтр по этапам */
906
+ addStagesFilter(value: Omit<IStagesFilterValue, "widgetKey">): void;
907
+ /** Удалить фильтр по этапам */
908
+ removeStagesFilter(widgetKey: string): void;
924
909
  }
910
+ declare const isFormulaFilterValue: (value: TExtendedFormulaFilterValue) => value is IFormulaFilterValue;
925
911
 
926
912
  declare enum EWidgetActionInputMethod {
927
913
  COLUMN = "COLUMN",
@@ -951,11 +937,7 @@ declare enum EViewOpenIn {
951
937
  WINDOW = "WINDOW",
952
938
  PLACEHOLDER = "PLACEHOLDER",
953
939
  MODAL_WINDOW = "MODAL_WINDOW",
954
- DRAWER_WINDOW = "DRAWER_WINDOW",
955
- /** @deprecated необходимо использовать EViewOpenIn.WINDOW с флагом newWindow - true */
956
- NEW_WINDOW = "NEW_WINDOW",
957
- /** @deprecated необходимо использовать EViewOpenIn.WINDOW с флагом newWindow - false */
958
- CURRENT_WINDOW = "CURRENT_WINDOW"
940
+ DRAWER_WINDOW = "DRAWER_WINDOW"
959
941
  }
960
942
  declare enum EDrawerPlacement {
961
943
  LEFT = "LEFT",
@@ -1085,17 +1067,9 @@ type TActionOpenIn = {
1085
1067
  } | {
1086
1068
  openIn: EViewOpenIn.PLACEHOLDER;
1087
1069
  placeholderName: string;
1088
- }
1089
- /** @deprecated необходимо использовать EViewOpenIn.WINDOW с флагом newWindow - true */
1090
- | {
1091
- openIn: EViewOpenIn.NEW_WINDOW;
1092
1070
  } | {
1093
1071
  openIn: EViewOpenIn.MODAL_WINDOW;
1094
1072
  positionByClick?: boolean;
1095
- }
1096
- /** @deprecated необходимо использовать EViewOpenIn.WINDOW с флагом newWindow - false */
1097
- | {
1098
- openIn: EViewOpenIn.CURRENT_WINDOW;
1099
1073
  } | {
1100
1074
  openIn: EViewOpenIn.WINDOW;
1101
1075
  newWindow: boolean;
@@ -1163,238 +1137,40 @@ interface IViewAction {
1163
1137
  type TAction = TActionsOnClick | IWidgetAction | IViewAction;
1164
1138
  type TActionValidator = (action: TAction) => boolean;
1165
1139
  declare enum EActionButtonsTypes {
1166
- LINK = "link",
1167
- BASE = "primary",
1168
- SECONDARY = "primary-outlined"
1169
- }
1170
-
1171
- declare enum ESimpleDataType {
1172
- OTHER = "OTHER",
1173
- DATE = "DATE",
1174
- FLOAT = "FLOAT",
1175
- DATETIME = "DATETIME",
1176
- STRING = "STRING",
1177
- INTEGER = "INTEGER",
1178
- DATETIME64 = "DATETIME64",
1179
- BOOLEAN = "BOOLEAN"
1180
- }
1181
- type TDbTypeContainer = "Array" | "Nullable";
1182
- /** Результат разбора типа данных из базы данных (в будущем возможна поддержка других СУБД помимо ClickHouse) */
1183
- interface IParsedDbType<T extends TNullable<string> = string> {
1184
- /** Контейнеры над базовым типом в порядке от внешнего к внутреннему */
1185
- containers: TDbTypeContainer[];
1186
- /** Исходный базовый тип (без контейнеров) */
1187
- dbBaseDataType: T;
1188
- /** Обобщенный базовый тип */
1189
- simpleBaseType: ESimpleDataType;
1190
- /** Обобщенный исходный тип (при наличии контейнера `Array` классифицируется как `OTHER`) */
1191
- simpleType: ESimpleDataType;
1192
- }
1193
-
1194
- declare enum EDimensionTemplateNames {
1195
- dateTime = "dateTime",
1196
- date = "date",
1197
- year = "year",
1198
- yearAndQuarter = "yearAndQuarter",
1199
- quarter = "quarter",
1200
- yearAndMonth = "yearAndMonth",
1201
- dayOfMonth = "dayOfMonth",
1202
- month = "month",
1203
- week = "week",
1204
- dayOfWeek = "dayOfWeek",
1205
- hour = "hour"
1206
- }
1207
- /** Стандартные шаблоны разреза */
1208
- declare const dimensionTemplateFormulas: Record<EDimensionTemplateNames, string>;
1209
-
1210
- declare function getDimensionFormula({ value }: IWidgetDimension): string;
1211
-
1212
- declare enum EDimensionAggregationTemplateName {
1213
- avg = "avg",
1214
- median = "median",
1215
- count = "count",
1216
- countDistinct = "countDistinct",
1217
- min = "min",
1218
- max = "max",
1219
- sum = "sum",
1220
- top = "top",
1221
- firstValue = "firstValue",
1222
- lastValue = "lastValue",
1223
- countExecutions = "countExecutions",
1224
- countReworks = "countReworks"
1225
- }
1226
- /** Шаблоны процессных метрик разреза с режимом AGGREGATION */
1227
- declare const dimensionAggregationTemplates: Record<EDimensionAggregationTemplateName, string>;
1228
- /** На основе значения режима AGGREGATION подготовить параметры для подстановки в шаблонную формулу */
1229
- declare const prepareDimensionAggregationParams: (value: Extract<IWidgetDimension["value"], {
1230
- mode: EWidgetIndicatorValueModes.AGGREGATION;
1231
- }>) => {
1232
- eventNameFormula: string;
1233
- caseCaseIdFormula: string;
1234
- eventName: string;
1235
- objectFilters: string;
1236
- filters: string;
1237
- eventTimeFormula: string;
1238
- columnFormula: string;
1239
- } | null;
1240
-
1241
- /** Шаблоны процессных метрик разреза с режимами START_TIME/END_TIME */
1242
- declare const timeTemplates: {
1243
- START_TIME: Record<EDimensionTemplateNames, string>;
1244
- END_TIME: Record<EDimensionTemplateNames, string>;
1245
- };
1246
- /** На основе значения режимов START_TIME/END_TIME подготовить параметры для подстановки в шаблонную формулу */
1247
- declare const prepareTimeParams: (value: TWidgetIndicatorTimeValue) => {
1248
- eventTimeFormula: string;
1249
- eventNameFormula: string;
1250
- caseCaseIdFormula: string;
1251
- filters: string;
1252
- eventName: string;
1253
- } | undefined;
1254
-
1255
- declare function getMeasureFormula({ value }: IWidgetMeasure): string;
1256
-
1257
- declare enum EMeasureTemplateNames {
1258
- avg = "avg",
1259
- median = "median",
1260
- count = "count",
1261
- countDistinct = "countDistinct",
1262
- min = "min",
1263
- max = "max",
1264
- sum = "sum"
1265
- }
1266
- /** Стандартные шаблоны меры */
1267
- declare const measureTemplateFormulas: {
1268
- readonly avg: "avg({columnFormula})";
1269
- readonly count: "count({columnFormula})";
1270
- readonly countDistinct: "count(distinct {columnFormula})";
1271
- readonly median: "medianExact({columnFormula})";
1272
- readonly min: "min({columnFormula})";
1273
- readonly max: "max({columnFormula})";
1274
- readonly sum: "sum({columnFormula})";
1275
- };
1276
-
1277
- declare enum EMeasureAggregationTemplateName {
1278
- agvIf = "agvIf",
1279
- medianIf = "medianIf",
1280
- countIf = "countIf",
1281
- countIfDistinct = "countIfDistinct",
1282
- minIf = "minIf",
1283
- maxIf = "maxIf",
1284
- sumIf = "sumIf",
1285
- top = "top",
1286
- firstValue = "firstValue",
1287
- lastValue = "lastValue",
1288
- countExecutions = "countExecutions",
1289
- countReworks = "countReworks"
1290
- }
1291
- /** На основе значения режима AGGREGATION подготовить параметры для подстановки в шаблонную формулу */
1292
- declare const prepareMeasureAggregationParams: (value: Extract<IWidgetMeasure["value"], {
1293
- mode: EWidgetIndicatorValueModes.AGGREGATION;
1294
- }>) => {
1295
- outerAggregation: EOuterAggregation;
1296
- eventNameFormula: string;
1297
- caseCaseIdFormula: string;
1298
- eventName: string | null;
1299
- objectFilters: string;
1300
- filters: string;
1301
- eventTimeFormula: string;
1302
- columnFormula: string;
1303
- } | null;
1304
-
1305
- /** Шаблон процессной метрики меры с режимом CONVERSION */
1306
- declare const conversionTemplate = "countIf(\n process(\n minIf(\n {startEventTimeFormula}, \n {startEventNameFormula} = '{startEventName}'{startEventFilters}\n ), \n {endCaseCaseIdFormula}\n ) < \n process(\n maxIf(\n {endEventTimeFormula}, \n {endEventNameFormula} = '{endEventName}'{endEventFilters}\n ), \n {endCaseCaseIdFormula}\n ) \n and \n process(\n countIf(\n {startEventNameFormula} = '{startEventName}'{startEventFilters}\n ) != 0, \n {endCaseCaseIdFormula}\n ) != 0\n) / countIf(\n process(\n countIf(\n {startEventNameFormula} = '{startEventName}'{startEventFilters}\n ) != 0, \n {endCaseCaseIdFormula}\n ) != 0\n)";
1307
- /** На основе значения режима CONVERSION подготовить параметры для подстановки в шаблонную формулу */
1308
- declare const prepareConversionParams: (value: TWidgetIndicatorConversionValue) => {
1309
- objectFilters: string;
1310
- startEventTimeFormula: string;
1311
- startEventNameFormula: string;
1312
- startEventFilters: string;
1313
- startEventName: string;
1314
- endEventTimeFormula: string;
1315
- endCaseCaseIdFormula: string;
1316
- endEventNameFormula: string;
1317
- endEventName: string;
1318
- endEventFilters: string;
1319
- } | null;
1320
-
1321
- declare function createAggregationTemplate(templateName: EMeasureAggregationTemplateName, { outerAggregation, anyEvent, }: Pick<TWidgetIndicatorAggregationValue, "anyEvent"> & {
1322
- outerAggregation: EOuterAggregation;
1323
- }): string;
1324
-
1325
- /** Шаблоны процессных метрик меры с режимом DURATION */
1326
- declare const durationTemplates: Record<EDurationTemplateName, string>;
1327
- /** На основе значения режима DURATION подготовить параметры для подстановки в шаблонную формулу */
1328
- declare const prepareDurationParams: (value: TWidgetIndicatorDurationValue) => {
1329
- objectFilters: string;
1330
- startEventTimeFormula: string;
1331
- startEventNameFormula: string;
1332
- startEventFilters: string;
1333
- startEventName: string;
1334
- startEventAggregationName: string;
1335
- endEventTimeFormula: string;
1336
- endCaseCaseIdFormula: string;
1337
- endEventNameFormula: string;
1338
- endEventName: string;
1339
- endEventFilters: string;
1340
- endEventAggregationName: string;
1341
- } | null;
1342
-
1343
- declare function getEventMeasureFormula({ value }: IProcessIndicator, process: IWidgetProcess): string;
1344
-
1345
- declare enum EEventMeasureTemplateNames {
1346
- eventsCount = "eventsCount",
1347
- reworksCount = "reworksCount"
1348
- }
1349
- declare const eventMeasureTemplateFormulas: {
1350
- readonly eventsCount: "count()";
1351
- readonly reworksCount: "count() - uniqExact({caseCaseIdFormula})";
1352
- };
1353
-
1354
- declare function getTransitionMeasureFormula({ value }: IProcessIndicator, process: IWidgetProcess): string;
1355
-
1356
- declare enum ETransitionMeasureTemplateNames {
1357
- transitionsCount = "transitionsCount",
1358
- medianTime = "medianTime"
1359
- }
1360
- declare const transitionMeasureTemplateFormulas: {
1361
- readonly transitionsCount: "count()";
1362
- readonly medianTime: "medianExact(date_diff(second, begin({eventTimeFormula}), end({eventTimeFormula})))";
1363
- };
1364
-
1365
- declare const countExecutionsTemplate = "process(countIf({eventNameFormula} in '{eventName}'{filters}), {caseCaseIdFormula})";
1366
-
1367
- declare function fillTemplateString(templateString: string, params: Record<string, any>): string;
1368
-
1369
- declare function generateColumnFormula(tableName: string, columnName: string): string;
1140
+ LINK = "link",
1141
+ BASE = "primary",
1142
+ SECONDARY = "primary-outlined"
1143
+ }
1370
1144
 
1371
- /**
1372
- * Паттерн подстроки, валидной для использования внутри фигурных скобок.
1373
- * Требование к подстроке - отсутствие закрывающих фигурных скобок (кроме экранированных).
1374
- */
1375
- declare const curlyBracketsContentPattern: string;
1376
- /**
1377
- * Паттерн подстроки, валидной для использования внутри двойных кавычек.
1378
- * Требование к подстроке - отсутствие двойных кавычек (кроме экранированных).
1379
- */
1380
- declare const doubleQuoteContentPattern: string;
1381
- declare const dashboardLinkRegExp: RegExp;
1382
- declare const workspaceLinkRegExp: RegExp;
1383
- /** Экранирование спец.символов при подстановке названий таблиц и колонок */
1384
- declare const escapeDoubleQuoteLinkName: (str: string) => string;
1385
- /** Экранирование спец.символов при подстановке названий переменных и показателей */
1386
- declare const escapeCurlyBracketLinkName: (str: string) => string;
1387
- interface IIndicatorLink {
1388
- /** string - имя группы пространства, null - используется текущий отчет */
1389
- scopeName: string | null;
1390
- indicatorName: string;
1145
+ declare enum ESimpleDataType {
1146
+ OTHER = "OTHER",
1147
+ DATE = "DATE",
1148
+ FLOAT = "FLOAT",
1149
+ DATETIME = "DATETIME",
1150
+ STRING = "STRING",
1151
+ INTEGER = "INTEGER",
1152
+ DATETIME64 = "DATETIME64",
1153
+ BOOLEAN = "BOOLEAN"
1154
+ }
1155
+ type TDbTypeContainer = "Array" | "Nullable";
1156
+ /** Результат разбора типа данных из базы данных (в будущем возможна поддержка других СУБД помимо ClickHouse) */
1157
+ interface IParsedDbType<T extends TNullable<string> = string> {
1158
+ /** Контейнеры над базовым типом в порядке от внешнего к внутреннему */
1159
+ containers: TDbTypeContainer[];
1160
+ /** Исходный базовый тип (без контейнеров) */
1161
+ dbBaseDataType: T;
1162
+ /** Обобщенный базовый тип */
1163
+ simpleBaseType: ESimpleDataType;
1164
+ /** Обобщенный исходный тип (при наличии контейнера `Array` классифицируется как `OTHER`) */
1165
+ simpleType: ESimpleDataType;
1391
1166
  }
1392
- declare const parseIndicatorLink: (formula: string) => IIndicatorLink | null;
1393
1167
 
1394
1168
  type THintPlacement = "top" | "left" | "right" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
1395
1169
  declare enum EControlType {
1396
1170
  /** Ввод текста */
1397
1171
  input = "input",
1172
+ /** Ввод текста с поддержкой шаблонной вставки сущностей */
1173
+ inputTemplate = "inputTemplate",
1398
1174
  /** Ввод текста в формате markdown */
1399
1175
  inputMarkdown = "inputMarkdown",
1400
1176
  /** Ввод числа */
@@ -1437,6 +1213,7 @@ declare enum EControlType {
1437
1213
  }
1438
1214
  type ControlsMap = {
1439
1215
  [EControlType.input]: IInputControl;
1216
+ [EControlType.inputTemplate]: IInputTemplatedControl;
1440
1217
  [EControlType.inputMarkdown]: IInputMarkdownControl;
1441
1218
  [EControlType.inputNumber]: IInputNumberControl;
1442
1219
  [EControlType.inputRange]: IInputRangeControl;
@@ -1550,6 +1327,11 @@ interface IInputControl {
1550
1327
  hintPlacement?: THintPlacement;
1551
1328
  };
1552
1329
  }
1330
+ interface IInputTemplatedControl {
1331
+ type: EControlType.inputTemplate;
1332
+ value: string;
1333
+ props: {};
1334
+ }
1553
1335
  interface IInputMarkdownControl {
1554
1336
  type: EControlType.inputMarkdown;
1555
1337
  value: string;
@@ -1665,9 +1447,9 @@ interface IFormulaControl {
1665
1447
  dbDataType: string | undefined;
1666
1448
  };
1667
1449
  props: {
1668
- showModeToggle?: boolean;
1669
1450
  indicatorConfig?: ({
1670
1451
  type: "measure";
1452
+ templates?: TWidgetMeasureData["templates"];
1671
1453
  } & {
1672
1454
  /** @deprecated временное решение для виджета "Воронка", не следует использовать [BI-14710] */
1673
1455
  allowClear?: boolean;
@@ -1679,9 +1461,12 @@ interface IFormulaControl {
1679
1461
  options?: TMeasureAddButtonSelectOption[];
1680
1462
  }) | {
1681
1463
  type: "dimension";
1682
- templates?: EDimensionTemplateNames[];
1464
+ templates?: TWidgetDimensionData["templates"];
1465
+ processTimeTemplates?: TWidgetDimensionData["processTimeTemplates"];
1683
1466
  };
1684
1467
  disabled?: boolean;
1468
+ /** Ключи процессов для фильтрации таблиц, доступных для выбора */
1469
+ processKeys?: Iterable<string>;
1685
1470
  titleModal?: string;
1686
1471
  };
1687
1472
  }
@@ -1699,9 +1484,14 @@ interface ITypedFormulaControl {
1699
1484
  interface IFormattingControl {
1700
1485
  type: EControlType.formatting;
1701
1486
  value: {
1702
- format: EFormatTypes;
1703
- formatting: EFormattingPresets;
1704
- formattingTemplate?: string;
1487
+ format: {
1488
+ value?: EFormatTypes;
1489
+ mode: EFormatOrFormattingMode;
1490
+ };
1491
+ formatting: {
1492
+ value?: EFormattingPresets;
1493
+ mode: EFormatOrFormattingMode;
1494
+ };
1705
1495
  };
1706
1496
  props: {
1707
1497
  formats?: Partial<Record<ESimpleDataType, EFormatTypes[]>>;
@@ -1734,6 +1524,8 @@ interface IFilterControl {
1734
1524
  value: TExtendedFormulaFilterValue[];
1735
1525
  props: {
1736
1526
  buttonTitle?: string;
1527
+ /** Ключи процессов для фильтрации таблиц, доступных для выбора */
1528
+ processKeys?: Iterable<string>;
1737
1529
  };
1738
1530
  }
1739
1531
  interface IDisplayConditionControl {
@@ -1879,8 +1671,6 @@ interface IEdge extends IGraphElement {
1879
1671
  endName: string | null;
1880
1672
  }
1881
1673
  interface IProcessGraphCalculatorInput {
1882
- /** @deprecated необходимо использовать processKey */
1883
- processName?: string;
1884
1674
  processKey: string;
1885
1675
  vertexLimit: number | null;
1886
1676
  edgeLimit: number;
@@ -2103,6 +1893,209 @@ interface ICalculatorFactory {
2103
1893
  type: (options?: ICalculatorOptions) => ITypeCalculator;
2104
1894
  }
2105
1895
 
1896
+ declare enum EDimensionTemplateNames {
1897
+ dateTime = "dateTime",
1898
+ date = "date",
1899
+ year = "year",
1900
+ yearAndQuarter = "yearAndQuarter",
1901
+ quarter = "quarter",
1902
+ yearAndMonth = "yearAndMonth",
1903
+ dayOfMonth = "dayOfMonth",
1904
+ month = "month",
1905
+ week = "week",
1906
+ dayOfWeek = "dayOfWeek",
1907
+ hour = "hour"
1908
+ }
1909
+ /** Стандартные шаблоны разреза */
1910
+ declare const dimensionTemplateFormulas: Record<EDimensionTemplateNames, string>;
1911
+
1912
+ declare function getDimensionFormula({ value }: IWidgetDimension): string;
1913
+
1914
+ declare enum EDimensionAggregationTemplateName {
1915
+ avg = "avg",
1916
+ median = "median",
1917
+ count = "count",
1918
+ countDistinct = "countDistinct",
1919
+ min = "min",
1920
+ max = "max",
1921
+ sum = "sum",
1922
+ top = "top",
1923
+ firstValue = "firstValue",
1924
+ lastValue = "lastValue",
1925
+ countExecutions = "countExecutions",
1926
+ countReworks = "countReworks"
1927
+ }
1928
+ /** Шаблоны процессных метрик разреза с режимом AGGREGATION */
1929
+ declare const dimensionAggregationTemplates: Record<EDimensionAggregationTemplateName, string>;
1930
+ /** На основе значения режима AGGREGATION подготовить параметры для подстановки в шаблонную формулу */
1931
+ declare const prepareDimensionAggregationParams: (value: Extract<IWidgetDimension["value"], {
1932
+ mode: EWidgetIndicatorValueModes.AGGREGATION;
1933
+ }>) => {
1934
+ eventNameFormula: string;
1935
+ caseCaseIdFormula: string;
1936
+ eventName: string;
1937
+ objectFilters: string;
1938
+ filters: string;
1939
+ eventTimeFormula: string;
1940
+ columnFormula: string;
1941
+ } | null;
1942
+
1943
+ /** Шаблоны процессных метрик разреза с режимами START_TIME/END_TIME */
1944
+ declare const timeTemplates: {
1945
+ START_TIME: Record<EDimensionTemplateNames, string>;
1946
+ END_TIME: Record<EDimensionTemplateNames, string>;
1947
+ };
1948
+ /** На основе значения режимов START_TIME/END_TIME подготовить параметры для подстановки в шаблонную формулу */
1949
+ declare const prepareTimeParams: (value: TWidgetIndicatorTimeValue) => {
1950
+ eventTimeFormula: string;
1951
+ eventNameFormula: string;
1952
+ caseCaseIdFormula: string;
1953
+ filters: string;
1954
+ eventName: string;
1955
+ } | undefined;
1956
+
1957
+ declare function getMeasureFormula({ value }: IWidgetMeasure): string;
1958
+
1959
+ declare enum EMeasureTemplateNames {
1960
+ avg = "avg",
1961
+ median = "median",
1962
+ count = "count",
1963
+ countDistinct = "countDistinct",
1964
+ min = "min",
1965
+ max = "max",
1966
+ sum = "sum"
1967
+ }
1968
+ /** Стандартные шаблоны меры */
1969
+ declare const measureTemplateFormulas: {
1970
+ readonly avg: "avg({columnFormula})";
1971
+ readonly count: "count({columnFormula})";
1972
+ readonly countDistinct: "count(distinct {columnFormula})";
1973
+ readonly median: "medianExact({columnFormula})";
1974
+ readonly min: "min({columnFormula})";
1975
+ readonly max: "max({columnFormula})";
1976
+ readonly sum: "sum({columnFormula})";
1977
+ };
1978
+
1979
+ declare enum EMeasureAggregationTemplateName {
1980
+ agvIf = "agvIf",
1981
+ medianIf = "medianIf",
1982
+ countIf = "countIf",
1983
+ countIfDistinct = "countIfDistinct",
1984
+ minIf = "minIf",
1985
+ maxIf = "maxIf",
1986
+ sumIf = "sumIf",
1987
+ top = "top",
1988
+ firstValue = "firstValue",
1989
+ lastValue = "lastValue",
1990
+ countExecutions = "countExecutions",
1991
+ countReworks = "countReworks"
1992
+ }
1993
+ /** На основе значения режима AGGREGATION подготовить параметры для подстановки в шаблонную формулу */
1994
+ declare const prepareMeasureAggregationParams: (value: Extract<IWidgetMeasure["value"], {
1995
+ mode: EWidgetIndicatorValueModes.AGGREGATION;
1996
+ }>) => {
1997
+ outerAggregation: EOuterAggregation;
1998
+ eventNameFormula: string;
1999
+ caseCaseIdFormula: string;
2000
+ eventName: string | null;
2001
+ objectFilters: string;
2002
+ filters: string;
2003
+ eventTimeFormula: string;
2004
+ columnFormula: string;
2005
+ } | null;
2006
+
2007
+ /** Шаблон процессной метрики меры с режимом CONVERSION */
2008
+ declare const conversionTemplate = "countIf(\n process(\n minIf(\n {startEventTimeFormula}, \n {startEventNameFormula} = '{startEventName}'{startEventFilters}\n ), \n {endCaseCaseIdFormula}\n ) < \n process(\n maxIf(\n {endEventTimeFormula}, \n {endEventNameFormula} = '{endEventName}'{endEventFilters}\n ), \n {endCaseCaseIdFormula}\n ) \n and \n process(\n countIf(\n {startEventNameFormula} = '{startEventName}'{startEventFilters}\n ) != 0, \n {endCaseCaseIdFormula}\n ) != 0\n) / countIf(\n process(\n countIf(\n {startEventNameFormula} = '{startEventName}'{startEventFilters}\n ) != 0, \n {endCaseCaseIdFormula}\n ) != 0\n)";
2009
+ /** На основе значения режима CONVERSION подготовить параметры для подстановки в шаблонную формулу */
2010
+ declare const prepareConversionParams: (value: TWidgetIndicatorConversionValue) => {
2011
+ objectFilters: string;
2012
+ startEventTimeFormula: string;
2013
+ startEventNameFormula: string;
2014
+ startEventFilters: string;
2015
+ startEventName: string;
2016
+ endEventTimeFormula: string;
2017
+ endCaseCaseIdFormula: string;
2018
+ endEventNameFormula: string;
2019
+ endEventName: string;
2020
+ endEventFilters: string;
2021
+ } | null;
2022
+
2023
+ declare function createAggregationTemplate(templateName: EMeasureAggregationTemplateName, { outerAggregation, anyEvent, }: Pick<TWidgetIndicatorAggregationValue, "anyEvent"> & {
2024
+ outerAggregation: EOuterAggregation;
2025
+ }): string;
2026
+
2027
+ /** Шаблоны процессных метрик меры с режимом DURATION */
2028
+ declare const durationTemplates: Record<EDurationTemplateName, string>;
2029
+ /** На основе значения режима DURATION подготовить параметры для подстановки в шаблонную формулу */
2030
+ declare const prepareDurationParams: (value: TWidgetIndicatorDurationValue) => {
2031
+ objectFilters: string;
2032
+ startEventTimeFormula: string;
2033
+ startEventNameFormula: string;
2034
+ startEventFilters: string;
2035
+ startEventName: string;
2036
+ startEventAggregationName: string;
2037
+ endEventTimeFormula: string;
2038
+ endCaseCaseIdFormula: string;
2039
+ endEventNameFormula: string;
2040
+ endEventName: string;
2041
+ endEventFilters: string;
2042
+ endEventAggregationName: string;
2043
+ } | null;
2044
+
2045
+ declare function getEventMeasureFormula({ value }: IProcessIndicator, process: IWidgetProcess): string;
2046
+
2047
+ declare enum EEventMeasureTemplateNames {
2048
+ eventsCount = "eventsCount",
2049
+ reworksCount = "reworksCount"
2050
+ }
2051
+ declare const eventMeasureTemplateFormulas: {
2052
+ readonly eventsCount: "count()";
2053
+ readonly reworksCount: "count() - uniqExact({caseCaseIdFormula})";
2054
+ };
2055
+
2056
+ declare function getTransitionMeasureFormula({ value }: IProcessIndicator, process: IWidgetProcess): string;
2057
+
2058
+ declare enum ETransitionMeasureTemplateNames {
2059
+ transitionsCount = "transitionsCount",
2060
+ medianTime = "medianTime"
2061
+ }
2062
+ declare const transitionMeasureTemplateFormulas: {
2063
+ readonly transitionsCount: "count()";
2064
+ readonly medianTime: "medianExact(date_diff(second, begin({eventTimeFormula}), end({eventTimeFormula})))";
2065
+ };
2066
+
2067
+ declare const countExecutionsTemplate = "process(countIf({eventNameFormula} in '{eventName}'{filters}), {caseCaseIdFormula})";
2068
+
2069
+ /** @deprecated - следует использовать fillTemplateSql */
2070
+ declare function fillTemplateString(templateString: string, params: Record<string, any>): string;
2071
+ /** Функция для безопасного заполнения SQL шаблонов с защитой от однострочных SQL комментариев в подставляемых значениях. */
2072
+ declare function fillTemplateSql(templateString: string, params: Record<string, any>): string;
2073
+
2074
+ declare function generateColumnFormula(tableName: string, columnName: string): string;
2075
+
2076
+ /**
2077
+ * Паттерн подстроки, валидной для использования внутри фигурных скобок.
2078
+ * Требование к подстроке - отсутствие закрывающих фигурных скобок (кроме экранированных).
2079
+ */
2080
+ declare const curlyBracketsContentPattern: string;
2081
+ /**
2082
+ * Паттерн подстроки, валидной для использования внутри двойных кавычек.
2083
+ * Требование к подстроке - отсутствие двойных кавычек (кроме экранированных).
2084
+ */
2085
+ declare const doubleQuoteContentPattern: string;
2086
+ declare const dashboardLinkRegExp: RegExp;
2087
+ declare const workspaceLinkRegExp: RegExp;
2088
+ /** Экранирование спец.символов при подстановке названий таблиц и колонок */
2089
+ declare const escapeDoubleQuoteLinkName: (str: string) => string;
2090
+ /** Экранирование спец.символов при подстановке названий переменных и показателей */
2091
+ declare const escapeCurlyBracketLinkName: (str: string) => string;
2092
+ interface IIndicatorLink {
2093
+ /** string - имя группы пространства, null - используется текущий отчет */
2094
+ scopeName: string | null;
2095
+ indicatorName: string;
2096
+ }
2097
+ declare const parseIndicatorLink: (formula: string) => IIndicatorLink | null;
2098
+
2106
2099
  interface ILens<T extends TNullable<object>, Value> {
2107
2100
  get(obj: T): TNullable<Value>;
2108
2101
  set(obj: T, value: Value): void;
@@ -2217,7 +2210,10 @@ interface IInitialSettings extends Record<string, any> {
2217
2210
  /** Кнопка добавления группы в набор */
2218
2211
  type TAddButton = {
2219
2212
  title: string;
2220
- props?: ICustomAddButtonProps | IMeasureAddButtonProps | ISortingAddButtonProps;
2213
+ props?: (ICustomAddButtonProps | IMeasureAddButtonProps | ISortingAddButtonProps) & {
2214
+ /** Ключи процессов для фильтрации таблиц, доступных для выбора */
2215
+ processKeys?: Iterable<string>;
2216
+ };
2221
2217
  /**
2222
2218
  * Начальные настройки, которые получит показатель при создании через кнопку добавления.
2223
2219
  * Возможность не поддерживается для иерархии разрезов.
@@ -2234,16 +2230,25 @@ type TWidgetDimensionData = {
2234
2230
  type: EWidgetIndicatorType.DIMENSION;
2235
2231
  /** Обобщенные типы данных, поддерживаемые разрезом */
2236
2232
  simpleTypes?: ESimpleDataType[];
2237
- /** Шаблоны формул, доступные для выбора в разрезе */
2238
- templates?: Partial<Record<ESimpleDataType, EDimensionTemplateNames[]>>;
2239
- /** Переопределение доступных форматов и их порядка */
2240
- formats?: Record<ESimpleDataType, EFormatTypes[]>;
2233
+ /**
2234
+ * Шаблоны формул, доступные к выбору шаблоны на основе колонок (по типу колонки)
2235
+ * Фильтрация применяется только для указанных типов колонки
2236
+ */
2237
+ templates?: Partial<Record<ESimpleDataType, (EDimensionTemplateNames | EDimensionAggregationTemplateName)[]>>;
2238
+ /**
2239
+ * Шаблоны формул, доступные к выбору в процессных разрезах по времени
2240
+ */
2241
+ processTimeTemplates?: EDimensionTemplateNames[];
2242
+ /** Переопределение доступных форматов */
2243
+ formats?: Partial<Record<ESimpleDataType, EFormatTypes[]>>;
2241
2244
  };
2242
2245
  /** Конфигурация меры */
2243
2246
  type TWidgetMeasureData = {
2244
2247
  type: EWidgetIndicatorType.MEASURE;
2245
- /** Переопределение доступных форматов и их порядка */
2246
- formats?: Record<ESimpleDataType, EFormatTypes[]>;
2248
+ /** Переопределение доступных форматов */
2249
+ formats?: Partial<Record<ESimpleDataType, EFormatTypes[]>>;
2250
+ /** Шаблоны формул, доступные для выбора в мере */
2251
+ templates?: Partial<Record<ESimpleDataType, EMeasureTemplateNames[]>>;
2247
2252
  };
2248
2253
  /** Конфигурация показателя */
2249
2254
  type TWidgetIndicatorData = TWidgetDimensionData | TWidgetMeasureData;
@@ -2334,10 +2339,6 @@ interface IWidgetProcess {
2334
2339
  caseCaseIdFormula: string;
2335
2340
  /** Имя колонки CaseId события */
2336
2341
  eventCaseIdColumnName: string;
2337
- /** Тип данных CaseId */
2338
- caseIdDbDataType: string;
2339
- /** Тип данных времени события */
2340
- eventTimeDbDataType: string;
2341
2342
  /** Является ли процесс валидным */
2342
2343
  isValid: boolean;
2343
2344
  }
@@ -2677,8 +2678,6 @@ interface IDimensionSelectionByFormula extends Map<string, IDimensionSelection>
2677
2678
  type TUpdateSelection = (selection: IDimensionSelectionByFormula, formula: string, value: string, filters: ICalculatorFilter[]) => void;
2678
2679
  declare const updateDefaultModeSelection: TUpdateSelection;
2679
2680
  declare const updateSingleModeSelection: TUpdateSelection;
2680
- /** @deprecated Отказ от режима фильтрации "Множественный выбор"*/
2681
- declare const updateMultiModeSelection: TUpdateSelection;
2682
2681
  declare const replaceFiltersBySelection: (filters: ICalculatorFilter[], selection: IDimensionSelectionByFormula) => ICalculatorFilter[];
2683
2682
 
2684
2683
  /**
@@ -2733,4 +2732,4 @@ declare global {
2733
2732
  }
2734
2733
  }
2735
2734
 
2736
- export { EActionButtonsTypes, EActionTypes, EActivateConditionMode, EAutoUpdateMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDataModelOption, EDimensionAggregationTemplateName, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationTemplateName, EDurationUnit, EEventAppearances, EEventMeasureTemplateNames, EFontWeight, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureAggregationTemplateName, EMeasureTemplateNames, EOuterAggregation, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESimpleInputType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, type IActionButton, type IActionGoToUrl, type IActionOnClickControl, type IActionRunScript, type IActionScript, type IActionUpdateVariable, type IAddButtonSelectOption, type IAddDurationOfTransitionFilter, type IAddPresenceOfEventFilter, type IAddPresenceOfTransitionFilter, type IAddRepetitionOfEventFilter, type IAutoIdentifiedArrayItem, type IBaseDimensionsAndMeasuresCalculator, type IBaseDimensionsAndMeasuresCalculatorInput, type IBaseDimensionsAndMeasuresCalculatorOutput, type IBaseWidgetSettings, type ICalculator, type ICalculatorDimensionInput, type ICalculatorDimensionOutput, type ICalculatorFactory, type ICalculatorFilter, type ICalculatorIndicatorInput, type ICalculatorIndicatorOutput, type ICalculatorMeasureInput, type ICalculatorMeasureOutput, type ICalculatorOptions, type ICollapseRecord, type IColorPickerControl, type IColoredValue, type ICommonDimensions, type ICommonMeasures, type ICommonState, type IControlRecord, type ICustomAddButtonProps, type ICustomWidgetProps, type IDefinition, type IDimensionSelection, type IDimensionSelectionByFormula, type IDisplayConditionControl, type IDisplayPredicate, type IDisplayRule, type IDivePanelDescription, type IDividerRecord, type IEdge, type IEventsColorControl, type IEventsPickerControl, type IExportColumnOrder, type IFillSettings, type IFilterControl, type IFormattingControl, type IFormattingTemplateControl, type IFormulaControl, type IFormulaFilterValue, type IGeneralCalculator, type IGeneralCalculatorExportInput, type IGeneralCalculatorInput, type IGeneralCalculatorOutput, type IGlobalContext, type IGraphElement, type IGroupSetDescription, type IGroupSetRecord, type IGroupSettings, type IHistogramBin, type IHistogramCalculator, type IHistogramCalculatorInput, type IHistogramCalculatorOutput, type IIndicatorLink, type IInitialSettings, type IInputControl, type IInputMarkdownControl, type IInputNumberControl, type IInputRangeControl, type ILens, type IMarkdownMeasure, type IMeasureAddButtonProps, type IPanelDescription, type IPanelDescriptionCreator, type IParameterColumnList, type IParameterFromAggregation, type IParameterFromColumn, type IParameterFromDynamicList, type IParameterFromEndEvent, type IParameterFromEvent, type IParameterFromFormula, type IParameterFromManualInput, type IParameterFromStartEvent, type IParameterFromStaticList, type IParameterFromVariable, type IParameterTableList, type IPieCalculator, type IPieCalculatorInput, type IPieCalculatorOutput, type IProcessEventFilterValue, type IProcessEventIndicator, type IProcessFilterPreviewParams, type IProcessGraphCalculator, type IProcessGraphCalculatorInput, type IProcessGraphCalculatorOutput, type IProcessIndicator, type IProcessTransitionFilterValue, type IProcessTransitionIndicator, type IRadioIconGroupControl, type IRange, type ISelectBranchOption, type ISelectControl, type ISelectDividerOption, type ISelectGroupOption, type ISelectLeafOption, type ISelectNode, type ISelectOption, type ISelectSystemOption, type ISettingsMigratorParams, type ISizeControl, type ISortOrder, type ISortingAddButtonProps, type IStagesFilterValue, type IStaticListLabeledOption, type ISwitchControl, type ITagSetControl, type ITwoLimitsCalculator, type ITwoLimitsCalculatorExportInput, type ITwoLimitsCalculatorInput, type ITwoLimitsCalculatorOutput, type ITypeCalculator, type ITypeCalculatorInput, type ITypeCalculatorOutput, type ITypeCalculatorOutputItem, type ITypedFormulaControl, type IVertex, type IViewAction, type IViewContext, type IWidget, type IWidgetAction, type IWidgetColumnIndicator, type IWidgetColumnListVariable, type IWidgetDimension, type IWidgetDimensionHierarchy, type IWidgetDynamicListVariable, type IWidgetEntity, type IWidgetFilter, type IWidgetFiltration, type IWidgetFormatting, type IWidgetIndicator, type IWidgetIndicatorAddButtonProps, type IWidgetManifest, type IWidgetMeasure, type IWidgetMigrator, type IWidgetPersistValue, type IWidgetPlaceholderController, type IWidgetPlaceholderValues, type IWidgetPresetSettings, type IWidgetProcess, type IWidgetProps, type IWidgetSortingIndicator, type IWidgetStaticListVariable, type IWidgetStaticVariable, type IWidgetStruct, type IWidgetTable, type IWidgetTableColumn, OuterAggregation, type TAction, type TActionOnClickParameter, type TActionOpenView, type TActionValidator, type TActionsOnClick, type TAddButton, type TBoundedContentWithIndicator, type TColor, type TColorBase, type TColorRule, type TColumnIndicatorValue, type TContextMenu, type TContextMenuButton, type TContextMenuButtonActions, type TContextMenuButtonApply, type TContextMenuButtonClose, type TContextMenuButtonCustom, type TContextMenuButtonGroup, type TContextMenuButtonOptions, type TContextMenuList, type TContextMenuPositionUnit, type TContextMenuRow, type TControlUnion, type TCustomAddButtonSelectOption, type TDefineWidgetOptions, type TDisplayCondition, type TDisplayMode, type TEmptyRecord, type TExtendedFormulaFilterValue, type TFiltrationAccessibility, type TGroupLevelRecord, type THintPlacement, type TLaunchActionParams, type TMeasureAddButtonSelectOption, type TMigrateProcessor, type TMigrationStruct, type TParameterFromDataModel, type TProcessIndicatorValue, type TRecordAccessor, type TSelectChildOptions, type TSelectFetchNodes, type TSelectivePartial, type TSortDirection, type TUpdateSelection, type TValuePath, type TVersion, type TViewActionParameter, type TWidgetActionParameter, type TWidgetContainer, type TWidgetDimensionData, type TWidgetFilterValue, type TWidgetFiltering, type TWidgetIndicatorAggregationValue, type TWidgetIndicatorConversionValue, type TWidgetIndicatorDurationValue, type TWidgetIndicatorTimeValue, type TWidgetLevelRecord, type TWidgetMeasureData, type TWidgetSortingValue, type TWidgetVariable, applyIndexToArrayFormula, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, createEscaper, createAggregationTemplate as createMeasureAggregationTemplate, curlyBracketsContentPattern, dashboardLinkRegExp, dimensionAggregationTemplates, dimensionTemplateFormulas, displayConditionTemplate, doubleQuoteContentPattern, durationTemplates, escapeCurlyBracketLinkName, escapeDoubleQuoteLinkName, eventMeasureTemplateFormulas, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getRuleColor, getTransitionMeasureFormula, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareConversionParams, prepareDimensionAggregationParams, prepareDurationParams, prepareFormulaForSql, prepareMeasureAggregationParams, prepareSortOrders, prepareTimeParams, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, timeTemplates, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
2735
+ export { EActionButtonsTypes, EActionTypes, EActivateConditionMode, EAutoUpdateMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDataModelOption, EDimensionAggregationTemplateName, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationTemplateName, EDurationUnit, EEventAppearances, EEventMeasureTemplateNames, EFontWeight, EFormatOrFormattingMode, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureAggregationTemplateName, EMeasureTemplateNames, EOuterAggregation, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESimpleInputType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, type IActionButton, type IActionGoToUrl, type IActionOnClickControl, type IActionRunScript, type IActionScript, type IActionUpdateVariable, type IAddButtonSelectOption, type IAddDurationOfTransitionFilter, type IAddPresenceOfEventFilter, type IAddPresenceOfTransitionFilter, type IAddRepetitionOfEventFilter, type IAutoIdentifiedArrayItem, type IBaseDimensionsAndMeasuresCalculator, type IBaseDimensionsAndMeasuresCalculatorInput, type IBaseDimensionsAndMeasuresCalculatorOutput, type IBaseWidgetSettings, type ICalculator, type ICalculatorDimensionInput, type ICalculatorDimensionOutput, type ICalculatorFactory, type ICalculatorFilter, type ICalculatorIndicatorInput, type ICalculatorIndicatorOutput, type ICalculatorMeasureInput, type ICalculatorMeasureOutput, type ICalculatorOptions, type ICollapseRecord, type IColorPickerControl, type IColoredValue, type ICommonDimensions, type ICommonMeasures, type ICommonState, type IControlRecord, type ICustomAddButtonProps, type ICustomWidgetProps, type IDefinition, type IDimensionSelection, type IDimensionSelectionByFormula, type IDisplayConditionControl, type IDisplayPredicate, type IDisplayRule, type IDivePanelDescription, type IDividerRecord, type IEdge, type IEventsColorControl, type IEventsPickerControl, type IExportColumnOrder, type IFillSettings, type IFilterControl, type IFormattingControl, type IFormattingTemplateControl, type IFormulaControl, type IFormulaFilterValue, type IGeneralCalculator, type IGeneralCalculatorExportInput, type IGeneralCalculatorInput, type IGeneralCalculatorOutput, type IGlobalContext, type IGraphElement, type IGroupSetDescription, type IGroupSetRecord, type IGroupSettings, type IHistogramBin, type IHistogramCalculator, type IHistogramCalculatorInput, type IHistogramCalculatorOutput, type IIndicatorLink, type IInitialSettings, type IInputControl, type IInputMarkdownControl, type IInputNumberControl, type IInputRangeControl, type IInputTemplatedControl, type ILens, type IMarkdownMeasure, type IMeasureAddButtonProps, type IPanelDescription, type IPanelDescriptionCreator, type IParameterColumnList, type IParameterFromAggregation, type IParameterFromColumn, type IParameterFromDynamicList, type IParameterFromEndEvent, type IParameterFromEvent, type IParameterFromFormula, type IParameterFromManualInput, type IParameterFromStartEvent, type IParameterFromStaticList, type IParameterFromVariable, type IParameterTableList, type IPieCalculator, type IPieCalculatorInput, type IPieCalculatorOutput, type IProcessEventFilterValue, type IProcessEventIndicator, type IProcessFilterPreviewParams, type IProcessGraphCalculator, type IProcessGraphCalculatorInput, type IProcessGraphCalculatorOutput, type IProcessIndicator, type IProcessTransitionFilterValue, type IProcessTransitionIndicator, type IRadioIconGroupControl, type IRange, type ISelectBranchOption, type ISelectControl, type ISelectDividerOption, type ISelectGroupOption, type ISelectLeafOption, type ISelectNode, type ISelectOption, type ISelectSystemOption, type ISettingsMigratorParams, type ISizeControl, type ISortOrder, type ISortingAddButtonProps, type IStagesFilterValue, type IStaticListLabeledOption, type ISwitchControl, type ITagSetControl, type ITwoLimitsCalculator, type ITwoLimitsCalculatorExportInput, type ITwoLimitsCalculatorInput, type ITwoLimitsCalculatorOutput, type ITypeCalculator, type ITypeCalculatorInput, type ITypeCalculatorOutput, type ITypeCalculatorOutputItem, type ITypedFormulaControl, type IVertex, type IViewAction, type IViewContext, type IWidget, type IWidgetAction, type IWidgetColumnIndicator, type IWidgetColumnListVariable, type IWidgetDimension, type IWidgetDimensionHierarchy, type IWidgetDynamicListVariable, type IWidgetEntity, type IWidgetFilter, type IWidgetFiltration, type IWidgetFormatting, type IWidgetIndicator, type IWidgetIndicatorAddButtonProps, type IWidgetManifest, type IWidgetMeasure, type IWidgetMigrator, type IWidgetPersistValue, type IWidgetPlaceholderController, type IWidgetPlaceholderValues, type IWidgetPresetSettings, type IWidgetProcess, type IWidgetProps, type IWidgetSortingIndicator, type IWidgetStaticListVariable, type IWidgetStaticVariable, type IWidgetStruct, type IWidgetTable, type IWidgetTableColumn, OuterAggregation, type TAction, type TActionOnClickParameter, type TActionOpenView, type TActionValidator, type TActionsOnClick, type TAddButton, type TBoundedContentWithIndicator, type TColor, type TColorBase, type TColorRule, type TColumnIndicatorValue, type TContextMenu, type TContextMenuButton, type TContextMenuButtonActions, type TContextMenuButtonApply, type TContextMenuButtonClose, type TContextMenuButtonCustom, type TContextMenuButtonGroup, type TContextMenuButtonOptions, type TContextMenuList, type TContextMenuPositionUnit, type TContextMenuRow, type TControlUnion, type TCustomAddButtonSelectOption, type TDefineWidgetOptions, type TDisplayCondition, type TDisplayMode, type TEmptyRecord, type TExtendedFormulaFilterValue, type TFiltrationAccessibility, type TGroupLevelRecord, type THintPlacement, type TLaunchActionParams, type TMeasureAddButtonSelectOption, type TMigrateProcessor, type TMigrationStruct, type TParameterFromDataModel, type TProcessIndicatorValue, type TRecordAccessor, type TSelectChildOptions, type TSelectFetchNodes, type TSelectivePartial, type TSortDirection, type TUpdateSelection, type TValuePath, type TVersion, type TViewActionParameter, type TWidgetActionParameter, type TWidgetContainer, type TWidgetDimensionData, type TWidgetFilterValue, type TWidgetFiltering, type TWidgetIndicatorAggregationValue, type TWidgetIndicatorConversionValue, type TWidgetIndicatorDurationValue, type TWidgetIndicatorTimeValue, type TWidgetLevelRecord, type TWidgetMeasureData, type TWidgetSortingValue, type TWidgetVariable, applyIndexToArrayFormula, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, createEscaper, createAggregationTemplate as createMeasureAggregationTemplate, curlyBracketsContentPattern, dashboardLinkRegExp, dimensionAggregationTemplates, dimensionTemplateFormulas, displayConditionTemplate, doubleQuoteContentPattern, durationTemplates, escapeCurlyBracketLinkName, escapeDoubleQuoteLinkName, eventMeasureTemplateFormulas, fillTemplateSql, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getRuleColor, getTransitionMeasureFormula, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareConversionParams, prepareDimensionAggregationParams, prepareDurationParams, prepareFormulaForSql, prepareMeasureAggregationParams, prepareSortOrders, prepareTimeParams, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, timeTemplates, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateSingleModeSelection, workspaceLinkRegExp };