@infomaximum/widget-sdk 4.0.0-beta42 → 4.0.0-beta45
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 +206 -205
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -569,7 +569,7 @@ interface IWidgetsContext {
|
|
|
569
569
|
filtrationMode: TFiltrationMode;
|
|
570
570
|
reportDisplayRules: Map<string, IDisplayRule>;
|
|
571
571
|
workspaceDisplayRules: Map<number, Map<string, IDisplayRule>>;
|
|
572
|
-
|
|
572
|
+
viewNameByKey: Map<string, string>;
|
|
573
573
|
fetchColumnsByTableName(tableName: string): Promise<IWidgetTableColumn[] | undefined>;
|
|
574
574
|
}
|
|
575
575
|
|
|
@@ -912,205 +912,6 @@ interface IBaseWidgetSettings {
|
|
|
912
912
|
displayConditionComment?: string;
|
|
913
913
|
}
|
|
914
914
|
|
|
915
|
-
interface ILens<T extends TNullable<object>, Value> {
|
|
916
|
-
get(obj: T): TNullable<Value>;
|
|
917
|
-
set(obj: T, value: Value): void;
|
|
918
|
-
}
|
|
919
|
-
type TValuePath = string | string[];
|
|
920
|
-
type TRecordAccessor<Settings extends object, Value> = TValuePath | ILens<Settings, Value>;
|
|
921
|
-
interface IDisplayPredicate<Settings> {
|
|
922
|
-
(s: Settings): boolean;
|
|
923
|
-
}
|
|
924
|
-
/** Конфигурация разделителя */
|
|
925
|
-
interface IDividerRecord<Settings extends object = object> {
|
|
926
|
-
type: "divider";
|
|
927
|
-
shouldDisplay?: IDisplayPredicate<Settings>;
|
|
928
|
-
}
|
|
929
|
-
/** Конфигурация набора групп */
|
|
930
|
-
interface IGroupSetRecord {
|
|
931
|
-
type: "groupSet";
|
|
932
|
-
groupSetKey: string;
|
|
933
|
-
}
|
|
934
|
-
type TEmptyRecord = boolean | null | undefined;
|
|
935
|
-
/** Набор конфигураций, которые могут встречаться на уровне виджета */
|
|
936
|
-
type TWidgetLevelRecord<Settings extends object> = IControlRecord<Settings, any, EControlType> | IDividerRecord<Settings> | IGroupSetRecord | TEmptyRecord;
|
|
937
|
-
/** Набор конфигураций, которые могут встречаться на уровне группы */
|
|
938
|
-
type TGroupLevelRecord<LevelGroupSettings extends object> = IControlRecord<LevelGroupSettings, any, EControlType> | IDividerRecord<LevelGroupSettings> | TEmptyRecord;
|
|
939
|
-
interface ISelectOption {
|
|
940
|
-
value: string;
|
|
941
|
-
label: string;
|
|
942
|
-
disabled?: boolean;
|
|
943
|
-
rightIcon?: "fx" | string;
|
|
944
|
-
}
|
|
945
|
-
declare enum ESelectOptionTypes {
|
|
946
|
-
DIVIDER = "DIVIDER",
|
|
947
|
-
SYSTEM = "SYSTEM",
|
|
948
|
-
GROUP = "GROUP",
|
|
949
|
-
BRANCH = "BRANCH",
|
|
950
|
-
LEAF = "LEAF"
|
|
951
|
-
}
|
|
952
|
-
declare enum ECustomSelectTemplates {
|
|
953
|
-
FORMULA = "FORMULA",
|
|
954
|
-
DIMENSION_GROUPS = "DIMENSION_GROUPS"
|
|
955
|
-
}
|
|
956
|
-
interface ISelectDividerOption {
|
|
957
|
-
type: ESelectOptionTypes.DIVIDER;
|
|
958
|
-
}
|
|
959
|
-
interface ISelectSystemOption<T extends string = string> {
|
|
960
|
-
type: ESelectOptionTypes.SYSTEM;
|
|
961
|
-
template: T;
|
|
962
|
-
}
|
|
963
|
-
interface ISelectGroupOption {
|
|
964
|
-
type: ESelectOptionTypes.GROUP;
|
|
965
|
-
label: string;
|
|
966
|
-
options: IAddButtonSelectOption[];
|
|
967
|
-
icon: string;
|
|
968
|
-
}
|
|
969
|
-
type TSelectFetchOptions = () => Promise<IAddButtonSelectOption[]>;
|
|
970
|
-
type TSelectChildOptions = IAddButtonSelectOption[] | TSelectFetchOptions;
|
|
971
|
-
interface ISelectBranchOption {
|
|
972
|
-
type: ESelectOptionTypes.BRANCH;
|
|
973
|
-
label: string;
|
|
974
|
-
options: TSelectChildOptions;
|
|
975
|
-
icon?: string;
|
|
976
|
-
disabled?: boolean;
|
|
977
|
-
}
|
|
978
|
-
interface ISelectLeafOption {
|
|
979
|
-
type: ESelectOptionTypes.LEAF;
|
|
980
|
-
label: string;
|
|
981
|
-
value: string;
|
|
982
|
-
onSelect: <T = object>(value: string, update: <R extends object>(f: (prevItems: (T | R)[]) => (T | R)[]) => void) => void;
|
|
983
|
-
/** Строка в формате base64 */
|
|
984
|
-
icon?: string;
|
|
985
|
-
disabled?: boolean;
|
|
986
|
-
}
|
|
987
|
-
type IAddButtonSelectOption = ISelectDividerOption | ISelectGroupOption | ISelectBranchOption | ISelectLeafOption;
|
|
988
|
-
type TCustomAddButtonSelectOption = ISelectSystemOption<ECustomSelectTemplates> | IAddButtonSelectOption;
|
|
989
|
-
type TMeasureAddButtonSelectOption = IAddButtonSelectOption;
|
|
990
|
-
interface ICustomAddButtonProps {
|
|
991
|
-
options: TSelectChildOptions;
|
|
992
|
-
hasDropdown?: boolean;
|
|
993
|
-
onClick?: ISelectLeafOption["onSelect"];
|
|
994
|
-
}
|
|
995
|
-
interface IWidgetIndicatorMenuConfig {
|
|
996
|
-
hideTablesColumnsOptions?: boolean;
|
|
997
|
-
hideCommonOptions?: boolean;
|
|
998
|
-
hideQuantityOption?: boolean;
|
|
999
|
-
}
|
|
1000
|
-
interface IMeasureMenuConfig extends IWidgetIndicatorMenuConfig {
|
|
1001
|
-
options?: TMeasureAddButtonSelectOption[];
|
|
1002
|
-
}
|
|
1003
|
-
interface ISortingMenuConfig extends IWidgetIndicatorMenuConfig {
|
|
1004
|
-
}
|
|
1005
|
-
/** Кнопка добавления группы в набор */
|
|
1006
|
-
type TAddButton = {
|
|
1007
|
-
title: string;
|
|
1008
|
-
indicatorType: Exclude<EWidgetIndicatorType, EWidgetIndicatorType.CUSTOM | EWidgetIndicatorType.MEASURE | EWidgetIndicatorType.SORTING>;
|
|
1009
|
-
} | {
|
|
1010
|
-
title: string;
|
|
1011
|
-
indicatorType: EWidgetIndicatorType.CUSTOM;
|
|
1012
|
-
props: ICustomAddButtonProps;
|
|
1013
|
-
} | {
|
|
1014
|
-
title: string;
|
|
1015
|
-
indicatorType: EWidgetIndicatorType.MEASURE;
|
|
1016
|
-
menuConfig?: IMeasureMenuConfig;
|
|
1017
|
-
} | {
|
|
1018
|
-
title: string;
|
|
1019
|
-
indicatorType: EWidgetIndicatorType.SORTING;
|
|
1020
|
-
menuConfig?: ISortingMenuConfig;
|
|
1021
|
-
};
|
|
1022
|
-
interface IAutoIdentifiedArrayItem {
|
|
1023
|
-
/**
|
|
1024
|
-
* Идентификатор, добавляемый системой "на лету" для удобства разработки, не сохраняется на сервер.
|
|
1025
|
-
* Гарантируется уникальность id в пределах settings виджета.
|
|
1026
|
-
*/
|
|
1027
|
-
id: number;
|
|
1028
|
-
}
|
|
1029
|
-
interface IGroupSettings extends IAutoIdentifiedArrayItem, Record<string, any> {
|
|
1030
|
-
}
|
|
1031
|
-
/** Конфигурация набора групп */
|
|
1032
|
-
interface IGroupSetDescription<Settings extends object, GroupSettings extends object> {
|
|
1033
|
-
/** Заголовок */
|
|
1034
|
-
title: string;
|
|
1035
|
-
/** Максимальное количество групп в наборе */
|
|
1036
|
-
maxCount: number;
|
|
1037
|
-
/** Описание доступа к настройкам групп */
|
|
1038
|
-
accessor: TRecordAccessor<Settings, GroupSettings[]>;
|
|
1039
|
-
/** Кнопки добавления группы в набор */
|
|
1040
|
-
addButtons: TAddButton[];
|
|
1041
|
-
/** Создать элементы управления внутри группы (для вкладки настроек данных) */
|
|
1042
|
-
createDataRecords?(group: IGroupSettings): TGroupLevelRecord<GroupSettings>[];
|
|
1043
|
-
/** Создать элементы управления внутри группы (для вкладки настроек отображения) */
|
|
1044
|
-
createDisplayRecords?(group: IGroupSettings): TGroupLevelRecord<GroupSettings>[];
|
|
1045
|
-
/** Получить название для плашки */
|
|
1046
|
-
getGroupTitle?(group: IGroupSettings): string;
|
|
1047
|
-
/** Валидная ли группа */
|
|
1048
|
-
isValid?(group: IGroupSettings): boolean;
|
|
1049
|
-
/** Находится ли группа в состоянии загрузки */
|
|
1050
|
-
isLoading?(group: IGroupSettings): boolean;
|
|
1051
|
-
/** Можно ли удалять группу по умолчанию true */
|
|
1052
|
-
isRemovable?(group: IGroupSettings): boolean;
|
|
1053
|
-
/** Можно ли сортировать группу по умолчанию true */
|
|
1054
|
-
isDraggable?: boolean;
|
|
1055
|
-
/** Опциональный верхний отступ для группы */
|
|
1056
|
-
marginTop?: number;
|
|
1057
|
-
}
|
|
1058
|
-
/** Конфигурация левой панели */
|
|
1059
|
-
interface IPanelDescription<Settings extends object, GroupSettings extends IGroupSettings = IGroupSettings> {
|
|
1060
|
-
/** Добавить заголовок для виджета */
|
|
1061
|
-
useHeader?: boolean;
|
|
1062
|
-
/** Добавить описание для виджета */
|
|
1063
|
-
useMarkdown?: boolean;
|
|
1064
|
-
/** Конфигурация настроек данных виджета */
|
|
1065
|
-
dataRecords?: TWidgetLevelRecord<Settings>[];
|
|
1066
|
-
/** Конфигурация настроек отображения виджета */
|
|
1067
|
-
displayRecords?: TWidgetLevelRecord<Settings>[];
|
|
1068
|
-
/** Конфигурации наборов групп */
|
|
1069
|
-
groupSetDescriptions?: Record<string, IGroupSetDescription<Settings, GroupSettings>>;
|
|
1070
|
-
}
|
|
1071
|
-
interface IWidgetProcess {
|
|
1072
|
-
guid: string;
|
|
1073
|
-
/** Имя процесса */
|
|
1074
|
-
name: string;
|
|
1075
|
-
/** Формула имени события */
|
|
1076
|
-
eventNameFormula: string;
|
|
1077
|
-
/** Формула времени события */
|
|
1078
|
-
eventTimeFormula: string;
|
|
1079
|
-
/** Формула CaseId события */
|
|
1080
|
-
eventCaseIdFormula: string;
|
|
1081
|
-
/** Формула CaseId кейса */
|
|
1082
|
-
caseCaseIdFormula: string;
|
|
1083
|
-
/** Имя колонки CaseId события */
|
|
1084
|
-
eventCaseIdColumnName: string;
|
|
1085
|
-
/** Тип данных CaseId */
|
|
1086
|
-
caseIdDataType: ESimpleDataType;
|
|
1087
|
-
/** Тип данных времени события */
|
|
1088
|
-
eventTimeDataType: ESimpleDataType;
|
|
1089
|
-
/** Является ли процесс валидным */
|
|
1090
|
-
isValid: boolean;
|
|
1091
|
-
}
|
|
1092
|
-
/** Конфигурация левой панели при погружении на уровень вниз */
|
|
1093
|
-
interface IDivePanelDescription<Settings extends object, GroupSettings extends IGroupSettings = IGroupSettings> extends IPanelDescription<Settings, GroupSettings> {
|
|
1094
|
-
}
|
|
1095
|
-
interface IPanelDescriptionCreator<Settings extends IBaseWidgetSettings, GroupSettings extends IGroupSettings> {
|
|
1096
|
-
(context: IWidgetsContext, panelSettings: Settings): IPanelDescription<Settings, GroupSettings>;
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
interface IWidgetPlaceholderController {
|
|
1100
|
-
setError(value: Error | null): void;
|
|
1101
|
-
setConfigured(value: boolean): void;
|
|
1102
|
-
setDisplay(value: boolean): void;
|
|
1103
|
-
setEmpty(value: boolean): void;
|
|
1104
|
-
setOverlay(value: boolean): void;
|
|
1105
|
-
}
|
|
1106
|
-
interface IWidgetPlaceholderValues {
|
|
1107
|
-
error: Error | null;
|
|
1108
|
-
isConfigured: boolean;
|
|
1109
|
-
isDisplay: boolean | undefined;
|
|
1110
|
-
isEmpty: boolean;
|
|
1111
|
-
isOverlay: boolean;
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
915
|
/** Формат входного параметра GeneralCalculator */
|
|
1115
916
|
interface IBaseDimensionsAndMeasuresCalculatorInput {
|
|
1116
917
|
/** Разрезы */
|
|
@@ -1369,6 +1170,205 @@ interface ICalculatorFactory {
|
|
|
1369
1170
|
type: () => ITypeCalculator;
|
|
1370
1171
|
}
|
|
1371
1172
|
|
|
1173
|
+
interface ILens<T extends TNullable<object>, Value> {
|
|
1174
|
+
get(obj: T): TNullable<Value>;
|
|
1175
|
+
set(obj: T, value: Value): void;
|
|
1176
|
+
}
|
|
1177
|
+
type TValuePath = string | string[];
|
|
1178
|
+
type TRecordAccessor<Settings extends object, Value> = TValuePath | ILens<Settings, Value>;
|
|
1179
|
+
interface IDisplayPredicate<Settings> {
|
|
1180
|
+
(s: Settings): boolean;
|
|
1181
|
+
}
|
|
1182
|
+
/** Конфигурация разделителя */
|
|
1183
|
+
interface IDividerRecord<Settings extends object = object> {
|
|
1184
|
+
type: "divider";
|
|
1185
|
+
shouldDisplay?: IDisplayPredicate<Settings>;
|
|
1186
|
+
}
|
|
1187
|
+
/** Конфигурация набора групп */
|
|
1188
|
+
interface IGroupSetRecord {
|
|
1189
|
+
type: "groupSet";
|
|
1190
|
+
groupSetKey: string;
|
|
1191
|
+
}
|
|
1192
|
+
type TEmptyRecord = boolean | null | undefined;
|
|
1193
|
+
/** Набор конфигураций, которые могут встречаться на уровне виджета */
|
|
1194
|
+
type TWidgetLevelRecord<Settings extends object> = IControlRecord<Settings, any, EControlType> | IDividerRecord<Settings> | IGroupSetRecord | TEmptyRecord;
|
|
1195
|
+
/** Набор конфигураций, которые могут встречаться на уровне группы */
|
|
1196
|
+
type TGroupLevelRecord<LevelGroupSettings extends object> = IControlRecord<LevelGroupSettings, any, EControlType> | IDividerRecord<LevelGroupSettings> | TEmptyRecord;
|
|
1197
|
+
interface ISelectOption {
|
|
1198
|
+
value: string;
|
|
1199
|
+
label: string;
|
|
1200
|
+
disabled?: boolean;
|
|
1201
|
+
rightIcon?: "fx" | string;
|
|
1202
|
+
}
|
|
1203
|
+
declare enum ESelectOptionTypes {
|
|
1204
|
+
DIVIDER = "DIVIDER",
|
|
1205
|
+
SYSTEM = "SYSTEM",
|
|
1206
|
+
GROUP = "GROUP",
|
|
1207
|
+
BRANCH = "BRANCH",
|
|
1208
|
+
LEAF = "LEAF"
|
|
1209
|
+
}
|
|
1210
|
+
declare enum ECustomSelectTemplates {
|
|
1211
|
+
FORMULA = "FORMULA",
|
|
1212
|
+
DIMENSION_GROUPS = "DIMENSION_GROUPS"
|
|
1213
|
+
}
|
|
1214
|
+
interface ISelectDividerOption {
|
|
1215
|
+
type: ESelectOptionTypes.DIVIDER;
|
|
1216
|
+
}
|
|
1217
|
+
interface ISelectSystemOption<T extends string = string> {
|
|
1218
|
+
type: ESelectOptionTypes.SYSTEM;
|
|
1219
|
+
template: T;
|
|
1220
|
+
}
|
|
1221
|
+
interface ISelectGroupOption {
|
|
1222
|
+
type: ESelectOptionTypes.GROUP;
|
|
1223
|
+
label: string;
|
|
1224
|
+
options: IAddButtonSelectOption[];
|
|
1225
|
+
icon: string;
|
|
1226
|
+
}
|
|
1227
|
+
type TSelectFetchOptions = () => Promise<IAddButtonSelectOption[]>;
|
|
1228
|
+
type TSelectChildOptions = IAddButtonSelectOption[] | TSelectFetchOptions;
|
|
1229
|
+
interface ISelectBranchOption {
|
|
1230
|
+
type: ESelectOptionTypes.BRANCH;
|
|
1231
|
+
label: string;
|
|
1232
|
+
options: TSelectChildOptions;
|
|
1233
|
+
icon?: string;
|
|
1234
|
+
disabled?: boolean;
|
|
1235
|
+
}
|
|
1236
|
+
interface ISelectLeafOption {
|
|
1237
|
+
type: ESelectOptionTypes.LEAF;
|
|
1238
|
+
label: string;
|
|
1239
|
+
value: string;
|
|
1240
|
+
onSelect: <T extends object>(value: string, update: <R extends object>(f: (prevItems: (T | R)[]) => (T | R)[]) => void) => void;
|
|
1241
|
+
/** Строка в формате base64 */
|
|
1242
|
+
icon?: string;
|
|
1243
|
+
disabled?: boolean;
|
|
1244
|
+
}
|
|
1245
|
+
type IAddButtonSelectOption = ISelectDividerOption | ISelectGroupOption | ISelectBranchOption | ISelectLeafOption;
|
|
1246
|
+
type TCustomAddButtonSelectOption = ISelectSystemOption<ECustomSelectTemplates> | IAddButtonSelectOption;
|
|
1247
|
+
type TMeasureAddButtonSelectOption = IAddButtonSelectOption;
|
|
1248
|
+
interface ICustomAddButtonProps {
|
|
1249
|
+
options: TSelectChildOptions;
|
|
1250
|
+
hasDropdown?: boolean;
|
|
1251
|
+
onClick?: ISelectLeafOption["onSelect"];
|
|
1252
|
+
}
|
|
1253
|
+
interface IWidgetIndicatorMenuConfig {
|
|
1254
|
+
hideTablesColumnsOptions?: boolean;
|
|
1255
|
+
hideCommonOptions?: boolean;
|
|
1256
|
+
hideQuantityOption?: boolean;
|
|
1257
|
+
}
|
|
1258
|
+
interface IMeasureMenuConfig extends IWidgetIndicatorMenuConfig {
|
|
1259
|
+
options?: TMeasureAddButtonSelectOption[];
|
|
1260
|
+
}
|
|
1261
|
+
interface ISortingMenuConfig extends IWidgetIndicatorMenuConfig {
|
|
1262
|
+
}
|
|
1263
|
+
/** Кнопка добавления группы в набор */
|
|
1264
|
+
type TAddButton = {
|
|
1265
|
+
title: string;
|
|
1266
|
+
indicatorType: Exclude<EWidgetIndicatorType, EWidgetIndicatorType.CUSTOM | EWidgetIndicatorType.MEASURE | EWidgetIndicatorType.SORTING>;
|
|
1267
|
+
} | {
|
|
1268
|
+
title: string;
|
|
1269
|
+
indicatorType: EWidgetIndicatorType.CUSTOM;
|
|
1270
|
+
props: ICustomAddButtonProps;
|
|
1271
|
+
} | {
|
|
1272
|
+
title: string;
|
|
1273
|
+
indicatorType: EWidgetIndicatorType.MEASURE;
|
|
1274
|
+
menuConfig?: IMeasureMenuConfig;
|
|
1275
|
+
} | {
|
|
1276
|
+
title: string;
|
|
1277
|
+
indicatorType: EWidgetIndicatorType.SORTING;
|
|
1278
|
+
menuConfig?: ISortingMenuConfig;
|
|
1279
|
+
};
|
|
1280
|
+
interface IAutoIdentifiedArrayItem {
|
|
1281
|
+
/**
|
|
1282
|
+
* Идентификатор, добавляемый системой "на лету" для удобства разработки, не сохраняется на сервер.
|
|
1283
|
+
* Гарантируется уникальность id в пределах settings виджета.
|
|
1284
|
+
*/
|
|
1285
|
+
id: number;
|
|
1286
|
+
}
|
|
1287
|
+
interface IGroupSettings extends IAutoIdentifiedArrayItem, Record<string, any> {
|
|
1288
|
+
}
|
|
1289
|
+
/** Конфигурация набора групп */
|
|
1290
|
+
interface IGroupSetDescription<Settings extends object, GroupSettings extends object> {
|
|
1291
|
+
/** Заголовок */
|
|
1292
|
+
title: string;
|
|
1293
|
+
/** Максимальное количество групп в наборе */
|
|
1294
|
+
maxCount: number;
|
|
1295
|
+
/** Описание доступа к настройкам групп */
|
|
1296
|
+
accessor: TRecordAccessor<Settings, GroupSettings[]>;
|
|
1297
|
+
/** Кнопки добавления группы в набор */
|
|
1298
|
+
addButtons: TAddButton[];
|
|
1299
|
+
/** Создать элементы управления внутри группы (для вкладки настроек данных) */
|
|
1300
|
+
createDataRecords?(group: IGroupSettings): TGroupLevelRecord<GroupSettings>[];
|
|
1301
|
+
/** Создать элементы управления внутри группы (для вкладки настроек отображения) */
|
|
1302
|
+
createDisplayRecords?(group: IGroupSettings): TGroupLevelRecord<GroupSettings>[];
|
|
1303
|
+
/** Получить название для плашки */
|
|
1304
|
+
getGroupTitle?(group: IGroupSettings): string;
|
|
1305
|
+
/** Валидная ли группа */
|
|
1306
|
+
isValid?(group: IGroupSettings): boolean;
|
|
1307
|
+
/** Находится ли группа в состоянии загрузки */
|
|
1308
|
+
isLoading?(group: IGroupSettings): boolean;
|
|
1309
|
+
/** Можно ли удалять группу по умолчанию true */
|
|
1310
|
+
isRemovable?(group: IGroupSettings): boolean;
|
|
1311
|
+
/** Можно ли сортировать группу по умолчанию true */
|
|
1312
|
+
isDraggable?: boolean;
|
|
1313
|
+
/** Опциональный верхний отступ для группы */
|
|
1314
|
+
marginTop?: number;
|
|
1315
|
+
}
|
|
1316
|
+
/** Конфигурация левой панели */
|
|
1317
|
+
interface IPanelDescription<Settings extends object, GroupSettings extends IGroupSettings = IGroupSettings> {
|
|
1318
|
+
/** Добавить заголовок для виджета */
|
|
1319
|
+
useHeader?: boolean;
|
|
1320
|
+
/** Добавить описание для виджета */
|
|
1321
|
+
useMarkdown?: boolean;
|
|
1322
|
+
/** Конфигурация настроек данных виджета */
|
|
1323
|
+
dataRecords?: TWidgetLevelRecord<Settings>[];
|
|
1324
|
+
/** Конфигурация настроек отображения виджета */
|
|
1325
|
+
displayRecords?: TWidgetLevelRecord<Settings>[];
|
|
1326
|
+
/** Конфигурации наборов групп */
|
|
1327
|
+
groupSetDescriptions?: Record<string, IGroupSetDescription<Settings, GroupSettings>>;
|
|
1328
|
+
}
|
|
1329
|
+
interface IWidgetProcess {
|
|
1330
|
+
guid: string;
|
|
1331
|
+
/** Имя процесса */
|
|
1332
|
+
name: string;
|
|
1333
|
+
/** Формула имени события */
|
|
1334
|
+
eventNameFormula: string;
|
|
1335
|
+
/** Формула времени события */
|
|
1336
|
+
eventTimeFormula: string;
|
|
1337
|
+
/** Формула CaseId события */
|
|
1338
|
+
eventCaseIdFormula: string;
|
|
1339
|
+
/** Формула CaseId кейса */
|
|
1340
|
+
caseCaseIdFormula: string;
|
|
1341
|
+
/** Имя колонки CaseId события */
|
|
1342
|
+
eventCaseIdColumnName: string;
|
|
1343
|
+
/** Тип данных CaseId */
|
|
1344
|
+
caseIdDataType: ESimpleDataType;
|
|
1345
|
+
/** Тип данных времени события */
|
|
1346
|
+
eventTimeDataType: ESimpleDataType;
|
|
1347
|
+
/** Является ли процесс валидным */
|
|
1348
|
+
isValid: boolean;
|
|
1349
|
+
}
|
|
1350
|
+
/** Конфигурация левой панели при погружении на уровень вниз */
|
|
1351
|
+
interface IDivePanelDescription<Settings extends object, GroupSettings extends IGroupSettings = IGroupSettings> extends IPanelDescription<Settings, GroupSettings> {
|
|
1352
|
+
}
|
|
1353
|
+
interface IPanelDescriptionCreator<Settings extends IBaseWidgetSettings, GroupSettings extends IGroupSettings> {
|
|
1354
|
+
(context: IWidgetsContext, panelSettings: Settings, calculatorFactory: ICalculatorFactory): IPanelDescription<Settings, GroupSettings>;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
interface IWidgetPlaceholderController {
|
|
1358
|
+
setError(value: Error | null): void;
|
|
1359
|
+
setConfigured(value: boolean): void;
|
|
1360
|
+
setDisplay(value: boolean): void;
|
|
1361
|
+
setEmpty(value: boolean): void;
|
|
1362
|
+
setOverlay(value: boolean): void;
|
|
1363
|
+
}
|
|
1364
|
+
interface IWidgetPlaceholderValues {
|
|
1365
|
+
error: Error | null;
|
|
1366
|
+
isConfigured: boolean;
|
|
1367
|
+
isDisplay: boolean | undefined;
|
|
1368
|
+
isEmpty: boolean;
|
|
1369
|
+
isOverlay: boolean;
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
1372
|
interface IDefinition<WidgetSettings extends IBaseWidgetSettings, GroupSettings extends IGroupSettings> {
|
|
1373
1373
|
/** иконка виджета отображаемая в системе (в base64, svg или png) */
|
|
1374
1374
|
icon?: string;
|
|
@@ -1423,6 +1423,10 @@ type TContextMenuButtonCustom = {
|
|
|
1423
1423
|
key: string;
|
|
1424
1424
|
type: "custom";
|
|
1425
1425
|
icon: string;
|
|
1426
|
+
tooltip?: {
|
|
1427
|
+
title: string;
|
|
1428
|
+
offset?: [number | `${number}%`, number | `${number}%`];
|
|
1429
|
+
};
|
|
1426
1430
|
onClick: () => void;
|
|
1427
1431
|
};
|
|
1428
1432
|
type TContextMenuButtonOptions = {
|
|
@@ -1438,9 +1442,6 @@ type TLaunchActionParams = {
|
|
|
1438
1442
|
filters: ICalculatorFilter[];
|
|
1439
1443
|
needConfirmation?: boolean;
|
|
1440
1444
|
};
|
|
1441
|
-
interface ILaunchActionSubscribers {
|
|
1442
|
-
onActionSuccess(callback: () => void): void;
|
|
1443
|
-
}
|
|
1444
1445
|
type TWidgetContainer = {
|
|
1445
1446
|
/** Имеет ли контейнер виджета ограниченную максимальную высоту */
|
|
1446
1447
|
isMaxHeightLimited: boolean;
|
|
@@ -1478,7 +1479,7 @@ interface IWidgetProps<WidgetSettings extends IBaseWidgetSettings = IBaseWidgetS
|
|
|
1478
1479
|
/** Данные о контейнере виджета */
|
|
1479
1480
|
widgetContainer: TWidgetContainer;
|
|
1480
1481
|
/** Запуск действия */
|
|
1481
|
-
launchAction(params: TLaunchActionParams):
|
|
1482
|
+
launchAction(params: TLaunchActionParams): void;
|
|
1482
1483
|
/** Значение, сохраняемое в localStorage и URL */
|
|
1483
1484
|
persistValue: IWidgetPersistValue;
|
|
1484
1485
|
/** функция для управления контекстными меню */
|
|
@@ -1654,4 +1655,4 @@ declare global {
|
|
|
1654
1655
|
}
|
|
1655
1656
|
}
|
|
1656
1657
|
|
|
1657
|
-
export { EActionTypes, ECalculatorFilterMethods, EColorMode, EColorScope, EControlType, ECustomSelectTemplates, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureTemplateNames, EOpenViewMode, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESortDirection, ESortingValueModes, ETransitionMeasureTemplateNames, EViewType, EWidgetActionInputMode, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, type IActionCommon, type IActionGoToUrl, type IActionOpenView, type IActionRunScript, type IActionScript, type IActionScriptField, type IActionUpdateVariable, type IAddButtonSelectOption, type IAddDurationOfTransitionFilter, type IAddPresenceOfEventFilter, type IAddPresenceOfTransitionFilter, type IAddRepetitionOfEventFilter, 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 ICalculatorVariable, type ICalculatorVariablesValues, type IColoredValue, type ICommonColumnIndicator, 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 IGraphElement, type IGroupSetDescription, type IGroupSetRecord, type IGroupSettings, type IHistogramBin, type IHistogramCalculator, type IHistogramCalculatorInput, type IHistogramCalculatorOutput, type
|
|
1658
|
+
export { EActionTypes, ECalculatorFilterMethods, EColorMode, EColorScope, EControlType, ECustomSelectTemplates, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureTemplateNames, EOpenViewMode, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESortDirection, ESortingValueModes, ETransitionMeasureTemplateNames, EViewType, EWidgetActionInputMode, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, type IActionCommon, type IActionGoToUrl, type IActionOpenView, type IActionRunScript, type IActionScript, type IActionScriptField, type IActionUpdateVariable, type IAddButtonSelectOption, type IAddDurationOfTransitionFilter, type IAddPresenceOfEventFilter, type IAddPresenceOfTransitionFilter, type IAddRepetitionOfEventFilter, 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 ICalculatorVariable, type ICalculatorVariablesValues, type IColoredValue, type ICommonColumnIndicator, 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 IGraphElement, type IGroupSetDescription, type IGroupSetRecord, type IGroupSettings, type IHistogramBin, type IHistogramCalculator, type IHistogramCalculatorInput, type IHistogramCalculatorOutput, type ILens, type IMarkdownMeasure, type IMeasureMenuConfig, type IPanelDescription, type IPanelDescriptionCreator, type IPieCalculator, type IPieCalculatorInput, type IPieCalculatorOutput, type IProcessEventFilterValue, type IProcessEventIndicator, type IProcessGraphCalculator, type IProcessGraphCalculatorInput, type IProcessGraphCalculatorOutput, type IProcessIndicator, type IProcessTransitionFilterValue, type IProcessTransitionIndicator, type IRange, type ISelectBranchOption, type ISelectDividerOption, type ISelectGroupOption, type ISelectLeafOption, type ISelectOption, type ISelectSystemOption, type ISortOrder, type ISortingMenuConfig, type IStagesFilterValue, type ITwoLimitsCalculator, type ITwoLimitsCalculatorExportInput, type ITwoLimitsCalculatorInput, type ITwoLimitsCalculatorOutput, type ITypeCalculator, type ITypeCalculatorInput, type ITypeCalculatorOutput, type IVertex, type IWidget, type IWidgetActionInput, type IWidgetColumnIndicator, type IWidgetDimension, type IWidgetDimensionHierarchy, type IWidgetEntity, type IWidgetFilter, type IWidgetFiltration, type IWidgetFormatting, type IWidgetFormulaFilterValue, type IWidgetIndicator, type IWidgetIndicatorMenuConfig, type IWidgetMeasure, type IWidgetPersistValue, type IWidgetPlaceholderController, type IWidgetPlaceholderValues, type IWidgetProcess, type IWidgetProps, type IWidgetSortingIndicator, type IWidgetTable, type IWidgetTableColumn, type IWidgetsContext, type TActionsOnClick, type TBoundedContentWithIndicator, type TColor, 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 TFiltrationMode, type TGroupLevelRecord, type TLaunchActionParams, type TMeasureAddButtonSelectOption, type TProcessIndicatorValue, type TRecordAccessor, type TSelectChildOptions, type TSelectFetchOptions, type TSelectivePartial, type TSortDirection, type TUpdateSelection, type TValuePath, type TWidgetActionCommonInputValue, type TWidgetActionInputValue, type TWidgetContainer, type TWidgetFilterValue, type TWidgetFiltering, type TWidgetLevelRecord, type TWidgetSortingValue, type TWidgetSortingValueRelatedWidgetDimension, type TWidgetSortingValueRelatedWidgetIndicator, type TWidgetSortingValueRelatedWidgetMeasure, type TWidgetVariable, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, dimensionTemplateFormulas, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formulaFilterMethods, generateColumnFormula, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getTransitionMeasureFormula, isActionValid, isHierarchy, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureTemplateFormulas, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection };
|