@ichicraft/widgets-widget-base 1.8.3 → 1.8.4
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 +57 -22
- package/lib/types/index.d.ts +32 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,77 +3,112 @@ This package supports development of widgets built using the Widget Development
|
|
|
3
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
4
|
|
|
5
5
|
# Changelog
|
|
6
|
+
|
|
6
7
|
All notable changes to this project will be documented here.
|
|
7
8
|
|
|
8
9
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
9
10
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
10
11
|
|
|
12
|
+
## 1.8.4 - 2022-09-05
|
|
13
|
+
|
|
14
|
+
- 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.
|
|
15
|
+
|
|
11
16
|
## 1.8.3 - 2022-08-16
|
|
12
|
-
|
|
17
|
+
|
|
18
|
+
- Added `openFilePicker()` function to the `WidgetContext` interface to support file selection from within a widget.
|
|
13
19
|
|
|
14
20
|
## 1.8.2 - 2022-07-06
|
|
15
|
-
|
|
21
|
+
|
|
22
|
+
- Added `subtitle` property to the `WidgetResource` interface.
|
|
16
23
|
|
|
17
24
|
## 1.8.1 - 2022-06-17
|
|
18
|
-
|
|
19
|
-
|
|
25
|
+
|
|
26
|
+
- Added new section `analytics` to `WidgetManifestConfig` interface to allow definition of time-based events that can be raised by a widget.
|
|
27
|
+
- Added `raiseEvent(...)` to the `instance` object of the `WidgetContent` interface, allowing widgets to raise an event.
|
|
20
28
|
|
|
21
29
|
## 1.7.11 - 2022-03-23
|
|
22
|
-
|
|
30
|
+
|
|
31
|
+
- Added `setWidgetHeaderVisibilty()` function to the `instance` object of the `WidgetContext` interface, allowing widgets to render in full height.
|
|
23
32
|
|
|
24
33
|
## 1.7.9 - 2022-01-20
|
|
25
|
-
|
|
34
|
+
|
|
35
|
+
- Added `userAccountCreated` date/time to the `WidgetContext` interface.
|
|
26
36
|
|
|
27
37
|
## 1.7.8 - 2022-01-18
|
|
38
|
+
|
|
28
39
|
### Changed
|
|
29
|
-
|
|
40
|
+
|
|
41
|
+
- Added `initiateWidgetDeletion()` function to the `WidgetContext` interface.
|
|
30
42
|
|
|
31
43
|
## 1.7.7 - 2022-01-14
|
|
44
|
+
|
|
32
45
|
### Changed
|
|
33
|
-
|
|
46
|
+
|
|
47
|
+
- Added `tenantId` property to the `WidgetContext` interface.
|
|
34
48
|
|
|
35
49
|
## 1.7.6 - 2021-11-04
|
|
50
|
+
|
|
36
51
|
### Changed
|
|
37
|
-
|
|
52
|
+
|
|
53
|
+
- Added `theme` property to the `WidgetContext` interface to give access to currently applied theme.
|
|
38
54
|
|
|
39
55
|
## 1.7.5 - 2021-10-26
|
|
56
|
+
|
|
40
57
|
### Changed
|
|
41
|
-
|
|
58
|
+
|
|
59
|
+
- Added `userSecurityGroups` and `userSharePointGroups` properties to the `WidgetContext` interface to inform widgets of SharePoint and security group memberships of the current user.
|
|
42
60
|
|
|
43
61
|
## 1.7.4 - 2021-10-20
|
|
62
|
+
|
|
44
63
|
### Changed
|
|
45
|
-
|
|
64
|
+
|
|
65
|
+
- Added `contentLanguages` property to the `WidgetContext` interface to inform widgets of the available content languages as configured in Ichicraft Boards.
|
|
46
66
|
|
|
47
67
|
## 1.7.3 - 2021-10-04
|
|
68
|
+
|
|
48
69
|
### Changed
|
|
49
|
-
|
|
50
|
-
|
|
70
|
+
|
|
71
|
+
- 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.
|
|
72
|
+
- 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.
|
|
51
73
|
|
|
52
74
|
## 1.6.1 - 2021-02-18
|
|
75
|
+
|
|
53
76
|
### Changed
|
|
54
|
-
|
|
77
|
+
|
|
78
|
+
- Added `userEmail` property to the `WidgetContext` interface to provide current user's email address to widgets.
|
|
55
79
|
|
|
56
80
|
## 1.5.0 - 2021-02-16
|
|
81
|
+
|
|
57
82
|
### Changed
|
|
58
|
-
|
|
83
|
+
|
|
84
|
+
- 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.
|
|
59
85
|
|
|
60
86
|
## 1.4.0 - 2021-01-25
|
|
87
|
+
|
|
61
88
|
### Changed
|
|
62
|
-
|
|
89
|
+
|
|
90
|
+
- Added several properties to the `WidgetContext` interface to identify the context in which the widget is shown (e.g. Team Browser hosted)
|
|
63
91
|
|
|
64
92
|
## 1.3.0 - 2021-01-15
|
|
93
|
+
|
|
65
94
|
### Changed
|
|
66
|
-
|
|
67
|
-
|
|
95
|
+
|
|
96
|
+
- `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.
|
|
97
|
+
- `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.
|
|
68
98
|
|
|
69
99
|
## 1.2.0 - 2021-01-15
|
|
100
|
+
|
|
70
101
|
### Changed
|
|
71
|
-
|
|
102
|
+
|
|
103
|
+
- `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.
|
|
72
104
|
|
|
73
105
|
## 1.1.0 - 2021-01-11
|
|
106
|
+
|
|
74
107
|
### Changed
|
|
75
|
-
|
|
76
|
-
|
|
108
|
+
|
|
109
|
+
- `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.
|
|
110
|
+
- **deps:** removed dependency ajv
|
|
77
111
|
|
|
78
112
|
## <= 1.0.5 - 2020-12-07
|
|
79
|
-
|
|
113
|
+
|
|
114
|
+
No changelog was maintained for the earlier versions.
|
package/lib/types/index.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface WidgetContext {
|
|
|
38
38
|
*/
|
|
39
39
|
initiateWidgetDeletion?: () => void;
|
|
40
40
|
/**
|
|
41
|
-
* Functionality offered by the widget board to open a url in an iframe dialog.
|
|
41
|
+
* @deprecated Functionality offered by the widget board to open a url in an iframe dialog.
|
|
42
42
|
*/
|
|
43
43
|
openUrlInDialog?: (url: string, onDismissed?: () => void) => void;
|
|
44
44
|
/**
|
|
@@ -260,6 +260,12 @@ export interface WidgetContext {
|
|
|
260
260
|
* Functionality offered by the widget board to open a File Picker panel to select files.
|
|
261
261
|
*/
|
|
262
262
|
openFilePicker?: (onFilePicked: (fileUrl: string) => void, onCancel?: () => void) => void;
|
|
263
|
+
/**
|
|
264
|
+
* Functionality offered by the widget board to open a url in an iframe dialog.
|
|
265
|
+
* @param url The url to open in a dialog.
|
|
266
|
+
* @param options Options to configure the dialog (e.g. size, margin, callbacks, ...)
|
|
267
|
+
*/
|
|
268
|
+
openIFrameDialog?: (url: string, options?: IFrameDialogOptions) => void;
|
|
263
269
|
/**
|
|
264
270
|
* Provides access to the Teams SDK and Teams context. Only provided when the web part is loaded in Teams.
|
|
265
271
|
*/
|
|
@@ -518,3 +524,28 @@ export interface CustomCommandBarItemProps {
|
|
|
518
524
|
*/
|
|
519
525
|
onClick?: () => void;
|
|
520
526
|
}
|
|
527
|
+
/**
|
|
528
|
+
* Options to pass to the openIFrameDialog function. Use this to configure how the dialog is rendered, and to handle events (e.g. onDismissed)
|
|
529
|
+
*/
|
|
530
|
+
export interface IFrameDialogOptions {
|
|
531
|
+
/**
|
|
532
|
+
* Maximum width of the dialog. If it exceeds the window width, that width is used instead.
|
|
533
|
+
*/
|
|
534
|
+
maxWidth?: number;
|
|
535
|
+
/**
|
|
536
|
+
* Maximum height of the dialog. If it exceeds the window height, that height is used instead.
|
|
537
|
+
*/
|
|
538
|
+
maxHeight?: number;
|
|
539
|
+
/**
|
|
540
|
+
* Minimum margin on the left- and right side of the dialog.
|
|
541
|
+
*/
|
|
542
|
+
marginHorizontal?: number;
|
|
543
|
+
/**
|
|
544
|
+
* Minimum margin on the top- and bottom side of the dialog.
|
|
545
|
+
*/
|
|
546
|
+
marginVertical?: number;
|
|
547
|
+
/**
|
|
548
|
+
* This event is triggered when the iFrame dialog is dismissed by the user.
|
|
549
|
+
*/
|
|
550
|
+
onDismissed?: () => void;
|
|
551
|
+
}
|
package/package.json
CHANGED