@infomaximum/widget-sdk 6.0.0-9 → 6.0.0-view-theme.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/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
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-view-theme.0](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-12...v6.0.0-view-theme.0) (2025-09-29)
6
+
7
+ ## [6.0.0-12](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-11...v6.0.0-12) (2025-09-29)
8
+
9
+
10
+ ### Features
11
+
12
+ * для параметров действий образа добавлен id ([4b92d35](https://github.com/Infomaximum/widget-sdk/commit/4b92d3547a6048b8326db94ec360515d99e17b1a))
13
+
14
+ ## [6.0.0-11](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-10...v6.0.0-11) (2025-09-23)
15
+
16
+
17
+ ### Features
18
+
19
+ * удален флаг isBordered для IInputControl [BI-15461] ([d60c32d](https://github.com/Infomaximum/widget-sdk/commit/d60c32d02134c10b1aa799dc5a45e2656fe5aefd))
20
+
21
+ ## [6.0.0-10](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-2508.1...v6.0.0-10) (2025-09-12)
22
+
5
23
  ## [6.0.0-9](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-8...v6.0.0-9) (2025-09-12)
6
24
 
7
25
 
@@ -9,116 +27,113 @@ All notable changes to this project will be documented in this file. See [standa
9
27
 
10
28
  * исправлен баг с подстановкой значений в template строки ([12166b5](https://github.com/Infomaximum/widget-sdk/commit/12166b587b74e0ff912822b0d065463b8f23121e))
11
29
 
30
+ ## [6.0.0-8](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-2508.0...v6.0.0-8) (2025-09-11)
31
+
32
+ ## [6.0.0-9](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-8...v6.0.0-9) (2025-09-12)
33
+
34
+ ### Bug Fixes
35
+
36
+ - исправлен баг с подстановкой значений в template строки ([12166b5](https://github.com/Infomaximum/widget-sdk/commit/12166b587b74e0ff912822b0d065463b8f23121e))
37
+
12
38
  ## [6.0.0-8](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-7...v6.0.0-8) (2025-09-11)
13
39
 
14
40
  ## [6.0.0-7](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-6...v6.0.0-7) (2025-09-10)
15
41
 
16
-
17
42
  ### Bug Fixes
18
43
 
19
- * исправлена проблема с подстановкой sql-комментариев в формулы. ([a07cbbe](https://github.com/Infomaximum/widget-sdk/commit/a07cbbe3d1597d9eb22bdeb0ee4621abecbd5740))
44
+ - исправлена проблема с подстановкой sql-комментариев в формулы. ([a07cbbe](https://github.com/Infomaximum/widget-sdk/commit/a07cbbe3d1597d9eb22bdeb0ee4621abecbd5740))
20
45
 
21
46
  ## [6.0.0-6](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-5...v6.0.0-6) (2025-09-02)
22
47
 
23
-
24
48
  ### ⚠ BREAKING CHANGES
25
49
 
26
- * Удален formattingTemplate. Изменены поля формат и форматирование
50
+ - Удален formattingTemplate. Изменены поля формат и форматирование
27
51
 
28
52
  ### Features
29
53
 
30
- * изменены формат и форматирование. Удален formattingTemplate. Добавлен новый контрол inputTemplated. ([7c3d230](https://github.com/Infomaximum/widget-sdk/commit/7c3d230c443f897d20be4ec4a23f6fe6b914a213))
54
+ - изменены формат и форматирование. Удален formattingTemplate. Добавлен новый контрол inputTemplated. ([7c3d230](https://github.com/Infomaximum/widget-sdk/commit/7c3d230c443f897d20be4ec4a23f6fe6b914a213))
31
55
 
32
56
  ## [6.0.0-5](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-4...v6.0.0-5) (2025-09-01)
33
57
 
34
-
35
58
  ### Features
36
59
 
37
- * добавлена поддержка фильтрации шаблонов мер и агригатных разрезов [WD-1197] ([af49cc3](https://github.com/Infomaximum/widget-sdk/commit/af49cc3ff7840f0d7762c6c40eb1bf183a32d4b7))
38
- * добавлена фильтрация шаблонов для процессных разрезов времяни [WD-1197] ([564cd57](https://github.com/Infomaximum/widget-sdk/commit/564cd5782276c4ec74c8d26de109f0d2e9deec50))
60
+ - добавлена поддержка фильтрации шаблонов мер и агригатных разрезов [WD-1197] ([af49cc3](https://github.com/Infomaximum/widget-sdk/commit/af49cc3ff7840f0d7762c6c40eb1bf183a32d4b7))
61
+ - добавлена фильтрация шаблонов для процессных разрезов времяни [WD-1197] ([564cd57](https://github.com/Infomaximum/widget-sdk/commit/564cd5782276c4ec74c8d26de109f0d2e9deec50))
39
62
 
40
63
  ## [6.0.0-4](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-3...v6.0.0-4) (2025-08-29)
41
64
 
42
-
43
65
  ### ⚠ BREAKING CHANGES
44
66
 
45
- * если виджеты использовали типы данных процесса, то теперь должны запрашивать их сами через type_calculator
46
- * требуется поддержка в виджетах
67
+ - если виджеты использовали типы данных процесса, то теперь должны запрашивать их сами через type_calculator
68
+ - требуется поддержка в виджетах
47
69
 
48
70
  ### Features
49
71
 
50
- * удален deprecated код в связи с переходом на widget-sdk 6 ([c1ce6cb](https://github.com/Infomaximum/widget-sdk/commit/c1ce6cb5f3838a4bfea3003ee2de0cb494477e8c))
51
- * удалены типы данных из интерфейса процесса ([3b17150](https://github.com/Infomaximum/widget-sdk/commit/3b17150ef67facaf50e489ec308a69fad1d6db82))
72
+ - удален deprecated код в связи с переходом на widget-sdk 6 ([c1ce6cb](https://github.com/Infomaximum/widget-sdk/commit/c1ce6cb5f3838a4bfea3003ee2de0cb494477e8c))
73
+ - удалены типы данных из интерфейса процесса ([3b17150](https://github.com/Infomaximum/widget-sdk/commit/3b17150ef67facaf50e489ec308a69fad1d6db82))
52
74
 
53
75
  ## [6.0.0-3](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-2...v6.0.0-3) (2025-08-28)
54
76
 
55
-
56
77
  ### Features
57
78
 
58
- * виджета дана возможность фильтровать таблицы в дропдаунах кнопок добавления индикаторов и фильтрации по процессам ([cb9fd22](https://github.com/Infomaximum/widget-sdk/commit/cb9fd22cbf6ebf12f0261949ab9d467edcaf0a36))
79
+ - виджета дана возможность фильтровать таблицы в дропдаунах кнопок добавления индикаторов и фильтрации по процессам ([cb9fd22](https://github.com/Infomaximum/widget-sdk/commit/cb9fd22cbf6ebf12f0261949ab9d467edcaf0a36))
59
80
 
60
81
  ## [6.0.0-2](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-1...v6.0.0-2) (2025-08-26)
61
82
 
62
-
63
83
  ### ⚠ BREAKING CHANGES
64
84
 
65
- * - Виджеты, использующие импорты, связанные со старым синтаксисом ссылок, будут работать некорректно в новой версии системы (dashboardLinkRegExp, workspaceLinkRegExp, parseIndicatorLink, getRuleColor, isValidColor).
66
- - Функция escapeSpecialCharacters заменена на escapeDoubleQuoteLinkName.
67
- - Константа linkNameRegExp удалена - вместо нее используется curlyBracketsContentPattern.
85
+ - - Виджеты, использующие импорты, связанные со старым синтаксисом ссылок, будут работать некорректно в новой версии системы (dashboardLinkRegExp, workspaceLinkRegExp, parseIndicatorLink, getRuleColor, isValidColor).
86
+
87
+ * Функция escapeSpecialCharacters заменена на escapeDoubleQuoteLinkName.
88
+ * Константа linkNameRegExp удалена - вместо нее используется curlyBracketsContentPattern.
68
89
 
69
90
  ### Features
70
91
 
71
- * добавлена поддержка нового синтаксиса ссылок на показатели ([7449482](https://github.com/Infomaximum/widget-sdk/commit/74494820ae4ca9e05f5d225ad243a57ca0a6d6aa))
92
+ - добавлена поддержка нового синтаксиса ссылок на показатели ([7449482](https://github.com/Infomaximum/widget-sdk/commit/74494820ae4ca9e05f5d225ad243a57ca0a6d6aa))
72
93
 
73
94
  ## [6.0.0-1](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-0...v6.0.0-1) (2025-08-26)
74
95
 
75
-
76
96
  ### ⚠ BREAKING CHANGES
77
97
 
78
- * если виджет использовал guid, то требуется поддержка
98
+ - если виджет использовал guid, то требуется поддержка
79
99
 
80
100
  ### Features
81
101
 
82
- * удален guid из интерфейсов. ([f50d978](https://github.com/Infomaximum/widget-sdk/commit/f50d9781ab2fc41ed1deb3fafee262e4c4057db1))
102
+ - удален guid из интерфейсов. ([f50d978](https://github.com/Infomaximum/widget-sdk/commit/f50d9781ab2fc41ed1deb3fafee262e4c4057db1))
83
103
 
84
104
  ## [6.0.0-0](https://github.com/Infomaximum/widget-sdk/compare/v5.33.1...v6.0.0-0) (2025-08-20)
85
105
 
86
-
87
106
  ### ⚠ BREAKING CHANGES
88
107
 
89
- * получение ф-ии шаблона процессной агрегации для меры через константу "measureAggregationTemplates" заменено на получение через ф-ию "createAggregationFormulaByTemplateName"
90
- * поле actions удалено из настроек виджетов
108
+ - получение ф-ии шаблона процессной агрегации для меры через константу "measureAggregationTemplates" заменено на получение через ф-ию "createAggregationFormulaByTemplateName"
109
+ - поле actions удалено из настроек виджетов
91
110
 
92
111
  ### Features
93
112
 
94
- * отказ от поля actions в пользу actionButtons в настройках виджетов ([2ee361a](https://github.com/Infomaximum/widget-sdk/commit/2ee361a5ab1478e1b0ad90feae2256cf90d46058))
95
- * расширен IInputControl полями hint и hintPlacement. Для запуска скрипта из действий по клику добавлена подсказка ([63d02d6](https://github.com/Infomaximum/widget-sdk/commit/63d02d68bc38bb6d6b1bb2dfd1898d4b948ee6fc))
96
-
113
+ - отказ от поля actions в пользу actionButtons в настройках виджетов ([2ee361a](https://github.com/Infomaximum/widget-sdk/commit/2ee361a5ab1478e1b0ad90feae2256cf90d46058))
114
+ - расширен IInputControl полями hint и hintPlacement. Для запуска скрипта из действий по клику добавлена подсказка ([63d02d6](https://github.com/Infomaximum/widget-sdk/commit/63d02d68bc38bb6d6b1bb2dfd1898d4b948ee6fc))
97
115
 
98
- * From BI-15231 into master (#92) ([8257237](https://github.com/Infomaximum/widget-sdk/commit/8257237e12b42ee403378408d0bb5007853c379d)), closes [#92](https://github.com/Infomaximum/widget-sdk/issues/92)
116
+ - From BI-15231 into master (#92) ([8257237](https://github.com/Infomaximum/widget-sdk/commit/8257237e12b42ee403378408d0bb5007853c379d)), closes [#92](https://github.com/Infomaximum/widget-sdk/issues/92)
99
117
 
100
118
  ### [5.33.1](https://github.com/Infomaximum/widget-sdk/compare/v5.33.0...v5.33.1) (2025-08-15)
101
119
 
102
120
  ## [5.33.0](https://github.com/Infomaximum/widget-sdk/compare/v5.32.1...v5.33.0) (2025-08-06)
103
121
 
104
-
105
122
  ### Features
106
123
 
107
- * расширены шаблоны процессных агрегаций ([f2bfbaf](https://github.com/Infomaximum/widget-sdk/commit/f2bfbafb557ba72ae605d906ae1341109adf3894))
124
+ - расширены шаблоны процессных агрегаций ([f2bfbaf](https://github.com/Infomaximum/widget-sdk/commit/f2bfbafb557ba72ae605d906ae1341109adf3894))
108
125
 
109
126
  ### [5.32.1](https://github.com/Infomaximum/widget-sdk/compare/v5.32.0...v5.32.1) (2025-08-05)
110
127
 
111
-
112
128
  ### Bug Fixes
113
129
 
114
- * исправлена типизация ответов вычислителей ([0453793](https://github.com/Infomaximum/widget-sdk/commit/04537930ba1916d300b279e658a7e9b8da191af4))
130
+ - исправлена типизация ответов вычислителей ([0453793](https://github.com/Infomaximum/widget-sdk/commit/04537930ba1916d300b279e658a7e9b8da191af4))
115
131
 
116
132
  ## [5.32.0](https://github.com/Infomaximum/widget-sdk/compare/v5.31.0...v5.32.0) (2025-07-31)
117
133
 
118
-
119
134
  ### Features
120
135
 
121
- * добавлена возможность управления якорем для сохранения положения виджета ([3bd5610](https://github.com/Infomaximum/widget-sdk/commit/3bd561058e48055ec10f99c53f88f2fcddf18d94))
136
+ - добавлена возможность управления якорем для сохранения положения виджета ([3bd5610](https://github.com/Infomaximum/widget-sdk/commit/3bd561058e48055ec10f99c53f88f2fcddf18d94))
122
137
 
123
138
  ## [5.31.0](https://github.com/Infomaximum/widget-sdk/compare/v5.30.0...v5.31.0) (2025-07-17)
124
139
 
@@ -126,15 +141,13 @@ All notable changes to this project will be documented in this file. See [standa
126
141
 
127
142
  ## [5.29.0-0](https://github.com/Infomaximum/widget-sdk/compare/v5.28.0...v5.29.0-0) (2025-07-10)
128
143
 
129
-
130
144
  ### Features
131
145
 
132
- * отказ от имени процесса ([4fa01d5](https://github.com/Infomaximum/widget-sdk/commit/4fa01d5c2602211810277d0b6aef6b4d5f62e19c))
133
-
146
+ - отказ от имени процесса ([4fa01d5](https://github.com/Infomaximum/widget-sdk/commit/4fa01d5c2602211810277d0b6aef6b4d5f62e19c))
134
147
 
135
148
  ### Bug Fixes
136
149
 
137
- * deprecated поле processName для интерфейса IProcessGraphCalculatorInput сделано необзятельным ([859f959](https://github.com/Infomaximum/widget-sdk/commit/859f959ea963ea2ed9214ccc4a4dc43a8b49142c))
150
+ - deprecated поле processName для интерфейса IProcessGraphCalculatorInput сделано необзятельным ([859f959](https://github.com/Infomaximum/widget-sdk/commit/859f959ea963ea2ed9214ccc4a4dc43a8b49142c))
138
151
 
139
152
  ## [5.30.0](https://github.com/Infomaximum/widget-sdk/compare/v5.29.0...v5.30.0) (2025-07-15)
140
153
 
package/README.md CHANGED
@@ -12,5 +12,7 @@
12
12
  | ------------------- | -------------- |
13
13
  | 3.x.x | 2401 - 2407 |
14
14
  | 4.x.x | 2408 - 2411 |
15
- | 5.x.x | 2412 - latest |
15
+ | 5.x.x | 2412 - 2507 |
16
+ | 6.x.x | 2508 - latest |
17
+
16
18
  ---
package/dist/index.d.ts CHANGED
@@ -255,7 +255,7 @@ interface IBaseWidgetSettings {
255
255
  markdownMeasures?: IMarkdownMeasure[];
256
256
  markdownText?: string;
257
257
  markdownTextSize?: number;
258
- filters?: TExtendedFormulaFilterValue[];
258
+ filters?: TSettingsFilter[];
259
259
  filterMode?: EWidgetFilterMode;
260
260
  ignoreFilters?: boolean;
261
261
  sorting?: IWidgetSortingIndicator[];
@@ -554,11 +554,11 @@ type TWidgetIndicatorDurationValue = {
554
554
  type TWidgetIndicatorTimeValue = {
555
555
  templateName: string;
556
556
  mode: EWidgetIndicatorValueModes.START_TIME | EWidgetIndicatorValueModes.END_TIME;
557
- processKey: string;
558
- eventName: string;
559
- eventTimeFormula: string;
560
- caseCaseIdFormula: string;
561
- eventNameFormula: string;
557
+ processKey: string | null;
558
+ eventName: string | null;
559
+ eventTimeFormula: string | null;
560
+ caseCaseIdFormula: string | null;
561
+ eventNameFormula: string | null;
562
562
  filters: TExtendedFormulaFilterValue[];
563
563
  };
564
564
 
@@ -849,6 +849,24 @@ interface IFormulaFilterValue {
849
849
  [EFormulaFilterFieldKeys.durationUnit]: EDurationUnit;
850
850
  }>;
851
851
  }
852
+ declare enum EDimensionProcessFilterTimeUnit {
853
+ YEARS = "YEARS",
854
+ MONTHS = "MONTHS",
855
+ HOURS = "HOURS",
856
+ DAYS = "DAYS",
857
+ MINUTES = "MINUTES"
858
+ }
859
+ interface IDimensionProcessFilter {
860
+ value: Extract<IFormulaControl["value"]["value"], {
861
+ mode: EWidgetIndicatorValueModes.AGGREGATION | EWidgetIndicatorValueModes.START_TIME | EWidgetIndicatorValueModes.END_TIME | EWidgetIndicatorValueModes.FORMULA;
862
+ }>;
863
+ dbDataType: string;
864
+ condition: {
865
+ filteringMethod: valueof<typeof formulaFilterMethods>;
866
+ timeUnit?: EDimensionProcessFilterTimeUnit;
867
+ values: (string | null)[];
868
+ };
869
+ }
852
870
  type TExtendedFormulaFilterValue = {
853
871
  formula: string;
854
872
  } | IFormulaFilterValue;
@@ -907,7 +925,9 @@ interface IWidgetFiltration {
907
925
  /** Удалить фильтр по этапам */
908
926
  removeStagesFilter(widgetKey: string): void;
909
927
  }
928
+ type TSettingsFilter = TExtendedFormulaFilterValue | IDimensionProcessFilter;
910
929
  declare const isFormulaFilterValue: (value: TExtendedFormulaFilterValue) => value is IFormulaFilterValue;
930
+ declare const isDimensionProcessFilter: (filter: TSettingsFilter) => filter is IDimensionProcessFilter;
911
931
 
912
932
  declare enum EWidgetActionInputMethod {
913
933
  COLUMN = "COLUMN",
@@ -1122,7 +1142,7 @@ interface IActionButton extends IAutoIdentifiedArrayItem {
1122
1142
  color: TColor;
1123
1143
  hint?: string;
1124
1144
  }
1125
- type TViewActionParameter = (IParameterFromAggregation | IParameterFromVariable) & {
1145
+ type TViewActionParameter = (IParameterFromAggregation | IParameterFromVariable) & IAutoIdentifiedArrayItem & {
1126
1146
  name: string;
1127
1147
  };
1128
1148
  interface IViewAction {
@@ -1313,7 +1333,6 @@ interface IInputControl {
1313
1333
  type: EControlType.input;
1314
1334
  value: string;
1315
1335
  props: {
1316
- isBordered?: boolean;
1317
1336
  placeholder?: string;
1318
1337
  /** Максимальное количество символов которое можно ввести в поле */
1319
1338
  maxLength?: number;
@@ -1752,6 +1771,8 @@ interface ITypeCalculator extends ICalculator<ITypeCalculatorInput, ITypeCalcula
1752
1771
 
1753
1772
  declare const prepareValuesForSql: (simpleType: ESimpleDataType, values: (string | null)[]) => (string | null)[];
1754
1773
 
1774
+ declare const mapSettingsFiltersToInputs: (filters: TSettingsFilter[]) => ICalculatorFilter[];
1775
+
1755
1776
  declare function checkDisplayCondition(displayCondition: TNullable<TDisplayCondition>, variables: Map<string, TWidgetVariable>): boolean;
1756
1777
  declare function getDisplayConditionFormula(displayCondition: TNullable<TDisplayCondition>): TNullable<string>;
1757
1778
  declare const replaceDisplayCondition: <I extends IWidgetColumnIndicator>(dimension: I, displayCondition: TNullable<TDisplayCondition>) => TNullable<I>;
@@ -1910,6 +1931,9 @@ declare enum EDimensionTemplateNames {
1910
1931
  declare const dimensionTemplateFormulas: Record<EDimensionTemplateNames, string>;
1911
1932
 
1912
1933
  declare function getDimensionFormula({ value }: IWidgetDimension): string;
1934
+ declare function getProcessDimensionValueFormula(value: (TWidgetIndicatorAggregationValue & {
1935
+ innerTemplateName?: string;
1936
+ }) | TWidgetIndicatorTimeValue): string | undefined;
1913
1937
 
1914
1938
  declare enum EDimensionAggregationTemplateName {
1915
1939
  avg = "avg",
@@ -1934,7 +1958,6 @@ declare const prepareDimensionAggregationParams: (value: Extract<IWidgetDimensio
1934
1958
  eventNameFormula: string;
1935
1959
  caseCaseIdFormula: string;
1936
1960
  eventName: string;
1937
- objectFilters: string;
1938
1961
  filters: string;
1939
1962
  eventTimeFormula: string;
1940
1963
  columnFormula: string;
@@ -1998,7 +2021,6 @@ declare const prepareMeasureAggregationParams: (value: Extract<IWidgetMeasure["v
1998
2021
  eventNameFormula: string;
1999
2022
  caseCaseIdFormula: string;
2000
2023
  eventName: string;
2001
- objectFilters: string;
2002
2024
  filters: string;
2003
2025
  eventTimeFormula: string;
2004
2026
  columnFormula: string;
@@ -2008,7 +2030,6 @@ declare const prepareMeasureAggregationParams: (value: Extract<IWidgetMeasure["v
2008
2030
  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
2031
  /** На основе значения режима CONVERSION подготовить параметры для подстановки в шаблонную формулу */
2010
2032
  declare const prepareConversionParams: (value: TWidgetIndicatorConversionValue) => {
2011
- objectFilters: string;
2012
2033
  startEventTimeFormula: string;
2013
2034
  startEventNameFormula: string;
2014
2035
  startEventFilters: string;
@@ -2028,7 +2049,6 @@ declare function createAggregationTemplate(templateName: EMeasureAggregationTemp
2028
2049
  declare const durationTemplates: Record<EDurationTemplateName, string>;
2029
2050
  /** На основе значения режима DURATION подготовить параметры для подстановки в шаблонную формулу */
2030
2051
  declare const prepareDurationParams: (value: TWidgetIndicatorDurationValue) => {
2031
- objectFilters: string;
2032
2052
  startEventTimeFormula: string;
2033
2053
  startEventNameFormula: string;
2034
2054
  startEventFilters: string;
@@ -2493,7 +2513,7 @@ type TContextMenuButtonOptions = {
2493
2513
 
2494
2514
  /** Контекст с данными образа (будет заполняться по мере необходимости) */
2495
2515
  interface IViewContext {
2496
- filters: TExtendedFormulaFilterValue[];
2516
+ filters: TSettingsFilter[];
2497
2517
  }
2498
2518
 
2499
2519
  type TLaunchActionParams = {
@@ -2732,4 +2752,4 @@ declare global {
2732
2752
  }
2733
2753
  }
2734
2754
 
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 };
2755
+ export { EActionButtonsTypes, EActionTypes, EActivateConditionMode, EAutoUpdateMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDataModelOption, EDimensionAggregationTemplateName, EDimensionProcessFilterTimeUnit, 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 IDimensionProcessFilter, 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 TSettingsFilter, 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, getProcessDimensionValueFormula, getRuleColor, getTransitionMeasureFormula, isDimensionProcessFilter, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSettingsFiltersToInputs, 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
@@ -212,9 +212,18 @@ var EFormulaFilterFieldKeys;
212
212
  EFormulaFilterFieldKeys["lastTimeUnit"] = "lastTimeUnit";
213
213
  EFormulaFilterFieldKeys["durationUnit"] = "durationUnit";
214
214
  })(EFormulaFilterFieldKeys || (EFormulaFilterFieldKeys = {}));
215
+ var EDimensionProcessFilterTimeUnit;
216
+ (function (EDimensionProcessFilterTimeUnit) {
217
+ EDimensionProcessFilterTimeUnit["YEARS"] = "YEARS";
218
+ EDimensionProcessFilterTimeUnit["MONTHS"] = "MONTHS";
219
+ EDimensionProcessFilterTimeUnit["HOURS"] = "HOURS";
220
+ EDimensionProcessFilterTimeUnit["DAYS"] = "DAYS";
221
+ EDimensionProcessFilterTimeUnit["MINUTES"] = "MINUTES";
222
+ })(EDimensionProcessFilterTimeUnit || (EDimensionProcessFilterTimeUnit = {}));
215
223
  var isFormulaFilterValue = function (value) {
216
224
  return "filteringMethod" in value;
217
225
  };
226
+ var isDimensionProcessFilter = function (filter) { return "value" in filter && "condition" in filter; };
218
227
 
219
228
  var compact = function (items) { return ((items === null || items === void 0 ? void 0 : items.filter(Boolean)) || []); };
220
229
  var compactMap = function (items, f) {
@@ -639,7 +648,7 @@ var formattingConfig = {
639
648
  },
640
649
  };
641
650
 
642
- var _a$4;
651
+ var _a$5;
643
652
  var EDimensionTemplateNames;
644
653
  (function (EDimensionTemplateNames) {
645
654
  EDimensionTemplateNames["dateTime"] = "dateTime";
@@ -655,19 +664,19 @@ var EDimensionTemplateNames;
655
664
  EDimensionTemplateNames["hour"] = "hour";
656
665
  })(EDimensionTemplateNames || (EDimensionTemplateNames = {}));
657
666
  /** Стандартные шаблоны разреза */
658
- var dimensionTemplateFormulas = (_a$4 = {},
659
- _a$4[EDimensionTemplateNames.dateTime] = "toDateTime({columnFormula})",
660
- _a$4[EDimensionTemplateNames.date] = "toDate({columnFormula})",
661
- _a$4[EDimensionTemplateNames.year] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toYear({columnFormula}))",
662
- _a$4[EDimensionTemplateNames.yearAndQuarter] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toYear({columnFormula}) * 10 + toQuarter({columnFormula}))",
663
- _a$4[EDimensionTemplateNames.quarter] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toQuarter({columnFormula}))",
664
- _a$4[EDimensionTemplateNames.yearAndMonth] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toYYYYMM({columnFormula}))",
665
- _a$4[EDimensionTemplateNames.month] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toMonth({columnFormula}))",
666
- _a$4[EDimensionTemplateNames.dayOfMonth] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toDayOfMonth({columnFormula}))",
667
- _a$4[EDimensionTemplateNames.week] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toWeek({columnFormula}))",
668
- _a$4[EDimensionTemplateNames.dayOfWeek] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toDayOfWeek({columnFormula}))",
669
- _a$4[EDimensionTemplateNames.hour] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toHour({columnFormula}))",
670
- _a$4);
667
+ var dimensionTemplateFormulas = (_a$5 = {},
668
+ _a$5[EDimensionTemplateNames.dateTime] = "toDateTime({columnFormula})",
669
+ _a$5[EDimensionTemplateNames.date] = "toDate({columnFormula})",
670
+ _a$5[EDimensionTemplateNames.year] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toYear({columnFormula}))",
671
+ _a$5[EDimensionTemplateNames.yearAndQuarter] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toYear({columnFormula}) * 10 + toQuarter({columnFormula}))",
672
+ _a$5[EDimensionTemplateNames.quarter] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toQuarter({columnFormula}))",
673
+ _a$5[EDimensionTemplateNames.yearAndMonth] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toYYYYMM({columnFormula}))",
674
+ _a$5[EDimensionTemplateNames.month] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toMonth({columnFormula}))",
675
+ _a$5[EDimensionTemplateNames.dayOfMonth] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toDayOfMonth({columnFormula}))",
676
+ _a$5[EDimensionTemplateNames.week] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toWeek({columnFormula}))",
677
+ _a$5[EDimensionTemplateNames.dayOfWeek] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toDayOfWeek({columnFormula}))",
678
+ _a$5[EDimensionTemplateNames.hour] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toHour({columnFormula}))",
679
+ _a$5);
671
680
 
672
681
  var EWidgetIndicatorType;
673
682
  (function (EWidgetIndicatorType) {
@@ -979,7 +988,7 @@ var convertFiltersToFormula = function (filters) {
979
988
  return filters.length > 0 ? " AND ".concat(convertToFormulasChain(filters)) : "";
980
989
  };
981
990
 
982
- var _a$3;
991
+ var _a$4;
983
992
  var EDimensionAggregationTemplateName;
984
993
  (function (EDimensionAggregationTemplateName) {
985
994
  EDimensionAggregationTemplateName["avg"] = "avg";
@@ -996,20 +1005,20 @@ var EDimensionAggregationTemplateName;
996
1005
  EDimensionAggregationTemplateName["countReworks"] = "countReworks";
997
1006
  })(EDimensionAggregationTemplateName || (EDimensionAggregationTemplateName = {}));
998
1007
  /** Шаблоны процессных метрик разреза с режимом AGGREGATION */
999
- var dimensionAggregationTemplates = (_a$3 = {},
1000
- _a$3[EDimensionAggregationTemplateName.avg] = avgTemplate,
1001
- _a$3[EDimensionAggregationTemplateName.median] = medianTemplate,
1002
- _a$3[EDimensionAggregationTemplateName.count] = countTemplate,
1003
- _a$3[EDimensionAggregationTemplateName.countDistinct] = countDistinctTemplate,
1004
- _a$3[EDimensionAggregationTemplateName.min] = minTemplate,
1005
- _a$3[EDimensionAggregationTemplateName.max] = maxTemplate,
1006
- _a$3[EDimensionAggregationTemplateName.sum] = sumTemplate,
1007
- _a$3[EDimensionAggregationTemplateName.top] = topTemplate,
1008
- _a$3[EDimensionAggregationTemplateName.firstValue] = firstValueTemplate,
1009
- _a$3[EDimensionAggregationTemplateName.lastValue] = lastValueTemplate,
1010
- _a$3[EDimensionAggregationTemplateName.countExecutions] = countExecutionsTemplate,
1011
- _a$3[EDimensionAggregationTemplateName.countReworks] = countReworksTemplate,
1012
- _a$3);
1008
+ var dimensionAggregationTemplates = (_a$4 = {},
1009
+ _a$4[EDimensionAggregationTemplateName.avg] = avgTemplate,
1010
+ _a$4[EDimensionAggregationTemplateName.median] = medianTemplate,
1011
+ _a$4[EDimensionAggregationTemplateName.count] = countTemplate,
1012
+ _a$4[EDimensionAggregationTemplateName.countDistinct] = countDistinctTemplate,
1013
+ _a$4[EDimensionAggregationTemplateName.min] = minTemplate,
1014
+ _a$4[EDimensionAggregationTemplateName.max] = maxTemplate,
1015
+ _a$4[EDimensionAggregationTemplateName.sum] = sumTemplate,
1016
+ _a$4[EDimensionAggregationTemplateName.top] = topTemplate,
1017
+ _a$4[EDimensionAggregationTemplateName.firstValue] = firstValueTemplate,
1018
+ _a$4[EDimensionAggregationTemplateName.lastValue] = lastValueTemplate,
1019
+ _a$4[EDimensionAggregationTemplateName.countExecutions] = countExecutionsTemplate,
1020
+ _a$4[EDimensionAggregationTemplateName.countReworks] = countReworksTemplate,
1021
+ _a$4);
1013
1022
  /** На основе значения режима AGGREGATION подготовить параметры для подстановки в шаблонную формулу */
1014
1023
  var prepareDimensionAggregationParams = function (value) {
1015
1024
  if (!value.eventName ||
@@ -1023,7 +1032,6 @@ var prepareDimensionAggregationParams = function (value) {
1023
1032
  eventNameFormula: value.eventNameFormula,
1024
1033
  caseCaseIdFormula: value.caseCaseIdFormula,
1025
1034
  eventName: value.eventName,
1026
- objectFilters: "1",
1027
1035
  filters: convertFiltersToFormula(value.filters),
1028
1036
  eventTimeFormula: "",
1029
1037
  columnFormula: "",
@@ -1081,7 +1089,7 @@ var prepareTimeParams = function (value) {
1081
1089
  };
1082
1090
 
1083
1091
  function getDimensionFormula(_a) {
1084
- var _b;
1092
+ var _b, _c;
1085
1093
  var value = _a.value;
1086
1094
  if (!value) {
1087
1095
  return "";
@@ -1099,6 +1107,9 @@ function getDimensionFormula(_a) {
1099
1107
  columnFormula: generateColumnFormula(tableName, columnName),
1100
1108
  });
1101
1109
  }
1110
+ return (_c = getProcessDimensionValueFormula(value)) !== null && _c !== void 0 ? _c : "";
1111
+ }
1112
+ function getProcessDimensionValueFormula(value) {
1102
1113
  if (value.mode === EWidgetIndicatorValueModes.AGGREGATION) {
1103
1114
  var preparedParams = prepareDimensionAggregationParams(value);
1104
1115
  if (!preparedParams) {
@@ -1122,7 +1133,6 @@ function getDimensionFormula(_a) {
1122
1133
  var templateFormula = timeTemplates[value.mode][value.templateName];
1123
1134
  return fillTemplateSql(templateFormula, preparedParams);
1124
1135
  }
1125
- return "";
1126
1136
  }
1127
1137
 
1128
1138
  var EMeasureAggregationTemplateName;
@@ -1156,7 +1166,6 @@ var prepareMeasureAggregationParams = function (value) {
1156
1166
  eventNameFormula: value.eventNameFormula,
1157
1167
  caseCaseIdFormula: value.caseCaseIdFormula,
1158
1168
  eventName: (_a = value.eventName) !== null && _a !== void 0 ? _a : "",
1159
- objectFilters: "1",
1160
1169
  filters: convertFiltersToFormula(value.filters),
1161
1170
  eventTimeFormula: "",
1162
1171
  columnFormula: "",
@@ -1177,7 +1186,7 @@ var prepareMeasureAggregationParams = function (value) {
1177
1186
  return columnParams;
1178
1187
  };
1179
1188
 
1180
- var _a$2;
1189
+ var _a$3;
1181
1190
  var EMeasureTemplateNames;
1182
1191
  (function (EMeasureTemplateNames) {
1183
1192
  EMeasureTemplateNames["avg"] = "avg";
@@ -1189,15 +1198,15 @@ var EMeasureTemplateNames;
1189
1198
  EMeasureTemplateNames["sum"] = "sum";
1190
1199
  })(EMeasureTemplateNames || (EMeasureTemplateNames = {}));
1191
1200
  /** Стандартные шаблоны меры */
1192
- var measureTemplateFormulas = (_a$2 = {},
1193
- _a$2[EMeasureTemplateNames.avg] = "avg({columnFormula})",
1194
- _a$2[EMeasureTemplateNames.count] = "count({columnFormula})",
1195
- _a$2[EMeasureTemplateNames.countDistinct] = "count(distinct {columnFormula})",
1196
- _a$2[EMeasureTemplateNames.median] = "medianExact({columnFormula})",
1197
- _a$2[EMeasureTemplateNames.min] = "min({columnFormula})",
1198
- _a$2[EMeasureTemplateNames.max] = "max({columnFormula})",
1199
- _a$2[EMeasureTemplateNames.sum] = "sum({columnFormula})",
1200
- _a$2);
1201
+ var measureTemplateFormulas = (_a$3 = {},
1202
+ _a$3[EMeasureTemplateNames.avg] = "avg({columnFormula})",
1203
+ _a$3[EMeasureTemplateNames.count] = "count({columnFormula})",
1204
+ _a$3[EMeasureTemplateNames.countDistinct] = "count(distinct {columnFormula})",
1205
+ _a$3[EMeasureTemplateNames.median] = "medianExact({columnFormula})",
1206
+ _a$3[EMeasureTemplateNames.min] = "min({columnFormula})",
1207
+ _a$3[EMeasureTemplateNames.max] = "max({columnFormula})",
1208
+ _a$3[EMeasureTemplateNames.sum] = "sum({columnFormula})",
1209
+ _a$3);
1201
1210
 
1202
1211
  /** Шаблон процессной метрики меры с режимом CONVERSION */
1203
1212
  var 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)";
@@ -1215,7 +1224,6 @@ var prepareConversionParams = function (value) {
1215
1224
  return null;
1216
1225
  }
1217
1226
  return {
1218
- objectFilters: "1",
1219
1227
  startEventTimeFormula: value.startEventTimeFormula,
1220
1228
  startEventNameFormula: value.startEventNameFormula,
1221
1229
  startEventFilters: convertFiltersToFormula(value.startEventFilters),
@@ -1254,7 +1262,6 @@ var prepareDurationParams = function (value) {
1254
1262
  return appearance === EEventAppearances.FIRST ? "minIf" : "maxIf";
1255
1263
  };
1256
1264
  return {
1257
- objectFilters: "1",
1258
1265
  startEventTimeFormula: value.startEventTimeFormula,
1259
1266
  startEventNameFormula: value.startEventNameFormula,
1260
1267
  startEventFilters: convertFiltersToFormula(value.startEventFilters),
@@ -1270,16 +1277,16 @@ var prepareDurationParams = function (value) {
1270
1277
  };
1271
1278
 
1272
1279
  function createAnyEventTemplate(aggregatePart) {
1273
- return "{outerAggregation}If(process(".concat(aggregatePart, ", {caseCaseIdFormula}), {objectFilters})");
1280
+ return "{outerAggregation}(process(".concat(aggregatePart, ", {caseCaseIdFormula}))");
1274
1281
  }
1275
1282
  function createSpecificEventTemplate(fn, additionalFn) {
1276
- return "{outerAggregation}If(process(".concat(fn, "(").concat(additionalFn ? "".concat(additionalFn, " ") : "", "{columnFormula}, {eventNameFormula} = '{eventName}'{filters}), {caseCaseIdFormula}), {objectFilters})");
1283
+ return "{outerAggregation}(process(".concat(fn, "(").concat(additionalFn ? "".concat(additionalFn, " ") : "", "{columnFormula}, {eventNameFormula} = '{eventName}'{filters}), {caseCaseIdFormula}))");
1277
1284
  }
1278
1285
  function createTopLikeTemplate(template) {
1279
1286
  return function (outerAggregation) {
1280
1287
  return outerAggregation === EOuterAggregation.top
1281
- ? "{outerAggregation}KIf(1)(".concat(template, ", {objectFilters})[1]")
1282
- : "{outerAggregation}If(".concat(template, ", {objectFilters})");
1288
+ ? "{outerAggregation}K(1)(".concat(template, ")[1]")
1289
+ : "{outerAggregation}(".concat(template, ")");
1283
1290
  };
1284
1291
  }
1285
1292
  function createAggregationTemplate(templateName, _a) {
@@ -1326,9 +1333,9 @@ function createAggregationTemplate(templateName, _a) {
1326
1333
  ? createAnyEventTemplate("argMax({columnFormula}, {eventTimeFormula})")
1327
1334
  : createTopLikeTemplate(lastValueTemplate)(outerAggregation);
1328
1335
  case EMeasureAggregationTemplateName.countExecutions:
1329
- return "{outerAggregation}If(".concat(countExecutionsTemplate, ", {objectFilters})");
1336
+ return "{outerAggregation}(".concat(countExecutionsTemplate, ")");
1330
1337
  case EMeasureAggregationTemplateName.countReworks:
1331
- return "{outerAggregation}If(".concat(countReworksTemplate, ", {objectFilters})");
1338
+ return "{outerAggregation}(".concat(countReworksTemplate, ")");
1332
1339
  }
1333
1340
  }
1334
1341
 
@@ -1377,16 +1384,16 @@ function getMeasureFormula(_a) {
1377
1384
  return "";
1378
1385
  }
1379
1386
 
1380
- var _a$1;
1387
+ var _a$2;
1381
1388
  var EEventMeasureTemplateNames;
1382
1389
  (function (EEventMeasureTemplateNames) {
1383
1390
  EEventMeasureTemplateNames["eventsCount"] = "eventsCount";
1384
1391
  EEventMeasureTemplateNames["reworksCount"] = "reworksCount";
1385
1392
  })(EEventMeasureTemplateNames || (EEventMeasureTemplateNames = {}));
1386
- var eventMeasureTemplateFormulas = (_a$1 = {},
1387
- _a$1[EEventMeasureTemplateNames.eventsCount] = "count()",
1388
- _a$1[EEventMeasureTemplateNames.reworksCount] = "count() - uniqExact({caseCaseIdFormula})",
1389
- _a$1);
1393
+ var eventMeasureTemplateFormulas = (_a$2 = {},
1394
+ _a$2[EEventMeasureTemplateNames.eventsCount] = "count()",
1395
+ _a$2[EEventMeasureTemplateNames.reworksCount] = "count() - uniqExact({caseCaseIdFormula})",
1396
+ _a$2);
1390
1397
 
1391
1398
  function getEventMeasureFormula(_a, process) {
1392
1399
  var value = _a.value;
@@ -1403,16 +1410,16 @@ function getEventMeasureFormula(_a, process) {
1403
1410
  return "";
1404
1411
  }
1405
1412
 
1406
- var _a;
1413
+ var _a$1;
1407
1414
  var ETransitionMeasureTemplateNames;
1408
1415
  (function (ETransitionMeasureTemplateNames) {
1409
1416
  ETransitionMeasureTemplateNames["transitionsCount"] = "transitionsCount";
1410
1417
  ETransitionMeasureTemplateNames["medianTime"] = "medianTime";
1411
1418
  })(ETransitionMeasureTemplateNames || (ETransitionMeasureTemplateNames = {}));
1412
- var transitionMeasureTemplateFormulas = (_a = {},
1413
- _a[ETransitionMeasureTemplateNames.transitionsCount] = "count()",
1414
- _a[ETransitionMeasureTemplateNames.medianTime] = "medianExact(date_diff(second, begin({eventTimeFormula}), end({eventTimeFormula})))",
1415
- _a);
1419
+ var transitionMeasureTemplateFormulas = (_a$1 = {},
1420
+ _a$1[ETransitionMeasureTemplateNames.transitionsCount] = "count()",
1421
+ _a$1[ETransitionMeasureTemplateNames.medianTime] = "medianExact(date_diff(second, begin({eventTimeFormula}), end({eventTimeFormula})))",
1422
+ _a$1);
1416
1423
 
1417
1424
  function getTransitionMeasureFormula(_a, process) {
1418
1425
  var value = _a.value;
@@ -1651,6 +1658,46 @@ var mapFormulaFiltersToInputs = function (filters) {
1651
1658
  return compactMap(filters, mapFormulaFilterToCalculatorInput);
1652
1659
  };
1653
1660
 
1661
+ var _a;
1662
+ var intervalByUnit = (_a = {},
1663
+ _a[EDimensionProcessFilterTimeUnit.YEARS] = "year",
1664
+ _a[EDimensionProcessFilterTimeUnit.MONTHS] = "month",
1665
+ _a[EDimensionProcessFilterTimeUnit.DAYS] = "day",
1666
+ _a[EDimensionProcessFilterTimeUnit.HOURS] = "hour",
1667
+ _a[EDimensionProcessFilterTimeUnit.MINUTES] = "minute",
1668
+ _a);
1669
+ function mapDimensionProcessFilterToCalculatorInput(filter) {
1670
+ var formula = filter.value.mode === EWidgetIndicatorValueModes.FORMULA
1671
+ ? filter.value.formula
1672
+ : getProcessDimensionValueFormula(filter.value);
1673
+ if (formula === undefined) {
1674
+ throw new Error("Formula generation error");
1675
+ }
1676
+ var _a = filter.condition, timeUnit = _a.timeUnit, filteringMethod = _a.filteringMethod, values = _a.values;
1677
+ if (filteringMethod === "LAST_TIME") {
1678
+ if (!timeUnit) {
1679
+ throw new Error("Missing time unit");
1680
+ }
1681
+ return {
1682
+ dbDataType: EClickHouseBaseTypes.Bool,
1683
+ formula: "date_diff('".concat(intervalByUnit[timeUnit], "', ").concat(formula, ", now())"),
1684
+ values: values,
1685
+ filteringMethod: formulaFilterMethods.LESS_THAN_OR_EQUAL_TO,
1686
+ };
1687
+ }
1688
+ return { formula: formula, filteringMethod: filteringMethod, values: values, dbDataType: filter.dbDataType };
1689
+ }
1690
+
1691
+ var mapSettingsFilterToCalculatorInput = function (filter) {
1692
+ if (isDimensionProcessFilter(filter)) {
1693
+ return mapDimensionProcessFilterToCalculatorInput(filter);
1694
+ }
1695
+ return mapFormulaFilterToCalculatorInput(filter);
1696
+ };
1697
+ var mapSettingsFiltersToInputs = function (filters) {
1698
+ return compactMap(filters, mapSettingsFilterToCalculatorInput);
1699
+ };
1700
+
1654
1701
  function mapMeasureToInput(measure, variables, addFormulas) {
1655
1702
  if (addFormulas === void 0) { addFormulas = function () { return new Map(); }; }
1656
1703
  var mainFormula = getMeasureFormula(measure);
@@ -2145,4 +2192,4 @@ var getColorByIndex = function (index) {
2145
2192
  return color;
2146
2193
  };
2147
2194
 
2148
- 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, 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 };
2195
+ export { EActionButtonsTypes, EActionTypes, EActivateConditionMode, EAutoUpdateMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDataModelOption, EDimensionAggregationTemplateName, EDimensionProcessFilterTimeUnit, 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, fillTemplateSql, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getProcessDimensionValueFormula, getRuleColor, getTransitionMeasureFormula, isDimensionProcessFilter, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSettingsFiltersToInputs, 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
@@ -213,9 +213,18 @@ exports.EFormulaFilterFieldKeys = void 0;
213
213
  EFormulaFilterFieldKeys["lastTimeUnit"] = "lastTimeUnit";
214
214
  EFormulaFilterFieldKeys["durationUnit"] = "durationUnit";
215
215
  })(exports.EFormulaFilterFieldKeys || (exports.EFormulaFilterFieldKeys = {}));
216
+ exports.EDimensionProcessFilterTimeUnit = void 0;
217
+ (function (EDimensionProcessFilterTimeUnit) {
218
+ EDimensionProcessFilterTimeUnit["YEARS"] = "YEARS";
219
+ EDimensionProcessFilterTimeUnit["MONTHS"] = "MONTHS";
220
+ EDimensionProcessFilterTimeUnit["HOURS"] = "HOURS";
221
+ EDimensionProcessFilterTimeUnit["DAYS"] = "DAYS";
222
+ EDimensionProcessFilterTimeUnit["MINUTES"] = "MINUTES";
223
+ })(exports.EDimensionProcessFilterTimeUnit || (exports.EDimensionProcessFilterTimeUnit = {}));
216
224
  var isFormulaFilterValue = function (value) {
217
225
  return "filteringMethod" in value;
218
226
  };
227
+ var isDimensionProcessFilter = function (filter) { return "value" in filter && "condition" in filter; };
219
228
 
220
229
  var compact = function (items) { return ((items === null || items === void 0 ? void 0 : items.filter(Boolean)) || []); };
221
230
  var compactMap = function (items, f) {
@@ -640,7 +649,7 @@ var formattingConfig = {
640
649
  },
641
650
  };
642
651
 
643
- var _a$4;
652
+ var _a$5;
644
653
  exports.EDimensionTemplateNames = void 0;
645
654
  (function (EDimensionTemplateNames) {
646
655
  EDimensionTemplateNames["dateTime"] = "dateTime";
@@ -656,19 +665,19 @@ exports.EDimensionTemplateNames = void 0;
656
665
  EDimensionTemplateNames["hour"] = "hour";
657
666
  })(exports.EDimensionTemplateNames || (exports.EDimensionTemplateNames = {}));
658
667
  /** Стандартные шаблоны разреза */
659
- var dimensionTemplateFormulas = (_a$4 = {},
660
- _a$4[exports.EDimensionTemplateNames.dateTime] = "toDateTime({columnFormula})",
661
- _a$4[exports.EDimensionTemplateNames.date] = "toDate({columnFormula})",
662
- _a$4[exports.EDimensionTemplateNames.year] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toYear({columnFormula}))",
663
- _a$4[exports.EDimensionTemplateNames.yearAndQuarter] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toYear({columnFormula}) * 10 + toQuarter({columnFormula}))",
664
- _a$4[exports.EDimensionTemplateNames.quarter] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toQuarter({columnFormula}))",
665
- _a$4[exports.EDimensionTemplateNames.yearAndMonth] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toYYYYMM({columnFormula}))",
666
- _a$4[exports.EDimensionTemplateNames.month] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toMonth({columnFormula}))",
667
- _a$4[exports.EDimensionTemplateNames.dayOfMonth] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toDayOfMonth({columnFormula}))",
668
- _a$4[exports.EDimensionTemplateNames.week] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toWeek({columnFormula}))",
669
- _a$4[exports.EDimensionTemplateNames.dayOfWeek] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toDayOfWeek({columnFormula}))",
670
- _a$4[exports.EDimensionTemplateNames.hour] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toHour({columnFormula}))",
671
- _a$4);
668
+ var dimensionTemplateFormulas = (_a$5 = {},
669
+ _a$5[exports.EDimensionTemplateNames.dateTime] = "toDateTime({columnFormula})",
670
+ _a$5[exports.EDimensionTemplateNames.date] = "toDate({columnFormula})",
671
+ _a$5[exports.EDimensionTemplateNames.year] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toYear({columnFormula}))",
672
+ _a$5[exports.EDimensionTemplateNames.yearAndQuarter] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toYear({columnFormula}) * 10 + toQuarter({columnFormula}))",
673
+ _a$5[exports.EDimensionTemplateNames.quarter] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toQuarter({columnFormula}))",
674
+ _a$5[exports.EDimensionTemplateNames.yearAndMonth] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toYYYYMM({columnFormula}))",
675
+ _a$5[exports.EDimensionTemplateNames.month] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toMonth({columnFormula}))",
676
+ _a$5[exports.EDimensionTemplateNames.dayOfMonth] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toDayOfMonth({columnFormula}))",
677
+ _a$5[exports.EDimensionTemplateNames.week] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toWeek({columnFormula}))",
678
+ _a$5[exports.EDimensionTemplateNames.dayOfWeek] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toDayOfWeek({columnFormula}))",
679
+ _a$5[exports.EDimensionTemplateNames.hour] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toHour({columnFormula}))",
680
+ _a$5);
672
681
 
673
682
  exports.EWidgetIndicatorType = void 0;
674
683
  (function (EWidgetIndicatorType) {
@@ -980,7 +989,7 @@ var convertFiltersToFormula = function (filters) {
980
989
  return filters.length > 0 ? " AND ".concat(convertToFormulasChain(filters)) : "";
981
990
  };
982
991
 
983
- var _a$3;
992
+ var _a$4;
984
993
  exports.EDimensionAggregationTemplateName = void 0;
985
994
  (function (EDimensionAggregationTemplateName) {
986
995
  EDimensionAggregationTemplateName["avg"] = "avg";
@@ -997,20 +1006,20 @@ exports.EDimensionAggregationTemplateName = void 0;
997
1006
  EDimensionAggregationTemplateName["countReworks"] = "countReworks";
998
1007
  })(exports.EDimensionAggregationTemplateName || (exports.EDimensionAggregationTemplateName = {}));
999
1008
  /** Шаблоны процессных метрик разреза с режимом AGGREGATION */
1000
- var dimensionAggregationTemplates = (_a$3 = {},
1001
- _a$3[exports.EDimensionAggregationTemplateName.avg] = avgTemplate,
1002
- _a$3[exports.EDimensionAggregationTemplateName.median] = medianTemplate,
1003
- _a$3[exports.EDimensionAggregationTemplateName.count] = countTemplate,
1004
- _a$3[exports.EDimensionAggregationTemplateName.countDistinct] = countDistinctTemplate,
1005
- _a$3[exports.EDimensionAggregationTemplateName.min] = minTemplate,
1006
- _a$3[exports.EDimensionAggregationTemplateName.max] = maxTemplate,
1007
- _a$3[exports.EDimensionAggregationTemplateName.sum] = sumTemplate,
1008
- _a$3[exports.EDimensionAggregationTemplateName.top] = topTemplate,
1009
- _a$3[exports.EDimensionAggregationTemplateName.firstValue] = firstValueTemplate,
1010
- _a$3[exports.EDimensionAggregationTemplateName.lastValue] = lastValueTemplate,
1011
- _a$3[exports.EDimensionAggregationTemplateName.countExecutions] = countExecutionsTemplate,
1012
- _a$3[exports.EDimensionAggregationTemplateName.countReworks] = countReworksTemplate,
1013
- _a$3);
1009
+ var dimensionAggregationTemplates = (_a$4 = {},
1010
+ _a$4[exports.EDimensionAggregationTemplateName.avg] = avgTemplate,
1011
+ _a$4[exports.EDimensionAggregationTemplateName.median] = medianTemplate,
1012
+ _a$4[exports.EDimensionAggregationTemplateName.count] = countTemplate,
1013
+ _a$4[exports.EDimensionAggregationTemplateName.countDistinct] = countDistinctTemplate,
1014
+ _a$4[exports.EDimensionAggregationTemplateName.min] = minTemplate,
1015
+ _a$4[exports.EDimensionAggregationTemplateName.max] = maxTemplate,
1016
+ _a$4[exports.EDimensionAggregationTemplateName.sum] = sumTemplate,
1017
+ _a$4[exports.EDimensionAggregationTemplateName.top] = topTemplate,
1018
+ _a$4[exports.EDimensionAggregationTemplateName.firstValue] = firstValueTemplate,
1019
+ _a$4[exports.EDimensionAggregationTemplateName.lastValue] = lastValueTemplate,
1020
+ _a$4[exports.EDimensionAggregationTemplateName.countExecutions] = countExecutionsTemplate,
1021
+ _a$4[exports.EDimensionAggregationTemplateName.countReworks] = countReworksTemplate,
1022
+ _a$4);
1014
1023
  /** На основе значения режима AGGREGATION подготовить параметры для подстановки в шаблонную формулу */
1015
1024
  var prepareDimensionAggregationParams = function (value) {
1016
1025
  if (!value.eventName ||
@@ -1024,7 +1033,6 @@ var prepareDimensionAggregationParams = function (value) {
1024
1033
  eventNameFormula: value.eventNameFormula,
1025
1034
  caseCaseIdFormula: value.caseCaseIdFormula,
1026
1035
  eventName: value.eventName,
1027
- objectFilters: "1",
1028
1036
  filters: convertFiltersToFormula(value.filters),
1029
1037
  eventTimeFormula: "",
1030
1038
  columnFormula: "",
@@ -1082,7 +1090,7 @@ var prepareTimeParams = function (value) {
1082
1090
  };
1083
1091
 
1084
1092
  function getDimensionFormula(_a) {
1085
- var _b;
1093
+ var _b, _c;
1086
1094
  var value = _a.value;
1087
1095
  if (!value) {
1088
1096
  return "";
@@ -1100,6 +1108,9 @@ function getDimensionFormula(_a) {
1100
1108
  columnFormula: generateColumnFormula(tableName, columnName),
1101
1109
  });
1102
1110
  }
1111
+ return (_c = getProcessDimensionValueFormula(value)) !== null && _c !== void 0 ? _c : "";
1112
+ }
1113
+ function getProcessDimensionValueFormula(value) {
1103
1114
  if (value.mode === exports.EWidgetIndicatorValueModes.AGGREGATION) {
1104
1115
  var preparedParams = prepareDimensionAggregationParams(value);
1105
1116
  if (!preparedParams) {
@@ -1123,7 +1134,6 @@ function getDimensionFormula(_a) {
1123
1134
  var templateFormula = timeTemplates[value.mode][value.templateName];
1124
1135
  return fillTemplateSql(templateFormula, preparedParams);
1125
1136
  }
1126
- return "";
1127
1137
  }
1128
1138
 
1129
1139
  exports.EMeasureAggregationTemplateName = void 0;
@@ -1157,7 +1167,6 @@ var prepareMeasureAggregationParams = function (value) {
1157
1167
  eventNameFormula: value.eventNameFormula,
1158
1168
  caseCaseIdFormula: value.caseCaseIdFormula,
1159
1169
  eventName: (_a = value.eventName) !== null && _a !== void 0 ? _a : "",
1160
- objectFilters: "1",
1161
1170
  filters: convertFiltersToFormula(value.filters),
1162
1171
  eventTimeFormula: "",
1163
1172
  columnFormula: "",
@@ -1178,7 +1187,7 @@ var prepareMeasureAggregationParams = function (value) {
1178
1187
  return columnParams;
1179
1188
  };
1180
1189
 
1181
- var _a$2;
1190
+ var _a$3;
1182
1191
  exports.EMeasureTemplateNames = void 0;
1183
1192
  (function (EMeasureTemplateNames) {
1184
1193
  EMeasureTemplateNames["avg"] = "avg";
@@ -1190,15 +1199,15 @@ exports.EMeasureTemplateNames = void 0;
1190
1199
  EMeasureTemplateNames["sum"] = "sum";
1191
1200
  })(exports.EMeasureTemplateNames || (exports.EMeasureTemplateNames = {}));
1192
1201
  /** Стандартные шаблоны меры */
1193
- var measureTemplateFormulas = (_a$2 = {},
1194
- _a$2[exports.EMeasureTemplateNames.avg] = "avg({columnFormula})",
1195
- _a$2[exports.EMeasureTemplateNames.count] = "count({columnFormula})",
1196
- _a$2[exports.EMeasureTemplateNames.countDistinct] = "count(distinct {columnFormula})",
1197
- _a$2[exports.EMeasureTemplateNames.median] = "medianExact({columnFormula})",
1198
- _a$2[exports.EMeasureTemplateNames.min] = "min({columnFormula})",
1199
- _a$2[exports.EMeasureTemplateNames.max] = "max({columnFormula})",
1200
- _a$2[exports.EMeasureTemplateNames.sum] = "sum({columnFormula})",
1201
- _a$2);
1202
+ var measureTemplateFormulas = (_a$3 = {},
1203
+ _a$3[exports.EMeasureTemplateNames.avg] = "avg({columnFormula})",
1204
+ _a$3[exports.EMeasureTemplateNames.count] = "count({columnFormula})",
1205
+ _a$3[exports.EMeasureTemplateNames.countDistinct] = "count(distinct {columnFormula})",
1206
+ _a$3[exports.EMeasureTemplateNames.median] = "medianExact({columnFormula})",
1207
+ _a$3[exports.EMeasureTemplateNames.min] = "min({columnFormula})",
1208
+ _a$3[exports.EMeasureTemplateNames.max] = "max({columnFormula})",
1209
+ _a$3[exports.EMeasureTemplateNames.sum] = "sum({columnFormula})",
1210
+ _a$3);
1202
1211
 
1203
1212
  /** Шаблон процессной метрики меры с режимом CONVERSION */
1204
1213
  var 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)";
@@ -1216,7 +1225,6 @@ var prepareConversionParams = function (value) {
1216
1225
  return null;
1217
1226
  }
1218
1227
  return {
1219
- objectFilters: "1",
1220
1228
  startEventTimeFormula: value.startEventTimeFormula,
1221
1229
  startEventNameFormula: value.startEventNameFormula,
1222
1230
  startEventFilters: convertFiltersToFormula(value.startEventFilters),
@@ -1255,7 +1263,6 @@ var prepareDurationParams = function (value) {
1255
1263
  return appearance === exports.EEventAppearances.FIRST ? "minIf" : "maxIf";
1256
1264
  };
1257
1265
  return {
1258
- objectFilters: "1",
1259
1266
  startEventTimeFormula: value.startEventTimeFormula,
1260
1267
  startEventNameFormula: value.startEventNameFormula,
1261
1268
  startEventFilters: convertFiltersToFormula(value.startEventFilters),
@@ -1271,16 +1278,16 @@ var prepareDurationParams = function (value) {
1271
1278
  };
1272
1279
 
1273
1280
  function createAnyEventTemplate(aggregatePart) {
1274
- return "{outerAggregation}If(process(".concat(aggregatePart, ", {caseCaseIdFormula}), {objectFilters})");
1281
+ return "{outerAggregation}(process(".concat(aggregatePart, ", {caseCaseIdFormula}))");
1275
1282
  }
1276
1283
  function createSpecificEventTemplate(fn, additionalFn) {
1277
- return "{outerAggregation}If(process(".concat(fn, "(").concat(additionalFn ? "".concat(additionalFn, " ") : "", "{columnFormula}, {eventNameFormula} = '{eventName}'{filters}), {caseCaseIdFormula}), {objectFilters})");
1284
+ return "{outerAggregation}(process(".concat(fn, "(").concat(additionalFn ? "".concat(additionalFn, " ") : "", "{columnFormula}, {eventNameFormula} = '{eventName}'{filters}), {caseCaseIdFormula}))");
1278
1285
  }
1279
1286
  function createTopLikeTemplate(template) {
1280
1287
  return function (outerAggregation) {
1281
1288
  return outerAggregation === exports.EOuterAggregation.top
1282
- ? "{outerAggregation}KIf(1)(".concat(template, ", {objectFilters})[1]")
1283
- : "{outerAggregation}If(".concat(template, ", {objectFilters})");
1289
+ ? "{outerAggregation}K(1)(".concat(template, ")[1]")
1290
+ : "{outerAggregation}(".concat(template, ")");
1284
1291
  };
1285
1292
  }
1286
1293
  function createAggregationTemplate(templateName, _a) {
@@ -1327,9 +1334,9 @@ function createAggregationTemplate(templateName, _a) {
1327
1334
  ? createAnyEventTemplate("argMax({columnFormula}, {eventTimeFormula})")
1328
1335
  : createTopLikeTemplate(lastValueTemplate)(outerAggregation);
1329
1336
  case exports.EMeasureAggregationTemplateName.countExecutions:
1330
- return "{outerAggregation}If(".concat(countExecutionsTemplate, ", {objectFilters})");
1337
+ return "{outerAggregation}(".concat(countExecutionsTemplate, ")");
1331
1338
  case exports.EMeasureAggregationTemplateName.countReworks:
1332
- return "{outerAggregation}If(".concat(countReworksTemplate, ", {objectFilters})");
1339
+ return "{outerAggregation}(".concat(countReworksTemplate, ")");
1333
1340
  }
1334
1341
  }
1335
1342
 
@@ -1378,16 +1385,16 @@ function getMeasureFormula(_a) {
1378
1385
  return "";
1379
1386
  }
1380
1387
 
1381
- var _a$1;
1388
+ var _a$2;
1382
1389
  exports.EEventMeasureTemplateNames = void 0;
1383
1390
  (function (EEventMeasureTemplateNames) {
1384
1391
  EEventMeasureTemplateNames["eventsCount"] = "eventsCount";
1385
1392
  EEventMeasureTemplateNames["reworksCount"] = "reworksCount";
1386
1393
  })(exports.EEventMeasureTemplateNames || (exports.EEventMeasureTemplateNames = {}));
1387
- var eventMeasureTemplateFormulas = (_a$1 = {},
1388
- _a$1[exports.EEventMeasureTemplateNames.eventsCount] = "count()",
1389
- _a$1[exports.EEventMeasureTemplateNames.reworksCount] = "count() - uniqExact({caseCaseIdFormula})",
1390
- _a$1);
1394
+ var eventMeasureTemplateFormulas = (_a$2 = {},
1395
+ _a$2[exports.EEventMeasureTemplateNames.eventsCount] = "count()",
1396
+ _a$2[exports.EEventMeasureTemplateNames.reworksCount] = "count() - uniqExact({caseCaseIdFormula})",
1397
+ _a$2);
1391
1398
 
1392
1399
  function getEventMeasureFormula(_a, process) {
1393
1400
  var value = _a.value;
@@ -1404,16 +1411,16 @@ function getEventMeasureFormula(_a, process) {
1404
1411
  return "";
1405
1412
  }
1406
1413
 
1407
- var _a;
1414
+ var _a$1;
1408
1415
  exports.ETransitionMeasureTemplateNames = void 0;
1409
1416
  (function (ETransitionMeasureTemplateNames) {
1410
1417
  ETransitionMeasureTemplateNames["transitionsCount"] = "transitionsCount";
1411
1418
  ETransitionMeasureTemplateNames["medianTime"] = "medianTime";
1412
1419
  })(exports.ETransitionMeasureTemplateNames || (exports.ETransitionMeasureTemplateNames = {}));
1413
- var transitionMeasureTemplateFormulas = (_a = {},
1414
- _a[exports.ETransitionMeasureTemplateNames.transitionsCount] = "count()",
1415
- _a[exports.ETransitionMeasureTemplateNames.medianTime] = "medianExact(date_diff(second, begin({eventTimeFormula}), end({eventTimeFormula})))",
1416
- _a);
1420
+ var transitionMeasureTemplateFormulas = (_a$1 = {},
1421
+ _a$1[exports.ETransitionMeasureTemplateNames.transitionsCount] = "count()",
1422
+ _a$1[exports.ETransitionMeasureTemplateNames.medianTime] = "medianExact(date_diff(second, begin({eventTimeFormula}), end({eventTimeFormula})))",
1423
+ _a$1);
1417
1424
 
1418
1425
  function getTransitionMeasureFormula(_a, process) {
1419
1426
  var value = _a.value;
@@ -1652,6 +1659,46 @@ var mapFormulaFiltersToInputs = function (filters) {
1652
1659
  return compactMap(filters, mapFormulaFilterToCalculatorInput);
1653
1660
  };
1654
1661
 
1662
+ var _a;
1663
+ var intervalByUnit = (_a = {},
1664
+ _a[exports.EDimensionProcessFilterTimeUnit.YEARS] = "year",
1665
+ _a[exports.EDimensionProcessFilterTimeUnit.MONTHS] = "month",
1666
+ _a[exports.EDimensionProcessFilterTimeUnit.DAYS] = "day",
1667
+ _a[exports.EDimensionProcessFilterTimeUnit.HOURS] = "hour",
1668
+ _a[exports.EDimensionProcessFilterTimeUnit.MINUTES] = "minute",
1669
+ _a);
1670
+ function mapDimensionProcessFilterToCalculatorInput(filter) {
1671
+ var formula = filter.value.mode === exports.EWidgetIndicatorValueModes.FORMULA
1672
+ ? filter.value.formula
1673
+ : getProcessDimensionValueFormula(filter.value);
1674
+ if (formula === undefined) {
1675
+ throw new Error("Formula generation error");
1676
+ }
1677
+ var _a = filter.condition, timeUnit = _a.timeUnit, filteringMethod = _a.filteringMethod, values = _a.values;
1678
+ if (filteringMethod === "LAST_TIME") {
1679
+ if (!timeUnit) {
1680
+ throw new Error("Missing time unit");
1681
+ }
1682
+ return {
1683
+ dbDataType: exports.EClickHouseBaseTypes.Bool,
1684
+ formula: "date_diff('".concat(intervalByUnit[timeUnit], "', ").concat(formula, ", now())"),
1685
+ values: values,
1686
+ filteringMethod: formulaFilterMethods.LESS_THAN_OR_EQUAL_TO,
1687
+ };
1688
+ }
1689
+ return { formula: formula, filteringMethod: filteringMethod, values: values, dbDataType: filter.dbDataType };
1690
+ }
1691
+
1692
+ var mapSettingsFilterToCalculatorInput = function (filter) {
1693
+ if (isDimensionProcessFilter(filter)) {
1694
+ return mapDimensionProcessFilterToCalculatorInput(filter);
1695
+ }
1696
+ return mapFormulaFilterToCalculatorInput(filter);
1697
+ };
1698
+ var mapSettingsFiltersToInputs = function (filters) {
1699
+ return compactMap(filters, mapSettingsFilterToCalculatorInput);
1700
+ };
1701
+
1655
1702
  function mapMeasureToInput(measure, variables, addFormulas) {
1656
1703
  if (addFormulas === void 0) { addFormulas = function () { return new Map(); }; }
1657
1704
  var mainFormula = getMeasureFormula(measure);
@@ -2189,8 +2236,10 @@ exports.getDisplayConditionFormula = getDisplayConditionFormula;
2189
2236
  exports.getEventMeasureFormula = getEventMeasureFormula;
2190
2237
  exports.getLocalizedText = getLocalizedText;
2191
2238
  exports.getMeasureFormula = getMeasureFormula;
2239
+ exports.getProcessDimensionValueFormula = getProcessDimensionValueFormula;
2192
2240
  exports.getRuleColor = getRuleColor;
2193
2241
  exports.getTransitionMeasureFormula = getTransitionMeasureFormula;
2242
+ exports.isDimensionProcessFilter = isDimensionProcessFilter;
2194
2243
  exports.isDimensionsHierarchy = isDimensionsHierarchy;
2195
2244
  exports.isFormulaFilterValue = isFormulaFilterValue;
2196
2245
  exports.isValidColor = isValidColor;
@@ -2199,6 +2248,7 @@ exports.mapEventMeasuresToInputs = mapEventMeasuresToInputs;
2199
2248
  exports.mapFormulaFilterToCalculatorInput = mapFormulaFilterToCalculatorInput;
2200
2249
  exports.mapFormulaFiltersToInputs = mapFormulaFiltersToInputs;
2201
2250
  exports.mapMeasuresToInputs = mapMeasuresToInputs;
2251
+ exports.mapSettingsFiltersToInputs = mapSettingsFiltersToInputs;
2202
2252
  exports.mapSortingToInputs = mapSortingToInputs;
2203
2253
  exports.mapTransitionMeasuresToInputs = mapTransitionMeasuresToInputs;
2204
2254
  exports.measureTemplateFormulas = measureTemplateFormulas;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infomaximum/widget-sdk",
3
- "version": "6.0.0-9",
3
+ "version": "6.0.0-view-theme.0",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",