@ichicraft/widgets-widget-base 1.8.6 → 1.8.8

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
@@ -9,6 +9,15 @@ All notable changes to this project will be documented here.
9
9
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
10
10
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
11
11
 
12
+ ## 1.8.8 - 2023-02-16
13
+
14
+ - Removed all SharePoint and Teams dependencies.
15
+
16
+ ## 1.8.7 - 2022-12-13
17
+
18
+ - Added `userRoles` property to the `WidgetContext` interface, to inform widgets of the roles of the current user.
19
+ - Added new exported `UserRole` type.
20
+
12
21
  ## 1.8.6 - 2022-12-08
13
22
 
14
23
  - Added `boardType` property to the `instance` object of the `WidgetContext` interface, to inform widgets of the type of their board.
@@ -1,6 +1,3 @@
1
- import { MSGraphClientFactory, AadTokenProviderFactory, AadHttpClientFactory } from '@microsoft/sp-http';
2
- import { IReadonlyTheme } from '@microsoft/sp-component-base';
3
- import * as microsoftTeams from '@microsoft/teams-js';
4
1
  /**
5
2
  * Widget context providing widget metadata and functionality offered by the widget board
6
3
  */
@@ -191,6 +188,10 @@ export interface WidgetContext {
191
188
  * Provides the date that the user's account was created
192
189
  */
193
190
  userAccountCreated: Date;
191
+ /**
192
+ * Roles of the current user. This may very depending on the active board
193
+ */
194
+ userRoles: UserRole[];
194
195
  /**
195
196
  * Language code of currently used UI rendering language in SharePoint
196
197
  */
@@ -227,19 +228,19 @@ export interface WidgetContext {
227
228
  /**
228
229
  * MS Graph Client Factory class as provided by the WebPartContext object.
229
230
  */
230
- msGraphClientFactory: MSGraphClientFactory;
231
+ msGraphClientFactory: any;
231
232
  /**
232
233
  * AAD Http Client Factory class as provided by the WebPartContext object.
233
234
  */
234
- aadHttpClientFactory: AadHttpClientFactory;
235
+ aadHttpClientFactory: any;
235
236
  /**
236
237
  * AAD Token Provider Factory class as provided by the WebPartContext object.
237
238
  */
238
- aadTokenProviderFactory: AadTokenProviderFactory;
239
+ aadTokenProviderFactory: any;
239
240
  /**
240
241
  * Currently in use theme (by SharePoint/Teams)
241
242
  */
242
- theme: IReadonlyTheme;
243
+ theme: any;
243
244
  /**
244
245
  * Returns whether or not the currently signed in user is part of an AAD security group.
245
246
  * Provide the guid of the group.
@@ -289,11 +290,11 @@ export interface WidgetContext {
289
290
  /**
290
291
  * Microsoft Teams SDK.
291
292
  */
292
- teamsJs: typeof microsoftTeams;
293
+ teamsJs: any;
293
294
  /**
294
295
  * {@inheritDoc @microsoft/teams-js#Context}
295
296
  */
296
- context: microsoftTeams.Context;
297
+ context: any;
297
298
  };
298
299
  }
299
300
  export interface ValidationResult {
@@ -566,3 +567,4 @@ export interface IFrameDialogOptions {
566
567
  onDismissed?: () => void;
567
568
  }
568
569
  export declare type BoardType = 'shared' | 'personal';
570
+ export declare type UserRole = 'administrator' | 'board-owner';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ichicraft/widgets-widget-base",
3
- "version": "1.8.6",
3
+ "version": "1.8.8",
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",
@@ -18,11 +18,6 @@
18
18
  "files": [
19
19
  "lib/**/*"
20
20
  ],
21
- "dependencies": {
22
- "@microsoft/sp-component-base": "^1.11.0",
23
- "@microsoft/sp-http": "1.11.0",
24
- "@microsoft/teams-js": "1.9.0"
25
- },
26
21
  "devDependencies": {
27
22
  "typescript": "^3.6.4"
28
23
  }