@staffbase/widget-sdk 3.3.3 → 3.4.0-alpha.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.
Files changed (69) 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/.nojekyll +1 -0
  22. package/docs/BaseBlock.md +5887 -0
  23. package/docs/BlockAttributes.md +21 -0
  24. package/docs/BlockDefinition.md +167 -0
  25. package/docs/BlockElement.md +103 -0
  26. package/docs/ColorTheme.md +97 -0
  27. package/docs/ExternalBlockDefinition.md +58 -0
  28. package/docs/Home.md +56 -30
  29. package/docs/IntegrationInformation.md +70 -0
  30. package/docs/IntegrationState.md +41 -0
  31. package/docs/IntegrationToken.md +30 -0
  32. package/docs/SBColors.md +639 -0
  33. package/docs/SBFileType.md +74 -0
  34. package/docs/SBImageEntity.md +74 -0
  35. package/docs/SBUserAvatar.md +52 -0
  36. package/docs/SBUserProfile.md +96 -0
  37. package/docs/UserListItem.md +52 -0
  38. package/docs/UserListRequestQuery.md +52 -0
  39. package/docs/UserListResponse.md +52 -0
  40. package/docs/WidgetApi.md +142 -0
  41. package/docs/_Sidebar.md +2 -19
  42. package/package.json +22 -17
  43. package/.commitlintrc.json +0 -28
  44. package/.github/CODEOWNERS +0 -1
  45. package/.github/workflows/ci.yaml +0 -63
  46. package/.husky/commit-msg +0 -6
  47. package/.releaserc +0 -38
  48. package/CHANGELOG.md +0 -234
  49. package/CONTRIBUTING.md +0 -10
  50. package/catalog-info.yaml +0 -11
  51. package/docs/Interface: BaseBlock.md +0 -3226
  52. package/docs/Interface: BlockAttributes.md +0 -11
  53. package/docs/Interface: BlockDefinition.md +0 -117
  54. package/docs/Interface: BlockElement.md +0 -89
  55. package/docs/Interface: ColorTheme.md +0 -52
  56. package/docs/Interface: ExternalBlockDefinition.md +0 -38
  57. package/docs/Interface: SBColors.md +0 -354
  58. package/docs/Interface: SBFileType.md +0 -39
  59. package/docs/Interface: SBImageEntity.md +0 -39
  60. package/docs/Interface: SBUserAvatar.md +0 -27
  61. package/docs/Interface: SBUserProfile.md +0 -51
  62. package/docs/Interface: UserListItem.md +0 -27
  63. package/docs/Interface: UserListRequestQuery.md +0 -27
  64. package/docs/Interface: UserListResponse.md +0 -27
  65. package/docs/Interface: WidgetApi.md +0 -75
  66. package/lib/base-block.ts +0 -110
  67. package/lib/block-definition.ts +0 -101
  68. package/lib/block-element.ts +0 -56
  69. package/tsconfig.json +0 -13
