@ichicraft/widgets-widget-base 1.8.8 → 1.8.9
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 +10 -0
- package/lib/types/index.d.ts +29 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,6 +9,16 @@ 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.8.9 - 2023-03-06
|
|
13
|
+
|
|
14
|
+
- Added `registerCustomCommandBarItems` function to the `instance` object of the `WidgetContext` interface, to support multiple custom buttons in the widget header.
|
|
15
|
+
- Added `unregisterCustomCommandBarItems` function to the `instance` object of the `WidgetContext` interface, to support removing all custom buttons in the widget header.
|
|
16
|
+
- Added optional `id` property to exported `CustomCommandBarItemProps` type, to support removing a custom command bar item by id.
|
|
17
|
+
- Added optional `pinned` property to exported `CustomCommandBarItemProps` type, to support forcing the widget header to always be visible.
|
|
18
|
+
- Added optional `showNotificationBadge` property to exported `CustomCommandBarItemProps` type, to support showing a red notification badge over the custom command bar item.
|
|
19
|
+
- Added optional `order` property to exported `CustomCommandBarItemProps` type, to support changing the order of custom command bar items.
|
|
20
|
+
- Changed `unregisterCustomCommandBarItem` function of the `instance` object of the `WidgetContext` interface, to support removing a custom command bar item by id.
|
|
21
|
+
|
|
12
22
|
## 1.8.8 - 2023-02-16
|
|
13
23
|
|
|
14
24
|
- Removed all SharePoint and Teams dependencies.
|
package/lib/types/index.d.ts
CHANGED
|
@@ -62,6 +62,12 @@ export interface WidgetContext {
|
|
|
62
62
|
* Optional callback to handle the click event of the widget title.
|
|
63
63
|
*/
|
|
64
64
|
onWidgetTitleClicked?: () => void;
|
|
65
|
+
/**
|
|
66
|
+
* Allows registration of multiple custom command bar items which can either result in an icon or
|
|
67
|
+
* an icon button, depending on the presence of the onClick property. To remove the items,
|
|
68
|
+
* use the [unregisterCommandBarItems] function.
|
|
69
|
+
*/
|
|
70
|
+
registerCustomCommandBarItems?: (props: CustomCommandBarItemProps[]) => void;
|
|
65
71
|
/**
|
|
66
72
|
* Allows registration of a custom command bar item which can either result in an icon or
|
|
67
73
|
* an icon button, depending on the presence of the onClick property. To remove the item,
|
|
@@ -69,9 +75,14 @@ export interface WidgetContext {
|
|
|
69
75
|
*/
|
|
70
76
|
registerCustomCommandBarItem?: (props: CustomCommandBarItemProps) => void;
|
|
71
77
|
/**
|
|
72
|
-
* Removes
|
|
78
|
+
* Removes all registered custom command bar items.
|
|
79
|
+
*/
|
|
80
|
+
unregisterCustomCommandBarItems?: () => void;
|
|
81
|
+
/**
|
|
82
|
+
* Removes a single custom command bar item, corresponding to the provided id.
|
|
83
|
+
* If no id was specified, it removes all items.
|
|
73
84
|
*/
|
|
74
|
-
unregisterCustomCommandBarItem?: () => void;
|
|
85
|
+
unregisterCustomCommandBarItem?: (id?: string) => void;
|
|
75
86
|
/**
|
|
76
87
|
* Raises an event to be handled by the Time-based Events feature of Ichicraft Boards.
|
|
77
88
|
* @param object The object this event concerns (e.g. app, report, newsArticle, ...). Use camelCase.
|
|
@@ -518,6 +529,10 @@ export declare enum CustomCommandBarItemSeverity {
|
|
|
518
529
|
* rendering of a command bar item, which could either be a single Icon or an Icon Button
|
|
519
530
|
*/
|
|
520
531
|
export interface CustomCommandBarItemProps {
|
|
532
|
+
/**
|
|
533
|
+
* Optional identifier for the icon.
|
|
534
|
+
*/
|
|
535
|
+
id?: string;
|
|
521
536
|
/**
|
|
522
537
|
* Name of the icon, as specified and available in Fluent UI Iconography:
|
|
523
538
|
* https://developer.microsoft.com/en-us/fluentui#/styles/web/icons
|
|
@@ -535,6 +550,18 @@ export interface CustomCommandBarItemProps {
|
|
|
535
550
|
* Optional severity to specify how the item should render
|
|
536
551
|
*/
|
|
537
552
|
severity?: CustomCommandBarItemSeverity;
|
|
553
|
+
/**
|
|
554
|
+
* Optionally tells the Widget Header that this icon should always be visible, even when not hovering
|
|
555
|
+
*/
|
|
556
|
+
pinned?: boolean;
|
|
557
|
+
/**
|
|
558
|
+
* Optionally display a red notification icon badge in the top-right corner of the button.
|
|
559
|
+
*/
|
|
560
|
+
showNotificationBadge?: boolean;
|
|
561
|
+
/**
|
|
562
|
+
* Optionally provide an order in which this button should appear, when registering multiple custom buttons.
|
|
563
|
+
*/
|
|
564
|
+
order?: number;
|
|
538
565
|
/**
|
|
539
566
|
* Optional onClick event, which is triggered on user click and makes the command
|
|
540
567
|
* bar item render as a button instead of a non-clickable icon
|
package/package.json
CHANGED