@ichicraft/widgets-widget-base 1.11.5 → 1.11.6

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,330 +1,337 @@
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 Ichicraft Boards._
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.11.5 - 2025-01-21
13
-
14
- - Added `defaultColor` property to `WidgetBuddyContext` interface.
15
-
16
- ## 1.11.4 - 2024-11-08
17
-
18
- - Added `driveId` property to `FilePickerFileProps` interface.
19
-
20
- ## 1.11.3 - 2024-11-05
21
-
22
- - Added `fileName` property to `FilePickerFileProps` interface.
23
-
24
- ## 1.11.2 - 2024-10-21
25
-
26
- - Added optional `objectId` property to the `ICPersona` interface.
27
-
28
- ## 1.11.1 - 2024-10-17
29
-
30
- - Made `buddy` property of type `WidgetBuddyContext` optional.
31
-
32
- ## 1.11.0 - 2024-10-17
33
-
34
- - Added `renderBuddy` function to the `BaseWidget` class, to support rendering widgets as a buddy.
35
- - Added `buddy` property of type `WidgetBuddyContext` to the `WidgetContext` interface, to support utility functions specifically for a widget buddy.
36
- - Added `setBadgeProperties` function to the `WidgetBuddyContext` interface, to allow rendering a badge on top of the buddy.
37
-
38
- ## 1.10.8 - 2024-10-15
39
-
40
- - Added `buddybar` to the `BoardType` type, to support widgets that run in the scope of the upcoming buddy bar feature
41
-
42
- ## 1.10.7 - 2024-08-20
43
-
44
- - Replaced `onInit` function with a new asynchronous `init` function in the `BaseWidget` class, to allow waiting until initialization is complete.
45
-
46
- ## 1.10.6 - 2024-08-19
47
-
48
- - Added `userDisplayName` property to the `WidgetContext` interface, to allow using the currently signed-in user's display name in widgets.
49
-
50
- ## 1.10.5 - 2024-08-07
51
-
52
- - Added `onSearch` property to the `CommandBarSearchItem` interface, to allow executing a callback when the user presses enter in the search box.
53
-
54
- ## 1.10.4 - 2024-07-23
55
-
56
- - Added `SearchBar` value to the `CommandBarItemType` enum, to allow rendering a command bar item as a search bar.
57
- - Added `CommandBarSearchItem` interface, to allow passing extra search-related props to a CommandBarItem of type `SearchBar`.
58
- - Added optional `overflowButtonIconName` and `overflowButtonTooltip` properties to the `CommandBarTabOptions` interface, to allow customization of the overflow menu button.
59
- - Added optional `itemCount` property to the `CommandBarTab` interface.
60
- - Added summaries to functions and interfaces related to widget command bar tabs.
61
-
62
- ## 1.10.3 - 2024-07-22
63
-
64
- - 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
65
-
66
- ## 1.10.2 - 2024-07-19
67
-
68
- - Added `registerTabs` function to the `WidgetInstanceContext` interface, to allow rendering of tabs in the widget header.
69
- - Added `setSelectedTab` function to the `WidgetInstanceContext` interface, to allow setting the current selected tab in the widget header.
70
- - Added `CommandBarTab` interface.
71
- - Added `CommandBarTabOptions` interface.
72
-
73
- ## 1.10.1 - 2024-07-08
74
-
75
- - Added `widget-administrator` role to the `UserRole` type.
76
-
77
- ## 1.10.0 - 2024-06-25
78
-
79
- - Added optional `updateDataAccess()` function to the `BaseWidget` class, used to update access to widget-specific data.
80
- - Added `administrators` property to the `WidgetVariantContext` interface.
81
-
82
- ## 1.9.14 - 2024-06-18
83
-
84
- - Change import of `SPFI` type to decrease bundle sizes in widgets.
85
-
86
- ## 1.9.13 - 2024-06-18
87
-
88
- - Added `spHttpClient` property to `WidgetContext` interface, to perform REST calls against SharePoint.
89
- - Added `spHttpClientConfiguration` property to `WidgetContext` interface.
90
-
91
- ## 1.9.12 - 2024-06-17
92
-
93
- - Added `sp` property to `WidgetContext` interface, to allow using a centralized PnPjs version across all widgets.
94
- - Added `siteId` property to `WidgetContext` interface.
95
- - Added `boardsInstanceId` property to `WidgetContext` interface.
96
-
97
- ## 1.9.11 - 2024-06-14
98
-
99
- - Fixed handling of null `ICPersonaType` values in `isCurrentUserInScope` function of `UserHelper` class.
100
-
101
- ## 1.9.10 - 2024-06-04
102
-
103
- - Renamed `CustomCommandBarItemProps` interface to `CommandBarItemProps`.
104
- - Merged `CommandBarIcon`, `CommandBarLink` and `CommandBarItemBase` interfaces into the `CommandBarItemProps` interface, to simplify adding custom command bar items.
105
- - Added `Overflow` type to `CommandBarItemType` enum, to allow rendering an item inside the overflow menu.
106
- - Added `highlighted` property to the `CommandBarItemProps` interface, to allow rendering an item as if it is being hovered.
107
- - Added `cursor` property to the `CommandBarItemProps` interface, to allow a different cursor when hovering over an item.
108
- - Added `disabled` property to the `CommandBarItemProps` interface, to allow rendering an item in a disabled state.
109
-
110
- ## 1.9.9 - 2024-05-14
111
-
112
- - Changed return type of `createDeepLink` function of the WidgetInstanceContext interface from `void` to `string`.
113
-
114
- ## 1.9.8 - 2024-05-13
115
-
116
- - Added `createDeepLink` property to the WidgetInstanceContext interface, to allow creating a deep link URL based on the current board and a widget instance.
117
- - 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.
118
- - 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.
119
-
120
- ## 1.9.7 - 2024-04-19
121
-
122
- - Added `hideSpHubNav` property to the IFrameDialogOptions interface, to allow hiding the Hub navigation on SharePoint sites.
123
- - Added `hideSpSiteHeader` property to the IFrameDialogOptions interface, to allow hiding the site header on SharePoint sites.
124
- - Added `showHistoryButtons` property to the IFrameDialogOptions interface, to render back and forward buttons, allowing the user to navigate the browser history.
125
- - 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.
126
-
127
- ## 1.9.6 - 2024-04-19
128
-
129
- - Changed `onRenderHeaderIcon` property of the IFrameDialogOptions interface, to work similarly to the widget render functions.
130
-
131
- ## 1.9.5 - 2024-04-18
132
-
133
- - Added `title` property to the IFrameDialogOptions interface, to allow rendering a title in the dialog header.
134
- - Added `titleUrl` property to the IFrameDialogOptions interface, to allow making the dialog header title clickable.
135
- - Added `onRenderHeaderIcon` property to the IFrameDialogOptions interface, to allow rendering an icon in the dialog header.
136
- - Added `onLoad` property to the IFrameDialogOptions interface, to support executing some code after the iframe finishes loading.
137
-
138
- ## 1.9.4 - 2024-04-11
139
-
140
- - Reintroduced the following types: `AadHttpClient`,`AadHttpClientConfiguration`,`AadHttpClientFactory`,`AadHttpClientResponse`, `AadTokenProvider`, `AadTokenProviderFactory`
141
-
142
- ## 1.9.2 - 2024-03-21
143
-
144
- - Added `CommandBarIcon` interface, to allow rendering a `CustomCommandBarItem` as a single icon or an icon button.
145
- - Added `CommandBarLink` interface, to allow rendering a `CustomCommandBarItem` as a clickable link.
146
- - Added `CommandBarItemBase` interface, to act as a base for different types of `CustomCommandBarItem`.
147
- - Added `elementBorderRadius` property to the `WidgetContext` interface, to allow styling widgets according to the configured design preferences.
148
- - Changed `CustomCommandBarItemProps` type to accept either a `CommandBarIcon` or a `CommandBarLink`.
149
-
150
- ## 1.9.1 - 2023-10-20
151
-
152
- - Added `WidgetInstanceContext` interface, to allow typing the `instance` property of the `WidgetContext` interface.
153
- - Added `WidgetVariantContext` interface, to allow typing the `definition` property of the `WidgetContext` interface.
154
- - Added `WidgetManifestContext` interface, to allow typing the `manifest` property of the `WidgetContext` interface.
155
-
156
- ## 1.9.0 - 2023-10-20
157
-
158
- - Added optional `importData()` function to the `BaseWidget` class, used to import widget-specific data.
159
- - Added optional `exportData()` function to the `BaseWidget` class, used to export widget-specific data.
160
- - Added new exported `ExportData` type.
161
-
162
- ## 1.8.17 - 2023-10-09
163
-
164
- - Added `iconName` property to the `definition` object of the `WidgetContext` interface, to support using an icon to represent a widget.
165
-
166
- ## 1.8.16 - 2023-09-26
167
-
168
- - Added `Custom` value to `ICPersonaType` enum, to support a custom ICPersona.
169
-
170
- ## 1.8.15 - 2023-09-01
171
-
172
- - Added `thumbnailUrl` property to `WidgetManifestConfig` interface, as a non-translatable substitute of the newly deprecated `preview_small` property from `WidgetImages` interface.
173
- - Removed the deprecated `preview_small` property from `WidgetImages` interface.
174
-
175
- ## 1.8.14 - 2023-09-01
176
-
177
- - Added `iconName` property to `WidgetManifestConfig` interface, to support using an icon to represent a widget, e.g. in the widget library or widget header.
178
- - Removed the deprecated `notificationIcon` property from `WidgetManifestConfig` interface.
179
-
180
- ## 1.8.13 - 2023-06-08
181
-
182
- - Removed the deprecated `resolved` property from `ICPersona` interface
183
-
184
- ## 1.8.12 - 2023-04-04
185
-
186
- - Changed `openFilePicker` function to return more details of the picked file in the shape of `FilePickerFileProps`
187
-
188
- ## 1.8.11 - 2023-04-03
189
-
190
- - Changed `openFilePicker` function to return more details of the picked file in the shape of `FilePickerFileProps`
191
-
192
- ## 1.8.10 - 2023-03-30
193
-
194
- - Changed `openFilePicker` function to accept `options`, to support configuration of picker behavior
195
-
196
- ## 1.8.9 - 2023-03-06
197
-
198
- - Added `registerCustomCommandBarItems` function to the `instance` object of the `WidgetContext` interface, to support multiple custom buttons in the widget header.
199
- - Added `unregisterCustomCommandBarItems` function to the `instance` object of the `WidgetContext` interface, to support removing all custom buttons in the widget header.
200
- - Added optional `id` property to exported `CustomCommandBarItemProps` type, to support removing a custom command bar item by id.
201
- - Added optional `pinned` property to exported `CustomCommandBarItemProps` type, to support forcing the widget header to always be visible.
202
- - Added optional `showNotificationBadge` property to exported `CustomCommandBarItemProps` type, to support showing a red notification badge over the custom command bar item.
203
- - Added optional `order` property to exported `CustomCommandBarItemProps` type, to support changing the order of custom command bar items.
204
- - Changed `unregisterCustomCommandBarItem` function of the `instance` object of the `WidgetContext` interface, to support removing a custom command bar item by id.
205
-
206
- ## 1.8.8 - 2023-02-16
207
-
208
- - Removed all SharePoint and Teams dependencies.
209
-
210
- ## 1.8.7 - 2022-12-13
211
-
212
- - Added `userRoles` property to the `WidgetContext` interface, to inform widgets of the roles of the current user.
213
- - Added new exported `UserRole` type.
214
-
215
- ## 1.8.6 - 2022-12-08
216
-
217
- - Added `boardType` property to the `instance` object of the `WidgetContext` interface, to inform widgets of the type of their board.
218
- - 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.
219
- - Added new exported `BoardType` type.
220
-
221
- ## 1.8.5 - 2022-09-30
222
-
223
- - Added `setWidgetTitleSuffix()` function to the `instance` object of the `WidgetContext` interface, to support appending the title of the widget with additional text.
224
- - Added `setWidgetSubtitle()` function to the `instance` object of the `WidgetContext` interface, to support overriding the subtitle of the widget.
225
- - Added `setUserConfigButtonVisibilty()` function to the `instance` object of the `WidgetContext` interface, to support hiding the settings button from the widget header.
226
- - Fixed spelling of `setWidgetHeaderVisibilty()` function. The function is now called `setWidgetHeaderVisibility()`.
227
-
228
- ## 1.8.4 - 2022-09-05
229
-
230
- - 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.
231
-
232
- ## 1.8.3 - 2022-08-16
233
-
234
- - Added `openFilePicker()` function to the `WidgetContext` interface to support file selection from within a widget.
235
-
236
- ## 1.8.2 - 2022-07-06
237
-
238
- - Added `subtitle` property to the `WidgetResource` interface.
239
-
240
- ## 1.8.1 - 2022-06-17
241
-
242
- - Added new section `analytics` to `WidgetManifestConfig` interface to allow definition of time-based events that can be raised by a widget.
243
- - Added `raiseEvent(...)` to the `instance` object of the `WidgetContent` interface, allowing widgets to raise an event.
244
-
245
- ## 1.7.11 - 2022-03-23
246
-
247
- - Added `setWidgetHeaderVisibilty()` function to the `instance` object of the `WidgetContext` interface, allowing widgets to render in full height.
248
-
249
- ## 1.7.9 - 2022-01-20
250
-
251
- - Added `userAccountCreated` date/time to the `WidgetContext` interface.
252
-
253
- ## 1.7.8 - 2022-01-18
254
-
255
- ### Changed
256
-
257
- - Added `initiateWidgetDeletion()` function to the `WidgetContext` interface.
258
-
259
- ## 1.7.7 - 2022-01-14
260
-
261
- ### Changed
262
-
263
- - Added `tenantId` property to the `WidgetContext` interface.
264
-
265
- ## 1.7.6 - 2021-11-04
266
-
267
- ### Changed
268
-
269
- - Added `theme` property to the `WidgetContext` interface to give access to currently applied theme.
270
-
271
- ## 1.7.5 - 2021-10-26
272
-
273
- ### Changed
274
-
275
- - Added `userSecurityGroups` and `userSharePointGroups` properties to the `WidgetContext` interface to inform widgets of SharePoint and security group memberships of the current user.
276
-
277
- ## 1.7.4 - 2021-10-20
278
-
279
- ### Changed
280
-
281
- - Added `contentLanguages` property to the `WidgetContext` interface to inform widgets of the available content languages as configured in Ichicraft Boards.
282
-
283
- ## 1.7.3 - 2021-10-04
284
-
285
- ### Changed
286
-
287
- - 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.
288
- - 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.
289
-
290
- ## 1.6.1 - 2021-02-18
291
-
292
- ### Changed
293
-
294
- - Added `userEmail` property to the `WidgetContext` interface to provide current user's email address to widgets.
295
-
296
- ## 1.5.0 - 2021-02-16
297
-
298
- ### Changed
299
-
300
- - 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.
301
-
302
- ## 1.4.0 - 2021-01-25
303
-
304
- ### Changed
305
-
306
- - Added several properties to the `WidgetContext` interface to identify the context in which the widget is shown (e.g. Team Browser hosted)
307
-
308
- ## 1.3.0 - 2021-01-15
309
-
310
- ### Changed
311
-
312
- - `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.
313
- - `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.
314
-
315
- ## 1.2.0 - 2021-01-15
316
-
317
- ### Changed
318
-
319
- - `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.
320
-
321
- ## 1.1.0 - 2021-01-11
322
-
323
- ### Changed
324
-
325
- - `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.
326
- - **deps:** removed dependency ajv
327
-
328
- ## <= 1.0.5 - 2020-12-07
329
-
330
- 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 Ichicraft Boards._
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.11.6 - 2025-01-30
13
+
14
+ - Added `spServiceScope` property to `WidgetContext` interface.
15
+ - Added `loadComponentById` function to `WidgetContext` interface.
16
+ - Deprecated `definition` property which is replaced by `variant` property in `WidgetContext` interface.
17
+ - Deprecated `instance.publishNotification` function in `WidgetContext` interface because feature is no longer available.
18
+
19
+ ## 1.11.5 - 2025-01-21
20
+
21
+ - Added `defaultColor` property to `WidgetBuddyContext` interface.
22
+
23
+ ## 1.11.4 - 2024-11-08
24
+
25
+ - Added `driveId` property to `FilePickerFileProps` interface.
26
+
27
+ ## 1.11.3 - 2024-11-05
28
+
29
+ - Added `fileName` property to `FilePickerFileProps` interface.
30
+
31
+ ## 1.11.2 - 2024-10-21
32
+
33
+ - Added optional `objectId` property to the `ICPersona` interface.
34
+
35
+ ## 1.11.1 - 2024-10-17
36
+
37
+ - Made `buddy` property of type `WidgetBuddyContext` optional.
38
+
39
+ ## 1.11.0 - 2024-10-17
40
+
41
+ - Added `renderBuddy` function to the `BaseWidget` class, to support rendering widgets as a buddy.
42
+ - Added `buddy` property of type `WidgetBuddyContext` to the `WidgetContext` interface, to support utility functions specifically for a widget buddy.
43
+ - Added `setBadgeProperties` function to the `WidgetBuddyContext` interface, to allow rendering a badge on top of the buddy.
44
+
45
+ ## 1.10.8 - 2024-10-15
46
+
47
+ - Added `buddybar` to the `BoardType` type, to support widgets that run in the scope of the upcoming buddy bar feature
48
+
49
+ ## 1.10.7 - 2024-08-20
50
+
51
+ - Replaced `onInit` function with a new asynchronous `init` function in the `BaseWidget` class, to allow waiting until initialization is complete.
52
+
53
+ ## 1.10.6 - 2024-08-19
54
+
55
+ - Added `userDisplayName` property to the `WidgetContext` interface, to allow using the currently signed-in user's display name in widgets.
56
+
57
+ ## 1.10.5 - 2024-08-07
58
+
59
+ - Added `onSearch` property to the `CommandBarSearchItem` interface, to allow executing a callback when the user presses enter in the search box.
60
+
61
+ ## 1.10.4 - 2024-07-23
62
+
63
+ - Added `SearchBar` value to the `CommandBarItemType` enum, to allow rendering a command bar item as a search bar.
64
+ - Added `CommandBarSearchItem` interface, to allow passing extra search-related props to a CommandBarItem of type `SearchBar`.
65
+ - Added optional `overflowButtonIconName` and `overflowButtonTooltip` properties to the `CommandBarTabOptions` interface, to allow customization of the overflow menu button.
66
+ - Added optional `itemCount` property to the `CommandBarTab` interface.
67
+ - Added summaries to functions and interfaces related to widget command bar tabs.
68
+
69
+ ## 1.10.3 - 2024-07-22
70
+
71
+ - 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
72
+
73
+ ## 1.10.2 - 2024-07-19
74
+
75
+ - Added `registerTabs` function to the `WidgetInstanceContext` interface, to allow rendering of tabs in the widget header.
76
+ - Added `setSelectedTab` function to the `WidgetInstanceContext` interface, to allow setting the current selected tab in the widget header.
77
+ - Added `CommandBarTab` interface.
78
+ - Added `CommandBarTabOptions` interface.
79
+
80
+ ## 1.10.1 - 2024-07-08
81
+
82
+ - Added `widget-administrator` role to the `UserRole` type.
83
+
84
+ ## 1.10.0 - 2024-06-25
85
+
86
+ - Added optional `updateDataAccess()` function to the `BaseWidget` class, used to update access to widget-specific data.
87
+ - Added `administrators` property to the `WidgetVariantContext` interface.
88
+
89
+ ## 1.9.14 - 2024-06-18
90
+
91
+ - Change import of `SPFI` type to decrease bundle sizes in widgets.
92
+
93
+ ## 1.9.13 - 2024-06-18
94
+
95
+ - Added `spHttpClient` property to `WidgetContext` interface, to perform REST calls against SharePoint.
96
+ - Added `spHttpClientConfiguration` property to `WidgetContext` interface.
97
+
98
+ ## 1.9.12 - 2024-06-17
99
+
100
+ - Added `sp` property to `WidgetContext` interface, to allow using a centralized PnPjs version across all widgets.
101
+ - Added `siteId` property to `WidgetContext` interface.
102
+ - Added `boardsInstanceId` property to `WidgetContext` interface.
103
+
104
+ ## 1.9.11 - 2024-06-14
105
+
106
+ - Fixed handling of null `ICPersonaType` values in `isCurrentUserInScope` function of `UserHelper` class.
107
+
108
+ ## 1.9.10 - 2024-06-04
109
+
110
+ - Renamed `CustomCommandBarItemProps` interface to `CommandBarItemProps`.
111
+ - Merged `CommandBarIcon`, `CommandBarLink` and `CommandBarItemBase` interfaces into the `CommandBarItemProps` interface, to simplify adding custom command bar items.
112
+ - Added `Overflow` type to `CommandBarItemType` enum, to allow rendering an item inside the overflow menu.
113
+ - Added `highlighted` property to the `CommandBarItemProps` interface, to allow rendering an item as if it is being hovered.
114
+ - Added `cursor` property to the `CommandBarItemProps` interface, to allow a different cursor when hovering over an item.
115
+ - Added `disabled` property to the `CommandBarItemProps` interface, to allow rendering an item in a disabled state.
116
+
117
+ ## 1.9.9 - 2024-05-14
118
+
119
+ - Changed return type of `createDeepLink` function of the WidgetInstanceContext interface from `void` to `string`.
120
+
121
+ ## 1.9.8 - 2024-05-13
122
+
123
+ - Added `createDeepLink` property to the WidgetInstanceContext interface, to allow creating a deep link URL based on the current board and a widget instance.
124
+ - 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.
125
+ - 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.
126
+
127
+ ## 1.9.7 - 2024-04-19
128
+
129
+ - Added `hideSpHubNav` property to the IFrameDialogOptions interface, to allow hiding the Hub navigation on SharePoint sites.
130
+ - Added `hideSpSiteHeader` property to the IFrameDialogOptions interface, to allow hiding the site header on SharePoint sites.
131
+ - Added `showHistoryButtons` property to the IFrameDialogOptions interface, to render back and forward buttons, allowing the user to navigate the browser history.
132
+ - 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.
133
+
134
+ ## 1.9.6 - 2024-04-19
135
+
136
+ - Changed `onRenderHeaderIcon` property of the IFrameDialogOptions interface, to work similarly to the widget render functions.
137
+
138
+ ## 1.9.5 - 2024-04-18
139
+
140
+ - Added `title` property to the IFrameDialogOptions interface, to allow rendering a title in the dialog header.
141
+ - Added `titleUrl` property to the IFrameDialogOptions interface, to allow making the dialog header title clickable.
142
+ - Added `onRenderHeaderIcon` property to the IFrameDialogOptions interface, to allow rendering an icon in the dialog header.
143
+ - Added `onLoad` property to the IFrameDialogOptions interface, to support executing some code after the iframe finishes loading.
144
+
145
+ ## 1.9.4 - 2024-04-11
146
+
147
+ - Reintroduced the following types: `AadHttpClient`,`AadHttpClientConfiguration`,`AadHttpClientFactory`,`AadHttpClientResponse`, `AadTokenProvider`, `AadTokenProviderFactory`
148
+
149
+ ## 1.9.2 - 2024-03-21
150
+
151
+ - Added `CommandBarIcon` interface, to allow rendering a `CustomCommandBarItem` as a single icon or an icon button.
152
+ - Added `CommandBarLink` interface, to allow rendering a `CustomCommandBarItem` as a clickable link.
153
+ - Added `CommandBarItemBase` interface, to act as a base for different types of `CustomCommandBarItem`.
154
+ - Added `elementBorderRadius` property to the `WidgetContext` interface, to allow styling widgets according to the configured design preferences.
155
+ - Changed `CustomCommandBarItemProps` type to accept either a `CommandBarIcon` or a `CommandBarLink`.
156
+
157
+ ## 1.9.1 - 2023-10-20
158
+
159
+ - Added `WidgetInstanceContext` interface, to allow typing the `instance` property of the `WidgetContext` interface.
160
+ - Added `WidgetVariantContext` interface, to allow typing the `definition` property of the `WidgetContext` interface.
161
+ - Added `WidgetManifestContext` interface, to allow typing the `manifest` property of the `WidgetContext` interface.
162
+
163
+ ## 1.9.0 - 2023-10-20
164
+
165
+ - Added optional `importData()` function to the `BaseWidget` class, used to import widget-specific data.
166
+ - Added optional `exportData()` function to the `BaseWidget` class, used to export widget-specific data.
167
+ - Added new exported `ExportData` type.
168
+
169
+ ## 1.8.17 - 2023-10-09
170
+
171
+ - Added `iconName` property to the `definition` object of the `WidgetContext` interface, to support using an icon to represent a widget.
172
+
173
+ ## 1.8.16 - 2023-09-26
174
+
175
+ - Added `Custom` value to `ICPersonaType` enum, to support a custom ICPersona.
176
+
177
+ ## 1.8.15 - 2023-09-01
178
+
179
+ - Added `thumbnailUrl` property to `WidgetManifestConfig` interface, as a non-translatable substitute of the newly deprecated `preview_small` property from `WidgetImages` interface.
180
+ - Removed the deprecated `preview_small` property from `WidgetImages` interface.
181
+
182
+ ## 1.8.14 - 2023-09-01
183
+
184
+ - Added `iconName` property to `WidgetManifestConfig` interface, to support using an icon to represent a widget, e.g. in the widget library or widget header.
185
+ - Removed the deprecated `notificationIcon` property from `WidgetManifestConfig` interface.
186
+
187
+ ## 1.8.13 - 2023-06-08
188
+
189
+ - Removed the deprecated `resolved` property from `ICPersona` interface
190
+
191
+ ## 1.8.12 - 2023-04-04
192
+
193
+ - Changed `openFilePicker` function to return more details of the picked file in the shape of `FilePickerFileProps`
194
+
195
+ ## 1.8.11 - 2023-04-03
196
+
197
+ - Changed `openFilePicker` function to return more details of the picked file in the shape of `FilePickerFileProps`
198
+
199
+ ## 1.8.10 - 2023-03-30
200
+
201
+ - Changed `openFilePicker` function to accept `options`, to support configuration of picker behavior
202
+
203
+ ## 1.8.9 - 2023-03-06
204
+
205
+ - Added `registerCustomCommandBarItems` function to the `instance` object of the `WidgetContext` interface, to support multiple custom buttons in the widget header.
206
+ - Added `unregisterCustomCommandBarItems` function to the `instance` object of the `WidgetContext` interface, to support removing all custom buttons in the widget header.
207
+ - Added optional `id` property to exported `CustomCommandBarItemProps` type, to support removing a custom command bar item by id.
208
+ - Added optional `pinned` property to exported `CustomCommandBarItemProps` type, to support forcing the widget header to always be visible.
209
+ - Added optional `showNotificationBadge` property to exported `CustomCommandBarItemProps` type, to support showing a red notification badge over the custom command bar item.
210
+ - Added optional `order` property to exported `CustomCommandBarItemProps` type, to support changing the order of custom command bar items.
211
+ - Changed `unregisterCustomCommandBarItem` function of the `instance` object of the `WidgetContext` interface, to support removing a custom command bar item by id.
212
+
213
+ ## 1.8.8 - 2023-02-16
214
+
215
+ - Removed all SharePoint and Teams dependencies.
216
+
217
+ ## 1.8.7 - 2022-12-13
218
+
219
+ - Added `userRoles` property to the `WidgetContext` interface, to inform widgets of the roles of the current user.
220
+ - Added new exported `UserRole` type.
221
+
222
+ ## 1.8.6 - 2022-12-08
223
+
224
+ - Added `boardType` property to the `instance` object of the `WidgetContext` interface, to inform widgets of the type of their board.
225
+ - 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.
226
+ - Added new exported `BoardType` type.
227
+
228
+ ## 1.8.5 - 2022-09-30
229
+
230
+ - Added `setWidgetTitleSuffix()` function to the `instance` object of the `WidgetContext` interface, to support appending the title of the widget with additional text.
231
+ - Added `setWidgetSubtitle()` function to the `instance` object of the `WidgetContext` interface, to support overriding the subtitle of the widget.
232
+ - Added `setUserConfigButtonVisibilty()` function to the `instance` object of the `WidgetContext` interface, to support hiding the settings button from the widget header.
233
+ - Fixed spelling of `setWidgetHeaderVisibilty()` function. The function is now called `setWidgetHeaderVisibility()`.
234
+
235
+ ## 1.8.4 - 2022-09-05
236
+
237
+ - 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.
238
+
239
+ ## 1.8.3 - 2022-08-16
240
+
241
+ - Added `openFilePicker()` function to the `WidgetContext` interface to support file selection from within a widget.
242
+
243
+ ## 1.8.2 - 2022-07-06
244
+
245
+ - Added `subtitle` property to the `WidgetResource` interface.
246
+
247
+ ## 1.8.1 - 2022-06-17
248
+
249
+ - Added new section `analytics` to `WidgetManifestConfig` interface to allow definition of time-based events that can be raised by a widget.
250
+ - Added `raiseEvent(...)` to the `instance` object of the `WidgetContent` interface, allowing widgets to raise an event.
251
+
252
+ ## 1.7.11 - 2022-03-23
253
+
254
+ - Added `setWidgetHeaderVisibilty()` function to the `instance` object of the `WidgetContext` interface, allowing widgets to render in full height.
255
+
256
+ ## 1.7.9 - 2022-01-20
257
+
258
+ - Added `userAccountCreated` date/time to the `WidgetContext` interface.
259
+
260
+ ## 1.7.8 - 2022-01-18
261
+
262
+ ### Changed
263
+
264
+ - Added `initiateWidgetDeletion()` function to the `WidgetContext` interface.
265
+
266
+ ## 1.7.7 - 2022-01-14
267
+
268
+ ### Changed
269
+
270
+ - Added `tenantId` property to the `WidgetContext` interface.
271
+
272
+ ## 1.7.6 - 2021-11-04
273
+
274
+ ### Changed
275
+
276
+ - Added `theme` property to the `WidgetContext` interface to give access to currently applied theme.
277
+
278
+ ## 1.7.5 - 2021-10-26
279
+
280
+ ### Changed
281
+
282
+ - Added `userSecurityGroups` and `userSharePointGroups` properties to the `WidgetContext` interface to inform widgets of SharePoint and security group memberships of the current user.
283
+
284
+ ## 1.7.4 - 2021-10-20
285
+
286
+ ### Changed
287
+
288
+ - Added `contentLanguages` property to the `WidgetContext` interface to inform widgets of the available content languages as configured in Ichicraft Boards.
289
+
290
+ ## 1.7.3 - 2021-10-04
291
+
292
+ ### Changed
293
+
294
+ - 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.
295
+ - 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.
296
+
297
+ ## 1.6.1 - 2021-02-18
298
+
299
+ ### Changed
300
+
301
+ - Added `userEmail` property to the `WidgetContext` interface to provide current user's email address to widgets.
302
+
303
+ ## 1.5.0 - 2021-02-16
304
+
305
+ ### Changed
306
+
307
+ - 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.
308
+
309
+ ## 1.4.0 - 2021-01-25
310
+
311
+ ### Changed
312
+
313
+ - Added several properties to the `WidgetContext` interface to identify the context in which the widget is shown (e.g. Team Browser hosted)
314
+
315
+ ## 1.3.0 - 2021-01-15
316
+
317
+ ### Changed
318
+
319
+ - `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.
320
+ - `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.
321
+
322
+ ## 1.2.0 - 2021-01-15
323
+
324
+ ### Changed
325
+
326
+ - `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.
327
+
328
+ ## 1.1.0 - 2021-01-11
329
+
330
+ ### Changed
331
+
332
+ - `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.
333
+ - **deps:** removed dependency ajv
334
+
335
+ ## <= 1.0.5 - 2020-12-07
336
+
337
+ No changelog was maintained for the earlier versions.
@@ -8,7 +8,7 @@ export interface WidgetContext {
8
8
  /**
9
9
  * Metadata and functions in the context of a widget instance. A widget instance
10
10
  * is a single and specific widget that a user has on their board. It has its own
11
- * unique ID and possibly configuration data if the widget is configurable by the user
11
+ * unique ID and possibly configuration data if the widget is configurable by the user.
12
12
  */
13
13
  instance: WidgetInstanceContext;
14
14
  /**
@@ -17,10 +17,16 @@ export interface WidgetContext {
17
17
  */
18
18
  buddy?: WidgetBuddyContext;
19
19
  /**
20
- * Metadata and functions in the context of a widget's variant (fka definition). A widget variant is
21
- * a widget that's been installed by an administrator from within the board administration.
20
+ * Metadata and functions in the context of a widget's variant (fka 'definition'). A widget variant is
21
+ * a widget that's been installed and possibly configured by an administrator from within the admin center.
22
+ * @deprecated Use `variant` instead
22
23
  */
23
- definition: WidgetVariantContext;
24
+ definition?: WidgetVariantContext;
25
+ /**
26
+ * Metadata and functions in the context of a widget's variant (fka 'definition'). A widget variant is
27
+ * a widget that's been installed and possibly configured by an administrator from within the admin center.
28
+ */
29
+ variant: WidgetVariantContext;
24
30
  /**
25
31
  * Metadata and functions in the context of a widget's manifest. A widget manifest contains
26
32
  * all information of the originally installed widget. Multiple `variants` of the same widget `manifest`
@@ -64,7 +70,8 @@ export interface WidgetContext {
64
70
  */
65
71
  tenantId: string;
66
72
  /**
67
- * ID of current Ichicraft Boards installation. Could either be a Site Collection ID (SP Shell) or a fixed ID (Teams Shell)
73
+ * ID of current Ichicraft Boards installation. Could either be a Site Collection ID (SP Shell)
74
+ * or a fixed ID (Teams Shell)
68
75
  */
69
76
  boardsInstanceId: string;
70
77
  /**
@@ -155,7 +162,8 @@ export interface WidgetContext {
155
162
  */
156
163
  elementBorderRadius: number;
157
164
  /**
158
- * Interacts with the SharePoint REST api, such as fetching/updating sites, lists and users.
165
+ * A multi purpose SharePoint interface that can be used to interact with SharePoint.
166
+ * It's based on the PnPjs library.
159
167
  */
160
168
  sp: SPFI;
161
169
  /**
@@ -166,6 +174,10 @@ export interface WidgetContext {
166
174
  * Provides a set of switches for enabling/disabling various features of the SPHttpClient.
167
175
  */
168
176
  spHttpClientConfiguration: SPHttpClientConfiguration;
177
+ /**
178
+ * SharePoint Service Scope, taken from SPFx WebPart Context. Type is removed to avoid dependency on SPFx.
179
+ */
180
+ spServiceScope?: unknown;
169
181
  /**
170
182
  * MS Graph Client Factory class as provided by the WebPartContext object.
171
183
  */
@@ -214,6 +226,10 @@ export interface WidgetContext {
214
226
  * Functionality offered by the widget board to load a script using SPComponentLoader.
215
227
  */
216
228
  loadScript?: <TModule>(url: string, options?: any) => Promise<TModule>;
229
+ /**
230
+ * Functionality offered by the widget board to load a publicly available SharePoint component using SPComponentLoader.
231
+ */
232
+ loadComponentById?: <TComponent>(id: string, version?: string) => Promise<TComponent>;
217
233
  /**
218
234
  * Functionality offered by the widget board to open a File Picker panel to select files.
219
235
  * @param onFilePicked Function that's called when a file was picked. Returns the url of the picked file.
@@ -273,10 +289,7 @@ export interface WidgetInstanceContext {
273
289
  */
274
290
  getDeepLinkData?: () => string;
275
291
  /**
276
- * Call this function from within a widget instance to publish a notification to the
277
- * notitication box on top of the widget board. It should provide information for this specific
278
- * widget instance. Notitifcation content is limited to one single line and a widget instance
279
- * can only have one active notification at a time
292
+ * @deprecated This feature is no longer available. It will be removed in a future release.
280
293
  */
281
294
  publishNotification?: (content: string, expirationDateTime: Date) => void;
282
295
  /**
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
package/package.json CHANGED
@@ -1,31 +1,31 @@
1
- {
2
- "name": "@ichicraft/widgets-widget-base",
3
- "version": "1.11.5",
4
- "description": "Part of the Widget Development Kit for building widgets for Ichicraft Boards",
5
- "main": "lib/index.js",
6
- "types": "lib/index.d.ts",
7
- "scripts": {
8
- "build": "tsc",
9
- "prepare": "tsc"
10
- },
11
- "keywords": [
12
- "ichicraft",
13
- "widget",
14
- "widgets"
15
- ],
16
- "author": "Ichicraft",
17
- "license": "ISC",
18
- "files": [
19
- "lib/**/*"
20
- ],
21
- "overrides": {
22
- "requirejs": "2.3.7"
23
- },
24
- "dependencies": {
25
- "@microsoft/sp-http": "1.18.2",
26
- "@pnp/sp": "4.0.1"
27
- },
28
- "devDependencies": {
29
- "typescript": "^5.4.5"
30
- }
31
- }
1
+ {
2
+ "name": "@ichicraft/widgets-widget-base",
3
+ "version": "1.11.6",
4
+ "description": "Part of the Widget Development Kit for building widgets for Ichicraft Boards",
5
+ "main": "lib/index.js",
6
+ "types": "lib/index.d.ts",
7
+ "scripts": {
8
+ "build": "tsc",
9
+ "prepare": "tsc"
10
+ },
11
+ "keywords": [
12
+ "ichicraft",
13
+ "widget",
14
+ "widgets"
15
+ ],
16
+ "author": "Ichicraft",
17
+ "license": "ISC",
18
+ "files": [
19
+ "lib/**/*"
20
+ ],
21
+ "overrides": {
22
+ "requirejs": "2.3.7"
23
+ },
24
+ "dependencies": {
25
+ "@microsoft/sp-http": "1.18.2",
26
+ "@pnp/sp": "4.0.1"
27
+ },
28
+ "devDependencies": {
29
+ "typescript": "^5.4.5"
30
+ }
31
+ }