@@ -1,11 +0,0 @@
1
- # Interface: BlockAttributes
2
-
3
- ## Indexable
4
-
5
- ▪ [key: *string*]: *number* \| *boolean* \| *string*
6
-
7
- ## Properties
8
-
9
- ### contentLanguage
10
-
11
- • **contentLanguage**: *string*
@@ -1,117 +0,0 @@
1
- # Interface: BlockDefinition<Factory\>
2
-
3
- ## Type parameters
4
-
5
- | Name | Default |
6
- | :------ | :------ |
7
- | `Factory` | [*BlockFactory*](../wiki/Home#blockfactory) |
8
-
9
- ## Properties
10
-
11
- ### attributes
12
-
13
- • **attributes**: *string*[]
14
-
15
- DOM attributes of the element, must be in kebab-case.
16
-
17
- ___
18
-
19
- ### blockLevel
20
-
21
- • `Optional` **blockLevel**: ``"block"`` \| ``"inline"``
22
-
23
- Set to `inline` if you want the element to behave like a span element
24
- rather than a div element if not specified, it defaults to `block`.
25
-
26
- ___
27
-
28
- ### configurationSchema
29
-
30
- • **configurationSchema**: JSONSchema7
31
-
32
- Schema used for defining the configuration form.
33
-
34
- **`example`**
35
- ```json
36
- {
37
- "type": "object",
38
- "required": [
39
- "firstName",
40
- "lastName"
41
- ],
42
- "properties": {
43
- "firstName": {
44
- "type": "string",
45
- "title": "First name"
46
- },
47
- "lastName": {
48
- "type": "string",
49
- "title": "Last name"
50
- }
51
- }
52
- }
53
- ```
54
-
55
- **`see`** https://react-jsonschema-form.readthedocs.io/en/latest/
56
-
57
- ___
58
-
59
- ### factory
60
-
61
- • **factory**: Factory
62
-
63
- The implementation of the web component.
64
-
65
- ___
66
-
67
- ### iconUrl
68
-
69
- • `Optional` **iconUrl**: *string*
70
-
71
- Icon displayed on the widget installation page.
72
- We recommend an icon with the dimensions 32x32 px.
73
-
74
- ___
75
-
76
- ### label
77
-
78
- • `Optional` **label**: *string*
79
-
80
- Label displayed in the settings dialog and in the default widget preview.
81
-
82
- ___
83
-
84
- ### name
85
-
86
- • **name**: *string*
87
-
88
- The tag name of the widget. It must be compatible with
89
- webcomponent naming conventions.
90
-
91
- **`see`** https://www.webcomponents.org/community/articles/how-should-i-name-my-element
92
-
93
- ___
94
-
95
- ### options
96
-
97
- • `Optional` **options**: ElementDefinitionOptions
98
-
99
- Can be used for extending from a built-in element.
100
-
101
- ___
102
-
103
- ### uiSchema
104
-
105
- • `Optional` **uiSchema**: UiSchema
106
-
107
- Schema to add more customization to the look and feel of the configuration form.
108
-
109
- ```json
110
- {
111
- "firstName": {
112
- "ui:help": "Your first name."
113
- }
114
- }
115
- ```
116
-
117
- **`see`** https://react-jsonschema-form.readthedocs.io/en/latest/api-reference/uiSchema/
@@ -1,89 +0,0 @@
1
- # Interface: BlockElement
2
-
3
- ## Properties
4
-
5
- ### adoptedCallback
6
-
7
- • **adoptedCallback**: () => *void*
8
-
9
- Invoked when the custom element is moved to a new document.
10
-
11
- #### Type declaration:
12
-
13
- ▸ (): *void*
14
-
15
- **Returns:** *void*
16
-
17
- ___
18
-
19
- ### attributeChangedCallback
20
-
21
- • **attributeChangedCallback**: (`attrName`: *string*, `oldValue`: *undefined* \| *string*, `newValue`: *undefined* \| *string*) => *void*
22
-
23
- Invoked when one of the attributes of the custom element is added, removed, or changed.
24
-
25
- Note that you have to statically register the observed values with the 'observedAttributes' static getter.
26
-
27
- **`param`** The changed attributes name
28
-
29
- **`param`** The old value
30
-
31
- **`param`** The new value
32
-
33
- #### Type declaration:
34
-
35
- ▸ (`attrName`: *string*, `oldValue`: *undefined* \| *string*, `newValue`: *undefined* \| *string*): *void*
36
-
37
- #### Parameters:
38
-
39
- | Name | Type |
40
- | :------ | :------ |
41
- | `attrName` | *string* |
42
- | `oldValue` | *undefined* \| *string* |
43
- | `newValue` | *undefined* \| *string* |
44
-
45
- **Returns:** *void*
46
-
47
- ___
48
-
49
- ### connectedCallback
50
-
51
- • **connectedCallback**: () => *void*
52
-
53
- Invoked when the custom element is first connected to the DOM.
54
-
55
- #### Type declaration:
56
-
57
- ▸ (): *void*
58
-
59
- **Returns:** *void*
60
-
61
- ___
62
-
63
- ### disconnectedCallback
64
-
65
- • **disconnectedCallback**: () => *void*
66
-
67
- Invoked when the custom element is disconnected from the DOM.
68
-
69
- #### Type declaration:
70
-
71
- ▸ (): *void*
72
-
73
- **Returns:** *void*
74
-
75
- ___
76
-
77
- ### unmount
78
-
79
- • **unmount**: () => *void*
80
-
81
- Method to unmount / revert any effects applied by rendering.
82
- E.g. to be used in editor cases to remove any rendered content
83
- and revert the block to its initial state.
84
-
85
- #### Type declaration:
86
-
87
- ▸ (): *void*
88
-
89
- **Returns:** *void*
@@ -1,52 +0,0 @@
1
- # Interface: ColorTheme
2
-
3
- The color theme allows the widget to mimic the look
4
- and feel of the Staffbase ecosystem it was added to.
5
-
6
- ## Properties
7
-
8
- ### bgColor
9
-
10
- • **bgColor**: *string*
11
-
12
- ___
13
-
14
- ### bgColorDarkened1
15
-
16
- • `Optional` **bgColorDarkened1**: *string*
17
-
18
- ___
19
-
20
- ### bgColorDarkened2
21
-
22
- • `Optional` **bgColorDarkened2**: *string*
23
-
24
- ___
25
-
26
- ### bgColorDarkened2Opaque
27
-
28
- • `Optional` **bgColorDarkened2Opaque**: *string*
29
-
30
- ___
31
-
32
- ### bgColorLum
33
-
34
- • `Optional` **bgColorLum**: *string*
35
-
36
- ___
37
-
38
- ### colors
39
-
40
- • **colors**: [*SBColors*](../wiki/Interface:%20SBColors)
41
-
42
- ___
43
-
44
- ### outlineColor
45
-
46
- • `Optional` **outlineColor**: *string*
47
-
48
- ___
49
-
50
- ### textColor
51
-
52
- • **textColor**: *string*
@@ -1,38 +0,0 @@
1
- # Interface: ExternalBlockDefinition<Factory\>
2
-
3
- Defintion of the Widget.
4
-
5
- Includes the implementation of the BlockDefinition
6
- and meta information (author and version of the widget).
7
-
8
- ## Type parameters
9
-
10
- | Name | Default |
11
- | :------ | :------ |
12
- | `Factory` | [*BlockFactory*](../wiki/Home#blockfactory) |
13
-
14
- ## Properties
15
-
16
- ### author
17
-
18
- • **author**: *string*
19
-
20
- Name of the author.
21
-
22
- ___
23
-
24
- ### blockDefinition
25
-
26
- • **blockDefinition**: [*BlockDefinition*](../wiki/Interface:%20BlockDefinition)<Factory\>
27
-
28
- Definition of the block.
29
-
30
- Will be registered to the staffbase app.
31
-
32
- ___
33
-
34
- ### version
35
-
36
- • **version**: *string*
37
-
38
- Current version of the widget.
@@ -1,354 +0,0 @@
1
- # Interface: SBColors
2
-
3
- Detailed colors entity definition
4
-
5
- **`param`** This color is meant to be used for foreground elements and is either black or white depending
6
- on which gives the better contrast when used as a foreground color for [clientPrimary](../wiki/Interface:%20SBColors#clientprimary)
7
-
8
- **`param`** The customer's primary color (previously `bgColor`)
9
-
10
- **`param`** This is [clientPrimary](../wiki/Interface:%20SBColors#clientprimary) adjusted in contrast to give a good contrast when used as a
11
- foreground color on a white background.
12
-
13
- **`param`** The customer's secondary color (previously `textColor`).
14
-
15
- **`param`** This is [clientSecondary](../wiki/Interface:%20SBColors#clientsecondary) adjusted in contrast to give a good contrast when used as
16
- a foreground color on a white background.
17
-
18
- **`param`** Active action component states for components with white background: Hover, Pressed, etc...
19
-
20
- ## Properties
21
-
22
- ### backdrop
23
-
24
- • **backdrop**: *string*
25
-
26
- ___
27
-
28
- ### backgroundBase
29
-
30
- • **backgroundBase**: *string*
31
-
32
- ___
33
-
34
- ### backgroundField
35
-
36
- • **backgroundField**: *string*
37
-
38
- ___
39
-
40
- ### backgroundFieldLight
41
-
42
- • **backgroundFieldLight**: *string*
43
-
44
- ___
45
-
46
- ### backgroundLevel1
47
-
48
- • **backgroundLevel1**: *string*
49
-
50
- ___
51
-
52
- ### backgroundLevel2
53
-
54
- • **backgroundLevel2**: *string*
55
-
56
- ___
57
-
58
- ### backgroundLevel3
59
-
60
- • **backgroundLevel3**: *string*
61
-
62
- ___
63
-
64
- ### backgroundLevel4
65
-
66
- • **backgroundLevel4**: *string*
67
-
68
- ___
69
-
70
- ### backgroundPrimary
71
-
72
- • **backgroundPrimary**: *string*
73
-
74
- ___
75
-
76
- ### backgroundSecondary
77
-
78
- • **backgroundSecondary**: *string*
79
-
80
- ___
81
-
82
- ### backgroundTertiary
83
-
84
- • **backgroundTertiary**: *string*
85
-
86
- ___
87
-
88
- ### black
89
-
90
- • **black**: *string*
91
-
92
- ___
93
-
94
- ### blue
95
-
96
- • **blue**: *string*
97
-
98
- ___
99
-
100
- ### blueDark
101
-
102
- • **blueDark**: *string*
103
-
104
- ___
105
-
106
- ### blueLight
107
-
108
- • **blueLight**: *string*
109
-
110
- ___
111
-
112
- ### borderSolid
113
-
114
- • **borderSolid**: *string*
115
-
116
- ___
117
-
118
- ### borderTranslucent
119
-
120
- • **borderTranslucent**: *string*
121
-
122
- ___
123
-
124
- ### clientForeground
125
-
126
- • **clientForeground**: *string*
127
-
128
- ___
129
-
130
- ### clientPrimary
131
-
132
- • **clientPrimary**: *string*
133
-
134
- ___
135
-
136
- ### clientPrimaryA11y
137
-
138
- • **clientPrimaryA11y**: *string*
139
-
140
- ___
141
-
142
- ### clientSecondary
143
-
144
- • **clientSecondary**: *string*
145
-
146
- ___
147
-
148
- ### clientSecondaryA11y
149
-
150
- • **clientSecondaryA11y**: *string*
151
-
152
- ___
153
-
154
- ### fileType
155
-
156
- • **fileType**: [*SBFileType*](../wiki/Interface:%20SBFileType)
157
-
158
- ___
159
-
160
- ### green
161
-
162
- • **green**: *string*
163
-
164
- ___
165
-
166
- ### greenDark
167
-
168
- • **greenDark**: *string*
169
-
170
- ___
171
-
172
- ### greenLight
173
-
174
- • **greenLight**: *string*
175
-
176
- ___
177
-
178
- ### grey
179
-
180
- • **grey**: *string*
181
-
182
- ___
183
-
184
- ### greyDark
185
-
186
- • **greyDark**: *string*
187
-
188
- ___
189
-
190
- ### greyLight
191
-
192
- • **greyLight**: *string*
193
-
194
- ___
195
-
196
- ### hairline
197
-
198
- • **hairline**: *string*
199
-
200
- ___
201
-
202
- ### hairlineDark
203
-
204
- • **hairlineDark**: *string*
205
-
206
- ___
207
-
208
- ### hoverState
209
-
210
- • **hoverState**: *string*
211
-
212
- ___
213
-
214
- ### neutral
215
-
216
- • **neutral**: *string*
217
-
218
- ___
219
-
220
- ### neutralDark
221
-
222
- • **neutralDark**: *string*
223
-
224
- ___
225
-
226
- ### neutralLight
227
-
228
- • **neutralLight**: *string*
229
-
230
- ___
231
-
232
- ### orange
233
-
234
- • **orange**: *string*
235
-
236
- ___
237
-
238
- ### orangeDark
239
-
240
- • **orangeDark**: *string*
241
-
242
- ___
243
-
244
- ### orangeLight
245
-
246
- • **orangeLight**: *string*
247
-
248
- ___
249
-
250
- ### overlay
251
-
252
- • **overlay**: *string*
253
-
254
- ___
255
-
256
- ### overlayDark
257
-
258
- • **overlayDark**: *string*
259
-
260
- ___
261
-
262
- ### pressedState
263
-
264
- • **pressedState**: *string*
265
-
266
- ___
267
-
268
- ### red
269
-
270
- • **red**: *string*
271
-
272
- ___
273
-
274
- ### redDark
275
-
276
- • **redDark**: *string*
277
-
278
- ___
279
-
280
- ### redLight
281
-
282
- • **redLight**: *string*
283
-
284
- ___
285
-
286
- ### text
287
-
288
- • **text**: *string*
289
-
290
- ___
291
-
292
- ### textGreyBase
293
-
294
- • **textGreyBase**: *string*
295
-
296
- ___
297
-
298
- ### textGreyLevel1
299
-
300
- • **textGreyLevel1**: *string*
301
-
302
- ___
303
-
304
- ### textGreyLevel2
305
-
306
- • **textGreyLevel2**: *string*
307
-
308
- ___
309
-
310
- ### textGreyLevel3
311
-
312
- • **textGreyLevel3**: *string*
313
-
314
- ___
315
-
316
- ### textGreyLevel4
317
-
318
- • **textGreyLevel4**: *string*
319
-
320
- ___
321
-
322
- ### textLight
323
-
324
- • **textLight**: *string*
325
-
326
- ___
327
-
328
- ### textPlaceholder
329
-
330
- • **textPlaceholder**: *string*
331
-
332
- ___
333
-
334
- ### textPrimary
335
-
336
- • **textPrimary**: *string*
337
-
338
- ___
339
-
340
- ### textSecondary
341
-
342
- • **textSecondary**: *string*
343
-
344
- ___
345
-
346
- ### textTertiary
347
-
348
- • **textTertiary**: *string*
349
-
350
- ___
351
-
352
- ### warningYellow
353
-
354
- • **warningYellow**: *string*
@@ -1,39 +0,0 @@
1
- # Interface: SBFileType
2
-
3
- File type entity
4
-
5
- ## Properties
6
-
7
- ### default
8
-
9
- • **default**: *string*
10
-
11
- ___
12
-
13
- ### doc
14
-
15
- • **doc**: *string*
16
-
17
- ___
18
-
19
- ### img
20
-
21
- • **img**: *string*
22
-
23
- ___
24
-
25
- ### pdf
26
-
27
- • **pdf**: *string*
28
-
29
- ___
30
-
31
- ### ppt
32
-
33
- • **ppt**: *string*
34
-
35
- ___
36
-
37
- ### xls
38
-
39
- • **xls**: *string*
@@ -1,39 +0,0 @@
1
- # Interface: SBImageEntity
2
-
3
- Image entity definition
4
-
5
- ## Properties
6
-
7
- ### format
8
-
9
- • `Optional` **format**: *string*
10
-
11
- ___
12
-
13
- ### height
14
-
15
- • **height**: *number*
16
-
17
- ___
18
-
19
- ### mimeType
20
-
21
- • `Optional` **mimeType**: *string*
22
-
23
- ___
24
-
25
- ### size
26
-
27
- • `Optional` **size**: *number*
28
-
29
- ___
30
-
31
- ### url
32
-
33
- • **url**: *string*
34
-
35
- ___
36
-
37
- ### width
38
-
39
- • **width**: *number*