@openfin/core 33.76.26 → 33.76.31
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.
|
Binary file
|
package/package.json
CHANGED
package/src/OpenFin.d.ts
CHANGED
|
@@ -2480,20 +2480,20 @@ export type ManifestInfo = {
|
|
|
2480
2480
|
*/
|
|
2481
2481
|
manifestUrl: string;
|
|
2482
2482
|
};
|
|
2483
|
-
export type ClickedMenuResult = {
|
|
2483
|
+
export type ClickedMenuResult<T extends unknown = unknown> = {
|
|
2484
2484
|
result: 'clicked';
|
|
2485
|
-
data:
|
|
2485
|
+
data: T;
|
|
2486
2486
|
};
|
|
2487
2487
|
export type ClosedMenuResult = {
|
|
2488
2488
|
result: 'closed';
|
|
2489
2489
|
};
|
|
2490
|
-
export type MenuResult = ClickedMenuResult | ClosedMenuResult;
|
|
2491
|
-
export type ShowPopupMenuOptions = {
|
|
2492
|
-
template: MenuItemTemplate[];
|
|
2490
|
+
export type MenuResult<T extends unknown = unknown> = ClickedMenuResult<T> | ClosedMenuResult;
|
|
2491
|
+
export type ShowPopupMenuOptions<T extends unknown = unknown> = {
|
|
2492
|
+
template: MenuItemTemplate<T>[];
|
|
2493
2493
|
x?: number;
|
|
2494
2494
|
y?: number;
|
|
2495
2495
|
};
|
|
2496
|
-
export type MenuItemTemplate = {
|
|
2496
|
+
export type MenuItemTemplate<T extends unknown = unknown> = {
|
|
2497
2497
|
/**
|
|
2498
2498
|
* Can be `normal`, `separator`, `submenu`, or `checkbox`.
|
|
2499
2499
|
* Defaults to 'normal' unless a 'submenu' key exists
|
|
@@ -2517,11 +2517,11 @@ export type MenuItemTemplate = {
|
|
|
2517
2517
|
* Should be specified for `submenu` type menu items. If `submenu` is specified,
|
|
2518
2518
|
* the `type: 'submenu'` can be omitted.
|
|
2519
2519
|
*/
|
|
2520
|
-
submenu?: MenuItemTemplate[];
|
|
2520
|
+
submenu?: MenuItemTemplate<T>[];
|
|
2521
2521
|
/**
|
|
2522
2522
|
* Data to be returned if the user selects the element. Must be serializable
|
|
2523
2523
|
*/
|
|
2524
|
-
data?:
|
|
2524
|
+
data?: T;
|
|
2525
2525
|
/**
|
|
2526
2526
|
* Image Data URI with image dimensions inferred from the encoded string
|
|
2527
2527
|
*/
|
|
@@ -1033,7 +1033,7 @@ export declare class _Window extends WebContents<OpenFin.WindowEvent> {
|
|
|
1033
1033
|
* @return {Promise<MenuResult>}
|
|
1034
1034
|
* @tutorial Window.showPopupMenu
|
|
1035
1035
|
*/
|
|
1036
|
-
showPopupMenu(options: OpenFin.ShowPopupMenuOptions): Promise<OpenFin.MenuResult
|
|
1036
|
+
showPopupMenu<T>(options: OpenFin.ShowPopupMenuOptions<T>): Promise<OpenFin.MenuResult<T>>;
|
|
1037
1037
|
/**
|
|
1038
1038
|
* Closes the window's popup menu, if one exists.
|
|
1039
1039
|
* @experimental
|
|
Binary file
|