@infomaximum/widget-sdk 5.9.1 → 5.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -6,59 +6,6 @@ type TNullable<T> = T | null | undefined;
6
6
  type valueof<T> = T[keyof T];
7
7
  type StringKeyOf<T> = Exclude<keyof T, number | symbol>;
8
8
 
9
- declare enum EUnitMode {
10
- PIXEL = "PIXEL",
11
- PERCENT = "PERCENT"
12
- }
13
- declare enum EControlType {
14
- inputNumber = "inputNumber",
15
- switch = "switch",
16
- input = "input",
17
- formattingTemplate = "formattingTemplate",
18
- radioIconGroup = "radioIconGroup",
19
- select = "select",
20
- tagSet = "tagSet",
21
- formula = "formula",
22
- typedFormula = "typedFormula",
23
- inputRange = "inputRange",
24
- colorPicker = "colorPicker",
25
- displayCondition = "displayCondition",
26
- eventsColor = "eventsColor",
27
- inputMarkdown = "inputMarkdown",
28
- filter = "filter",
29
- actionOnClick = "actionOnClick",
30
- eventsPicker = "eventsPicker",
31
- size = "size",
32
- formatting = "formatting"
33
- }
34
- /** Конфигурация элемента управления настройкой */
35
- interface IControlRecord<Settings extends object, Value, ControlType = EControlType> {
36
- /** Ключ, должен быть уникальным в рамках одного уровня вложенности */
37
- key: string;
38
- /** Локализация заголовка */
39
- title?: string;
40
- /** Тип используемого элемента управления из предложенных системой */
41
- type: ControlType | string;
42
- /** Кастомный верхний отступ */
43
- marginTop?: number;
44
- /** Объект дополнительных параметров элемента управления */
45
- props?: object | ((settings: Settings) => object);
46
- /** Описание доступа к значению настройки */
47
- accessor: TRecordAccessor<Settings, Value>;
48
- /**
49
- * Рекурсивное определение мета-описания, в элемент управления будет передана функция dive
50
- * для перехода в указанное мета-описание.
51
- *
52
- * Возможность работает только для элемента управления EControlType.tagSet.
53
- */
54
- description?: IDivePanelDescription<Settings>;
55
- /**
56
- * Предикат, позволяющий скрыть элемент управления.
57
- * Предоставлен для удобства разработки. Скрыть элемент можно и условно добавляя его в мета-описание.
58
- */
59
- shouldDisplay?: IDisplayPredicate<Settings>;
60
- }
61
-
62
9
  interface ICalculator<Input, Output> {
63
10
  /** Запрос к вычислителю */
64
11
  calculate(input: Input): Promise<Output>;
@@ -455,12 +402,15 @@ declare const isFormulaFilterValue: (value: TExtendedFormulaFilterValue) => valu
455
402
  declare enum EWidgetFilterMode {
456
403
  DEFAULT = "DEFAULT",
457
404
  SINGLE = "SINGLE",
405
+ /** @deprecated Отказ от режима фильтрации "Множественный выбор"*/
458
406
  MULTI = "MULTI",
459
407
  DISABLED = "DISABLED"
460
408
  }
461
409
  type TWidgetFiltering = {
462
410
  ignore: true;
463
- mode: EWidgetFilterMode.SINGLE | EWidgetFilterMode.MULTI;
411
+ mode: EWidgetFilterMode.SINGLE
412
+ /** @deprecated Отказ от режима фильтрации "Множественный выбор"*/
413
+ | EWidgetFilterMode.MULTI;
464
414
  } | {
465
415
  ignore: false;
466
416
  mode: EWidgetFilterMode;
@@ -505,6 +455,301 @@ interface IAppearanceDisabledSettings {
505
455
  }
506
456
  type TAppearanceSettings = IAppearanceEnabledSettings | IAppearanceDisabledSettings;
507
457
 
458
+ declare enum ESortDirection {
459
+ descend = "DESC",
460
+ ascend = "ASC",
461
+ ASC = "ascend",
462
+ DESC = "descend"
463
+ }
464
+ type TSortDirection = ESortDirection.ascend | ESortDirection.descend;
465
+ interface ISortOrder {
466
+ /** Формула сортировки */
467
+ formula: string;
468
+ /** Тип данных формулы */
469
+ dbDataType: TNullable<string>;
470
+ /** Направление сортировки */
471
+ direction: TSortDirection;
472
+ /** Условие применения сортировки */
473
+ displayCondition?: TNullable<string>;
474
+ }
475
+ type TWidgetSortingValue = {
476
+ mode: ESortingValueModes.FORMULA;
477
+ formula: string;
478
+ dbDataType: string;
479
+ } | {
480
+ mode: ESortingValueModes.IN_WIDGET;
481
+ group: string;
482
+ index: number;
483
+ };
484
+
485
+ declare enum EWidgetIndicatorType {
486
+ MEASURE = "MEASURE",
487
+ EVENT_INDICATOR = "EVENT_INDICATOR",
488
+ TRANSITION_INDICATOR = "TRANSITION_INDICATOR",
489
+ DIMENSION = "DIMENSION",
490
+ SORTING = "SORTING"
491
+ }
492
+ declare enum EOuterAggregation {
493
+ avg = "avg",
494
+ median = "median",
495
+ count = "count",
496
+ countDistinct = "countDistinct",
497
+ min = "min",
498
+ max = "max",
499
+ sum = "sum"
500
+ }
501
+ interface IWidgetIndicator extends IAutoIdentifiedArrayItem {
502
+ name: string;
503
+ }
504
+ type TProcessIndicatorValue = {
505
+ mode: EWidgetIndicatorValueModes.FORMULA;
506
+ formula: string;
507
+ } | {
508
+ mode: EWidgetIndicatorValueModes.TEMPLATE;
509
+ /** Имя шаблонной формулы, использующей колонку таблицы */
510
+ templateName: string;
511
+ };
512
+ interface IProcessIndicator extends IWidgetIndicator {
513
+ value?: TProcessIndicatorValue;
514
+ dbDataType?: string;
515
+ format?: EFormatTypes;
516
+ formatting?: EFormattingPresets;
517
+ formattingTemplate?: string;
518
+ displayCondition?: TDisplayCondition;
519
+ }
520
+ interface IProcessEventIndicator extends IProcessIndicator {
521
+ }
522
+ interface IProcessTransitionIndicator extends IProcessIndicator {
523
+ }
524
+ /** Индикатор для сортировки */
525
+ interface IWidgetSortingIndicator extends IWidgetIndicator {
526
+ direction: TSortDirection;
527
+ value: TWidgetSortingValue;
528
+ }
529
+ /** Режимы значения показателя (на основе чего генерируется формула) */
530
+ declare enum EWidgetIndicatorValueModes {
531
+ /** Готовая формула (как правило, введенная пользователем через редактор формул) */
532
+ FORMULA = "FORMULA",
533
+ /** Шаблон формулы, предоставляемый системой */
534
+ TEMPLATE = "TEMPLATE",
535
+ AGGREGATION = "AGGREGATION",
536
+ DURATION = "DURATION",
537
+ CONVERSION = "CONVERSION",
538
+ START_TIME = "START_TIME",
539
+ END_TIME = "END_TIME"
540
+ }
541
+ /** Режимы сортировки (на что ссылается сортировка) */
542
+ declare enum ESortingValueModes {
543
+ /** Сортировка по формуле */
544
+ FORMULA = "FORMULA",
545
+ /** Сортировка по показателю(разрезу или мере) виджета */
546
+ IN_WIDGET = "IN_WIDGET"
547
+ }
548
+ interface ICommonState {
549
+ name: string;
550
+ /** @deprecated */
551
+ guid: string;
552
+ }
553
+ interface ICommonMeasures {
554
+ name: string;
555
+ /** @deprecated */
556
+ guid: string;
557
+ formula: string;
558
+ }
559
+ interface ICommonDimensions {
560
+ name: string;
561
+ formula: string;
562
+ }
563
+ type TColumnIndicatorValue = {
564
+ mode: EWidgetIndicatorValueModes.FORMULA;
565
+ formula?: string;
566
+ } | {
567
+ mode: EWidgetIndicatorValueModes.TEMPLATE;
568
+ /** Имя шаблонной формулы, использующей колонку таблицы */
569
+ templateName?: string;
570
+ /** Имя таблицы */
571
+ tableName?: string;
572
+ /** Имя колонки */
573
+ columnName?: string;
574
+ };
575
+ /** Общий интерфейс разреза и меры */
576
+ interface IWidgetColumnIndicator extends IWidgetIndicator {
577
+ dbDataType?: string;
578
+ format?: EFormatTypes;
579
+ formatting?: EFormattingPresets;
580
+ formattingTemplate?: string;
581
+ displayCondition?: TDisplayCondition;
582
+ onClick?: TActionsOnClick[];
583
+ }
584
+ interface IWidgetDimensionHierarchy<D extends IWidgetDimension = IWidgetDimension> extends IAutoIdentifiedArrayItem {
585
+ name: string;
586
+ hierarchyDimensions: D[];
587
+ displayCondition?: TDisplayCondition;
588
+ }
589
+ interface IWidgetDimension extends Omit<IWidgetColumnIndicator, "value"> {
590
+ value?: TColumnIndicatorValue | (TWidgetIndicatorAggregationValue & {
591
+ innerTemplateName?: string;
592
+ }) | TWidgetIndicatorTimeValue;
593
+ hideEmptyValues: boolean;
594
+ }
595
+ interface IWidgetMeasure extends Omit<IWidgetColumnIndicator, "value"> {
596
+ value?: TColumnIndicatorValue | (TWidgetIndicatorAggregationValue & {
597
+ outerAggregation: EOuterAggregation;
598
+ }) | TWidgetIndicatorConversionValue | TWidgetIndicatorDurationValue;
599
+ }
600
+ interface IMarkdownMeasure extends IWidgetMeasure {
601
+ format: EFormatTypes;
602
+ displaySign: EMarkdownDisplayMode;
603
+ }
604
+ /** Тип показателя */
605
+ declare enum EIndicatorType {
606
+ /** Показатели процесса */
607
+ PROCESS_MEASURE = "PROCESS_MEASURE",
608
+ /** Вводимое значение */
609
+ STATIC = "STATIC",
610
+ /** Статический список */
611
+ STATIC_LIST = "STATIC_LIST",
612
+ /** Динамический список */
613
+ DYNAMIC_LIST = "DYNAMIC_LIST",
614
+ /** Список колонок */
615
+ COLUMN_LIST = "COLUMN_LIST",
616
+ /** Разрез */
617
+ DIMENSION = "DIMENSION",
618
+ /** Мера */
619
+ MEASURE = "MEASURE",
620
+ /** Иерархия */
621
+ DYNAMIC_DIMENSION = "DYNAMIC_DIMENSION",
622
+ /** Пользовательская сортировка */
623
+ USER_SORTING = "USER_SORTING"
624
+ }
625
+ interface IBaseWidgetVariable {
626
+ /** Имя переменной */
627
+ name: string;
628
+ /** @deprecated */
629
+ guid: string;
630
+ }
631
+ /** Обобщенные типы значений переменных */
632
+ declare enum ESimpleInputType {
633
+ /** Число (точность Float64) */
634
+ NUMBER = "FLOAT",
635
+ /** Целое число (точность Int64) */
636
+ INTEGER_NUMBER = "INTEGER",
637
+ /** Текст */
638
+ TEXT = "STRING",
639
+ /** Дата (точность Date) */
640
+ DATE = "DATE",
641
+ /** Дата и время (точность DateTime64) */
642
+ DATE_AND_TIME = "DATETIME"
643
+ }
644
+ interface IWidgetStaticVariable extends IBaseWidgetVariable {
645
+ /** Тип переменной */
646
+ type: EIndicatorType.STATIC;
647
+ /** Значение */
648
+ value: string;
649
+ /** Обобщенный тип данных */
650
+ simpleInputType: ESimpleInputType;
651
+ }
652
+ interface IStaticListLabeledOption {
653
+ value: string;
654
+ label: string;
655
+ }
656
+ interface IWidgetStaticListVariable extends IBaseWidgetVariable {
657
+ /** Тип переменной */
658
+ type: EIndicatorType.STATIC_LIST;
659
+ /** Значение */
660
+ value: string | string[];
661
+ /** Элементы статического списка */
662
+ /** @deprecated поле будет удалено, необходимо использовать labeledOptions */
663
+ options: string[];
664
+ /** Объект ключ значение для статического списка */
665
+ labeledOptions: IStaticListLabeledOption[];
666
+ /** Множественный выбор */
667
+ multipleChoice: boolean;
668
+ }
669
+ interface IWidgetDynamicListVariable extends IBaseWidgetVariable {
670
+ /** Тип переменной */
671
+ type: EIndicatorType.DYNAMIC_LIST;
672
+ /** Значение */
673
+ value: string | string[];
674
+ /** Формула для отображения списка */
675
+ listFormula: TNullable<string>;
676
+ /** Тип данных */
677
+ dbDataType: string;
678
+ /** Множественный выбор */
679
+ multipleChoice: boolean;
680
+ /** Фильтры */
681
+ filters: TExtendedFormulaFilterValue[];
682
+ }
683
+ interface IWidgetColumnListVariable extends IBaseWidgetVariable {
684
+ /** Тип переменной */
685
+ type: EIndicatorType.COLUMN_LIST;
686
+ /** Имя таблицы */
687
+ tableName: string;
688
+ /** Значение (имя колонки) */
689
+ value: string;
690
+ }
691
+ type TWidgetVariable = IWidgetStaticVariable | IWidgetStaticListVariable | IWidgetDynamicListVariable | IWidgetColumnListVariable;
692
+ declare function isDimensionsHierarchy(indicator: IWidgetColumnIndicator): indicator is IWidgetDimensionHierarchy;
693
+ declare enum OuterAggregation {
694
+ avg = "avgIf",
695
+ median = "medianIf",
696
+ count = "countIf",
697
+ countDistinct = "countIfDistinct",
698
+ min = "minIf",
699
+ max = "maxIf",
700
+ sum = "sumIf"
701
+ }
702
+ declare enum EDurationTemplateName {
703
+ avg = "avg",
704
+ median = "median"
705
+ }
706
+ type TWidgetIndicatorAggregationValue = {
707
+ mode: EWidgetIndicatorValueModes.AGGREGATION;
708
+ templateName: string;
709
+ processName: string | null;
710
+ eventName: string | null;
711
+ caseCaseIdFormula: string | null;
712
+ eventNameFormula: string | null;
713
+ filters: TExtendedFormulaFilterValue[];
714
+ tableName?: string;
715
+ columnName?: string;
716
+ eventTimeFormula?: string | null;
717
+ };
718
+ declare enum EEventAppearances {
719
+ FIRST = "FIRST",
720
+ LAST = "LAST"
721
+ }
722
+ type TWidgetIndicatorConversionValue = {
723
+ mode: EWidgetIndicatorValueModes.CONVERSION;
724
+ startEventNameFormula: string | null;
725
+ startEventProcessName: string | null;
726
+ startEventName: string | null;
727
+ startEventFilters: TExtendedFormulaFilterValue[];
728
+ startEventTimeFormula: string | null;
729
+ endEventNameFormula: string | null;
730
+ endEventProcessName: string | null;
731
+ endEventName: string | null;
732
+ endEventFilters: TExtendedFormulaFilterValue[];
733
+ endCaseCaseIdFormula: string | null;
734
+ endEventTimeFormula: string | null;
735
+ };
736
+ type TWidgetIndicatorDurationValue = {
737
+ mode: EWidgetIndicatorValueModes.DURATION;
738
+ templateName: string;
739
+ startEventAppearances: EEventAppearances;
740
+ endEventAppearances: EEventAppearances;
741
+ } & Omit<TWidgetIndicatorConversionValue, "mode">;
742
+ type TWidgetIndicatorTimeValue = {
743
+ templateName: string;
744
+ mode: EWidgetIndicatorValueModes.START_TIME | EWidgetIndicatorValueModes.END_TIME;
745
+ processName: string;
746
+ eventName: string;
747
+ eventTimeFormula: string;
748
+ caseCaseIdFormula: string;
749
+ eventNameFormula: string;
750
+ filters: TExtendedFormulaFilterValue[];
751
+ };
752
+
508
753
  interface IWidgetTableColumn {
509
754
  /** Имя колонки */
510
755
  name: string;
@@ -691,6 +936,11 @@ declare enum EDrawerPlacement {
691
936
  LEFT = "LEFT",
692
937
  RIGHT = "RIGHT"
693
938
  }
939
+ declare enum EAutoUpdateMode {
940
+ NONE = "NONE",
941
+ THIS_WIDGET = "THIS_WIDGET",
942
+ ALL_WIDGETS = "ALL_WIDGETS"
943
+ }
694
944
  interface IParameterFromColumn {
695
945
  inputMethod: EWidgetActionInputMethod.COLUMN;
696
946
  tableName: string;
@@ -758,7 +1008,7 @@ interface IActionRunScript extends IActionCommon {
758
1008
  type: EActionTypes.EXECUTE_SCRIPT;
759
1009
  parameters: TActionOnClickParameter[];
760
1010
  scriptKey: string;
761
- updateDashboard: boolean;
1011
+ autoUpdate: EAutoUpdateMode;
762
1012
  }
763
1013
  interface IActionUpdateVariable extends IActionCommon {
764
1014
  type: EActionTypes.UPDATE_VARIABLE;
@@ -803,7 +1053,7 @@ interface IWidgetAction extends IActionCommon {
803
1053
  parameters: TWidgetActionParameter[];
804
1054
  type: EActionTypes.EXECUTE_SCRIPT;
805
1055
  scriptKey: string;
806
- updateDashboard: boolean;
1056
+ autoUpdate: EAutoUpdateMode;
807
1057
  description: string;
808
1058
  blockingCondition: {
809
1059
  mode: EBlockingConditionMode.FORMULA;
@@ -826,300 +1076,377 @@ declare enum EActionButtonsTypes {
826
1076
  SECONDARY = "primary-outlined"
827
1077
  }
828
1078
 
829
- declare enum ESortDirection {
830
- descend = "DESC",
831
- ascend = "ASC",
832
- ASC = "ascend",
833
- DESC = "descend"
1079
+ declare enum ESimpleDataType {
1080
+ OTHER = "OTHER",
1081
+ DATE = "DATE",
1082
+ FLOAT = "FLOAT",
1083
+ DATETIME = "DATETIME",
1084
+ STRING = "STRING",
1085
+ INTEGER = "INTEGER",
1086
+ DATETIME64 = "DATETIME64",
1087
+ BOOLEAN = "BOOLEAN"
834
1088
  }
835
- type TSortDirection = ESortDirection.ascend | ESortDirection.descend;
836
- interface ISortOrder {
837
- /** Формула сортировки */
838
- formula: string;
839
- /** Тип данных формулы */
840
- dbDataType: TNullable<string>;
841
- /** Направление сортировки */
842
- direction: TSortDirection;
843
- /** Условие применения сортировки */
844
- displayCondition?: TNullable<string>;
1089
+ type TDbTypeContainer = "Array" | "Nullable";
1090
+ /** Результат разбора типа данных из базы данных (в будущем возможна поддержка других СУБД помимо ClickHouse) */
1091
+ interface IParsedDbType<T extends TNullable<string> = string> {
1092
+ /** Контейнеры над базовым типом в порядке от внешнего к внутреннему */
1093
+ containers: TDbTypeContainer[];
1094
+ /** Исходный базовый тип (без контейнеров) */
1095
+ dbBaseDataType: T;
1096
+ /** Обобщенный базовый тип */
1097
+ simpleBaseType: ESimpleDataType;
1098
+ /** Обобщенный исходный тип (при наличии контейнера `Array` классифицируется как `OTHER`) */
1099
+ simpleType: ESimpleDataType;
845
1100
  }
846
- type TWidgetSortingValue = {
847
- mode: ESortingValueModes.FORMULA;
848
- formula: string;
849
- dbDataType: string;
850
- } | {
851
- mode: ESortingValueModes.IN_WIDGET;
852
- group: string;
853
- index: number;
854
- };
855
1101
 
856
- declare enum EWidgetIndicatorType {
857
- MEASURE = "MEASURE",
858
- EVENT_INDICATOR = "EVENT_INDICATOR",
859
- TRANSITION_INDICATOR = "TRANSITION_INDICATOR",
860
- DIMENSION = "DIMENSION",
861
- SORTING = "SORTING"
862
- }
863
- declare enum EOuterAggregation {
864
- avg = "avg",
865
- median = "median",
866
- count = "count",
867
- countDistinct = "countDistinct",
868
- min = "min",
869
- max = "max",
870
- sum = "sum"
871
- }
872
- interface IWidgetIndicator extends IAutoIdentifiedArrayItem {
873
- name: string;
874
- }
875
- type TProcessIndicatorValue = {
876
- mode: EWidgetIndicatorValueModes.FORMULA;
877
- formula: string;
878
- } | {
879
- mode: EWidgetIndicatorValueModes.TEMPLATE;
880
- /** Имя шаблонной формулы, использующей колонку таблицы */
881
- templateName: string;
1102
+ declare enum EControlType {
1103
+ /** Ввод текста */
1104
+ input = "input",
1105
+ /** Ввод текста в формате markdown */
1106
+ inputMarkdown = "inputMarkdown",
1107
+ /** Ввод числа */
1108
+ inputNumber = "inputNumber",
1109
+ /** Выбор диапазона чисел */
1110
+ inputRange = "inputRange",
1111
+ /** Ввод размера (число + единица измерения) */
1112
+ size = "size",
1113
+ /** Выбор boolean значения через переключатель */
1114
+ switch = "switch",
1115
+ /** Выбор варианта из выпадающего списка */
1116
+ select = "select",
1117
+ /** Выбор одного из вариантов, представленных через иконки */
1118
+ radioIconGroup = "radioIconGroup",
1119
+ /** Ввод значения показателя */
1120
+ formula = "formula",
1121
+ /** Ввод формулы и ее типа */
1122
+ typedFormula = "typedFormula",
1123
+ /** Выбор настроек форматирования */
1124
+ formatting = "formatting",
1125
+ /** Ввод шаблона форматирования */
1126
+ formattingTemplate = "formattingTemplate",
1127
+ /** Выбор действий по клику */
1128
+ actionOnClick = "actionOnClick",
1129
+ /** Ввод фильтров */
1130
+ filter = "filter",
1131
+ /** Ввод условия отображения */
1132
+ displayCondition = "displayCondition",
1133
+ /** Ввод цвета */
1134
+ colorPicker = "colorPicker",
1135
+ /** Отображение тегов с возможностью "провалиться" внутрь */
1136
+ tagSet = "tagSet",
1137
+ /** Множественный выбор событий процесса */
1138
+ eventsPicker = "eventsPicker",
1139
+ /**
1140
+ * @deprecated используется только для виджета "Маршруты", будет перенесено на уровень виджета.
1141
+ * Ввод цветов для событий процесса.
1142
+ */
1143
+ eventsColor = "eventsColor"
1144
+ }
1145
+ type ControlsMap = {
1146
+ [EControlType.input]: IInputControl;
1147
+ [EControlType.inputMarkdown]: IInputMarkdownControl;
1148
+ [EControlType.inputNumber]: IInputNumberControl;
1149
+ [EControlType.inputRange]: IInputRangeControl;
1150
+ [EControlType.size]: ISizeControl;
1151
+ [EControlType.switch]: ISwitchControl;
1152
+ [EControlType.select]: ISelectControl;
1153
+ [EControlType.radioIconGroup]: IRadioIconGroupControl;
1154
+ [EControlType.formula]: IFormulaControl;
1155
+ [EControlType.typedFormula]: ITypedFormulaControl;
1156
+ [EControlType.formatting]: IFormattingControl;
1157
+ [EControlType.formattingTemplate]: IFormattingTemplateControl;
1158
+ [EControlType.actionOnClick]: IActionOnClickControl;
1159
+ [EControlType.filter]: IFilterControl;
1160
+ [EControlType.displayCondition]: IDisplayConditionControl;
1161
+ [EControlType.colorPicker]: IColorPickerControl;
1162
+ [EControlType.tagSet]: ITagSetControl;
1163
+ [EControlType.eventsPicker]: IEventsPickerControl;
1164
+ [EControlType.eventsColor]: IEventsColorControl;
882
1165
  };
883
- interface IProcessIndicator extends IWidgetIndicator {
884
- value?: TProcessIndicatorValue;
885
- dbDataType?: string;
886
- format?: EFormatTypes;
887
- formatting?: EFormattingPresets;
888
- formattingTemplate?: string;
889
- displayCondition?: TDisplayCondition;
890
- }
891
- interface IProcessEventIndicator extends IProcessIndicator {
892
- }
893
- interface IProcessTransitionIndicator extends IProcessIndicator {
894
- }
895
- /** Индикатор для сортировки */
896
- interface IWidgetSortingIndicator extends IWidgetIndicator {
897
- direction: TSortDirection;
898
- value: TWidgetSortingValue;
899
- }
900
- /** Режимы значения показателя (на основе чего генерируется формула) */
901
- declare enum EWidgetIndicatorValueModes {
902
- /** Готовая формула (как правило, введенная пользователем через редактор формул) */
903
- FORMULA = "FORMULA",
904
- /** Шаблон формулы, предоставляемый системой */
905
- TEMPLATE = "TEMPLATE",
906
- AGGREGATION = "AGGREGATION",
907
- DURATION = "DURATION",
908
- CONVERSION = "CONVERSION",
909
- START_TIME = "START_TIME",
910
- END_TIME = "END_TIME"
911
- }
912
- /** Режимы сортировки (на что ссылается сортировка) */
913
- declare enum ESortingValueModes {
914
- /** Сортировка по формуле */
915
- FORMULA = "FORMULA",
916
- /** Сортировка по показателю(разрезу или мере) виджета */
917
- IN_WIDGET = "IN_WIDGET"
1166
+ type TControlUnion<Settings extends object> = {
1167
+ [K in keyof ControlsMap]: IControlRecord<Settings, ControlsMap[K]>;
1168
+ }[keyof ControlsMap];
1169
+ type TControlConstraint = {
1170
+ type: string;
1171
+ value: unknown;
1172
+ props: object;
1173
+ };
1174
+ /** Конфигурация элемента управления настройкой */
1175
+ interface IControlRecord<Settings extends object, T extends TControlConstraint = TControlConstraint> {
1176
+ /** Ключ, должен быть уникальным в рамках одного уровня вложенности */
1177
+ key: string;
1178
+ /** Локализация заголовка */
1179
+ title?: string;
1180
+ /** Тип используемого элемента управления из предложенных системой */
1181
+ type: T["type"];
1182
+ /** Кастомный верхний отступ */
1183
+ marginTop?: number;
1184
+ /** Объект дополнительных параметров элемента управления */
1185
+ props?: T["props"] | ((settings: Settings) => T["props"]);
1186
+ /** Описание доступа к значению настройки */
1187
+ accessor: TRecordAccessor<Settings, T["value"]>;
1188
+ /**
1189
+ * Рекурсивное определение мета-описания, в элемент управления будет передана функция dive
1190
+ * для перехода в указанное мета-описание.
1191
+ *
1192
+ * Возможность работает только для элемента управления EControlType.tagSet.
1193
+ */
1194
+ description?: T["type"] extends EControlType.tagSet ? IDivePanelDescription<Settings> : never;
1195
+ /**
1196
+ * Предикат, позволяющий скрыть элемент управления.
1197
+ * Предоставлен для удобства разработки. Скрыть элемент можно и условно добавляя его в мета-описание.
1198
+ */
1199
+ shouldDisplay?: IDisplayPredicate<Settings>;
918
1200
  }
919
- interface ICommonState {
920
- name: string;
921
- /** @deprecated */
922
- guid: string;
1201
+ interface IInputControl {
1202
+ type: EControlType.input;
1203
+ value: string;
1204
+ props: {
1205
+ isBordered?: boolean;
1206
+ placeholder?: string;
1207
+ /** Максимальное количество символов которое можно ввести в поле */
1208
+ maxLength?: number;
1209
+ onFocus?: (e: FocusEvent) => void;
1210
+ /** Обрабатывать ли изменения по onBlur */
1211
+ isChangeOnBlur?: boolean;
1212
+ /** Использовать ли уменьшенный размер заголовка */
1213
+ isSmallTitle?: boolean;
1214
+ disabled?: boolean;
1215
+ };
923
1216
  }
924
- interface ICommonMeasures {
925
- name: string;
926
- /** @deprecated */
927
- guid: string;
928
- formula: string;
1217
+ interface IInputMarkdownControl {
1218
+ type: EControlType.inputMarkdown;
1219
+ value: string;
1220
+ props: {};
1221
+ }
1222
+ interface IInputNumberControl {
1223
+ type: EControlType.inputNumber;
1224
+ value: number | null;
1225
+ props: {
1226
+ min?: number;
1227
+ max?: number;
1228
+ /**
1229
+ * Число, на которое увеличивается или уменьшается текущее значение при нажатии на стрелку.
1230
+ * Это может быть целое или десятичное число.
1231
+ */
1232
+ step?: number;
1233
+ placeholder?: string;
1234
+ /**
1235
+ * Текстовая метка, которая отображает любую контекстную информацию о поле, например,
1236
+ * единицы измерения.
1237
+ */
1238
+ unitLabel?: string;
1239
+ isClearable?: boolean;
1240
+ disabled?: boolean;
1241
+ };
929
1242
  }
930
- interface ICommonDimensions {
931
- name: string;
932
- formula: string;
1243
+ interface IInputRangeControl {
1244
+ type: EControlType.inputRange;
1245
+ value: IRange;
1246
+ props: {
1247
+ min?: number;
1248
+ max?: number;
1249
+ units?: {
1250
+ key: string;
1251
+ label: string;
1252
+ }[];
1253
+ prepareValue?: (value: [number?, number?]) => [number?, number?];
1254
+ disabled?: boolean;
1255
+ };
933
1256
  }
934
- type TColumnIndicatorValue = {
935
- mode: EWidgetIndicatorValueModes.FORMULA;
936
- formula?: string;
937
- } | {
938
- mode: EWidgetIndicatorValueModes.TEMPLATE;
939
- /** Имя шаблонной формулы, использующей колонку таблицы */
940
- templateName?: string;
941
- /** Имя таблицы */
942
- tableName?: string;
943
- /** Имя колонки */
944
- columnName?: string;
945
- };
946
- /** Общий интерфейс разреза и меры */
947
- interface IWidgetColumnIndicator extends IWidgetIndicator {
948
- dbDataType?: string;
949
- format?: EFormatTypes;
950
- formatting?: EFormattingPresets;
951
- formattingTemplate?: string;
952
- displayCondition?: TDisplayCondition;
953
- onClick?: TActionsOnClick[];
1257
+ declare enum EUnitMode {
1258
+ PIXEL = "PIXEL",
1259
+ PERCENT = "PERCENT"
954
1260
  }
955
- interface IWidgetDimensionHierarchy<D extends IWidgetDimension = IWidgetDimension> extends IAutoIdentifiedArrayItem {
956
- name: string;
957
- hierarchyDimensions: D[];
958
- displayCondition?: TDisplayCondition;
1261
+ interface ISizeControl {
1262
+ type: EControlType.size;
1263
+ value: {
1264
+ value: number | null;
1265
+ mode: EUnitMode;
1266
+ };
1267
+ props: {
1268
+ placeholder?: string;
1269
+ disabled?: boolean;
1270
+ isClearable?: boolean;
1271
+ minMaxByMode?: {
1272
+ [EUnitMode.PIXEL]: {
1273
+ min?: number;
1274
+ max?: number;
1275
+ };
1276
+ [EUnitMode.PERCENT]: {
1277
+ min?: number;
1278
+ max?: number;
1279
+ };
1280
+ };
1281
+ };
959
1282
  }
960
- interface IWidgetDimension extends Omit<IWidgetColumnIndicator, "value"> {
961
- value?: TColumnIndicatorValue | (TWidgetIndicatorAggregationValue & {
962
- innerTemplateName?: string;
963
- }) | TWidgetIndicatorTimeValue;
964
- hideEmptyValues: boolean;
1283
+ interface ISwitchControl {
1284
+ type: EControlType.switch;
1285
+ value: boolean;
1286
+ props: {
1287
+ size?: "small" | "default";
1288
+ };
965
1289
  }
966
- interface IWidgetMeasure extends Omit<IWidgetColumnIndicator, "value"> {
967
- value?: TColumnIndicatorValue | (TWidgetIndicatorAggregationValue & {
968
- outerAggregation: EOuterAggregation;
969
- }) | TWidgetIndicatorConversionValue | TWidgetIndicatorDurationValue;
1290
+ interface ISelectControl {
1291
+ type: EControlType.select;
1292
+ value: TNullable<string>;
1293
+ props: {
1294
+ fetchOptions?: (searchText?: string) => Promise<ISelectOption[] | {
1295
+ isAllRequested: boolean;
1296
+ options: ISelectOption[];
1297
+ }>;
1298
+ options?: ISelectOption[];
1299
+ withSearch?: boolean;
1300
+ error?: string;
1301
+ allowClear?: boolean;
1302
+ size?: "small" | "default";
1303
+ placeholder?: string;
1304
+ disabled?: boolean;
1305
+ status?: "error" | "warning";
1306
+ };
970
1307
  }
971
- interface IMarkdownMeasure extends IWidgetMeasure {
972
- format: EFormatTypes;
973
- displaySign: EMarkdownDisplayMode;
1308
+ interface IRadioIconGroupControl<Icon = string> {
1309
+ type: EControlType.radioIconGroup;
1310
+ value: string;
1311
+ props: {
1312
+ options: {
1313
+ value: string;
1314
+ /** Иконка */
1315
+ label: Icon;
1316
+ disabled?: boolean;
1317
+ }[];
1318
+ };
974
1319
  }
975
- /** Тип показателя */
976
- declare enum EIndicatorType {
977
- /** Показатели процесса */
978
- PROCESS_MEASURE = "PROCESS_MEASURE",
979
- /** Вводимое значение */
980
- STATIC = "STATIC",
981
- /** Статический список */
982
- STATIC_LIST = "STATIC_LIST",
983
- /** Динамический список */
984
- DYNAMIC_LIST = "DYNAMIC_LIST",
985
- /** Список колонок */
986
- COLUMN_LIST = "COLUMN_LIST",
987
- /** Разрез */
988
- DIMENSION = "DIMENSION",
989
- /** Мера */
990
- MEASURE = "MEASURE",
991
- /** Иерархия */
992
- DYNAMIC_DIMENSION = "DYNAMIC_DIMENSION",
993
- /** Пользовательская сортировка */
994
- USER_SORTING = "USER_SORTING"
1320
+ interface IFormulaControl {
1321
+ type: EControlType.formula;
1322
+ value: {
1323
+ value: TColumnIndicatorValue | (TWidgetIndicatorAggregationValue & {
1324
+ outerAggregation: EOuterAggregation;
1325
+ }) | (TWidgetIndicatorAggregationValue & {
1326
+ innerTemplateName?: string;
1327
+ }) | TWidgetIndicatorConversionValue | TWidgetIndicatorDurationValue | TWidgetIndicatorTimeValue;
1328
+ dbDataType: string | undefined;
1329
+ };
1330
+ props: {
1331
+ showModeToggle?: boolean;
1332
+ indicatorConfig?: ({
1333
+ type: "measure";
1334
+ } & {
1335
+ /** @deprecated временное решение для виджета "Воронка", не следует использовать [BI-14710] */
1336
+ allowClear?: boolean;
1337
+ /** @deprecated временное решение для виджета "Воронка", не следует использовать [BI-14710] */
1338
+ placeholder?: string;
1339
+ /** @deprecated временное решение для виджета "Воронка", не следует использовать [BI-14710] */
1340
+ hideQuantityOption?: boolean;
1341
+ /** @deprecated временное решение для виджета "Воронка", не следует использовать [BI-14710] */
1342
+ options?: TMeasureAddButtonSelectOption[];
1343
+ }) | {
1344
+ type: "dimension";
1345
+ };
1346
+ disabled?: boolean;
1347
+ titleModal?: string;
1348
+ };
995
1349
  }
996
- interface IBaseWidgetVariable {
997
- /** Имя переменной */
998
- name: string;
999
- /** @deprecated */
1000
- guid: string;
1350
+ interface ITypedFormulaControl {
1351
+ type: EControlType.typedFormula;
1352
+ value: {
1353
+ formula: string;
1354
+ dbDataType: string;
1355
+ };
1356
+ props: {
1357
+ disabled?: boolean;
1358
+ titleModal?: string;
1359
+ };
1001
1360
  }
1002
- /** Обобщенные типы значений переменных */
1003
- declare enum ESimpleInputType {
1004
- /** Число (точность Float64) */
1005
- NUMBER = "FLOAT",
1006
- /** Целое число (точность Int64) */
1007
- INTEGER_NUMBER = "INTEGER",
1008
- /** Текст */
1009
- TEXT = "STRING",
1010
- /** Дата (точность Date) */
1011
- DATE = "DATE",
1012
- /** Дата и время (точность DateTime64) */
1013
- DATE_AND_TIME = "DATETIME"
1361
+ interface IFormattingControl {
1362
+ type: EControlType.formatting;
1363
+ value: {
1364
+ format: EFormatTypes;
1365
+ formatting: EFormattingPresets;
1366
+ formattingTemplate?: string;
1367
+ };
1368
+ props: {
1369
+ formats?: Partial<Record<ESimpleDataType, EFormatTypes[]>>;
1370
+ formatting?: Partial<Record<EFormatTypes, EFormattingPresets[]>>;
1371
+ dbDataType: TNullable<string>;
1372
+ };
1014
1373
  }
1015
- interface IWidgetStaticVariable extends IBaseWidgetVariable {
1016
- /** Тип переменной */
1017
- type: EIndicatorType.STATIC;
1018
- /** Значение */
1374
+ interface IFormattingTemplateControl {
1375
+ type: EControlType.formattingTemplate;
1019
1376
  value: string;
1020
- /** Обобщенный тип данных */
1021
- simpleInputType: ESimpleInputType;
1377
+ props: {
1378
+ /** Используемый формат (влияет на контент подсказки) */
1379
+ format?: TNullable<EFormatTypes>;
1380
+ };
1022
1381
  }
1023
- interface IStaticListLabeledOption {
1024
- value: string;
1025
- label: string;
1382
+ interface IActionOnClickControl {
1383
+ type: EControlType.actionOnClick;
1384
+ value: TActionsOnClick[];
1385
+ props: {
1386
+ indicator: {
1387
+ name: string;
1388
+ onClick?: TActionsOnClick[];
1389
+ };
1390
+ placeholder?: string;
1391
+ inputMethods: EWidgetActionInputMethod[];
1392
+ };
1026
1393
  }
1027
- interface IWidgetStaticListVariable extends IBaseWidgetVariable {
1028
- /** Тип переменной */
1029
- type: EIndicatorType.STATIC_LIST;
1030
- /** Значение */
1031
- value: string | string[];
1032
- /** Элементы статического списка */
1033
- /** @deprecated поле будет удалено, необходимо использовать labeledOptions */
1034
- options: string[];
1035
- /** Объект ключ значение для статического списка */
1036
- labeledOptions: IStaticListLabeledOption[];
1037
- /** Множественный выбор */
1038
- multipleChoice: boolean;
1394
+ interface IFilterControl {
1395
+ type: EControlType.filter;
1396
+ value: TExtendedFormulaFilterValue[];
1397
+ props: {
1398
+ buttonTitle?: string;
1399
+ };
1039
1400
  }
1040
- interface IWidgetDynamicListVariable extends IBaseWidgetVariable {
1041
- /** Тип переменной */
1042
- type: EIndicatorType.DYNAMIC_LIST;
1043
- /** Значение */
1044
- value: string | string[];
1045
- /** Формула для отображения списка */
1046
- listFormula: TNullable<string>;
1047
- /** Тип данных */
1048
- dbDataType: string;
1049
- /** Множественный выбор */
1050
- multipleChoice: boolean;
1051
- /** Фильтры */
1052
- filters: TExtendedFormulaFilterValue[];
1401
+ interface IDisplayConditionControl {
1402
+ type: EControlType.displayCondition;
1403
+ value: TDisplayCondition;
1404
+ props: {
1405
+ isInMeasure?: boolean;
1406
+ labelFontSize?: number;
1407
+ };
1053
1408
  }
1054
- interface IWidgetColumnListVariable extends IBaseWidgetVariable {
1055
- /** Тип переменной */
1056
- type: EIndicatorType.COLUMN_LIST;
1057
- /** Имя таблицы */
1058
- tableName: string;
1059
- /** Значение (имя колонки) */
1060
- value: string;
1409
+ interface IColorPickerControl {
1410
+ type: EControlType.colorPicker;
1411
+ value: TColor | undefined;
1412
+ props: {
1413
+ ruleModes?: EColorMode[];
1414
+ modes?: EColorMode[];
1415
+ /** Цвет по умолчанию для режима BASE при переключении с другого режима */
1416
+ defaultColor?: string;
1417
+ dimension?: IWidgetDimension;
1418
+ };
1061
1419
  }
1062
- type TWidgetVariable = IWidgetStaticVariable | IWidgetStaticListVariable | IWidgetDynamicListVariable | IWidgetColumnListVariable;
1063
- declare function isDimensionsHierarchy(indicator: IWidgetColumnIndicator): indicator is IWidgetDimensionHierarchy;
1064
- declare enum OuterAggregation {
1065
- avg = "avgIf",
1066
- median = "medianIf",
1067
- count = "countIf",
1068
- countDistinct = "countIfDistinct",
1069
- min = "minIf",
1070
- max = "maxIf",
1071
- sum = "sumIf"
1420
+ interface ITagSetControl {
1421
+ type: EControlType.tagSet;
1422
+ value: string[];
1423
+ props: {
1424
+ placeholder?: string;
1425
+ isError?: boolean;
1426
+ };
1072
1427
  }
1073
- declare enum EDurationTemplateName {
1074
- avg = "avg",
1075
- median = "median"
1428
+ interface IEventsPickerControl {
1429
+ type: EControlType.eventsPicker;
1430
+ value: (string | null)[];
1431
+ props: {
1432
+ process: IWidgetProcess | undefined;
1433
+ withPercentageSelection?: boolean;
1434
+ };
1076
1435
  }
1077
- type TWidgetIndicatorAggregationValue = {
1078
- mode: EWidgetIndicatorValueModes.AGGREGATION;
1079
- templateName: string;
1080
- processName: string | null;
1081
- eventName: string | null;
1082
- caseCaseIdFormula: string | null;
1083
- eventNameFormula: string | null;
1084
- filters: TExtendedFormulaFilterValue[];
1085
- tableName?: string;
1086
- columnName?: string;
1087
- eventTimeFormula?: string | null;
1088
- };
1089
- declare enum EEventAppearances {
1090
- FIRST = "FIRST",
1091
- LAST = "LAST"
1436
+ interface IEventsColorControl {
1437
+ type: EControlType.eventsColor;
1438
+ value: {
1439
+ defaultColor: string;
1440
+ values: Record<string, {
1441
+ mode: EColorMode;
1442
+ value: string;
1443
+ }>;
1444
+ };
1445
+ props: Omit<IColorPickerControl["props"], "defaultColor"> & {
1446
+ defaultColor?: ((eventName: string) => string) | string;
1447
+ processName: string;
1448
+ };
1092
1449
  }
1093
- type TWidgetIndicatorConversionValue = {
1094
- mode: EWidgetIndicatorValueModes.CONVERSION;
1095
- startEventNameFormula: string | null;
1096
- startEventProcessName: string | null;
1097
- startEventName: string | null;
1098
- startEventFilters: TExtendedFormulaFilterValue[];
1099
- startEventTimeFormula: string | null;
1100
- endEventNameFormula: string | null;
1101
- endEventProcessName: string | null;
1102
- endEventName: string | null;
1103
- endEventFilters: TExtendedFormulaFilterValue[];
1104
- endCaseCaseIdFormula: string | null;
1105
- endEventTimeFormula: string | null;
1106
- };
1107
- type TWidgetIndicatorDurationValue = {
1108
- mode: EWidgetIndicatorValueModes.DURATION;
1109
- templateName: string;
1110
- startEventAppearances: EEventAppearances;
1111
- endEventAppearances: EEventAppearances;
1112
- } & Omit<TWidgetIndicatorConversionValue, "mode">;
1113
- type TWidgetIndicatorTimeValue = {
1114
- templateName: string;
1115
- mode: EWidgetIndicatorValueModes.START_TIME | EWidgetIndicatorValueModes.END_TIME;
1116
- processName: string;
1117
- eventName: string;
1118
- eventTimeFormula: string;
1119
- caseCaseIdFormula: string;
1120
- eventNameFormula: string;
1121
- filters: TExtendedFormulaFilterValue[];
1122
- };
1123
1450
 
1124
1451
  /** Формат входного параметра GeneralCalculator */
1125
1452
  interface IBaseDimensionsAndMeasuresCalculatorInput {
@@ -1293,29 +1620,6 @@ interface ITypeCalculatorOutput {
1293
1620
  interface ITypeCalculator extends ICalculator<ITypeCalculatorInput, ITypeCalculatorOutput> {
1294
1621
  }
1295
1622
 
1296
- declare enum ESimpleDataType {
1297
- OTHER = "OTHER",
1298
- DATE = "DATE",
1299
- FLOAT = "FLOAT",
1300
- DATETIME = "DATETIME",
1301
- STRING = "STRING",
1302
- INTEGER = "INTEGER",
1303
- DATETIME64 = "DATETIME64",
1304
- BOOLEAN = "BOOLEAN"
1305
- }
1306
- type TDbTypeContainer = "Array" | "Nullable";
1307
- /** Результат разбора типа данных из базы данных (в будущем возможна поддержка других СУБД помимо ClickHouse) */
1308
- interface IParsedDbType<T extends TNullable<string> = string> {
1309
- /** Контейнеры над базовым типом в порядке от внешнего к внутреннему */
1310
- containers: TDbTypeContainer[];
1311
- /** Исходный базовый тип (без контейнеров) */
1312
- dbBaseDataType: T;
1313
- /** Обобщенный базовый тип */
1314
- simpleBaseType: ESimpleDataType;
1315
- /** Обобщенный исходный тип (при наличии контейнера `Array` классифицируется как `OTHER`) */
1316
- simpleType: ESimpleDataType;
1317
- }
1318
-
1319
1623
  declare const prepareValuesForSql: (simpleType: ESimpleDataType, values: (string | null)[]) => (string | null)[];
1320
1624
 
1321
1625
  declare function checkDisplayCondition(displayCondition: TNullable<TDisplayCondition>, variables: Map<string, TWidgetVariable>): boolean;
@@ -1629,8 +1933,16 @@ interface ILens<T extends TNullable<object>, Value> {
1629
1933
  get(obj: T): TNullable<Value>;
1630
1934
  set(obj: T, value: Value): void;
1631
1935
  }
1936
+ /**
1937
+ * Линза, которая может вернуть Partial значение из get (будет обработано на стороне control'а),
1938
+ * но требует передачи в set полного значения
1939
+ */
1940
+ interface IPartialLens<T extends TNullable<object>, Value> {
1941
+ get(obj: T): TNullable<Partial<Value>>;
1942
+ set(obj: T, value: Value): void;
1943
+ }
1632
1944
  type TValuePath = string | string[];
1633
- type TRecordAccessor<Settings extends object, Value> = TValuePath | ILens<Settings, Value>;
1945
+ type TRecordAccessor<Settings extends object, Value> = TValuePath | IPartialLens<Settings, Value>;
1634
1946
  interface IDisplayPredicate<Settings> {
1635
1947
  (s: Settings): boolean;
1636
1948
  }
@@ -1648,13 +1960,14 @@ interface IGroupSetRecord {
1648
1960
  interface ICollapseRecord<Settings extends object = object> {
1649
1961
  key: string;
1650
1962
  type: "collapse";
1963
+ title?: string;
1651
1964
  records: TGroupLevelRecord<Settings>[];
1652
1965
  }
1653
1966
  type TEmptyRecord = boolean | null | undefined;
1654
1967
  /** Набор конфигураций, которые могут встречаться на уровне виджета */
1655
- type TWidgetLevelRecord<Settings extends object> = IControlRecord<Settings, any, EControlType> | IDividerRecord<Settings> | IGroupSetRecord | ICollapseRecord<Settings> | TEmptyRecord;
1968
+ type TWidgetLevelRecord<Settings extends object> = ICollapseRecord<Settings> | IDividerRecord<Settings> | IGroupSetRecord | TControlUnion<Settings> | TEmptyRecord;
1656
1969
  /** Набор конфигураций, которые могут встречаться на уровне группы */
1657
- type TGroupLevelRecord<LevelGroupSettings extends object> = IControlRecord<LevelGroupSettings, any, EControlType> | IDividerRecord<LevelGroupSettings> | ICollapseRecord<LevelGroupSettings> | TEmptyRecord;
1970
+ type TGroupLevelRecord<LevelGroupSettings extends object> = ICollapseRecord<LevelGroupSettings> | IDividerRecord<LevelGroupSettings> | TControlUnion<LevelGroupSettings> | TEmptyRecord;
1658
1971
  interface ISelectOption {
1659
1972
  value: string;
1660
1973
  label: string;
@@ -1766,7 +2079,7 @@ interface IGroupSetDescription<Settings extends object, GroupSettings extends ob
1766
2079
  /** Максимальное количество групп в наборе */
1767
2080
  maxCount: number;
1768
2081
  /** Описание доступа к настройкам групп */
1769
- accessor: TRecordAccessor<Settings, GroupSettings[]>;
2082
+ accessor: TValuePath | ILens<Settings, GroupSettings[]>;
1770
2083
  /** Конфигурация кнопок добавления группы в набор */
1771
2084
  addButtons: TAddButton[];
1772
2085
  /** Получить название, отображаемое на плашке (по умолчанию используется поле name из группы) */
@@ -2166,6 +2479,7 @@ interface IDimensionSelectionByFormula extends Map<string, IDimensionSelection>
2166
2479
  type TUpdateSelection = (selection: IDimensionSelectionByFormula, formula: string, value: string, filters: ICalculatorFilter[]) => void;
2167
2480
  declare const updateDefaultModeSelection: TUpdateSelection;
2168
2481
  declare const updateSingleModeSelection: TUpdateSelection;
2482
+ /** @deprecated Отказ от режима фильтрации "Множественный выбор"*/
2169
2483
  declare const updateMultiModeSelection: TUpdateSelection;
2170
2484
  declare const replaceFiltersBySelection: (filters: ICalculatorFilter[], selection: IDimensionSelectionByFormula) => ICalculatorFilter[];
2171
2485
 
@@ -2221,4 +2535,4 @@ declare global {
2221
2535
  }
2222
2536
  }
2223
2537
 
2224
- export { EActionButtonsTypes, EActionTypes, EBlockingConditionMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, 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 IActionGoToUrl, 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 ICollapseRecord, type IColoredValue, type ICommonDimensions, type ICommonMeasures, type ICommonState, type IControlRecord, type ICustomAddButtonProps, type ICustomWidgetProps, type IDefinition, type IDimensionSelection, type IDimensionSelectionByFormula, type IDisplayPredicate, type IDisplayRule, type IDivePanelDescription, type IDividerRecord, type IEdge, type IExportColumnOrder, type IFillSettings, 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 ILens, type IMarkdownMeasure, type IMeasureAddButtonProps, type IPanelDescription, type IPanelDescriptionCreator, 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 IRange, type ISelectBranchOption, type ISelectDividerOption, type ISelectGroupOption, type ISelectLeafOption, type ISelectNode, type ISelectOption, type ISelectSystemOption, type ISettingsMigratorParams, type ISortOrder, type ISortingAddButtonProps, type IStagesFilterValue, type IStaticListLabeledOption, type ITwoLimitsCalculator, type ITwoLimitsCalculatorExportInput, type ITwoLimitsCalculatorInput, type ITwoLimitsCalculatorOutput, type ITypeCalculator, type ITypeCalculatorInput, type ITypeCalculatorOutput, type ITypeCalculatorOutputItem, type IVertex, 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 TAppearanceSettings, 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 TCustomAddButtonSelectOption, type TDefineWidgetOptions, type TDisplayCondition, type TDisplayMode, type TEmptyRecord, type TExtendedFormulaFilterValue, type TFiltrationAccessibility, type TGroupLevelRecord, type TLaunchActionParams, type TMeasureAddButtonSelectOption, type TMigrateProcessor, type TMigrationStruct, type TProcessIndicatorValue, type TRecordAccessor, type TSelectChildOptions, type TSelectFetchNodes, type TSelectivePartial, type TSortDirection, type TUpdateSelection, type TValuePath, type TVersion, type TWidgetActionParameter, type TWidgetContainer, type TWidgetDimensionData, type TWidgetFilterValue, type TWidgetFiltering, type TWidgetIndicatorAggregationValue, type TWidgetIndicatorConversionValue, type TWidgetIndicatorData, type TWidgetIndicatorDurationValue, type TWidgetIndicatorTimeValue, type TWidgetLevelRecord, type TWidgetSortingValue, type TWidgetVariable, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, dashboardLinkRegExp, dimensionAggregationTemplates, dimensionTemplateFormulas, durationTemplates, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getRuleColor, getTransitionMeasureFormula, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, linkNameRegExp, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureAggregationTemplates, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareConversionParams, prepareDimensionAggregationParams, prepareDurationParams, prepareFormulaForSql, prepareMeasureAggregationParams, prepareSortOrders, prepareTimeParams, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, timeTemplates, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
2538
+ export { EActionButtonsTypes, EActionTypes, EAutoUpdateMode, EBlockingConditionMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, 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 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 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 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 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 TAppearanceSettings, 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 TLaunchActionParams, type TMeasureAddButtonSelectOption, type TMigrateProcessor, type TMigrationStruct, type TProcessIndicatorValue, type TRecordAccessor, type TSelectChildOptions, type TSelectFetchNodes, type TSelectivePartial, type TSortDirection, type TUpdateSelection, type TValuePath, type TVersion, type TWidgetActionParameter, type TWidgetContainer, type TWidgetDimensionData, type TWidgetFilterValue, type TWidgetFiltering, type TWidgetIndicatorAggregationValue, type TWidgetIndicatorConversionValue, type TWidgetIndicatorData, type TWidgetIndicatorDurationValue, type TWidgetIndicatorTimeValue, type TWidgetLevelRecord, type TWidgetSortingValue, type TWidgetVariable, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, dashboardLinkRegExp, dimensionAggregationTemplates, dimensionTemplateFormulas, durationTemplates, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getRuleColor, getTransitionMeasureFormula, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, linkNameRegExp, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureAggregationTemplates, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareConversionParams, prepareDimensionAggregationParams, prepareDurationParams, prepareFormulaForSql, prepareMeasureAggregationParams, prepareSortOrders, prepareTimeParams, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, timeTemplates, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection, workspaceLinkRegExp };