@staffbase/widget-sdk 3.3.5 → 3.4.0-alpha.13

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.
Files changed (53) hide show
  1. package/dist/base-block.d.ts +98 -0
  2. package/{index.d.ts → dist/base-block.js} +2 -11
  3. package/{lib/block-attributes.ts → dist/block-attributes.d.ts} +2 -3
  4. package/dist/block-attributes.js +13 -0
  5. package/dist/block-definition.d.ts +91 -0
  6. package/dist/block-definition.js +13 -0
  7. package/dist/block-element.d.ts +45 -0
  8. package/dist/block-element.js +13 -0
  9. package/{lib/block-factory.ts → dist/block-factory.d.ts} +2 -6
  10. package/dist/block-factory.js +13 -0
  11. package/{lib/external-block-definition.ts → dist/external-block-definition.d.ts} +15 -19
  12. package/dist/external-block-definition.js +13 -0
  13. package/{lib → dist}/global.d.ts +6 -9
  14. package/dist/global.js +13 -0
  15. package/dist/index.d.ts +9 -0
  16. package/dist/index.js +9 -0
  17. package/{lib/widget-api-types.ts → dist/widget-api-types.d.ts} +92 -76
  18. package/dist/widget-api-types.js +21 -0
  19. package/{lib/widget-api.ts → dist/widget-api.d.ts} +18 -8
  20. package/dist/widget-api.js +13 -0
  21. package/docs/BaseBlock.md +1259 -1
  22. package/docs/BlockAttributes.md +4 -0
  23. package/docs/BlockDefinition.md +36 -0
  24. package/docs/BlockElement.md +20 -0
  25. package/docs/ColorTheme.md +32 -0
  26. package/docs/ExternalBlockDefinition.md +12 -0
  27. package/docs/Home.md +25 -0
  28. package/docs/IntegrationInformation.md +70 -0
  29. package/docs/IntegrationState.md +41 -0
  30. package/docs/IntegrationToken.md +30 -0
  31. package/docs/SBColors.md +224 -0
  32. package/docs/SBFileType.md +24 -0
  33. package/docs/SBImageEntity.md +24 -0
  34. package/docs/SBUserAvatar.md +16 -0
  35. package/docs/SBUserProfile.md +32 -0
  36. package/docs/UserListItem.md +16 -0
  37. package/docs/UserListRequestQuery.md +16 -0
  38. package/docs/UserListResponse.md +16 -0
  39. package/docs/WidgetApi.md +50 -0
  40. package/package.json +17 -12
  41. package/.commitlintrc.json +0 -28
  42. package/.github/CODEOWNERS +0 -1
  43. package/.github/workflows/ci.yaml +0 -61
  44. package/.github/workflows/dependency-update.yml +0 -24
  45. package/.husky/commit-msg +0 -6
  46. package/.releaserc +0 -38
  47. package/CHANGELOG.md +0 -295
  48. package/CONTRIBUTING.md +0 -10
  49. package/catalog-info.yaml +0 -11
  50. package/lib/base-block.ts +0 -110
  51. package/lib/block-definition.ts +0 -101
  52. package/lib/block-element.ts +0 -56
  53. package/tsconfig.json +0 -13
@@ -15,3 +15,7 @@
15
15
  ### contentLanguage
16
16
 
17
17
  • **contentLanguage**: `string`
