@ichicraft/widgets-widget-base 1.8.10 → 1.8.11

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,10 @@ 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.11 - 2023-04-03
13
+
14
+ - Changed `openFilePicker` function to return more details of the picked file in the shape of `FilePickerFileProps`
15
+
12
16
  ## 1.8.10 - 2023-03-30
13
17
 
14
18
  - Changed `openFilePicker` function to accept `options`, to support configuration of picker behavior
@@ -288,7 +288,7 @@ export interface WidgetContext {
288
288
  * @param onFilePicked Function that's called when a file was picked. Returns the url of the picked file.
289
289
  * @param options Options to change the behavior of the file picker
290
290
  */
291
- openFilePicker?: (onFilePicked: (fileUrl: string) => void, options?: FilePickerOptions) => void;
291
+ openFilePicker?: (onFilePicked: (fileUrl: string, fileProps: FilePickerFileProps) => void, options?: FilePickerOptions) => void;
292
292
  /**
293
293
  * Functionality offered by the widget board to open a url in an iframe dialog.
294
294
  * @param url The url to open in a dialog.
@@ -629,5 +629,15 @@ export interface FilePickerOptions {
629
629
  */
630
630
  onCancel?: () => void;
631
631
  }
632
+ export interface FilePickerFileProps {
633
+ /**
634
+ * Unique identifier of the file item in SharePoint, in the shape of a Guid.
635
+ */
636
+ uniqueId: string;
637
+ /**
638
+ * Unique identifier of the site in SharePoint, in the shape of a Guid.
639
+ */
640
+ siteId: string;
641
+ }
632
642
  export declare type BoardType = 'shared' | 'personal';
633
643
  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.10",
3
+ "version": "1.8.11",
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",