@ichicraft/widgets-widget-base 1.19.0 → 1.21.0

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 CHANGED
@@ -1,454 +1,607 @@
1
- This package supports development of widgets built using the Widget Development Kit
2
-
3
- _This package is part of the Widget Development Kit, which is a collection of NPM packages that empower developers to create widgets for Bloom Intranet._
4
-
5
- # Changelog
6
-
7
- All notable changes to this project will be documented here.
8
-
9
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
10
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
11
-
12
- ## 1.19.0 - 2026-08-18
13
-
14
- - Added optional `bloomGroups` provider to `WidgetContext`, exposing a `fetchGroups()` function that supplies the tenant's Bloom Group definitions. Widgets can pass it through to their people pickers so Bloom Groups can be offered as suggestions.
15
-
16
- ## 1.18.0 - 2026-08-17
17
-
18
- - Added optional `assetsBaseUrl` property to the `WidgetContext` interface, containing the base URL of the folder the widget bundle was loaded from. This allows widgets to fetch files that are published alongside their bundle, such as per-language translation files.
19
-
20
- ## 1.17.0 - 2026-07-16
21
-
22
- - Moved `UserHelper`, `ICPersona`, `ICPersonaType`, `ICSite`, `ICTeam` and `ICTerm` to an internal package.
23
-
24
- ## 1.16.6 - 2026-06-03
25
-
26
- - Replaced unused `design.header.activeTextColor` with `design.header.subTextColor`
27
-
28
- ## 1.16.5 - 2026-06-01
29
-
30
- - Added `BuddyRenderOptions` interface, passed by the host to `BaseWidget.renderBuddy` to describe the slot the widget is about to render into.
31
- - Added optional `options` parameter to `BaseWidget.renderBuddy`, of type `BuddyRenderOptions`. Contains an `allowRichRendering` boolean that signals whether the slot has room for richer rendering than the standard buddy icon button — letting the widget decide synchronously between custom and default rendering.
32
-
33
- ## 1.16.4 - 2026-05-27
34
-
35
- - Added `header` property to `WidgetDesignContext` interface, exposing the header's `textColor`, `iconColor`, `activeTextColor` and `activeIconColor` from the user's theme.
36
- - Deprecated `defaultColor` property on `WidgetBuddyContext` interface in favor of `design.header.iconColor` (and `design.header.activeIconColor` for the hover/active state).
37
-
38
- ## 1.16.3 - 2026-05-08
39
-
40
- - Added `whatsNewUrl` property to `WidgetManifestConfig` to allow quick access to updates that the widget has received.
41
- - Added `aboutUrl` property to `WidgetManifestConfig` to allow quick access to more information about the widget.
42
-
43
- ## 1.16.2 - 2026-03-25
44
-
45
- - Fixed issue with using internal library `@ic/caching` by publishing caching library as public (`@ichicraft/caching`)
46
-
47
- ## 1.16.1 - 2026-03-19
48
-
49
- - Addition of `notificationBadgeCount` property to `CommandBarItemProps` to allow for a number to be displayed in the badge
50
-
51
- ## 1.16.0 - 2026-03-09
52
-
53
- - Addition of `cache` property to `instance`, `variant` and `manifest` level of `WidgetContext` to centralize cache handling and functionality
54
-
55
- ## 1.15.4 - 2026-01-07
56
-
57
- - Override version of deep dependency 'validator' to get rid of potential vulnerability
58
-
59
- ## 1.15.3 - 2025-12-09
60
-
61
- - Added property `isIndeterminate` to `ICTerm` interface, used to represent a term's indeterminate checkmark state.
62
-
63
- ## 1.15.2 - 2025-11-21
64
-
65
- - Added new interface `ICTerm`, used to represent a SharePoint Taxonomy Term object in code
66
-
67
- ## 1.15.1 - 2025-09-30
68
-
69
- - Added new interface `ICTeam`, used to represent a Microsoft Teams team object in code
70
-
71
- ## 1.15.0 - 2025-09-29
72
-
73
- - Deprecated `msGraphClientFactory` in favor of `msGraphClient` in the `WidgetManifestConfig` interface.
74
-
75
- ## 1.14.7 - 2025-08-21
76
-
77
- - Added `parentId` property to the `WidgetInstanceContext` interface, to support checking the ID of the parent of a widget instance.
78
-
79
- ## 1.14.6 - 2025-08-11
80
-
81
- - Added `updateInstanceConfiguration` property to the `WidgetInstanceContext` interface, to support updating the instance configuration directly in a widget, instead of through the settings panel.
82
-
83
- ## 1.14.5 - 2025-08-07
84
-
85
- - Added `imageUrl` property to the `CommandBarTab` interface, to support displaying images in widget header tabs.
86
-
87
- ## 1.14.4 - 2025-08-01
88
-
89
- - Added `releaseType` property to the `WidgetManifestConfig` interface, to indicate the current stage of the release lifecycle a widget is in.
90
- - Added `registerOnBuddyClick` property to the `WidgetBuddyContext` interface, to allow overriding default onClick behavior when clicking on a buddy (by default, it opens the widget in a Callout).
91
-
92
- ## 1.14.3 - 2025-07-04
93
-
94
- - Added `justification` string property to widget manifest to describe the reasoning behind the need for certain API permisisons
95
-
96
- ## 1.14.2 - 2025-07-02
97
-
98
- - Reverted `@microsoft/sp-http` dependency back to SPFx version `1.18.2` due to postponed upgrade
99
- - Added `isOptional` boolean to widget manifest to allow marking certain API permission requests as optional
100
-
101
- ## 1.14.1 - 2025-06-17
102
-
103
- - Reverted module type 'commonjs' for backwards compatibility
104
-
105
- ## 1.14.0 - 2025-05-21
106
-
107
- - Version bumped `@microsoft/sp-http` dependency to latest SPFx version `1.21.1`
108
-
109
- ## 1.13.2 - 2025-04-11
110
-
111
- - Minor update in documentation of `WebApiPermissionRequest` interface
112
-
113
- ## 1.13.1 - 2025-03-11
114
-
115
- - Added new interface `ICSite`, used to represent a SharePoint site object in code
116
-
117
- ## 1.13.0 - 2025-02-17
118
-
119
- - Fixed an issue with detecting external users in `UserHelper`
120
- - Changed target JavaScript version to `ES6`
121
-
122
- ## 1.12.0 - 2025-02-11
123
-
124
- - Added `ColorOption` interface.
125
- - Added `WidgetDesignContext` interface.
126
- - Added `design` property of type `WidgetDesignContext` to `WidgetContext` interface, to support UI settings within widgets.
127
- - Deprecated `elementBorderRadius` property which is renamed to `borderRadius` and moved under `design` property in `WidgetContext` interface.
128
-
129
- ## 1.11.6 - 2025-01-30
130
-
131
- - Added `spServiceScope` property to `WidgetContext` interface.
132
- - Added `loadComponentById` function to `WidgetContext` interface.
133
- - Deprecated `definition` property which is replaced by `variant` property in `WidgetContext` interface.
134
- - Deprecated `instance.publishNotification` function in `WidgetContext` interface because feature is no longer available.
135
-
136
- ## 1.11.5 - 2025-01-21
137
-
138
- - Added `defaultColor` property to `WidgetBuddyContext` interface.
139
-
140
- ## 1.11.4 - 2024-11-08
141
-
142
- - Added `driveId` property to `FilePickerFileProps` interface.
143
-
144
- ## 1.11.3 - 2024-11-05
145
-
146
- - Added `fileName` property to `FilePickerFileProps` interface.
147
-
148
- ## 1.11.2 - 2024-10-21
149
-
150
- - Added optional `objectId` property to the `ICPersona` interface.
151
-
152
- ## 1.11.1 - 2024-10-17
153
-
154
- - Made `buddy` property of type `WidgetBuddyContext` optional.
155
-
156
- ## 1.11.0 - 2024-10-17
157
-
158
- - Added `renderBuddy` function to the `BaseWidget` class, to support rendering widgets as a buddy.
159
- - Added `buddy` property of type `WidgetBuddyContext` to the `WidgetContext` interface, to support utility functions specifically for a widget buddy.
160
- - Added `setBadgeProperties` function to the `WidgetBuddyContext` interface, to allow rendering a badge on top of the buddy.
161
-
162
- ## 1.10.8 - 2024-10-15
163
-
164
- - Added `buddybar` to the `BoardType` type, to support widgets that run in the scope of the upcoming buddy bar feature
165
-
166
- ## 1.10.7 - 2024-08-20
167
-
168
- - Replaced `onInit` function with a new asynchronous `init` function in the `BaseWidget` class, to allow waiting until initialization is complete.
169
-
170
- ## 1.10.6 - 2024-08-19
171
-
172
- - Added `userDisplayName` property to the `WidgetContext` interface, to allow using the currently signed-in user's display name in widgets.
173
-
174
- ## 1.10.5 - 2024-08-07
175
-
176
- - Added `onSearch` property to the `CommandBarSearchItem` interface, to allow executing a callback when the user presses enter in the search box.
177
-
178
- ## 1.10.4 - 2024-07-23
179
-
180
- - Added `SearchBar` value to the `CommandBarItemType` enum, to allow rendering a command bar item as a search bar.
181
- - Added `CommandBarSearchItem` interface, to allow passing extra search-related props to a CommandBarItem of type `SearchBar`.
182
- - Added optional `overflowButtonIconName` and `overflowButtonTooltip` properties to the `CommandBarTabOptions` interface, to allow customization of the overflow menu button.
183
- - Added optional `itemCount` property to the `CommandBarTab` interface.
184
- - Added summaries to functions and interfaces related to widget command bar tabs.
185
-
186
- ## 1.10.3 - 2024-07-22
187
-
188
- - Added override in package.json to use version `2.3.7` instead of `2.3.6` of `requirejs` because the latter has vulnerability CVE-2024-38999
189
-
190
- ## 1.10.2 - 2024-07-19
191
-
192
- - Added `registerTabs` function to the `WidgetInstanceContext` interface, to allow rendering of tabs in the widget header.
193
- - Added `setSelectedTab` function to the `WidgetInstanceContext` interface, to allow setting the current selected tab in the widget header.
194
- - Added `CommandBarTab` interface.
195
- - Added `CommandBarTabOptions` interface.
196
-
197
- ## 1.10.1 - 2024-07-08
198
-
199
- - Added `widget-administrator` role to the `UserRole` type.
200
-
201
- ## 1.10.0 - 2024-06-25
202
-
203
- - Added optional `updateDataAccess()` function to the `BaseWidget` class, used to update access to widget-specific data.
204
- - Added `administrators` property to the `WidgetVariantContext` interface.
205
-
206
- ## 1.9.14 - 2024-06-18
207
-
208
- - Change import of `SPFI` type to decrease bundle sizes in widgets.
209
-
210
- ## 1.9.13 - 2024-06-18
211
-
212
- - Added `spHttpClient` property to `WidgetContext` interface, to perform REST calls against SharePoint.
213
- - Added `spHttpClientConfiguration` property to `WidgetContext` interface.
214
-
215
- ## 1.9.12 - 2024-06-17
216
-
217
- - Added `sp` property to `WidgetContext` interface, to allow using a centralized PnPjs version across all widgets.
218
- - Added `siteId` property to `WidgetContext` interface.
219
- - Added `boardsInstanceId` property to `WidgetContext` interface.
220
-
221
- ## 1.9.11 - 2024-06-14
222
-
223
- - Fixed handling of null `ICPersonaType` values in `isCurrentUserInScope` function of `UserHelper` class.
224
-
225
- ## 1.9.10 - 2024-06-04
226
-
227
- - Renamed `CustomCommandBarItemProps` interface to `CommandBarItemProps`.
228
- - Merged `CommandBarIcon`, `CommandBarLink` and `CommandBarItemBase` interfaces into the `CommandBarItemProps` interface, to simplify adding custom command bar items.
229
- - Added `Overflow` type to `CommandBarItemType` enum, to allow rendering an item inside the overflow menu.
230
- - Added `highlighted` property to the `CommandBarItemProps` interface, to allow rendering an item as if it is being hovered.
231
- - Added `cursor` property to the `CommandBarItemProps` interface, to allow a different cursor when hovering over an item.
232
- - Added `disabled` property to the `CommandBarItemProps` interface, to allow rendering an item in a disabled state.
233
-
234
- ## 1.9.9 - 2024-05-14
235
-
236
- - Changed return type of `createDeepLink` function of the WidgetInstanceContext interface from `void` to `string`.
237
-
238
- ## 1.9.8 - 2024-05-13
239
-
240
- - Added `createDeepLink` property to the WidgetInstanceContext interface, to allow creating a deep link URL based on the current board and a widget instance.
241
- - Added `setDeepLinkData` property to the WidgetInstanceContext interface, to allow setting deep link data related to a widget instance in the URL of the current page.
242
- - Added `getDeepLinkData` property to the WidgetInstanceContext interface, to allow getting deep link data related to a widget instance from the URL of the current page.
243
-
244
- ## 1.9.7 - 2024-04-19
245
-
246
- - Added `hideSpHubNav` property to the IFrameDialogOptions interface, to allow hiding the Hub navigation on SharePoint sites.
247
- - Added `hideSpSiteHeader` property to the IFrameDialogOptions interface, to allow hiding the site header on SharePoint sites.
248
- - Added `showHistoryButtons` property to the IFrameDialogOptions interface, to render back and forward buttons, allowing the user to navigate the browser history.
249
- - Added `showOpenInNewWindow` property to the IFrameDialogOptions interface, to render an 'open in new window' button, allowing the user to open the iframe url in a new browser window.
250
-
251
- ## 1.9.6 - 2024-04-19
252
-
253
- - Changed `onRenderHeaderIcon` property of the IFrameDialogOptions interface, to work similarly to the widget render functions.
254
-
255
- ## 1.9.5 - 2024-04-18
256
-
257
- - Added `title` property to the IFrameDialogOptions interface, to allow rendering a title in the dialog header.
258
- - Added `titleUrl` property to the IFrameDialogOptions interface, to allow making the dialog header title clickable.
259
- - Added `onRenderHeaderIcon` property to the IFrameDialogOptions interface, to allow rendering an icon in the dialog header.
260
- - Added `onLoad` property to the IFrameDialogOptions interface, to support executing some code after the iframe finishes loading.
261
-
262
- ## 1.9.4 - 2024-04-11
263
-
264
- - Reintroduced the following types: `AadHttpClient`,`AadHttpClientConfiguration`,`AadHttpClientFactory`,`AadHttpClientResponse`, `AadTokenProvider`, `AadTokenProviderFactory`
265
-
266
- ## 1.9.2 - 2024-03-21
267
-
268
- - Added `CommandBarIcon` interface, to allow rendering a `CustomCommandBarItem` as a single icon or an icon button.
269
- - Added `CommandBarLink` interface, to allow rendering a `CustomCommandBarItem` as a clickable link.
270
- - Added `CommandBarItemBase` interface, to act as a base for different types of `CustomCommandBarItem`.
271
- - Added `elementBorderRadius` property to the `WidgetContext` interface, to allow styling widgets according to the configured design preferences.
272
- - Changed `CustomCommandBarItemProps` type to accept either a `CommandBarIcon` or a `CommandBarLink`.
273
-
274
- ## 1.9.1 - 2023-10-20
275
-
276
- - Added `WidgetInstanceContext` interface, to allow typing the `instance` property of the `WidgetContext` interface.
277
- - Added `WidgetVariantContext` interface, to allow typing the `definition` property of the `WidgetContext` interface.
278
- - Added `WidgetManifestContext` interface, to allow typing the `manifest` property of the `WidgetContext` interface.
279
-
280
- ## 1.9.0 - 2023-10-20
281
-
282
- - Added optional `importData()` function to the `BaseWidget` class, used to import widget-specific data.
283
- - Added optional `exportData()` function to the `BaseWidget` class, used to export widget-specific data.
284
- - Added new exported `ExportData` type.
285
-
286
- ## 1.8.17 - 2023-10-09
287
-
288
- - Added `iconName` property to the `definition` object of the `WidgetContext` interface, to support using an icon to represent a widget.
289
-
290
- ## 1.8.16 - 2023-09-26
291
-
292
- - Added `Custom` value to `ICPersonaType` enum, to support a custom ICPersona.
293
-
294
- ## 1.8.15 - 2023-09-01
295
-
296
- - Added `thumbnailUrl` property to `WidgetManifestConfig` interface, as a non-translatable substitute of the newly deprecated `preview_small` property from `WidgetImages` interface.
297
- - Removed the deprecated `preview_small` property from `WidgetImages` interface.
298
-
299
- ## 1.8.14 - 2023-09-01
300
-
301
- - Added `iconName` property to `WidgetManifestConfig` interface, to support using an icon to represent a widget, e.g. in the widget library or widget header.
302
- - Removed the deprecated `notificationIcon` property from `WidgetManifestConfig` interface.
303
-
304
- ## 1.8.13 - 2023-06-08
305
-
306
- - Removed the deprecated `resolved` property from `ICPersona` interface
307
-
308
- ## 1.8.12 - 2023-04-04
309
-
310
- - Changed `openFilePicker` function to return more details of the picked file in the shape of `FilePickerFileProps`
311
-
312
- ## 1.8.11 - 2023-04-03
313
-
314
- - Changed `openFilePicker` function to return more details of the picked file in the shape of `FilePickerFileProps`
315
-
316
- ## 1.8.10 - 2023-03-30
317
-
318
- - Changed `openFilePicker` function to accept `options`, to support configuration of picker behavior
319
-
320
- ## 1.8.9 - 2023-03-06
321
-
322
- - Added `registerCustomCommandBarItems` function to the `instance` object of the `WidgetContext` interface, to support multiple custom buttons in the widget header.
323
- - Added `unregisterCustomCommandBarItems` function to the `instance` object of the `WidgetContext` interface, to support removing all custom buttons in the widget header.
324
- - Added optional `id` property to exported `CustomCommandBarItemProps` type, to support removing a custom command bar item by id.
325
- - Added optional `pinned` property to exported `CustomCommandBarItemProps` type, to support forcing the widget header to always be visible.
326
- - Added optional `showNotificationBadge` property to exported `CustomCommandBarItemProps` type, to support showing a red notification badge over the custom command bar item.
327
- - Added optional `order` property to exported `CustomCommandBarItemProps` type, to support changing the order of custom command bar items.
328
- - Changed `unregisterCustomCommandBarItem` function of the `instance` object of the `WidgetContext` interface, to support removing a custom command bar item by id.
329
-
330
- ## 1.8.8 - 2023-02-16
331
-
332
- - Removed all SharePoint and Teams dependencies.
333
-
334
- ## 1.8.7 - 2022-12-13
335
-
336
- - Added `userRoles` property to the `WidgetContext` interface, to inform widgets of the roles of the current user.
337
- - Added new exported `UserRole` type.
338
-
339
- ## 1.8.6 - 2022-12-08
340
-
341
- - Added `boardType` property to the `instance` object of the `WidgetContext` interface, to inform widgets of the type of their board.
342
- - Added `allowedBoardTypes` property to the `definition` object of the `WidgetContext` interface, to inform widget variants of the types of boards it is allowed to be added to.
343
- - Added new exported `BoardType` type.
344
-
345
- ## 1.8.5 - 2022-09-30
346
-
347
- - Added `setWidgetTitleSuffix()` function to the `instance` object of the `WidgetContext` interface, to support appending the title of the widget with additional text.
348
- - Added `setWidgetSubtitle()` function to the `instance` object of the `WidgetContext` interface, to support overriding the subtitle of the widget.
349
- - Added `setUserConfigButtonVisibilty()` function to the `instance` object of the `WidgetContext` interface, to support hiding the settings button from the widget header.
350
- - Fixed spelling of `setWidgetHeaderVisibilty()` function. The function is now called `setWidgetHeaderVisibility()`.
351
-
352
- ## 1.8.4 - 2022-09-05
353
-
354
- - Added `openIFrameDialog()` function to the `WidgetContext` interface. This has the same functionality as the `openUrlInDialog()` function of the `instance` object, but adds more control over the dimensions of the dialog. The function `openUrlInDialog()` is now deprecated.
355
-
356
- ## 1.8.3 - 2022-08-16
357
-
358
- - Added `openFilePicker()` function to the `WidgetContext` interface to support file selection from within a widget.
359
-
360
- ## 1.8.2 - 2022-07-06
361
-
362
- - Added `subtitle` property to the `WidgetResource` interface.
363
-
364
- ## 1.8.1 - 2022-06-17
365
-
366
- - Added new section `analytics` to `WidgetManifestConfig` interface to allow definition of time-based events that can be raised by a widget.
367
- - Added `raiseEvent(...)` to the `instance` object of the `WidgetContent` interface, allowing widgets to raise an event.
368
-
369
- ## 1.7.11 - 2022-03-23
370
-
371
- - Added `setWidgetHeaderVisibilty()` function to the `instance` object of the `WidgetContext` interface, allowing widgets to render in full height.
372
-
373
- ## 1.7.9 - 2022-01-20
374
-
375
- - Added `userAccountCreated` date/time to the `WidgetContext` interface.
376
-
377
- ## 1.7.8 - 2022-01-18
378
-
379
- ### Changed
380
-
381
- - Added `initiateWidgetDeletion()` function to the `WidgetContext` interface.
382
-
383
- ## 1.7.7 - 2022-01-14
384
-
385
- ### Changed
386
-
387
- - Added `tenantId` property to the `WidgetContext` interface.
388
-
389
- ## 1.7.6 - 2021-11-04
390
-
391
- ### Changed
392
-
393
- - Added `theme` property to the `WidgetContext` interface to give access to currently applied theme.
394
-
395
- ## 1.7.5 - 2021-10-26
396
-
397
- ### Changed
398
-
399
- - Added `userSecurityGroups` and `userSharePointGroups` properties to the `WidgetContext` interface to inform widgets of SharePoint and security group memberships of the current user.
400
-
401
- ## 1.7.4 - 2021-10-20
402
-
403
- ### Changed
404
-
405
- - Added `contentLanguages` property to the `WidgetContext` interface to inform widgets of the available content languages as configured in Ichicraft Boards.
406
-
407
- ## 1.7.3 - 2021-10-04
408
-
409
- ### Changed
410
-
411
- - Added `manifestVersion` property to the `WidgetManifestConfig` interface to support multiple versions of the manifest. Current version is 2 which introduced this and the `externals` property.
412
- - Added `externals` property to the `WidgetManifestConfig` interface to support libraries that can be loaded separately from the widget bundle. This reduces widget bundle size and improves overal performance of Ichicraft Boards.
413
-
414
- ## 1.6.1 - 2021-02-18
415
-
416
- ### Changed
417
-
418
- - Added `userEmail` property to the `WidgetContext` interface to provide current user's email address to widgets.
419
-
420
- ## 1.5.0 - 2021-02-16
421
-
422
- ### Changed
423
-
424
- - Added `teamsSdk` property to the `WidgetContext` interface to allow interaction with Teams in case widget board is running in Teams client. Will be `undefined` if running in SharePoint.
425
-
426
- ## 1.4.0 - 2021-01-25
427
-
428
- ### Changed
429
-
430
- - Added several properties to the `WidgetContext` interface to identify the context in which the widget is shown (e.g. Team Browser hosted)
431
-
432
- ## 1.3.0 - 2021-01-15
433
-
434
- ### Changed
435
-
436
- - `registerCustomCommandBarItem()` is added to the `WidgetContext` interface as a function to call from within a widget instance to render an additional command bar item in the widget header.
437
- - `unregisterCustomCommandBarItem()` is added to the `WidgetContext` interface as a function to call from within a widget instance to remove a previously added command bar item from the widget header.
438
-
439
- ## 1.2.0 - 2021-01-15
440
-
441
- ### Changed
442
-
443
- - `loadScript()` is added to the `WidgetContext` interface as a function to call from within a widget in case an external script needs to be loaded. This allows the widget board to load external javascript.
444
-
445
- ## 1.1.0 - 2021-01-11
446
-
447
- ### Changed
448
-
449
- - `handleFatalError()` is added to the `WidgetContext` interface as a function to call from within a widget in case of an unhandled/unresolvable error. This allows the widget board to handle this situation gracefully.
450
- - **deps:** removed dependency ajv
451
-
452
- ## <= 1.0.5 - 2020-12-07
453
-
454
- No changelog was maintained for the earlier versions.
1
+ This package supports development of widgets built using the Widget Development Kit
2
+
3
+ _This package is part of the Widget Development Kit, which is a collection of NPM packages that empower developers to create widgets for Bloom Intranet._
4
+
5
+ # @ichicraft/widgets-widget-base
6
+
7
+ The contract a widget implements, and the shape of what the Widget Board hands it at runtime. A widget extends `BaseWidget`, receives a `WidgetContext`, and renders into a DOM element the board owns.
8
+
9
+ ## Features
10
+
11
+ - **One base class** — Extend `BaseWidget`, implement `init` and `render`, and the board takes care of the rest
12
+ - **Opt-in capabilities** — Buddy rendering, user and admin configuration, import and export are optional methods; implement only what the widget needs
13
+ - **A scoped context** — `WidgetContext` exposes the SharePoint and Graph clients, the current user, the board's theme and the host environment, without handing over the web part
14
+ - **Dev server helpers** `lib/dev` builds a webpack dev-server configuration that resolves its own port, so several widgets can be debugged against one board at once
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ npm install @ichicraft/widgets-widget-base
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ A widget is a class extending `BaseWidget`. Only `init` and `render` are required.
25
+
26
+ ```typescript
27
+ import { BaseWidget, type WidgetContext } from '@ichicraft/widgets-widget-base';
28
+
29
+ export default class RssWidget extends BaseWidget {
30
+ private feed: FeedItem[] = [];
31
+
32
+ public async init(): Promise<void> {
33
+ // Called once before the first render. Fetch what the widget needs.
34
+ this.feed = await loadFeed(this.context.instance.data);
35
+ }
36
+
37
+ public render(domElement: HTMLDivElement): void {
38
+ // Called whenever the board wants the widget drawn.
39
+ ReactDOM.render(<Rss items={this.feed} context={this.context} />, domElement);
40
+ }
41
+ }
42
+ ```
43
+
44
+ `this.context` is the `WidgetContext` the board constructed for this widget instance.
45
+
46
+ ### Optional capabilities
47
+
48
+ Each of these is optional. Implementing one tells the board the widget supports that capability.
49
+
50
+ | Method | Purpose |
51
+ | --- | --- |
52
+ | `renderBuddy(el, options?)` | Draw the widget's buddy-bar entry. Return `true` when rendering it yourself. `options.allowRichRendering` says whether the slot has room for more than an icon button. |
53
+ | `renderUserConfigurationForm(el)` | Draw the per-user settings form. |
54
+ | `validateUserConfigurationForm()` | Return a `ValidationResult` before the form is saved. |
55
+ | `getSerializedUserConfiguration()` | Return the form's state as the string the board persists. |
56
+ | `verifyPersistedUserConfiguration(config)` | Check stored configuration before it is used. |
57
+ | `renderAdminConfigurationForm(el)` and its siblings | The same four methods for the admin-level configuration. |
58
+ | `exportData()` / `importData(data)` | Move the widget's stored data between boards. |
59
+ | `updateDataAccess(from, to)` | React to the widget's audience changing. |
60
+ | `cleanupResources()` | Release anything held when the widget is torn down. |
61
+
62
+ ### What is on the context
63
+
64
+ `WidgetContext` is broad; these are the parts most widgets reach for.
65
+
66
+ ```typescript
67
+ // SharePoint and Graph, already authenticated for this user
68
+ context.sp; // @pnp/sp SPFI
69
+ context.spHttpClient; // SPHttpClient
70
+ context.msGraphClient; // Graph client
71
+ context.aadHttpClientFactory; // for your own AAD-protected APIs
72
+
73
+ // Who is looking at it
74
+ context.userDisplayName;
75
+ context.userEmail;
76
+ context.spUserId;
77
+ context.userRoles; // 'administrator' | 'board-owner' | 'widget-administrator'
78
+ context.language;
79
+
80
+ // Where it is running
81
+ context.siteUrl;
82
+ context.tenantId;
83
+ context.inTeamsContext;
84
+ context.isMobileBrowser;
85
+ context.assetsBaseUrl; // the folder this widget's bundle was loaded from
86
+
87
+ // This placement and its configuration
88
+ context.instance; // this instance: id, parent board, deep links, notifications
89
+ context.instance.data; // user settings for this instance, as a string
90
+ context.variant.data; // board-wide settings for it, as a string
91
+ context.instance.cache; // a CacheManager scoped to this instance
92
+ context.variant.cache; // a CacheManager scoped to the variant
93
+ context.manifest; // what the widget declared about itself
94
+ context.design; // the board's theme colours
95
+ ```
96
+
97
+ The full set is in `WidgetContext` in `lib/types`; the interface is documented member by member.
98
+
99
+ ### Reading configuration
100
+
101
+ Configuration is persisted as a string. `ConfigurationHelper` parses it back.
102
+
103
+ ```typescript
104
+ import { ConfigurationHelper } from '@ichicraft/widgets-widget-base/lib/utils';
105
+
106
+ const config = ConfigurationHelper.parseConfiguration<RssConfig>(this.context.instance.data);
107
+ ```
108
+
109
+ `parseConfiguration` returns an empty object rather than throwing when the stored value is empty. `instance.data` holds the settings a user made for this placement; `variant.data` holds the board-wide ones an administrator configured.
110
+
111
+ ## Debugging against a live board
112
+
113
+ `lib/dev` builds the webpack dev-server configuration for a widget, resolving a free port first so the manifest url handed to the board always matches the port the server binds to. That is what allows several widgets to be debugged on one board at the same time.
114
+
115
+ ```typescript
116
+ // webpack.dev.ts
117
+ import { createWidgetDevServerConfig } from '@ichicraft/widgets-widget-base/lib/dev';
118
+ import serveConfig from './config/serve.config';
119
+
120
+ const { devServer, cssModuleLocalIdentName, manifestUrl, debugPageUrl } =
121
+ await createWidgetDevServerConfig({ projectPath: __dirname, serveConfig });
122
+ ```
123
+
124
+ `serve.config.ts` controls the session:
125
+
126
+ ```typescript
127
+ export default {
128
+ widgetsDebugPageUrl: 'https://contoso.sharepoint.com/sites/intranet/SitePages/Home.aspx',
129
+ debugPort: 8081, // optional; otherwise the first free port from 8080 up
130
+ openBrowser: false, // set false for the second and further widgets in a session
131
+ };
132
+ ```
133
+
134
+ `cssModuleLocalIdentName` is keyed by port, so two widgets served at once never collide on css module class names.
135
+
136
+ `webpack` and `webpack-dev-server` are optional peer dependencies. They are only needed for these helpers, which every widget project already has installed.
137
+
138
+ # Changelog
139
+
140
+ All notable changes to this project will be documented here.
141
+
142
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
143
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
144
+
145
+ Entries from 1.21.0 onwards are generated from pull request descriptions when a release is built.
146
+
147
+ <!-- changelog:insert -->
148
+
149
+ ## 1.21.0 - 2026-08-27
150
+
151
+ ### Changed
152
+ - The package now needs SharePoint Framework 1.23.2 or newer.
153
+ - The framework dependency accepts any 1.x from 1.23.2 upwards rather than one exact version.
154
+ - The package page on npm now explains how to write a widget: the base class, what the context carries, where configuration is stored, and the helpers for debugging against a live installation of Bloom Intranet.
155
+
156
+ ## 1.20.0 - 2026-08-25
157
+
158
+ - Added `createWidgetDevServerConfig` and `findAvailablePort`, exported from `@ichicraft/widgets-widget-base/lib/dev` for use in a widget's `webpack.dev.ts`. The helper resolves a free port before it builds the debug url, so the manifest url handed to the board always matches the port the dev server binds to. This is what allows several widgets to be served and debugged on the same board at the same time.
159
+ - Added `cssModuleLocalIdentName` to the result of `createWidgetDevServerConfig`. It is keyed by port, so css module class names stay unique between widgets that are served at the same time.
160
+ - Added optional `debugPort` property to `WidgetDebugServeConfig`, pinning a widget's dev server to a fixed port. When omitted, the first free port from 8080 upwards is used.
161
+ - Added optional `openBrowser` property to `WidgetDebugServeConfig`. Set it to `false` for the second and further widgets in a multi-widget debug session, so they serve their bundle without opening a browser window of their own.
162
+ - Added `webpack` and `webpack-dev-server` as optional peer dependencies. They are only needed when using the `lib/dev` helpers, which every widget project already has installed.
163
+ - **Breaking:** removed the `DebugComponentType` enum and the `debugComponentType` property of `WidgetDebugServeConfig`. Opening the board on one specific component no longer makes sense now that several widgets can be debugged at once. Remove both from your `config/serve.config.ts`.
164
+
165
+ ## 1.19.0 - 2026-08-18
166
+
167
+ - Added optional `bloomGroups` provider to `WidgetContext`, exposing a `fetchGroups()` function that supplies the tenant's Bloom Group definitions. Widgets can pass it through to their people pickers so Bloom Groups can be offered as suggestions.
168
+
169
+ ## 1.18.0 - 2026-08-17
170
+
171
+ - Added optional `assetsBaseUrl` property to the `WidgetContext` interface, containing the base URL of the folder the widget bundle was loaded from. This allows widgets to fetch files that are published alongside their bundle, such as per-language translation files.
172
+
173
+ ## 1.17.0 - 2026-07-16
174
+
175
+ - Moved `UserHelper`, `ICPersona`, `ICPersonaType`, `ICSite`, `ICTeam` and `ICTerm` to an internal package.
176
+
177
+ ## 1.16.6 - 2026-06-03
178
+
179
+ - Replaced unused `design.header.activeTextColor` with `design.header.subTextColor`
180
+
181
+ ## 1.16.5 - 2026-06-01
182
+
183
+ - Added `BuddyRenderOptions` interface, passed by the host to `BaseWidget.renderBuddy` to describe the slot the widget is about to render into.
184
+ - Added optional `options` parameter to `BaseWidget.renderBuddy`, of type `BuddyRenderOptions`. Contains an `allowRichRendering` boolean that signals whether the slot has room for richer rendering than the standard buddy icon button — letting the widget decide synchronously between custom and default rendering.
185
+
186
+ ## 1.16.4 - 2026-05-27
187
+
188
+ - Added `header` property to `WidgetDesignContext` interface, exposing the header's `textColor`, `iconColor`, `activeTextColor` and `activeIconColor` from the user's theme.
189
+ - Deprecated `defaultColor` property on `WidgetBuddyContext` interface in favor of `design.header.iconColor` (and `design.header.activeIconColor` for the hover/active state).
190
+
191
+ ## 1.16.3 - 2026-05-08
192
+
193
+ - Added `whatsNewUrl` property to `WidgetManifestConfig` to allow quick access to updates that the widget has received.
194
+ - Added `aboutUrl` property to `WidgetManifestConfig` to allow quick access to more information about the widget.
195
+
196
+ ## 1.16.2 - 2026-03-25
197
+
198
+ - Fixed issue with using internal library `@ic/caching` by publishing caching library as public (`@ichicraft/caching`)
199
+
200
+ ## 1.16.1 - 2026-03-19
201
+
202
+ - Addition of `notificationBadgeCount` property to `CommandBarItemProps` to allow for a number to be displayed in the badge
203
+
204
+ ## 1.16.0 - 2026-03-09
205
+
206
+ - Addition of `cache` property to `instance`, `variant` and `manifest` level of `WidgetContext` to centralize cache handling and functionality
207
+
208
+ ## 1.15.4 - 2026-01-07
209
+
210
+ - Override version of deep dependency 'validator' to get rid of potential vulnerability
211
+
212
+ ## 1.15.3 - 2025-12-09
213
+
214
+ - Added property `isIndeterminate` to `ICTerm` interface, used to represent a term's indeterminate checkmark state.
215
+
216
+ ## 1.15.2 - 2025-11-21
217
+
218
+ - Added new interface `ICTerm`, used to represent a SharePoint Taxonomy Term object in code
219
+
220
+ ## 1.15.1 - 2025-09-30
221
+
222
+ - Added new interface `ICTeam`, used to represent a Microsoft Teams team object in code
223
+
224
+ ## 1.15.0 - 2025-09-29
225
+
226
+ - Deprecated `msGraphClientFactory` in favor of `msGraphClient` in the `WidgetManifestConfig` interface.
227
+
228
+ ## 1.14.7 - 2025-08-21
229
+
230
+ - Added `parentId` property to the `WidgetInstanceContext` interface, to support checking the ID of the parent of a widget instance.
231
+
232
+ ## 1.14.6 - 2025-08-11
233
+
234
+ - Added `updateInstanceConfiguration` property to the `WidgetInstanceContext` interface, to support updating the instance configuration directly in a widget, instead of through the settings panel.
235
+
236
+ ## 1.14.5 - 2025-08-07
237
+
238
+ - Added `imageUrl` property to the `CommandBarTab` interface, to support displaying images in widget header tabs.
239
+
240
+ ## 1.14.4 - 2025-08-01
241
+
242
+ - Added `releaseType` property to the `WidgetManifestConfig` interface, to indicate the current stage of the release lifecycle a widget is in.
243
+ - Added `registerOnBuddyClick` property to the `WidgetBuddyContext` interface, to allow overriding default onClick behavior when clicking on a buddy (by default, it opens the widget in a Callout).
244
+
245
+ ## 1.14.3 - 2025-07-04
246
+
247
+ - Added `justification` string property to widget manifest to describe the reasoning behind the need for certain API permisisons
248
+
249
+ ## 1.14.2 - 2025-07-02
250
+
251
+ - Reverted `@microsoft/sp-http` dependency back to SPFx version `1.18.2` due to postponed upgrade
252
+ - Added `isOptional` boolean to widget manifest to allow marking certain API permission requests as optional
253
+
254
+ ## 1.14.1 - 2025-06-17
255
+
256
+ - Reverted module type 'commonjs' for backwards compatibility
257
+
258
+ ## 1.14.0 - 2025-05-21
259
+
260
+ - Version bumped `@microsoft/sp-http` dependency to latest SPFx version `1.21.1`
261
+
262
+ ## 1.13.2 - 2025-04-11
263
+
264
+ - Minor update in documentation of `WebApiPermissionRequest` interface
265
+
266
+ ## 1.13.1 - 2025-03-11
267
+
268
+ - Added new interface `ICSite`, used to represent a SharePoint site object in code
269
+
270
+ ## 1.13.0 - 2025-02-17
271
+
272
+ - Fixed an issue with detecting external users in `UserHelper`
273
+ - Changed target JavaScript version to `ES6`
274
+
275
+ ## 1.12.0 - 2025-02-11
276
+
277
+ - Added `ColorOption` interface.
278
+ - Added `WidgetDesignContext` interface.
279
+ - Added `design` property of type `WidgetDesignContext` to `WidgetContext` interface, to support UI settings within widgets.
280
+ - Deprecated `elementBorderRadius` property which is renamed to `borderRadius` and moved under `design` property in `WidgetContext` interface.
281
+
282
+ ## 1.11.6 - 2025-01-30
283
+
284
+ - Added `spServiceScope` property to `WidgetContext` interface.
285
+ - Added `loadComponentById` function to `WidgetContext` interface.
286
+ - Deprecated `definition` property which is replaced by `variant` property in `WidgetContext` interface.
287
+ - Deprecated `instance.publishNotification` function in `WidgetContext` interface because feature is no longer available.
288
+
289
+ ## 1.11.5 - 2025-01-21
290
+
291
+ - Added `defaultColor` property to `WidgetBuddyContext` interface.
292
+
293
+ ## 1.11.4 - 2024-11-08
294
+
295
+ - Added `driveId` property to `FilePickerFileProps` interface.
296
+
297
+ ## 1.11.3 - 2024-11-05
298
+
299
+ - Added `fileName` property to `FilePickerFileProps` interface.
300
+
301
+ ## 1.11.2 - 2024-10-21
302
+
303
+ - Added optional `objectId` property to the `ICPersona` interface.
304
+
305
+ ## 1.11.1 - 2024-10-17
306
+
307
+ - Made `buddy` property of type `WidgetBuddyContext` optional.
308
+
309
+ ## 1.11.0 - 2024-10-17
310
+
311
+ - Added `renderBuddy` function to the `BaseWidget` class, to support rendering widgets as a buddy.
312
+ - Added `buddy` property of type `WidgetBuddyContext` to the `WidgetContext` interface, to support utility functions specifically for a widget buddy.
313
+ - Added `setBadgeProperties` function to the `WidgetBuddyContext` interface, to allow rendering a badge on top of the buddy.
314
+
315
+ ## 1.10.8 - 2024-10-15
316
+
317
+ - Added `buddybar` to the `BoardType` type, to support widgets that run in the scope of the upcoming buddy bar feature
318
+
319
+ ## 1.10.7 - 2024-08-20
320
+
321
+ - Replaced `onInit` function with a new asynchronous `init` function in the `BaseWidget` class, to allow waiting until initialization is complete.
322
+
323
+ ## 1.10.6 - 2024-08-19
324
+
325
+ - Added `userDisplayName` property to the `WidgetContext` interface, to allow using the currently signed-in user's display name in widgets.
326
+
327
+ ## 1.10.5 - 2024-08-07
328
+
329
+ - Added `onSearch` property to the `CommandBarSearchItem` interface, to allow executing a callback when the user presses enter in the search box.
330
+
331
+ ## 1.10.4 - 2024-07-23
332
+
333
+ - Added `SearchBar` value to the `CommandBarItemType` enum, to allow rendering a command bar item as a search bar.
334
+ - Added `CommandBarSearchItem` interface, to allow passing extra search-related props to a CommandBarItem of type `SearchBar`.
335
+ - Added optional `overflowButtonIconName` and `overflowButtonTooltip` properties to the `CommandBarTabOptions` interface, to allow customization of the overflow menu button.
336
+ - Added optional `itemCount` property to the `CommandBarTab` interface.
337
+ - Added summaries to functions and interfaces related to widget command bar tabs.
338
+
339
+ ## 1.10.3 - 2024-07-22
340
+
341
+ - Added override in package.json to use version `2.3.7` instead of `2.3.6` of `requirejs` because the latter has vulnerability CVE-2024-38999
342
+
343
+ ## 1.10.2 - 2024-07-19
344
+
345
+ - Added `registerTabs` function to the `WidgetInstanceContext` interface, to allow rendering of tabs in the widget header.
346
+ - Added `setSelectedTab` function to the `WidgetInstanceContext` interface, to allow setting the current selected tab in the widget header.
347
+ - Added `CommandBarTab` interface.
348
+ - Added `CommandBarTabOptions` interface.
349
+
350
+ ## 1.10.1 - 2024-07-08
351
+
352
+ - Added `widget-administrator` role to the `UserRole` type.
353
+
354
+ ## 1.10.0 - 2024-06-25
355
+
356
+ - Added optional `updateDataAccess()` function to the `BaseWidget` class, used to update access to widget-specific data.
357
+ - Added `administrators` property to the `WidgetVariantContext` interface.
358
+
359
+ ## 1.9.14 - 2024-06-18
360
+
361
+ - Change import of `SPFI` type to decrease bundle sizes in widgets.
362
+
363
+ ## 1.9.13 - 2024-06-18
364
+
365
+ - Added `spHttpClient` property to `WidgetContext` interface, to perform REST calls against SharePoint.
366
+ - Added `spHttpClientConfiguration` property to `WidgetContext` interface.
367
+
368
+ ## 1.9.12 - 2024-06-17
369
+
370
+ - Added `sp` property to `WidgetContext` interface, to allow using a centralized PnPjs version across all widgets.
371
+ - Added `siteId` property to `WidgetContext` interface.
372
+ - Added `boardsInstanceId` property to `WidgetContext` interface.
373
+
374
+ ## 1.9.11 - 2024-06-14
375
+
376
+ - Fixed handling of null `ICPersonaType` values in `isCurrentUserInScope` function of `UserHelper` class.
377
+
378
+ ## 1.9.10 - 2024-06-04
379
+
380
+ - Renamed `CustomCommandBarItemProps` interface to `CommandBarItemProps`.
381
+ - Merged `CommandBarIcon`, `CommandBarLink` and `CommandBarItemBase` interfaces into the `CommandBarItemProps` interface, to simplify adding custom command bar items.
382
+ - Added `Overflow` type to `CommandBarItemType` enum, to allow rendering an item inside the overflow menu.
383
+ - Added `highlighted` property to the `CommandBarItemProps` interface, to allow rendering an item as if it is being hovered.
384
+ - Added `cursor` property to the `CommandBarItemProps` interface, to allow a different cursor when hovering over an item.
385
+ - Added `disabled` property to the `CommandBarItemProps` interface, to allow rendering an item in a disabled state.
386
+
387
+ ## 1.9.9 - 2024-05-14
388
+
389
+ - Changed return type of `createDeepLink` function of the WidgetInstanceContext interface from `void` to `string`.
390
+
391
+ ## 1.9.8 - 2024-05-13
392
+
393
+ - Added `createDeepLink` property to the WidgetInstanceContext interface, to allow creating a deep link URL based on the current board and a widget instance.
394
+ - Added `setDeepLinkData` property to the WidgetInstanceContext interface, to allow setting deep link data related to a widget instance in the URL of the current page.
395
+ - Added `getDeepLinkData` property to the WidgetInstanceContext interface, to allow getting deep link data related to a widget instance from the URL of the current page.
396
+
397
+ ## 1.9.7 - 2024-04-19
398
+
399
+ - Added `hideSpHubNav` property to the IFrameDialogOptions interface, to allow hiding the Hub navigation on SharePoint sites.
400
+ - Added `hideSpSiteHeader` property to the IFrameDialogOptions interface, to allow hiding the site header on SharePoint sites.
401
+ - Added `showHistoryButtons` property to the IFrameDialogOptions interface, to render back and forward buttons, allowing the user to navigate the browser history.
402
+ - Added `showOpenInNewWindow` property to the IFrameDialogOptions interface, to render an 'open in new window' button, allowing the user to open the iframe url in a new browser window.
403
+
404
+ ## 1.9.6 - 2024-04-19
405
+
406
+ - Changed `onRenderHeaderIcon` property of the IFrameDialogOptions interface, to work similarly to the widget render functions.
407
+
408
+ ## 1.9.5 - 2024-04-18
409
+
410
+ - Added `title` property to the IFrameDialogOptions interface, to allow rendering a title in the dialog header.
411
+ - Added `titleUrl` property to the IFrameDialogOptions interface, to allow making the dialog header title clickable.
412
+ - Added `onRenderHeaderIcon` property to the IFrameDialogOptions interface, to allow rendering an icon in the dialog header.
413
+ - Added `onLoad` property to the IFrameDialogOptions interface, to support executing some code after the iframe finishes loading.
414
+
415
+ ## 1.9.4 - 2024-04-11
416
+
417
+ - Reintroduced the following types: `AadHttpClient`,`AadHttpClientConfiguration`,`AadHttpClientFactory`,`AadHttpClientResponse`, `AadTokenProvider`, `AadTokenProviderFactory`
418
+
419
+ ## 1.9.2 - 2024-03-21
420
+
421
+ - Added `CommandBarIcon` interface, to allow rendering a `CustomCommandBarItem` as a single icon or an icon button.
422
+ - Added `CommandBarLink` interface, to allow rendering a `CustomCommandBarItem` as a clickable link.
423
+ - Added `CommandBarItemBase` interface, to act as a base for different types of `CustomCommandBarItem`.
424
+ - Added `elementBorderRadius` property to the `WidgetContext` interface, to allow styling widgets according to the configured design preferences.
425
+ - Changed `CustomCommandBarItemProps` type to accept either a `CommandBarIcon` or a `CommandBarLink`.
426
+
427
+ ## 1.9.1 - 2023-10-20
428
+
429
+ - Added `WidgetInstanceContext` interface, to allow typing the `instance` property of the `WidgetContext` interface.
430
+ - Added `WidgetVariantContext` interface, to allow typing the `definition` property of the `WidgetContext` interface.
431
+ - Added `WidgetManifestContext` interface, to allow typing the `manifest` property of the `WidgetContext` interface.
432
+
433
+ ## 1.9.0 - 2023-10-20
434
+
435
+ - Added optional `importData()` function to the `BaseWidget` class, used to import widget-specific data.
436
+ - Added optional `exportData()` function to the `BaseWidget` class, used to export widget-specific data.
437
+ - Added new exported `ExportData` type.
438
+
439
+ ## 1.8.17 - 2023-10-09
440
+
441
+ - Added `iconName` property to the `definition` object of the `WidgetContext` interface, to support using an icon to represent a widget.
442
+
443
+ ## 1.8.16 - 2023-09-26
444
+
445
+ - Added `Custom` value to `ICPersonaType` enum, to support a custom ICPersona.
446
+
447
+ ## 1.8.15 - 2023-09-01
448
+
449
+ - Added `thumbnailUrl` property to `WidgetManifestConfig` interface, as a non-translatable substitute of the newly deprecated `preview_small` property from `WidgetImages` interface.
450
+ - Removed the deprecated `preview_small` property from `WidgetImages` interface.
451
+
452
+ ## 1.8.14 - 2023-09-01
453
+
454
+ - Added `iconName` property to `WidgetManifestConfig` interface, to support using an icon to represent a widget, e.g. in the widget library or widget header.
455
+ - Removed the deprecated `notificationIcon` property from `WidgetManifestConfig` interface.
456
+
457
+ ## 1.8.13 - 2023-06-08
458
+
459
+ - Removed the deprecated `resolved` property from `ICPersona` interface
460
+
461
+ ## 1.8.12 - 2023-04-04
462
+
463
+ - Changed `openFilePicker` function to return more details of the picked file in the shape of `FilePickerFileProps`
464
+
465
+ ## 1.8.11 - 2023-04-03
466
+
467
+ - Changed `openFilePicker` function to return more details of the picked file in the shape of `FilePickerFileProps`
468
+
469
+ ## 1.8.10 - 2023-03-30
470
+
471
+ - Changed `openFilePicker` function to accept `options`, to support configuration of picker behavior
472
+
473
+ ## 1.8.9 - 2023-03-06
474
+
475
+ - Added `registerCustomCommandBarItems` function to the `instance` object of the `WidgetContext` interface, to support multiple custom buttons in the widget header.
476
+ - Added `unregisterCustomCommandBarItems` function to the `instance` object of the `WidgetContext` interface, to support removing all custom buttons in the widget header.
477
+ - Added optional `id` property to exported `CustomCommandBarItemProps` type, to support removing a custom command bar item by id.
478
+ - Added optional `pinned` property to exported `CustomCommandBarItemProps` type, to support forcing the widget header to always be visible.
479
+ - Added optional `showNotificationBadge` property to exported `CustomCommandBarItemProps` type, to support showing a red notification badge over the custom command bar item.
480
+ - Added optional `order` property to exported `CustomCommandBarItemProps` type, to support changing the order of custom command bar items.
481
+ - Changed `unregisterCustomCommandBarItem` function of the `instance` object of the `WidgetContext` interface, to support removing a custom command bar item by id.
482
+
483
+ ## 1.8.8 - 2023-02-16
484
+
485
+ - Removed all SharePoint and Teams dependencies.
486
+
487
+ ## 1.8.7 - 2022-12-13
488
+
489
+ - Added `userRoles` property to the `WidgetContext` interface, to inform widgets of the roles of the current user.
490
+ - Added new exported `UserRole` type.
491
+
492
+ ## 1.8.6 - 2022-12-08
493
+
494
+ - Added `boardType` property to the `instance` object of the `WidgetContext` interface, to inform widgets of the type of their board.
495
+ - Added `allowedBoardTypes` property to the `definition` object of the `WidgetContext` interface, to inform widget variants of the types of boards it is allowed to be added to.
496
+ - Added new exported `BoardType` type.
497
+
498
+ ## 1.8.5 - 2022-09-30
499
+
500
+ - Added `setWidgetTitleSuffix()` function to the `instance` object of the `WidgetContext` interface, to support appending the title of the widget with additional text.
501
+ - Added `setWidgetSubtitle()` function to the `instance` object of the `WidgetContext` interface, to support overriding the subtitle of the widget.
502
+ - Added `setUserConfigButtonVisibilty()` function to the `instance` object of the `WidgetContext` interface, to support hiding the settings button from the widget header.
503
+ - Fixed spelling of `setWidgetHeaderVisibilty()` function. The function is now called `setWidgetHeaderVisibility()`.
504
+
505
+ ## 1.8.4 - 2022-09-05
506
+
507
+ - Added `openIFrameDialog()` function to the `WidgetContext` interface. This has the same functionality as the `openUrlInDialog()` function of the `instance` object, but adds more control over the dimensions of the dialog. The function `openUrlInDialog()` is now deprecated.
508
+
509
+ ## 1.8.3 - 2022-08-16
510
+
511
+ - Added `openFilePicker()` function to the `WidgetContext` interface to support file selection from within a widget.
512
+
513
+ ## 1.8.2 - 2022-07-06
514
+
515
+ - Added `subtitle` property to the `WidgetResource` interface.
516
+
517
+ ## 1.8.1 - 2022-06-17
518
+
519
+ - Added new section `analytics` to `WidgetManifestConfig` interface to allow definition of time-based events that can be raised by a widget.
520
+ - Added `raiseEvent(...)` to the `instance` object of the `WidgetContent` interface, allowing widgets to raise an event.
521
+
522
+ ## 1.7.11 - 2022-03-23
523
+
524
+ - Added `setWidgetHeaderVisibilty()` function to the `instance` object of the `WidgetContext` interface, allowing widgets to render in full height.
525
+
526
+ ## 1.7.9 - 2022-01-20
527
+
528
+ - Added `userAccountCreated` date/time to the `WidgetContext` interface.
529
+
530
+ ## 1.7.8 - 2022-01-18
531
+
532
+ ### Changed
533
+
534
+ - Added `initiateWidgetDeletion()` function to the `WidgetContext` interface.
535
+
536
+ ## 1.7.7 - 2022-01-14
537
+
538
+ ### Changed
539
+
540
+ - Added `tenantId` property to the `WidgetContext` interface.
541
+
542
+ ## 1.7.6 - 2021-11-04
543
+
544
+ ### Changed
545
+
546
+ - Added `theme` property to the `WidgetContext` interface to give access to currently applied theme.
547
+
548
+ ## 1.7.5 - 2021-10-26
549
+
550
+ ### Changed
551
+
552
+ - Added `userSecurityGroups` and `userSharePointGroups` properties to the `WidgetContext` interface to inform widgets of SharePoint and security group memberships of the current user.
553
+
554
+ ## 1.7.4 - 2021-10-20
555
+
556
+ ### Changed
557
+
558
+ - Added `contentLanguages` property to the `WidgetContext` interface to inform widgets of the available content languages as configured in Ichicraft Boards.
559
+
560
+ ## 1.7.3 - 2021-10-04
561
+
562
+ ### Changed
563
+
564
+ - Added `manifestVersion` property to the `WidgetManifestConfig` interface to support multiple versions of the manifest. Current version is 2 which introduced this and the `externals` property.
565
+ - Added `externals` property to the `WidgetManifestConfig` interface to support libraries that can be loaded separately from the widget bundle. This reduces widget bundle size and improves overal performance of Ichicraft Boards.
566
+
567
+ ## 1.6.1 - 2021-02-18
568
+
569
+ ### Changed
570
+
571
+ - Added `userEmail` property to the `WidgetContext` interface to provide current user's email address to widgets.
572
+
573
+ ## 1.5.0 - 2021-02-16
574
+
575
+ ### Changed
576
+
577
+ - Added `teamsSdk` property to the `WidgetContext` interface to allow interaction with Teams in case widget board is running in Teams client. Will be `undefined` if running in SharePoint.
578
+
579
+ ## 1.4.0 - 2021-01-25
580
+
581
+ ### Changed
582
+
583
+ - Added several properties to the `WidgetContext` interface to identify the context in which the widget is shown (e.g. Team Browser hosted)
584
+
585
+ ## 1.3.0 - 2021-01-15
586
+
587
+ ### Changed
588
+
589
+ - `registerCustomCommandBarItem()` is added to the `WidgetContext` interface as a function to call from within a widget instance to render an additional command bar item in the widget header.
590
+ - `unregisterCustomCommandBarItem()` is added to the `WidgetContext` interface as a function to call from within a widget instance to remove a previously added command bar item from the widget header.
591
+
592
+ ## 1.2.0 - 2021-01-15
593
+
594
+ ### Changed
595
+
596
+ - `loadScript()` is added to the `WidgetContext` interface as a function to call from within a widget in case an external script needs to be loaded. This allows the widget board to load external javascript.
597
+
598
+ ## 1.1.0 - 2021-01-11
599
+
600
+ ### Changed
601
+
602
+ - `handleFatalError()` is added to the `WidgetContext` interface as a function to call from within a widget in case of an unhandled/unresolvable error. This allows the widget board to handle this situation gracefully.
603
+ - **deps:** removed dependency ajv
604
+
605
+ ## <= 1.0.5 - 2020-12-07
606
+
607
+ No changelog was maintained for the earlier versions.