18
+
19
+ #### Defined in
20
+
21
+ [lib/block-attributes.ts:15](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/block-attributes.ts#L15)
@@ -28,6 +28,10 @@
28
28
 
29
29
  DOM attributes of the element, must be in kebab-case.
30
30
 
31
+ #### Defined in
32
+
33
+ [lib/block-definition.ts:40](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/block-definition.ts#L40)
34
+
31
35
  ___
32
36
 
33
37
  ### blockLevel
@@ -37,6 +41,10 @@ ___
37
41
  Set to `inline` if you want the element to behave like a span element
38
42
  rather than a div element if not specified, it defaults to `block`.
39
43
 
44
+ #### Defined in
45
+
46
+ [lib/block-definition.ts:46](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/block-definition.ts#L46)
47
+
40
48
  ___
41
49
 
42
50
  ### configurationSchema
@@ -68,6 +76,10 @@ Schema used for defining the configuration form.
68
76
 
69
77
  **`see`** https://react-jsonschema-form.readthedocs.io/en/latest/
70
78
 
79
+ #### Defined in
80
+
81
+ [lib/block-definition.ts:73](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/block-definition.ts#L73)
82
+
71
83
  ___
72
84
 
73
85
  ### factory
@@ -76,6 +88,10 @@ ___
76
88
 
77
89
  The implementation of the web component.
78
90
 
91
+ #### Defined in
92
+
93
+ [lib/block-definition.ts:30](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/block-definition.ts#L30)
94
+
79
95
  ___
80
96
 
81
97
  ### iconUrl
@@ -85,6 +101,10 @@ ___
85
101
  Icon displayed on the widget installation page.
86
102
  We recommend an icon with the dimensions 32x32 px.
87
103
 
104
+ #### Defined in
105
+
106
+ [lib/block-definition.ts:100](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/block-definition.ts#L100)
107
+
88
108
  ___
89
109
 
90
110
  ### label
@@ -93,6 +113,10 @@ ___
93
113
 
94
114
  Label displayed in the settings dialog and in the default widget preview.
95
115
 
116
+ #### Defined in
117
+
118
+ [lib/block-definition.ts:94](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/block-definition.ts#L94)
119
+
96
120
  ___
97
121
 
98
122
  ### name
@@ -104,6 +128,10 @@ webcomponent naming conventions.
104
128
 
105
129
  **`see`** https://www.webcomponents.org/community/articles/how-should-i-name-my-element
106
130
 
131
+ #### Defined in
132
+
133
+ [lib/block-definition.ts:25](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/block-definition.ts#L25)
134
+
107
135
  ___
108
136
 
109
137
  ### options
@@ -112,6 +140,10 @@ ___
112
140
 
113
141
  Can be used for extending from a built-in element.
114
142
 
143
+ #### Defined in
144
+
145
+ [lib/block-definition.ts:35](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/block-definition.ts#L35)
146
+
115
147
  ___
116
148
 
117
149
  ### uiSchema
@@ -129,3 +161,7 @@ Schema to add more customization to the look and feel of the configuration form.
129
161
  ```
130
162
 
131
163
  **`see`** https://react-jsonschema-form.readthedocs.io/en/latest/api-reference/uiSchema/
164
+
165
+ #### Defined in
166
+
167
+ [lib/block-definition.ts:89](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/block-definition.ts#L89)
@@ -22,6 +22,10 @@ Invoked when the custom element is moved to a new document.
22
22
 
23
23
  `void`
24
24
 
25
+ #### Defined in
26
+
27
+ [lib/block-element.ts:33](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/block-element.ts#L33)
28
+
25
29
  ___
26
30
 
27
31
  ### attributeChangedCallback
@@ -44,6 +48,10 @@ Note that you have to statically register the observed values with the 'observed
44
48
 
45
49
  `void`
46
50
 
51
+ #### Defined in
52
+
53
+ [lib/block-element.ts:44](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/block-element.ts#L44)
54
+
47
55
  ___
48
56
 
49
57
  ### connectedCallback
@@ -56,6 +64,10 @@ Invoked when the custom element is first connected to the DOM.
56
64
 
57
65
  `void`
58
66
 
67
+ #### Defined in
68
+
69
+ [lib/block-element.ts:23](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/block-element.ts#L23)
70
+
59
71
  ___
60
72
 
61
73
  ### disconnectedCallback
@@ -68,6 +80,10 @@ Invoked when the custom element is disconnected from the DOM.
68
80
 
69
81
  `void`
70
82
 
83
+ #### Defined in
84
+
85
+ [lib/block-element.ts:28](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/block-element.ts#L28)
86
+
71
87
  ___
72
88
 
73
89
  ### unmount
@@ -81,3 +97,7 @@ and revert the block to its initial state.
81
97
  #### Returns
82
98
 
83
99
  `void`
100
+
101
+ #### Defined in
102
+
103
+ [lib/block-element.ts:55](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/block-element.ts#L55)
@@ -22,44 +22,76 @@ and feel of the Staffbase ecosystem it was added to.
22
22
 
23
23
  • **bgColor**: `string`
24
24
 
25
+ #### Defined in
26
+
27
+ [lib/widget-api-types.ts:103](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L103)
28
+
25
29
  ___
26
30
 
27
31
  ### bgColorDarkened1
28
32
 
29
33
  • `Optional` **bgColorDarkened1**: `string`
30
34
 
35
+ #### Defined in
36
+
37
+ [lib/widget-api-types.ts:106](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L106)
38
+
31
39
  ___
32
40
 
33
41
  ### bgColorDarkened2
34
42
 
35
43
  • `Optional` **bgColorDarkened2**: `string`
36
44
 
45
+ #### Defined in
46
+
47
+ [lib/widget-api-types.ts:107](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L107)
48
+
37
49
  ___
38
50
 
39
51
  ### bgColorDarkened2Opaque
40
52
 
41
53
  • `Optional` **bgColorDarkened2Opaque**: `string`
42
54
 
55
+ #### Defined in
56
+
57
+ [lib/widget-api-types.ts:108](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L108)
58
+
43
59
  ___
44
60
 
45
61
  ### bgColorLum
46
62
 
47
63
  • `Optional` **bgColorLum**: `string`
48
64
 
65
+ #### Defined in
66
+
67
+ [lib/widget-api-types.ts:109](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L109)
68
+
49
69
  ___
50
70
 
51
71
  ### colors
52
72
 
53
73
  • **colors**: [`SBColors`](../wiki/SBColors)
54
74
 
75
+ #### Defined in
76
+
77
+ [lib/widget-api-types.ts:105](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L105)
78
+
55
79
  ___
56
80
 
57
81
  ### outlineColor
58
82
 
59
83
  • `Optional` **outlineColor**: `string`
60
84
 
85
+ #### Defined in
86
+
87
+ [lib/widget-api-types.ts:110](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L110)
88
+
61
89
  ___
62
90
 
63
91
  ### textColor
64
92
 
65
93
  • **textColor**: `string`
94
+
95
+ #### Defined in
96
+
97
+ [lib/widget-api-types.ts:104](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L104)
@@ -27,6 +27,10 @@ and meta information (author and version of the widget).
27
27
 
28
28
  Name of the author.
29
29
 
30
+ #### Defined in
31
+
32
+ [lib/external-block-definition.ts:39](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/external-block-definition.ts#L39)
33
+
30
34
  ___
31
35
 
32
36
  ### blockDefinition
@@ -37,6 +41,10 @@ Definition of the block.
37
41
 
38
42
  Will be registered to the staffbase app.
39
43
 
44
+ #### Defined in
45
+
46
+ [lib/external-block-definition.ts:29](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/external-block-definition.ts#L29)
47
+
40
48
  ___
41
49
 
42
50
  ### version
@@ -44,3 +52,7 @@ ___
44
52
  • **version**: `string`
45
53
 
46
54
  Current version of the widget.
55
+
56
+ #### Defined in
57
+
58
+ [lib/external-block-definition.ts:34](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/external-block-definition.ts#L34)
package/docs/Home.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Table of contents
4
4
 
5
+ ### Enumerations
6
+
7
+ - [IntegrationState](../wiki/IntegrationState)
8
+
5
9
  ### Interfaces
6
10
 
7
11
  - [BaseBlock](../wiki/BaseBlock)
@@ -10,6 +14,8 @@
10
14
  - [BlockElement](../wiki/BlockElement)
11
15
  - [ColorTheme](../wiki/ColorTheme)
12
16
  - [ExternalBlockDefinition](../wiki/ExternalBlockDefinition)
17
+ - [IntegrationInformation](../wiki/IntegrationInformation)
18
+ - [IntegrationToken](../wiki/IntegrationToken)
13
19
  - [SBColors](../wiki/SBColors)
14
20
  - [SBFileType](../wiki/SBFileType)
15
21
  - [SBImageEntity](../wiki/SBImageEntity)
@@ -23,6 +29,7 @@
23
29
  ### Type aliases
24
30
 
25
31
  - [BlockFactory](../wiki/Home#blockfactory)
32
+ - [IntegrationType](../wiki/Home#integrationtype)
26
33
  - [UserListSorting](../wiki/Home#userlistsorting)
27
34
 
28
35
  ## Type aliases
@@ -60,6 +67,20 @@ Factory for the custom widgets.
60
67
 
61
68
  `CustomElementConstructor`
62
69
 
70
+ #### Defined in
71
+
72
+ [lib/block-factory.ts:38](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/block-factory.ts#L38)
73
+
74
+ ___
75
+
76
+ ### IntegrationType
77
+
78
+ Ƭ **IntegrationType**: ``"ms365"``
79
+
80
+ #### Defined in
81
+
82
+ [lib/widget-api-types.ts:189](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L189)
83
+
63
84
  ___
64
85
 
65
86
  ### UserListSorting
@@ -73,3 +94,7 @@ The sorting order of the user list.
73
94
  **`param`** sort by date of creation descending
74
95
 
75
96
  **`param`** sort by date of last update descending
97
+
98
+ #### Defined in
99
+
100
+ [lib/widget-api-types.ts:156](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L156)
@@ -0,0 +1,70 @@
1
+ # Interface: IntegrationInformation
2
+
3
+ Information about the requested Integration target
4
+
5
+ ## Table of contents
6
+
7
+ ### Properties
8
+
9
+ - [enabledFeatures](../wiki/IntegrationInformation#enabledfeatures)
10
+ - [status](../wiki/IntegrationInformation#status)
11
+ - [supportedFeatures](../wiki/IntegrationInformation#supportedfeatures)
12
+ - [token](../wiki/IntegrationInformation#token)
13
+
14
+ ### Methods
15
+
16
+ - [signIn](../wiki/IntegrationInformation#signin)
17
+
18
+ ## Properties
19
+
20
+ ### enabledFeatures
21
+
22
+ • **enabledFeatures**: `string`[]
23
+
24
+ #### Defined in
25
+
26
+ [lib/widget-api-types.ts:218](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L218)
27
+
28
+ ___
29
+
30
+ ### status
31
+
32
+ • **status**: [`IntegrationState`](../wiki/IntegrationState)
33
+
34
+ #### Defined in
35
+
36
+ [lib/widget-api-types.ts:216](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L216)
37
+
38
+ ___
39
+
40
+ ### supportedFeatures
41
+
42
+ • **supportedFeatures**: `string`[]
43
+
44
+ #### Defined in
45
+
46
+ [lib/widget-api-types.ts:220](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L220)
47
+
48
+ ___
49
+
50
+ ### token
51
+
52
+ • `Optional` **token**: [`IntegrationToken`](../wiki/IntegrationToken)
53
+
54
+ #### Defined in
55
+
56
+ [lib/widget-api-types.ts:222](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L222)
57
+
58
+ ## Methods
59
+
60
+ ### signIn
61
+
62
+ ▸ `Optional` **signIn**(): `void`
63
+
64
+ #### Returns
65
+
66
+ `void`
67
+
68
+ #### Defined in
69
+
70
+ [lib/widget-api-types.ts:224](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L224)
@@ -0,0 +1,41 @@
1
+ # Enumeration: IntegrationState
2
+
3
+ All available states the integration can take
4
+
5
+ ## Table of contents
6
+
7
+ ### Enumeration members
8
+
9
+ - [AVAILABLE](../wiki/IntegrationState#available)
10
+ - [LOGGED\_OUT](../wiki/IntegrationState#logged_out)
11
+ - [UNAVAILABLE](../wiki/IntegrationState#unavailable)
12
+
13
+ ## Enumeration members
14
+
15
+ ### AVAILABLE
16
+
17
+ • **AVAILABLE** = `"available"`
18
+
19
+ #### Defined in
20
+
21
+ [lib/widget-api-types.ts:207](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L207)
22
+
23
+ ___
24
+
25
+ ### LOGGED\_OUT
26
+
27
+ • **LOGGED\_OUT** = `"loggedOut"`
28
+
29
+ #### Defined in
30
+
31
+ [lib/widget-api-types.ts:208](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L208)
32
+
33
+ ___
34
+
35
+ ### UNAVAILABLE
36
+
37
+ • **UNAVAILABLE** = `"unavailable"`
38
+
39
+ #### Defined in
40
+
41
+ [lib/widget-api-types.ts:206](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L206)
@@ -0,0 +1,30 @@
1
+ # Interface: IntegrationToken
2
+
3
+ Integration Token including the expiration time
4
+
5
+ ## Table of contents
6
+
7
+ ### Properties
8
+
9
+ - [accessToken](../wiki/IntegrationToken#accesstoken)
10
+ - [accessTokenExpiresAt](../wiki/IntegrationToken#accesstokenexpiresat)
11
+
12
+ ## Properties
13
+
14
+ ### accessToken
15
+
16
+ • **accessToken**: `string`
17
+
18
+ #### Defined in
19
+
20
+ [lib/widget-api-types.ts:196](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L196)
21
+
22
+ ___
23
+
24
+ ### accessTokenExpiresAt
25
+
26
+ • `Optional` **accessTokenExpiresAt**: `Date`
27
+
28
+ #### Defined in
29
+
30
+ [lib/widget-api-types.ts:199](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L199)