@ichicraft/widgets-widget-base 1.7.5 → 1.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/lib/types/index.d.ts +18 -2
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -8,6 +8,21 @@ All notable changes to this project will be documented here.
|
|
|
8
8
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
9
9
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
10
10
|
|
|
11
|
+
## 1.7.9 - 2022-01-20
|
|
12
|
+
* Added `userAccountCreated` date/time to the `WidgetContext` interface.
|
|
13
|
+
|
|
14
|
+
## 1.7.8 - 2022-01-18
|
|
15
|
+
### Changed
|
|
16
|
+
* Added `initiateWidgetDeletion()` function to the `WidgetContext` interface.
|
|
17
|
+
|
|
18
|
+
## 1.7.7 - 2022-01-14
|
|
19
|
+
### Changed
|
|
20
|
+
* Added `tenantId` property to the `WidgetContext` interface.
|
|
21
|
+
|
|
22
|
+
## 1.7.6 - 2021-11-04
|
|
23
|
+
### Changed
|
|
24
|
+
* Added `theme` property to the `WidgetContext` interface to give access to currently applied theme.
|
|
25
|
+
|
|
11
26
|
## 1.7.5 - 2021-10-26
|
|
12
27
|
### Changed
|
|
13
28
|
* Added `userSecurityGroups` and `userSharePointGroups` properties to the `WidgetContext` interface to inform widgets of SharePoint and security group memberships of the current user.
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MSGraphClientFactory, AadTokenProviderFactory, AadHttpClientFactory } from '@microsoft/sp-http';
|
|
2
|
+
import { IReadonlyTheme } from '@microsoft/sp-component-base';
|
|
2
3
|
import * as microsoftTeams from '@microsoft/teams-js';
|
|
3
4
|
/**
|
|
4
5
|
* Widget context providing widget metadata and functionality offered by the widget board
|
|
@@ -31,6 +32,11 @@ export interface WidgetContext {
|
|
|
31
32
|
* menu of the widget.
|
|
32
33
|
*/
|
|
33
34
|
openConfiguration?: () => void;
|
|
35
|
+
/**
|
|
36
|
+
* Call this function to open the widget delete confirmation dialog for a user. This offers widget developers
|
|
37
|
+
* the ability to trigger the "widget deletion process". This allows different methods to delete the widget.
|
|
38
|
+
*/
|
|
39
|
+
initiateWidgetDeletion?: () => void;
|
|
34
40
|
/**
|
|
35
41
|
* Functionality offered by the widget board to open a url in an iframe dialog.
|
|
36
42
|
*/
|
|
@@ -116,6 +122,10 @@ export interface WidgetContext {
|
|
|
116
122
|
* Tells whether the widget board is running in a mobile webview context
|
|
117
123
|
*/
|
|
118
124
|
isMobileWebView: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Tenant ID of current SharePoint tenant
|
|
127
|
+
*/
|
|
128
|
+
tenantId: string;
|
|
119
129
|
/**
|
|
120
130
|
* Site url of the site where the widget board is running
|
|
121
131
|
*/
|
|
@@ -147,14 +157,16 @@ export interface WidgetContext {
|
|
|
147
157
|
* SharePoint groups in this site collection that user is member of
|
|
148
158
|
*/
|
|
149
159
|
userSharePointGroups: number[];
|
|
160
|
+
/**
|
|
161
|
+
* Provides the date that the user's account was created
|
|
162
|
+
*/
|
|
163
|
+
userAccountCreated: Date;
|
|
150
164
|
/**
|
|
151
165
|
* Language code of currently used UI rendering language in SharePoint
|
|
152
166
|
*/
|
|
153
167
|
language: string;
|
|
154
168
|
/**
|
|
155
169
|
* List of supported languages as configured in Widget Board configuration
|
|
156
|
-
/**
|
|
157
|
-
*
|
|
158
170
|
*/
|
|
159
171
|
contentLanguages: {
|
|
160
172
|
/**
|
|
@@ -194,6 +206,10 @@ export interface WidgetContext {
|
|
|
194
206
|
* AAD Token Provider Factory class as provided by the WebPartContext object.
|
|
195
207
|
*/
|
|
196
208
|
aadTokenProviderFactory: AadTokenProviderFactory;
|
|
209
|
+
/**
|
|
210
|
+
* Currently in use theme (by SharePoint/Teams)
|
|
211
|
+
*/
|
|
212
|
+
theme: IReadonlyTheme;
|
|
197
213
|
/**
|
|
198
214
|
* Returns whether or not the currently signed in user is part of an AAD security group.
|
|
199
215
|
* Provide the guid of the group.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ichicraft/widgets-widget-base",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.9",
|
|
4
4
|
"description": "Part of the Widget Development Kit for building widgets for Ichicraft Boards",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"lib/**/*"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
+
"@microsoft/sp-component-base": "^1.11.0",
|
|
22
23
|
"@microsoft/sp-http": "1.11.0",
|
|
23
24
|
"@microsoft/teams-js": "1.9.0"
|
|
24
25
|
},
|