@ichicraft/widgets-widget-base 1.10.1 → 1.10.2
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/README.md +7 -0
- package/lib/types/index.d.ts +18 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,6 +9,13 @@ All notable changes to this project will be documented here.
|
|
|
9
9
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
10
10
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
11
11
|
|
|
12
|
+
## 1.10.2 - 2024-07-19
|
|
13
|
+
|
|
14
|
+
- Added `registerTabs` function to the `WidgetInstanceContext` interface, to allow rendering of tabs in the widget header.
|
|
15
|
+
- Added `setSelectedTab` function to the `WidgetInstanceContext` interface, to allow setting the current selected tab in the widget header.
|
|
16
|
+
- Added `CommandBarTab` interface.
|
|
17
|
+
- Added `CommandBarTabOptions` interface.
|
|
18
|
+
|
|
12
19
|
## 1.10.1 - 2024-07-08
|
|
13
20
|
|
|
14
21
|
- Added `widget-administrator` role to the `UserRole` type.
|
package/lib/types/index.d.ts
CHANGED
|
@@ -323,6 +323,14 @@ export interface WidgetInstanceContext {
|
|
|
323
323
|
* If no id was specified, it removes all items.
|
|
324
324
|
*/
|
|
325
325
|
unregisterCustomCommandBarItem?: (id?: string) => void;
|
|
326
|
+
/**
|
|
327
|
+
* Allows registration of tabs (pivots) in the widget header.
|
|
328
|
+
*/
|
|
329
|
+
registerTabs?: (options: CommandBarTabOptions) => void;
|
|
330
|
+
/**
|
|
331
|
+
* Allows setting the current selected tab in the widget header.
|
|
332
|
+
*/
|
|
333
|
+
setSelectedTab?: (tabId: string) => void;
|
|
326
334
|
/**
|
|
327
335
|
* Raises an event to be handled by the Time-based Events feature of Ichicraft Boards.
|
|
328
336
|
* @param object The object this event concerns (e.g. app, report, newsArticle, ...). Use camelCase.
|
|
@@ -669,6 +677,16 @@ export interface CommandBarItemProps {
|
|
|
669
677
|
*/
|
|
670
678
|
onClick?: () => void;
|
|
671
679
|
}
|
|
680
|
+
export interface CommandBarTabOptions {
|
|
681
|
+
tabs: CommandBarTab[];
|
|
682
|
+
onTabSelect: (tabId: string) => void;
|
|
683
|
+
}
|
|
684
|
+
export interface CommandBarTab {
|
|
685
|
+
id: string;
|
|
686
|
+
label: string;
|
|
687
|
+
iconName?: string;
|
|
688
|
+
tooltip?: string;
|
|
689
|
+
}
|
|
672
690
|
/**
|
|
673
691
|
* Options to pass to the openIFrameDialog function. Use this to configure how the dialog is rendered, and to handle events (e.g. onDismissed)
|
|
674
692
|
*/
|
package/package.json
CHANGED