@ichicraft/widgets-widget-base 1.9.12 → 1.9.14

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,9 +9,18 @@ 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.9.14 - 2024-06-18
13
+
14
+ - Change import of `SPFI` type to decrease bundle sizes in widgets.
15
+
16
+ ## 1.9.13 - 2024-06-18
17
+
18
+ - Added `spHttpClient` property to `WidgetContext` interface, to perform REST calls against SharePoint.
19
+ - Added `spHttpClientConfiguration` property to `WidgetContext` interface.
20
+
12
21
  ## 1.9.12 - 2024-06-17
13
22
 
14
- - Added `sp` object to `WidgetContext` interface, to allow using a centralized PnPjs version across all widgets.
23
+ - Added `sp` property to `WidgetContext` interface, to allow using a centralized PnPjs version across all widgets.
15
24
  - Added `siteId` property to `WidgetContext` interface.
16
25
  - Added `boardsInstanceId` property to `WidgetContext` interface.
17
26
 
@@ -1,6 +1,6 @@
1
- import type { AadHttpClientFactory, AadTokenProviderFactory } from '@microsoft/sp-http';
2
- import type { SPFI } from '@pnp/sp/fi';
3
- export type { AadTokenProviderFactory, AadTokenProvider, AadHttpClientFactory, AadHttpClient, AadHttpClientConfiguration, AadHttpClientResponse, } from '@microsoft/sp-http';
1
+ import type { AadHttpClientFactory, AadTokenProviderFactory, SPHttpClient, SPHttpClientConfiguration } from '@microsoft/sp-http';
2
+ import type { SPFI } from '@pnp/sp/presets/all';
3
+ export type { AadTokenProviderFactory, AadTokenProvider, AadHttpClientFactory, AadHttpClient, AadHttpClientConfiguration, AadHttpClientResponse, SPHttpClient, SPHttpClientConfiguration, } from '@microsoft/sp-http';
4
4
  /**
5
5
  * Widget context providing widget metadata and functionality offered by the widget board
6
6
  */
@@ -22,10 +22,6 @@ export interface WidgetContext {
22
22
  * can exist in a widget board configuration.
23
23
  */
24
24
  manifest: WidgetManifestContext;
25
- /**
26
- * Interacts with the SharePoint REST api, such as fetching/updating sites, lists and users.
27
- */
28
- sp: SPFI;
29
25
  /**
30
26
  * Tells whether the widget board is running in a Teams context
31
27
  */
@@ -146,6 +142,18 @@ export interface WidgetContext {
146
142
  * Preferred border radius of UI elements as configured in Widget Board configuration
147
143
  */
148
144
  elementBorderRadius: number;
145
+ /**
146
+ * Interacts with the SharePoint REST api, such as fetching/updating sites, lists and users.
147
+ */
148
+ sp: SPFI;
149
+ /**
150
+ * Used to perform REST calls against SharePoint.
151
+ */
152
+ spHttpClient: SPHttpClient;
153
+ /**
154
+ * Provides a set of switches for enabling/disabling various features of the SPHttpClient.
155
+ */
156
+ spHttpClientConfiguration: SPHttpClientConfiguration;
149
157
  /**
150
158
  * MS Graph Client Factory class as provided by the WebPartContext object.
151
159
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ichicraft/widgets-widget-base",
3
- "version": "1.9.12",
3
+ "version": "1.9.14",
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",