@appsemble/sdk 0.19.14 → 0.19.15
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 +35 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IconName } from '@fortawesome/fontawesome-common-types';
|
|
2
2
|
import { Promisable } from 'type-fest';
|
|
3
|
-
import { Action, Message, Remapper, Theme } from './types';
|
|
3
|
+
import { Action, BulmaColor, Message, Remapper, Theme } from './types';
|
|
4
4
|
export * from './types';
|
|
5
5
|
export { IconName };
|
|
6
6
|
/**
|
|
@@ -86,6 +86,35 @@ export interface EventListeners {
|
|
|
86
86
|
export interface Parameters {
|
|
87
87
|
}
|
|
88
88
|
export declare type PageParameters = Record<string, string>;
|
|
89
|
+
/**
|
|
90
|
+
* A menu item that can be displayed in addition to the normal app menu.
|
|
91
|
+
*/
|
|
92
|
+
export interface MenuItem {
|
|
93
|
+
/**
|
|
94
|
+
* The title of the menu item.
|
|
95
|
+
*/
|
|
96
|
+
title: string;
|
|
97
|
+
/**
|
|
98
|
+
* The icon to display next to the title.
|
|
99
|
+
*/
|
|
100
|
+
icon?: IconName;
|
|
101
|
+
/**
|
|
102
|
+
* The color to use for the icon.
|
|
103
|
+
*/
|
|
104
|
+
iconColor?: BulmaColor;
|
|
105
|
+
/**
|
|
106
|
+
* The click handler for when the menu item is clicked.
|
|
107
|
+
*/
|
|
108
|
+
onClick: () => void;
|
|
109
|
+
/**
|
|
110
|
+
* The submenu items associated with this menu item.
|
|
111
|
+
*/
|
|
112
|
+
submenu?: Omit<MenuItem, 'submenu'>[];
|
|
113
|
+
/**
|
|
114
|
+
* Whether the item is considered active.
|
|
115
|
+
*/
|
|
116
|
+
active?: boolean;
|
|
117
|
+
}
|
|
89
118
|
/**
|
|
90
119
|
* A set of utility functions provided by the Appsemble SDK.
|
|
91
120
|
*/
|
|
@@ -127,6 +156,11 @@ export interface Utils {
|
|
|
127
156
|
* @returns String containing the FontAwesome classes for the icon.
|
|
128
157
|
*/
|
|
129
158
|
fa: (icon: IconName) => string;
|
|
159
|
+
/**
|
|
160
|
+
* @param items - The list of menu items to display.
|
|
161
|
+
* @param header - A header that can be used to separate from other block menus.
|
|
162
|
+
*/
|
|
163
|
+
menu: (items: MenuItem[], header?: string) => void;
|
|
130
164
|
}
|
|
131
165
|
export interface Events {
|
|
132
166
|
/**
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,cAAc,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,cAAc,SAAS,CAAC;AA0RxB;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,EAAqB;IAC7C,MAAM,KAAK,GAA4B,IAAI,WAAW,CAAC,oBAAoB,EAAE;QAC3E,MAAM,EAAE;YACN,EAAE;YACF,QAAQ;SACT;KACF,CAAC,CAAC;IACH,IAAI,QAAQ,CAAC,aAAa,EAAE;QAC1B,QAAQ,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;KAC7C;AACH,CAAC"}
|