@infomaximum/widget-sdk 5.0.0-beta8 → 5.0.0-beta9
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 +8 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1514,22 +1514,22 @@ interface ISelectBranchOption {
|
|
|
1514
1514
|
icon?: string;
|
|
1515
1515
|
disabled?: boolean;
|
|
1516
1516
|
}
|
|
1517
|
-
interface ISelectLeafOption {
|
|
1517
|
+
interface ISelectLeafOption<U extends object> {
|
|
1518
1518
|
type: ESelectOptionTypes.LEAF;
|
|
1519
1519
|
label: string;
|
|
1520
1520
|
value: string;
|
|
1521
|
-
onSelect:
|
|
1521
|
+
onSelect: (value: string, update: (f: (prevItems: U) => U) => void) => void;
|
|
1522
1522
|
/** Строка в формате base64 */
|
|
1523
1523
|
icon?: string;
|
|
1524
1524
|
disabled?: boolean;
|
|
1525
1525
|
}
|
|
1526
|
-
type IAddButtonSelectOption = ISelectDividerOption | ISelectGroupOption | ISelectBranchOption | ISelectLeafOption
|
|
1526
|
+
type IAddButtonSelectOption = ISelectDividerOption | ISelectGroupOption | ISelectBranchOption | ISelectLeafOption<object[]>;
|
|
1527
1527
|
type TCustomAddButtonSelectOption = ISelectSystemOption<ECustomSelectTemplates> | IAddButtonSelectOption;
|
|
1528
1528
|
type TMeasureAddButtonSelectOption = IAddButtonSelectOption;
|
|
1529
1529
|
interface ICustomAddButtonProps {
|
|
1530
1530
|
options: TSelectChildOptions;
|
|
1531
1531
|
hasDropdown?: boolean;
|
|
1532
|
-
onClick?: ISelectLeafOption["onSelect"];
|
|
1532
|
+
onClick?: ISelectLeafOption<object[]>["onSelect"];
|
|
1533
1533
|
}
|
|
1534
1534
|
interface IWidgetIndicatorAddButtonProps {
|
|
1535
1535
|
hideTablesColumnsOptions?: boolean;
|
|
@@ -1586,7 +1586,7 @@ interface IGroupSetDescription<Settings extends object, GroupSettings extends ob
|
|
|
1586
1586
|
/** Конфигурация кнопок добавления группы в набор */
|
|
1587
1587
|
addButtons: TAddButton[];
|
|
1588
1588
|
/** Получить название, отображаемое на плашке (по умолчанию используется поле name из группы) */
|
|
1589
|
-
getGroupTitle?(group: IGroupSettings): string;
|
|
1589
|
+
getGroupTitle?(group: IGroupSettings, index: number): string;
|
|
1590
1590
|
/**
|
|
1591
1591
|
* Получить описание показателя для группы, если группа описывает системный показатель.
|
|
1592
1592
|
*
|
|
@@ -1597,9 +1597,9 @@ interface IGroupSetDescription<Settings extends object, GroupSettings extends ob
|
|
|
1597
1597
|
*/
|
|
1598
1598
|
getIndicatorData?: (settings: IInitialSettings) => EWidgetIndicatorType | TWidgetIndicatorData;
|
|
1599
1599
|
/** Создать конфигурацию группы для вкладки настроек данных */
|
|
1600
|
-
createDataRecords?(group: IGroupSettings): TGroupLevelRecord<GroupSettings>[];
|
|
1600
|
+
createDataRecords?(group: IGroupSettings, index: number): TGroupLevelRecord<GroupSettings>[];
|
|
1601
1601
|
/** Создать конфигурацию группы для вкладки настроек отображения */
|
|
1602
|
-
createDisplayRecords?(group: IGroupSettings): TGroupLevelRecord<GroupSettings>[];
|
|
1602
|
+
createDisplayRecords?(group: IGroupSettings, index: number): TGroupLevelRecord<GroupSettings>[];
|
|
1603
1603
|
/** Находится ли группа в состоянии загрузки (по умолчанию false) */
|
|
1604
1604
|
isLoading?(group: IGroupSettings): boolean;
|
|
1605
1605
|
/** Является ли группа валидной (по умолчанию true) */
|
|
@@ -1954,7 +1954,7 @@ interface IWidget<WidgetSettings extends IBaseWidgetSettings> {
|
|
|
1954
1954
|
unmount(container: HTMLElement): void;
|
|
1955
1955
|
}
|
|
1956
1956
|
interface IFillSettings<WidgetSettings extends IBaseWidgetSettings> {
|
|
1957
|
-
(settings: Partial<WidgetSettings>, context: IGlobalContext): void;
|
|
1957
|
+
(settings: Partial<WidgetSettings>, context: IGlobalContext, prevSettings: Partial<WidgetSettings> | undefined): void;
|
|
1958
1958
|
}
|
|
1959
1959
|
interface IWidgetEntity<WidgetSettings extends IBaseWidgetSettings, GroupSettings extends IGroupSettings> {
|
|
1960
1960
|
new (): IWidget<WidgetSettings>;
|