@infomaximum/widget-sdk 6.0.0-5 → 6.0.0-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 +11 -0
- package/dist/index.d.ts +518 -498
- package/dist/index.esm.js +11 -3
- package/dist/index.js +10 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [6.0.0-6](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-5...v6.0.0-6) (2025-09-02)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* Удален formattingTemplate. Изменены поля формат и форматирование
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* изменены формат и форматирование. Удален formattingTemplate. Добавлен новый контрол inputTemplated. ([7c3d230](https://github.com/Infomaximum/widget-sdk/commit/7c3d230c443f897d20be4ec4a23f6fe6b914a213))
|
|
15
|
+
|
|
5
16
|
## [6.0.0-5](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-4...v6.0.0-5) (2025-09-01)
|
|
6
17
|
|
|
7
18
|
|
package/dist/index.d.ts
CHANGED
|
@@ -73,353 +73,6 @@ 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
|
-
/**
|
|
277
|
-
* Параметры, которые влияют на отображаемый контент в окне настройки процессного фильтра,
|
|
278
|
-
* но не учитываются при применении фильтра.
|
|
279
|
-
*/
|
|
280
|
-
interface IProcessFilterPreviewParams {
|
|
281
|
-
/**
|
|
282
|
-
* События, доступные при выборе процесса.
|
|
283
|
-
* Если параметр не передан, используются все события процесса на основе запроса к вычислителю.
|
|
284
|
-
*/
|
|
285
|
-
eventsNamesByProcessKey?: Map<string, (string | null)[]>;
|
|
286
|
-
/** Фильтры событий */
|
|
287
|
-
eventFilters?: TExtendedFormulaFilterValue[];
|
|
288
|
-
}
|
|
289
|
-
interface IProcessEventFilterValue {
|
|
290
|
-
processKey: string;
|
|
291
|
-
eventName: string;
|
|
292
|
-
}
|
|
293
|
-
interface IProcessTransitionFilterValue {
|
|
294
|
-
startEventProcessKey: string;
|
|
295
|
-
startEventName: string;
|
|
296
|
-
endEventProcessKey: string;
|
|
297
|
-
endEventName: string;
|
|
298
|
-
}
|
|
299
|
-
interface IClickPosition {
|
|
300
|
-
x: number;
|
|
301
|
-
y: number;
|
|
302
|
-
elementWidth?: number;
|
|
303
|
-
elementHeight?: number;
|
|
304
|
-
}
|
|
305
|
-
interface IPositionConfig extends IClickPosition {
|
|
306
|
-
offsetX?: number;
|
|
307
|
-
offsetY?: number;
|
|
308
|
-
}
|
|
309
|
-
interface IAddPresenceOfEventFilter {
|
|
310
|
-
(name: EProcessFilterNames.presenceOfEvent, value: IProcessEventFilterValue, positionConfig?: IPositionConfig, previewParams?: IProcessFilterPreviewParams): void;
|
|
311
|
-
}
|
|
312
|
-
interface IAddRepetitionOfEventFilter {
|
|
313
|
-
(name: EProcessFilterNames.repetitionOfEvent, value: IProcessEventFilterValue, positionConfig?: IPositionConfig, previewParams?: IProcessFilterPreviewParams): void;
|
|
314
|
-
}
|
|
315
|
-
interface IAddPresenceOfTransitionFilter {
|
|
316
|
-
(name: EProcessFilterNames.presenceOfTransition, value: IProcessTransitionFilterValue, positionConfig?: IPositionConfig, previewParams?: IProcessFilterPreviewParams): void;
|
|
317
|
-
}
|
|
318
|
-
interface IAddDurationOfTransitionFilter {
|
|
319
|
-
(name: EProcessFilterNames.durationOfTransition, value: IProcessTransitionFilterValue, positionConfig?: IPositionConfig, previewParams?: IProcessFilterPreviewParams): void;
|
|
320
|
-
}
|
|
321
|
-
declare enum EFormulaFilterFieldKeys {
|
|
322
|
-
date = "date",
|
|
323
|
-
dateRange = "dateRange",
|
|
324
|
-
numberRange = "numberRange",
|
|
325
|
-
string = "string",
|
|
326
|
-
lastTimeValue = "lastTimeValue",
|
|
327
|
-
lastTimeUnit = "lastTimeUnit",
|
|
328
|
-
durationUnit = "durationUnit"
|
|
329
|
-
}
|
|
330
|
-
interface IFormulaFilterValue {
|
|
331
|
-
/** Заголовок фильтра */
|
|
332
|
-
name: TNullable<string>;
|
|
333
|
-
/** Формула */
|
|
334
|
-
formula: string;
|
|
335
|
-
/**
|
|
336
|
-
* Индекс элемента в результате вычисления формулы (если результат - массив).
|
|
337
|
-
*
|
|
338
|
-
* Используется, когда формула возвращает массив значений, но требуется работать только с одним конкретным элементом.
|
|
339
|
-
* Индекс добавляется к вычисляемой формуле, позволяя выбрать нужный элемент из результирующего массива.
|
|
340
|
-
*
|
|
341
|
-
* **Важно:** Индексация начинается с 1, т.к. используется ClickHouse (1-based).
|
|
342
|
-
*/
|
|
343
|
-
sliceIndex?: number;
|
|
344
|
-
/** Тип данных формулы (без учета `sliceIndex`) */
|
|
345
|
-
dbDataType: string;
|
|
346
|
-
/** Формат */
|
|
347
|
-
format: EFormatTypes;
|
|
348
|
-
/** Метод фильтрации */
|
|
349
|
-
filteringMethod: valueof<typeof formulaFilterMethods>;
|
|
350
|
-
/** Выбранные в списке значения в виде моделей */
|
|
351
|
-
checkedValues?: (string | null)[];
|
|
352
|
-
/** Значения полей формы редактора */
|
|
353
|
-
formValues?: Partial<{
|
|
354
|
-
[EFormulaFilterFieldKeys.date]: string | null;
|
|
355
|
-
[EFormulaFilterFieldKeys.dateRange]: [string, string];
|
|
356
|
-
[EFormulaFilterFieldKeys.numberRange]: Partial<[number, number]>;
|
|
357
|
-
[EFormulaFilterFieldKeys.string]: string;
|
|
358
|
-
[EFormulaFilterFieldKeys.lastTimeValue]: number;
|
|
359
|
-
[EFormulaFilterFieldKeys.lastTimeUnit]: ELastTimeUnit;
|
|
360
|
-
[EFormulaFilterFieldKeys.durationUnit]: EDurationUnit;
|
|
361
|
-
}>;
|
|
362
|
-
}
|
|
363
|
-
type TExtendedFormulaFilterValue = {
|
|
364
|
-
formula: string;
|
|
365
|
-
} | IFormulaFilterValue;
|
|
366
|
-
interface IStagesFilterItem {
|
|
367
|
-
id: number;
|
|
368
|
-
/** Название этапа */
|
|
369
|
-
name: string;
|
|
370
|
-
/** Формула фильтра этапа */
|
|
371
|
-
formula: string;
|
|
372
|
-
isSelected: boolean;
|
|
373
|
-
}
|
|
374
|
-
interface IStagesFilterValue {
|
|
375
|
-
/** Ключ виджета */
|
|
376
|
-
widgetKey: string;
|
|
377
|
-
/** Заголовок фильтра */
|
|
378
|
-
name: TNullable<string>;
|
|
379
|
-
/** Этапы */
|
|
380
|
-
stages: IStagesFilterItem[];
|
|
381
|
-
}
|
|
382
|
-
type TWidgetFilterValue = TExtendedFormulaFilterValue | IStagesFilterValue | IProcessEventFilterValue | IProcessTransitionFilterValue;
|
|
383
|
-
interface IWidgetFilter {
|
|
384
|
-
/** Значение фильтра */
|
|
385
|
-
filterValue: TWidgetFilterValue;
|
|
386
|
-
/** Значение фильтра, подготовленное для передачи в вычислитель */
|
|
387
|
-
preparedFilterValue: ICalculatorFilter;
|
|
388
|
-
/** Информация о возможности менять фильтр из виджета */
|
|
389
|
-
isReadonly: boolean;
|
|
390
|
-
}
|
|
391
|
-
interface IWidgetFiltration {
|
|
392
|
-
/** Информация о внешних фильтрах виджета */
|
|
393
|
-
filters: IWidgetFilter[];
|
|
394
|
-
/**
|
|
395
|
-
* Значения внешних фильтров виджета, подготовленные для передачи в вычислитель.
|
|
396
|
-
* Использует данные из filters, но предоставлено отдельным полем для удобства разработки.
|
|
397
|
-
*/
|
|
398
|
-
preparedFilterValues: ICalculatorFilter[];
|
|
399
|
-
/** Добавить фильтр по формуле */
|
|
400
|
-
addFormulaFilter(value: TSelectivePartial<IFormulaFilterValue, "format" | "formValues">): void;
|
|
401
|
-
/**
|
|
402
|
-
* Удалить фильтр, заданный формулой, из текущего набора фильтров
|
|
403
|
-
*
|
|
404
|
-
* @param formula Формула фильтра, который необходимо удалить. Должна точно соответствовать
|
|
405
|
-
* формуле ранее добавленного фильтра (с учетом регистра и пробелов).
|
|
406
|
-
* @param [sliceIndex] Опциональный индекс элемента массива. См. {@link IFormulaFilterValue.sliceIndex}.
|
|
407
|
-
*
|
|
408
|
-
* @remarks
|
|
409
|
-
* - Если фильтр был добавлен без указания индекса, его нужно удалять без указания индекса.
|
|
410
|
-
* - Если фильтр был добавлен с индексом, тот же индекс должен быть указан при удалении.
|
|
411
|
-
* - Удаление происходит по точному совпадению формулы и индекса (если он был указан).
|
|
412
|
-
*/
|
|
413
|
-
removeFormulaFilter(formula: string, sliceIndex?: number): void;
|
|
414
|
-
/** Добавить процессный фильтр */
|
|
415
|
-
addProcessFilter(...args: Parameters<IAddPresenceOfEventFilter> | Parameters<IAddRepetitionOfEventFilter> | Parameters<IAddPresenceOfTransitionFilter> | Parameters<IAddDurationOfTransitionFilter>): void;
|
|
416
|
-
/** Добавить фильтр по этапам */
|
|
417
|
-
addStagesFilter(value: Omit<IStagesFilterValue, "widgetKey">): void;
|
|
418
|
-
/** Удалить фильтр по этапам */
|
|
419
|
-
removeStagesFilter(widgetKey: string): void;
|
|
420
|
-
}
|
|
421
|
-
declare const isFormulaFilterValue: (value: TExtendedFormulaFilterValue) => value is IFormulaFilterValue;
|
|
422
|
-
|
|
423
76
|
declare enum EWidgetFilterMode {
|
|
424
77
|
DEFAULT = "DEFAULT",
|
|
425
78
|
SINGLE = "SINGLE",
|
|
@@ -452,14 +105,162 @@ type TDisplayCondition = {
|
|
|
452
105
|
variableName: TNullable<string>;
|
|
453
106
|
variableValue: TNullable<string>;
|
|
454
107
|
};
|
|
455
|
-
interface IRange {
|
|
456
|
-
unit?: string;
|
|
457
|
-
min?: number;
|
|
458
|
-
max?: number;
|
|
108
|
+
interface IRange {
|
|
109
|
+
unit?: string;
|
|
110
|
+
min?: number;
|
|
111
|
+
max?: number;
|
|
112
|
+
}
|
|
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;
|
|
459
247
|
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
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;
|
|
463
264
|
}
|
|
464
265
|
|
|
465
266
|
declare enum ESortDirection {
|
|
@@ -520,9 +321,8 @@ type TProcessIndicatorValue = {
|
|
|
520
321
|
interface IProcessIndicator extends IWidgetIndicator {
|
|
521
322
|
value?: TProcessIndicatorValue;
|
|
522
323
|
dbDataType?: string;
|
|
523
|
-
format?:
|
|
524
|
-
formatting?:
|
|
525
|
-
formattingTemplate?: string;
|
|
324
|
+
format?: IWidgetColumnIndicator["format"];
|
|
325
|
+
formatting?: IWidgetColumnIndicator["formatting"];
|
|
526
326
|
displayCondition?: TDisplayCondition;
|
|
527
327
|
}
|
|
528
328
|
interface IProcessEventIndicator extends IProcessIndicator {
|
|
@@ -576,12 +376,21 @@ type TColumnIndicatorValue = {
|
|
|
576
376
|
/** Имя колонки */
|
|
577
377
|
columnName?: string;
|
|
578
378
|
};
|
|
379
|
+
declare enum EFormatOrFormattingMode {
|
|
380
|
+
BASE = "BASE",
|
|
381
|
+
TEMPLATE = "TEMPLATE"
|
|
382
|
+
}
|
|
579
383
|
/** Общий интерфейс разреза и меры */
|
|
580
384
|
interface IWidgetColumnIndicator extends IWidgetIndicator {
|
|
581
385
|
dbDataType?: string;
|
|
582
|
-
format?:
|
|
583
|
-
|
|
584
|
-
|
|
386
|
+
format?: {
|
|
387
|
+
value?: EFormatTypes;
|
|
388
|
+
mode: EFormatOrFormattingMode;
|
|
389
|
+
};
|
|
390
|
+
formatting?: {
|
|
391
|
+
value?: EFormattingPresets;
|
|
392
|
+
mode: EFormatOrFormattingMode;
|
|
393
|
+
};
|
|
585
394
|
displayCondition?: TDisplayCondition;
|
|
586
395
|
onClick?: TActionsOnClick[];
|
|
587
396
|
}
|
|
@@ -602,7 +411,6 @@ interface IWidgetMeasure extends Omit<IWidgetColumnIndicator, "value"> {
|
|
|
602
411
|
}) | TWidgetIndicatorConversionValue | TWidgetIndicatorDurationValue;
|
|
603
412
|
}
|
|
604
413
|
interface IMarkdownMeasure extends IWidgetMeasure {
|
|
605
|
-
format: EFormatTypes;
|
|
606
414
|
displaySign: EMarkdownDisplayMode;
|
|
607
415
|
}
|
|
608
416
|
/** Тип показателя */
|
|
@@ -754,153 +562,352 @@ type TWidgetIndicatorTimeValue = {
|
|
|
754
562
|
filters: TExtendedFormulaFilterValue[];
|
|
755
563
|
};
|
|
756
564
|
|
|
757
|
-
|
|
758
|
-
/**
|
|
759
|
-
|
|
760
|
-
/**
|
|
761
|
-
|
|
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"
|
|
764
|
+
}
|
|
765
|
+
/**
|
|
766
|
+
* Параметры, которые влияют на отображаемый контент в окне настройки процессного фильтра,
|
|
767
|
+
* но не учитываются при применении фильтра.
|
|
768
|
+
*/
|
|
769
|
+
interface IProcessFilterPreviewParams {
|
|
770
|
+
/**
|
|
771
|
+
* События, доступные при выборе процесса.
|
|
772
|
+
* Если параметр не передан, используются все события процесса на основе запроса к вычислителю.
|
|
773
|
+
*/
|
|
774
|
+
eventsNamesByProcessKey?: Map<string, (string | null)[]>;
|
|
775
|
+
/** Фильтры событий */
|
|
776
|
+
eventFilters?: TExtendedFormulaFilterValue[];
|
|
762
777
|
}
|
|
763
|
-
interface
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
isArray: boolean;
|
|
778
|
+
interface IProcessEventFilterValue {
|
|
779
|
+
processKey: string;
|
|
780
|
+
eventName: string;
|
|
767
781
|
}
|
|
768
|
-
interface
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
782
|
+
interface IProcessTransitionFilterValue {
|
|
783
|
+
startEventProcessKey: string;
|
|
784
|
+
startEventName: string;
|
|
785
|
+
endEventProcessKey: string;
|
|
786
|
+
endEventName: string;
|
|
772
787
|
}
|
|
773
|
-
interface
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
788
|
+
interface IClickPosition {
|
|
789
|
+
x: number;
|
|
790
|
+
y: number;
|
|
791
|
+
elementWidth?: number;
|
|
792
|
+
elementHeight?: number;
|
|
778
793
|
}
|
|
779
|
-
interface
|
|
780
|
-
|
|
794
|
+
interface IPositionConfig extends IClickPosition {
|
|
795
|
+
offsetX?: number;
|
|
796
|
+
offsetY?: number;
|
|
781
797
|
}
|
|
782
|
-
interface
|
|
783
|
-
|
|
784
|
-
language: ELanguages;
|
|
785
|
-
/** Имя отчета */
|
|
786
|
-
reportName: string;
|
|
787
|
-
/** Имена образов по их ключу(в текущем отчете) */
|
|
788
|
-
viewNameByKey: Map<string, string>;
|
|
789
|
-
/** Меры уровня отчета */
|
|
790
|
-
reportMeasures: TNullable<Map<string, ICommonMeasures>>;
|
|
791
|
-
/** Меры уровня пространства(из модели данных) */
|
|
792
|
-
workspaceMeasures: TNullable<Map<string, Map<string, ICommonMeasures>>>;
|
|
793
|
-
/** Разрезы уровня отчета */
|
|
794
|
-
reportDimensions: TNullable<Map<string, ICommonDimensions>>;
|
|
795
|
-
/** Разрезы уровня пространства(из модели данных) */
|
|
796
|
-
workspaceDimensions: TNullable<Map<string, Map<string, ICommonDimensions>>>;
|
|
797
|
-
/** Правила отображения уровня */
|
|
798
|
-
reportDisplayRules: Map<string, IDisplayRule>;
|
|
799
|
-
/** Правила отображения уровня пространства(из модели данных) */
|
|
800
|
-
workspaceDisplayRules: Map<string, Map<string, IDisplayRule>>;
|
|
801
|
-
/** Пользовательские переменные уровня отчета */
|
|
802
|
-
variables: Map<string, TWidgetVariable>;
|
|
803
|
-
/** Метод установки значения пользовательской переменной уровня отчета */
|
|
804
|
-
setVariableValue(name: string, value: TWidgetVariable["value"]): TWidgetVariable["value"];
|
|
805
|
-
/** Метод очистки значения пользовательской переменной уровня отчета */
|
|
806
|
-
unsetVariableValue(name: string): TWidgetVariable["value"];
|
|
807
|
-
/** Состояния(название сущности) отчета */
|
|
808
|
-
states: Map<string, ICommonState>;
|
|
809
|
-
/** Процессы из модели данных (по ключу) */
|
|
810
|
-
processByKey: Map<string, IWidgetProcess>;
|
|
811
|
-
/** Имена таблиц из модели данных */
|
|
812
|
-
tables: Set<string>;
|
|
813
|
-
/** Функция для запроса информации о колонках таблицы из модели данных */
|
|
814
|
-
fetchColumnsByTableName(tableName: string): Promise<IWidgetTableColumn[] | undefined>;
|
|
815
|
-
/** Скрипты, доступные для запуска из отчета */
|
|
816
|
-
scripts: Map<string, IActionScript>;
|
|
798
|
+
interface IAddPresenceOfEventFilter {
|
|
799
|
+
(name: EProcessFilterNames.presenceOfEvent, value: IProcessEventFilterValue, positionConfig?: IPositionConfig, previewParams?: IProcessFilterPreviewParams): void;
|
|
817
800
|
}
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
/** Окрашивание отключено */
|
|
821
|
-
DISABLED = "DISABLED",
|
|
822
|
-
/** Цвет каждого значения вычисляется по формуле */
|
|
823
|
-
FORMULA = "FORMULA",
|
|
824
|
-
/** Один цвет для всех значений */
|
|
825
|
-
BASE = "BASE",
|
|
826
|
-
/** Окрашивание каждого значения по градиенту относительно минимального и максимального значений */
|
|
827
|
-
GRADIENT = "GRADIENT",
|
|
828
|
-
/** Использовать автоматический цвет: по умолчанию определяется порядковым номером показателя */
|
|
829
|
-
AUTO = "AUTO",
|
|
830
|
-
/** Использовать цвет из правила отображения (в правиле отображения рекурсивно определен цвет) */
|
|
831
|
-
RULE = "RULE",
|
|
832
|
-
/** Задать цвет конкретным значениям разреза */
|
|
833
|
-
VALUES = "VALUES",
|
|
834
|
-
/** Задать цвет конкретным значениям общего разреза. Режим используется только для настроек правила отображения */
|
|
835
|
-
BY_DIMENSION = "BY_DIMENSION"
|
|
801
|
+
interface IAddRepetitionOfEventFilter {
|
|
802
|
+
(name: EProcessFilterNames.repetitionOfEvent, value: IProcessEventFilterValue, positionConfig?: IPositionConfig, previewParams?: IProcessFilterPreviewParams): void;
|
|
836
803
|
}
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
value?: string;
|
|
840
|
-
};
|
|
841
|
-
type TColorRule = {
|
|
842
|
-
mode: EColorMode.RULE;
|
|
843
|
-
formula: string;
|
|
844
|
-
};
|
|
845
|
-
interface IColoredValue {
|
|
846
|
-
value: string;
|
|
847
|
-
color: TColorBase | TColorRule;
|
|
804
|
+
interface IAddPresenceOfTransitionFilter {
|
|
805
|
+
(name: EProcessFilterNames.presenceOfTransition, value: IProcessTransitionFilterValue, positionConfig?: IPositionConfig, previewParams?: IProcessFilterPreviewParams): void;
|
|
848
806
|
}
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
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
|
+
/** Формула */
|
|
852
823
|
formula: string;
|
|
853
|
-
} | TColorBase | {
|
|
854
|
-
mode: EColorMode.GRADIENT;
|
|
855
|
-
startValue: string;
|
|
856
|
-
endValue: string;
|
|
857
|
-
classCount?: TNullable<number>;
|
|
858
|
-
} | {
|
|
859
|
-
mode: EColorMode.AUTO;
|
|
860
|
-
} | TColorRule | {
|
|
861
|
-
mode: EColorMode.VALUES;
|
|
862
|
-
items: IColoredValue[];
|
|
863
|
-
} | {
|
|
864
|
-
mode: EColorMode.BY_DIMENSION;
|
|
865
|
-
/** Имя разреза из области видимости правила отображения */
|
|
866
|
-
dimensionName: string;
|
|
867
|
-
items: IColoredValue[];
|
|
868
|
-
} | {
|
|
869
|
-
mode: EColorMode.DISABLED;
|
|
870
|
-
};
|
|
871
|
-
declare const getRuleColor: (ruleFormula: string, globalContext: Pick<IGlobalContext, "reportDisplayRules" | "workspaceDisplayRules">) => TColor | undefined;
|
|
872
|
-
declare const isValidColor: (color: TColor, globalContext: Pick<IGlobalContext, "reportDisplayRules" | "workspaceDisplayRules">) => boolean;
|
|
873
|
-
declare const colors: string[];
|
|
874
|
-
/**
|
|
875
|
-
* Получить цвет по индексу элемента
|
|
876
|
-
* @param index - индекс элемента, которому требуется цвет
|
|
877
|
-
*/
|
|
878
|
-
declare const getColorByIndex: (index: number) => string;
|
|
879
|
-
|
|
880
|
-
interface IAutoIdentifiedArrayItem {
|
|
881
824
|
/**
|
|
882
|
-
*
|
|
883
|
-
*
|
|
825
|
+
* Индекс элемента в результате вычисления формулы (если результат - массив).
|
|
826
|
+
*
|
|
827
|
+
* Используется, когда формула возвращает массив значений, но требуется работать только с одним конкретным элементом.
|
|
828
|
+
* Индекс добавляется к вычисляемой формуле, позволяя выбрать нужный элемент из результирующего массива.
|
|
829
|
+
*
|
|
830
|
+
* **Важно:** Индексация начинается с 1, т.к. используется ClickHouse (1-based).
|
|
884
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
|
+
}>;
|
|
851
|
+
}
|
|
852
|
+
type TExtendedFormulaFilterValue = {
|
|
853
|
+
formula: string;
|
|
854
|
+
} | IFormulaFilterValue;
|
|
855
|
+
interface IStagesFilterItem {
|
|
885
856
|
id: number;
|
|
857
|
+
/** Название этапа */
|
|
858
|
+
name: string;
|
|
859
|
+
/** Формула фильтра этапа */
|
|
860
|
+
formula: string;
|
|
861
|
+
isSelected: boolean;
|
|
886
862
|
}
|
|
887
|
-
interface
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
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[];
|
|
883
|
+
/**
|
|
884
|
+
* Значения внешних фильтров виджета, подготовленные для передачи в вычислитель.
|
|
885
|
+
* Использует данные из filters, но предоставлено отдельным полем для удобства разработки.
|
|
886
|
+
*/
|
|
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;
|
|
903
909
|
}
|
|
910
|
+
declare const isFormulaFilterValue: (value: TExtendedFormulaFilterValue) => value is IFormulaFilterValue;
|
|
904
911
|
|
|
905
912
|
declare enum EWidgetActionInputMethod {
|
|
906
913
|
COLUMN = "COLUMN",
|
|
@@ -1162,6 +1169,8 @@ type THintPlacement = "top" | "left" | "right" | "bottom" | "topLeft" | "topRigh
|
|
|
1162
1169
|
declare enum EControlType {
|
|
1163
1170
|
/** Ввод текста */
|
|
1164
1171
|
input = "input",
|
|
1172
|
+
/** Ввод текста с поддержкой шаблонной вставки сущностей */
|
|
1173
|
+
inputTemplate = "inputTemplate",
|
|
1165
1174
|
/** Ввод текста в формате markdown */
|
|
1166
1175
|
inputMarkdown = "inputMarkdown",
|
|
1167
1176
|
/** Ввод числа */
|
|
@@ -1204,6 +1213,7 @@ declare enum EControlType {
|
|
|
1204
1213
|
}
|
|
1205
1214
|
type ControlsMap = {
|
|
1206
1215
|
[EControlType.input]: IInputControl;
|
|
1216
|
+
[EControlType.inputTemplate]: IInputTemplatedControl;
|
|
1207
1217
|
[EControlType.inputMarkdown]: IInputMarkdownControl;
|
|
1208
1218
|
[EControlType.inputNumber]: IInputNumberControl;
|
|
1209
1219
|
[EControlType.inputRange]: IInputRangeControl;
|
|
@@ -1317,6 +1327,11 @@ interface IInputControl {
|
|
|
1317
1327
|
hintPlacement?: THintPlacement;
|
|
1318
1328
|
};
|
|
1319
1329
|
}
|
|
1330
|
+
interface IInputTemplatedControl {
|
|
1331
|
+
type: EControlType.inputTemplate;
|
|
1332
|
+
value: string;
|
|
1333
|
+
props: {};
|
|
1334
|
+
}
|
|
1320
1335
|
interface IInputMarkdownControl {
|
|
1321
1336
|
type: EControlType.inputMarkdown;
|
|
1322
1337
|
value: string;
|
|
@@ -1470,9 +1485,14 @@ interface ITypedFormulaControl {
|
|
|
1470
1485
|
interface IFormattingControl {
|
|
1471
1486
|
type: EControlType.formatting;
|
|
1472
1487
|
value: {
|
|
1473
|
-
format:
|
|
1474
|
-
|
|
1475
|
-
|
|
1488
|
+
format: {
|
|
1489
|
+
value?: EFormatTypes;
|
|
1490
|
+
mode: EFormatOrFormattingMode;
|
|
1491
|
+
};
|
|
1492
|
+
formatting: {
|
|
1493
|
+
value?: EFormattingPresets;
|
|
1494
|
+
mode: EFormatOrFormattingMode;
|
|
1495
|
+
};
|
|
1476
1496
|
};
|
|
1477
1497
|
props: {
|
|
1478
1498
|
formats?: Partial<Record<ESimpleDataType, EFormatTypes[]>>;
|
|
@@ -2710,4 +2730,4 @@ declare global {
|
|
|
2710
2730
|
}
|
|
2711
2731
|
}
|
|
2712
2732
|
|
|
2713
|
-
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, updateSingleModeSelection, workspaceLinkRegExp };
|
|
2733
|
+
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, 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 };
|
package/dist/index.esm.js
CHANGED
|
@@ -680,6 +680,11 @@ var ESortingValueModes;
|
|
|
680
680
|
/** Сортировка по показателю(разрезу или мере) виджета */
|
|
681
681
|
ESortingValueModes["IN_WIDGET"] = "IN_WIDGET";
|
|
682
682
|
})(ESortingValueModes || (ESortingValueModes = {}));
|
|
683
|
+
var EFormatOrFormattingMode;
|
|
684
|
+
(function (EFormatOrFormattingMode) {
|
|
685
|
+
EFormatOrFormattingMode["BASE"] = "BASE";
|
|
686
|
+
EFormatOrFormattingMode["TEMPLATE"] = "TEMPLATE";
|
|
687
|
+
})(EFormatOrFormattingMode || (EFormatOrFormattingMode = {}));
|
|
683
688
|
/** Тип показателя */
|
|
684
689
|
var EIndicatorType;
|
|
685
690
|
(function (EIndicatorType) {
|
|
@@ -1728,7 +1733,8 @@ var getDefaultSortOrders = function (_a) {
|
|
|
1728
1733
|
}
|
|
1729
1734
|
/** Если есть временной разрез, то авто-сортировка по первому такому разрезу (по возрастанию) */
|
|
1730
1735
|
var timeDimension = dimensions.find(function (dimension) {
|
|
1731
|
-
|
|
1736
|
+
var _a;
|
|
1737
|
+
return ((_a = dimension.format) === null || _a === void 0 ? void 0 : _a.value) &&
|
|
1732
1738
|
[
|
|
1733
1739
|
EFormatTypes.DATE,
|
|
1734
1740
|
EFormatTypes.MONTH,
|
|
@@ -1741,7 +1747,7 @@ var getDefaultSortOrders = function (_a) {
|
|
|
1741
1747
|
EFormatTypes.QUARTER_YEAR,
|
|
1742
1748
|
EFormatTypes.DAY_OF_MONTH,
|
|
1743
1749
|
EFormatTypes.WEEK,
|
|
1744
|
-
].includes(dimension.format);
|
|
1750
|
+
].includes(dimension.format.value);
|
|
1745
1751
|
});
|
|
1746
1752
|
if (timeDimension) {
|
|
1747
1753
|
return [
|
|
@@ -1845,6 +1851,8 @@ var EControlType;
|
|
|
1845
1851
|
(function (EControlType) {
|
|
1846
1852
|
/** Ввод текста */
|
|
1847
1853
|
EControlType["input"] = "input";
|
|
1854
|
+
/** Ввод текста с поддержкой шаблонной вставки сущностей */
|
|
1855
|
+
EControlType["inputTemplate"] = "inputTemplate";
|
|
1848
1856
|
/** Ввод текста в формате markdown */
|
|
1849
1857
|
EControlType["inputMarkdown"] = "inputMarkdown";
|
|
1850
1858
|
/** Ввод числа */
|
|
@@ -2078,4 +2086,4 @@ var getColorByIndex = function (index) {
|
|
|
2078
2086
|
return color;
|
|
2079
2087
|
};
|
|
2080
2088
|
|
|
2081
|
-
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, OuterAggregation, 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, updateSingleModeSelection, workspaceLinkRegExp };
|
|
2089
|
+
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, OuterAggregation, 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, updateSingleModeSelection, workspaceLinkRegExp };
|
package/dist/index.js
CHANGED
|
@@ -681,6 +681,11 @@ exports.ESortingValueModes = void 0;
|
|
|
681
681
|
/** Сортировка по показателю(разрезу или мере) виджета */
|
|
682
682
|
ESortingValueModes["IN_WIDGET"] = "IN_WIDGET";
|
|
683
683
|
})(exports.ESortingValueModes || (exports.ESortingValueModes = {}));
|
|
684
|
+
exports.EFormatOrFormattingMode = void 0;
|
|
685
|
+
(function (EFormatOrFormattingMode) {
|
|
686
|
+
EFormatOrFormattingMode["BASE"] = "BASE";
|
|
687
|
+
EFormatOrFormattingMode["TEMPLATE"] = "TEMPLATE";
|
|
688
|
+
})(exports.EFormatOrFormattingMode || (exports.EFormatOrFormattingMode = {}));
|
|
684
689
|
/** Тип показателя */
|
|
685
690
|
exports.EIndicatorType = void 0;
|
|
686
691
|
(function (EIndicatorType) {
|
|
@@ -1729,7 +1734,8 @@ var getDefaultSortOrders = function (_a) {
|
|
|
1729
1734
|
}
|
|
1730
1735
|
/** Если есть временной разрез, то авто-сортировка по первому такому разрезу (по возрастанию) */
|
|
1731
1736
|
var timeDimension = dimensions.find(function (dimension) {
|
|
1732
|
-
|
|
1737
|
+
var _a;
|
|
1738
|
+
return ((_a = dimension.format) === null || _a === void 0 ? void 0 : _a.value) &&
|
|
1733
1739
|
[
|
|
1734
1740
|
exports.EFormatTypes.DATE,
|
|
1735
1741
|
exports.EFormatTypes.MONTH,
|
|
@@ -1742,7 +1748,7 @@ var getDefaultSortOrders = function (_a) {
|
|
|
1742
1748
|
exports.EFormatTypes.QUARTER_YEAR,
|
|
1743
1749
|
exports.EFormatTypes.DAY_OF_MONTH,
|
|
1744
1750
|
exports.EFormatTypes.WEEK,
|
|
1745
|
-
].includes(dimension.format);
|
|
1751
|
+
].includes(dimension.format.value);
|
|
1746
1752
|
});
|
|
1747
1753
|
if (timeDimension) {
|
|
1748
1754
|
return [
|
|
@@ -1846,6 +1852,8 @@ exports.EControlType = void 0;
|
|
|
1846
1852
|
(function (EControlType) {
|
|
1847
1853
|
/** Ввод текста */
|
|
1848
1854
|
EControlType["input"] = "input";
|
|
1855
|
+
/** Ввод текста с поддержкой шаблонной вставки сущностей */
|
|
1856
|
+
EControlType["inputTemplate"] = "inputTemplate";
|
|
1849
1857
|
/** Ввод текста в формате markdown */
|
|
1850
1858
|
EControlType["inputMarkdown"] = "inputMarkdown";
|
|
1851
1859
|
/** Ввод числа */
|