@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
package/CHANGELOG.md DELETED
@@ -1,295 +0,0 @@
1
- ## [3.3.5](https://github.com/Staffbase/widget-sdk/compare/3.3.4...3.3.5) (2021-12-22)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * update dependencies ([896bf16](https://github.com/Staffbase/widget-sdk/commit/896bf16c26a260296c18d43c897a4a8b1f45a2ef))
7
- * update dependencies ([b7a50ee](https://github.com/Staffbase/widget-sdk/commit/b7a50ee02331cc65341cc92a5f9dcf8951add7d3))
8
-
9
-
10
- ### Build System
11
-
12
- * **deps:** npm audit fix ([c985824](https://github.com/Staffbase/widget-sdk/commit/c985824cbffa6cb1e31c4911109aac1909c2d148))
13
- * **deps:** npm audit fix ([2a7983d](https://github.com/Staffbase/widget-sdk/commit/2a7983dd94d84afc13c01f31e056fde262585df1))
14
-
15
-
16
- ### Chores
17
-
18
- * test new release secret ([eed46c5](https://github.com/Staffbase/widget-sdk/commit/eed46c598d3da53b5173f7a27bf00d7530325cd1))
19
-
20
-
21
- ### Miscellaneous
22
-
23
- * ([abfb02e](https://github.com/Staffbase/widget-sdk/commit/abfb02e6f1ea1377eb0a198f597c2f277f55461c))
24
-
25
- ## [3.3.4](https://github.com/Staffbase/widget-sdk/compare/3.3.3...3.3.4) (2021-11-23)
26
-
27
-
28
- ### Bug Fixes
29
-
30
- * fix peer dependency ([13d1cba](https://github.com/Staffbase/widget-sdk/commit/13d1cba452d46a165b88d233412fc0ef54585aa8))
31
-
32
-
33
- ### Build System
34
-
35
- * **deps:** npm audit fix ([6e7a417](https://github.com/Staffbase/widget-sdk/commit/6e7a417b42a86845528f605ae18bbff448d5f77f))
36
- * **deps:** npm audit fix ([4bade01](https://github.com/Staffbase/widget-sdk/commit/4bade0131d073e9859dbbb8cc6862035fef9493f))
37
- * **deps:** npm audit fix ([89951f4](https://github.com/Staffbase/widget-sdk/commit/89951f4aa7db18babc21918bab37a6da10d330b9))
38
- * **deps:** npm audit fix ([330760c](https://github.com/Staffbase/widget-sdk/commit/330760cb4971042d132a93700fedecff16cde89b))
39
- * **deps:** npm audit fix ([856ca6b](https://github.com/Staffbase/widget-sdk/commit/856ca6b503229bae8ebf841b0637868515f3367e))
40
-
41
-
42
- ### Chores
43
-
44
- * add dependency update bot ([48be50e](https://github.com/Staffbase/widget-sdk/commit/48be50e36508ab89cb17f0b5643162180a7b7d38))
45
- * exchange token vars ([4ef9c78](https://github.com/Staffbase/widget-sdk/commit/4ef9c78bf81e9b272f4014cd5e8df1cb6b2d2f3b))
46
- * exchange token vars ([80bebb5](https://github.com/Staffbase/widget-sdk/commit/80bebb5825c5f7d410f3bc2d1493d492d757a2e4))
47
- * remove unneeded env vars ([c368fde](https://github.com/Staffbase/widget-sdk/commit/c368fdee2473b0ff7fa8b54464740200718370bd))
48
- * remove unneeded env vars ([a823c98](https://github.com/Staffbase/widget-sdk/commit/a823c98a51a5d9b928ce857d36e5ced7f8e10d98))
49
- * remove yarn ([5fb934f](https://github.com/Staffbase/widget-sdk/commit/5fb934f3aadc7eef2aea60a31b6b812335483b8f))
50
- * removed unneeded env var ([52960df](https://github.com/Staffbase/widget-sdk/commit/52960dfef49d00432ebc00a3f84a3a902aaefc6f))
51
- * update dependencies ([d9a807b](https://github.com/Staffbase/widget-sdk/commit/d9a807b5da9f13f7b811df673a2290040557ca72))
52
- * **deps:** bump semver-regex from 3.1.2 to 3.1.3 ([#28](https://github.com/Staffbase/widget-sdk/issues/28)) ([05dc6db](https://github.com/Staffbase/widget-sdk/commit/05dc6dbdbd3c4743768fc612f994522c42459264))
53
-
54
-
55
- ### Miscellaneous
56
-
57
- * ([ed1232c](https://github.com/Staffbase/widget-sdk/commit/ed1232c889fb7294283312b3a8461ca969842d14))
58
- * Set env variable ([9da7ec4](https://github.com/Staffbase/widget-sdk/commit/9da7ec4f026efb52beb920f0c5791ab7e201ab9c))
59
- * Add env variable ([f0e5b1f](https://github.com/Staffbase/widget-sdk/commit/f0e5b1fdd07fd2f04ce3008c8b82260c27acd967))
60
- * ([1622de1](https://github.com/Staffbase/widget-sdk/commit/1622de1c0741fe438e7efa7d706cb1c9c94d12ee))
61
-
62
- ## [3.3.3](https://github.com/Staffbase/widget-sdk/compare/3.3.2...3.3.3) (2021-09-01)
63
-
64
-
65
- ### Bug Fixes
66
-
67
- * dependency update ([c9de860](https://github.com/Staffbase/widget-sdk/commit/c9de860af14e902ebf58c32bc84700cdf3b18a53))
68
-
69
-
70
- ### Chores
71
-
72
- * npm audit fix ([9176053](https://github.com/Staffbase/widget-sdk/commit/9176053a1d453df87e5e8f2ae316a42098adcb8a))
73
- * **deps:** bump trim-newlines from 3.0.0 to 3.0.1 ([9d34aec](https://github.com/Staffbase/widget-sdk/commit/9d34aec5ff491dafcad315fa41c32e8b4aac98d6))
74
- * Trigger push ([66e5c87](https://github.com/Staffbase/widget-sdk/commit/66e5c879cf8c34e25ff00439b7d14c0a576cc028))
75
- * **deps:** bump normalize-url from 6.0.0 to 6.0.1 ([f1ec4cb](https://github.com/Staffbase/widget-sdk/commit/f1ec4cbffb8264d8d0f376a7cfea2500815fa704))
76
- * Trigger push ([84035d4](https://github.com/Staffbase/widget-sdk/commit/84035d446f4e2c400d988e1551de877a9a90f4eb))
77
- * update dependencies ([b18d9ac](https://github.com/Staffbase/widget-sdk/commit/b18d9ac734459784f457b4120a9816ba743f53d6))
78
- * **deps:** bump normalize-url from 6.0.0 to 6.0.1 ([178e0f0](https://github.com/Staffbase/widget-sdk/commit/178e0f05286dbb2dc27e375b03eb4c19989fb17a))
79
- * **deps:** bump trim-newlines from 3.0.0 to 3.0.1 ([e4f0e7b](https://github.com/Staffbase/widget-sdk/commit/e4f0e7bd9517ecbcb95663545d002819bc80648e))
80
-
81
-
82
- ### Miscellaneous
83
-
84
- * NFS-000: Release new version ([1bbeb5b](https://github.com/Staffbase/widget-sdk/commit/1bbeb5bb76675cffc127441a305cf9311bf57af1))
85
- * NFS-000: Dependency update ([f0c12f6](https://github.com/Staffbase/widget-sdk/commit/f0c12f6a74893028e94475240b2aa4c28aa8c9a2))
86
- * 3.3.3-beta.1 ([6e21d16](https://github.com/Staffbase/widget-sdk/commit/6e21d16ee70d130a7c2f2c03a899290b7637db66))
87
- * 3.3.3-beta.0 ([6f9859e](https://github.com/Staffbase/widget-sdk/commit/6f9859e28420ce1d97ca886574b40ab67af3c096))
88
- * NFS-000: Dependency update ([ffa68ed](https://github.com/Staffbase/widget-sdk/commit/ffa68edd3c617c8b3f2e5611efd5ad8b40aab854))
89
- * Add catalog-info.yaml for Backstage (#14) ([d7caa8e](https://github.com/Staffbase/widget-sdk/commit/d7caa8ed45d091860da33dbb5abb0a2938068235)), closes [#14](https://github.com/Staffbase/widget-sdk/issues/14)
90
-
91
- ## [3.3.2](https://github.com/Staffbase/widget-sdk/compare/3.3.1...3.3.2) (2021-05-25)
92
-
93
-
94
- ### Chores
95
-
96
- * add scripts to generate docs ([30ec320](https://github.com/Staffbase/widget-sdk/commit/30ec320a9a0d82d4b83496dd04da710a17bc2c99))
97
- * change release rule for docs ([a4a6d13](https://github.com/Staffbase/widget-sdk/commit/a4a6d136c78e39380b1e8f2e2c63c58507803ed6))
98
- * fix dependencies ([68ea122](https://github.com/Staffbase/widget-sdk/commit/68ea122d30bf67235439869cffdda35fde6d35e8))
99
-
100
-
101
- ### Documentation
102
-
103
- * add example for the json schema ([f454896](https://github.com/Staffbase/widget-sdk/commit/f45489631c1a67046b298fa0234a44f6d8bb2d93))
104
- * add more to the readme ([15f59fe](https://github.com/Staffbase/widget-sdk/commit/15f59fe1206f27dade3dd9f1fe66c5c914edae36))
105
- * add typedoc and generated docs files ([7241869](https://github.com/Staffbase/widget-sdk/commit/7241869d1080b41e144e5ec14c23c0dc9104ed7e))
106
- * add typedoc and generated docs files ([8c61df0](https://github.com/Staffbase/widget-sdk/commit/8c61df0a3f98aaa82cb1ccc8a3d161cf57d4c3ce))
107
- * Apply suggestions from code review ([b69f838](https://github.com/Staffbase/widget-sdk/commit/b69f83823674ca1a105345fa6a99d38963d4a557))
108
- * create new doc files ([f3d72f2](https://github.com/Staffbase/widget-sdk/commit/f3d72f232b1e805cab195cdd8ab646b020a70ec9))
109
- * fix missing comment line ([abe01df](https://github.com/Staffbase/widget-sdk/commit/abe01df6f8e18a173ec4edd8b237a30cc24c81b4))
110
- * fix wording, remove readme and defined links ([0454faf](https://github.com/Staffbase/widget-sdk/commit/0454faf9d793a62d9ab2d3fc93054125a70bcd7b))
111
- * update documentation ([54f9212](https://github.com/Staffbase/widget-sdk/commit/54f92123879b889b93e7690f29f69d641de93edd))
112
- * update generated docs ([8cb1a22](https://github.com/Staffbase/widget-sdk/commit/8cb1a229b58b927d1d90dcc51bb979d565a1ecf9))
113
- * updated generated doc ([c7eeede](https://github.com/Staffbase/widget-sdk/commit/c7eeeded002f2ec468de58c478262bf30a520459))
114
-
115
-
116
- ### Miscellaneous
117
-
118
- * Merge branch 'master' into nfs-1164-documentation ([d911c98](https://github.com/Staffbase/widget-sdk/commit/d911c98b947767a29d7b2349b97f9bb17171eb4f))
119
- * Next Release ([fd88885](https://github.com/Staffbase/widget-sdk/commit/fd88885a245639601d471ee6a4d51cb994fb9b15))
120
- * Merge branch 'next' into nfs-1164-documentation ([92881b1](https://github.com/Staffbase/widget-sdk/commit/92881b173480451aa9b6731f336e7b96d30898f3))
121
-
122
- ## [3.3.1](https://github.com/Staffbase/widget-sdk/compare/3.3.0...3.3.1) (2021-05-19)
123
-
124
-
125
- ### Bug Fixes
126
-
127
- * change types to allow casting ([7ed2910](https://github.com/Staffbase/widget-sdk/commit/7ed2910641b211d45d849735e621a5f2d475fb5c))
128
- * change types to allow casting ([abcb961](https://github.com/Staffbase/widget-sdk/commit/abcb9612954169a9b5d1f340e7f73d96b74dd53f))
129
-
130
-
131
- ### Chores
132
-
133
- * update package lock ([3254412](https://github.com/Staffbase/widget-sdk/commit/3254412b2de24a64fcd6bfa522684eca25907068))
134
-
135
- # [3.3.0](https://github.com/Staffbase/widget-sdk/compare/3.2.0...3.3.0) (2021-05-11)
136
-
137
-
138
- ### Bug Fixes
139
-
140
- * changed package version ([3641fdd](https://github.com/Staffbase/widget-sdk/commit/3641fdd980ba84370f8736c7ec49b3a0c93a273d))
141
- * changed props to contentLanguage #NFS-872 ([f8f0107](https://github.com/Staffbase/widget-sdk/commit/f8f01078f5798239e63f34921c43cfb1fb6e4e21)), closes [#NFS-872](https://github.com/Staffbase/widget-sdk/issues/NFS-872)
142
- * update package-lock.json ([67163cf](https://github.com/Staffbase/widget-sdk/commit/67163cf3445d3f6dc4ae6862461b28409ea22328))
143
- * update package-lock.json ([6480488](https://github.com/Staffbase/widget-sdk/commit/648048892f7804913747c24320c4f71dc7597cf7))
144
-
145
-
146
- ### Chores
147
-
148
- * add deleted block attributes file ([8c639df](https://github.com/Staffbase/widget-sdk/commit/8c639dfbe70197be614af7a4a57041d391caf372))
149
- * add deleted block attributes file ([629d0c5](https://github.com/Staffbase/widget-sdk/commit/629d0c5276cb065979e0c66b3d849e083d73a032))
150
- * add semantic release ([0dc3400](https://github.com/Staffbase/widget-sdk/commit/0dc340015f62702608b107199b977a13bcebdaa3))
151
- * add semantic release ([63e0344](https://github.com/Staffbase/widget-sdk/commit/63e0344939cb24444afab2d1ab0c3553730a5cea))
152
- * change release rules ([32f0520](https://github.com/Staffbase/widget-sdk/commit/32f05208e33801eb925c09d67dcd9ec6ae993b57))
153
- * disabled dryrun ([f390c78](https://github.com/Staffbase/widget-sdk/commit/f390c78d85446decc62b0eb9efa1a346bedb32bd))
154
- * fix blocked release ([9283e21](https://github.com/Staffbase/widget-sdk/commit/9283e210a788bee4c72856ecde5125a8daf45298))
155
- * fix blocked release ([857dcac](https://github.com/Staffbase/widget-sdk/commit/857dcac7093892a3035297bc70b693c5c9a3d501))
156
- * raise min node version ([c41863d](https://github.com/Staffbase/widget-sdk/commit/c41863d877c210b3ee46d5c7a7db77623b3c93ad))
157
- * remove publish config ([c7b6198](https://github.com/Staffbase/widget-sdk/commit/c7b61980ff4c44f8aa58f78e28486fffa5975f4e))
158
- * switched the release plugin ([5c907a6](https://github.com/Staffbase/widget-sdk/commit/5c907a6d46ee77a87b6d71c92dd9e13a3190ab1a))
159
- * use default release rules ([5932645](https://github.com/Staffbase/widget-sdk/commit/59326457e0c73ff68762bf130c80c1b5e0b8725e))
160
-
161
-
162
- ### Code Refactoring
163
-
164
- * make uischema optional ([0a0bc56](https://github.com/Staffbase/widget-sdk/commit/0a0bc5672d7964008f3440164752560ae86c8036))
165
-
166
-
167
- ### Features
168
-
169
- * add ui schema support ([ea16238](https://github.com/Staffbase/widget-sdk/commit/ea16238f0f25da1461a0c3176a872948580bb8dc))
170
- * add ui schema support ([3fe7510](https://github.com/Staffbase/widget-sdk/commit/3fe751072066f3b103c42f653a5f1e5927ee292a))
171
- * set package name ([214990b](https://github.com/Staffbase/widget-sdk/commit/214990b8f0c1ab79c5492d6e88661b6577fce80b))
172
-
173
-
174
- ### Miscellaneous
175
-
176
- * **version:** Release 3.3.0 [skip ci] ([215fe19](https://github.com/Staffbase/widget-sdk/commit/215fe190644cf2edbf34e7c20f3290d9712b080d)), closes [#NFS-872](https://github.com/Staffbase/widget-sdk/issues/NFS-872)
177
- * NFS-1002: adds definitions for the parsing of attributes ([8d5e897](https://github.com/Staffbase/widget-sdk/commit/8d5e897f956f97f03b1b7ebd5190b343db9672e9))
178
- * Merge branch 'next' into NFS-1002-parse-methods ([a4fc6e3](https://github.com/Staffbase/widget-sdk/commit/a4fc6e3b26e2fb89787c4f924235e0fdbb0b4a43))
179
- * Make ui schema optional ([3c6e1b1](https://github.com/Staffbase/widget-sdk/commit/3c6e1b104ec99acd97c5febc8ee7544ee5a856fb))
180
- * 3.3.0-beta-2 ([5ee39df](https://github.com/Staffbase/widget-sdk/commit/5ee39dff788cdd90054f097f13d8ca27844d53a0))
181
- * NFS-989: Add colors to the sdk ([eb59ed1](https://github.com/Staffbase/widget-sdk/commit/eb59ed1c7670f91e8974e1648e354d925c4feae5))
182
- * Merge branch 'Add_colors_to_the_SDK' of github.com:Staffbase/widget-sdk into Add_colors_to_the_SDK ([e576c4f](https://github.com/Staffbase/widget-sdk/commit/e576c4f8636ca8938d737bfd449d695171b42eb2))
183
- * Merge branch 'master' into Add_colors_to_the_SDK ([be07592](https://github.com/Staffbase/widget-sdk/commit/be07592ab9f8682d466b78d127bdf0a4cac6cde0))
184
- * NFS-1289: Widget SDK: As a widget developer I want to have user information provided ([7716a6f](https://github.com/Staffbase/widget-sdk/commit/7716a6f590eb3dff8b7d9ee14c84bda1a5d3a7eb))
185
- * NFS-1289: Changes from review ([ccad4b1](https://github.com/Staffbase/widget-sdk/commit/ccad4b1605129db09e840619cf26a76c99d694b4))
186
- * NFS-1289: Changes from review ([18fd04d](https://github.com/Staffbase/widget-sdk/commit/18fd04d635eedbba3f89f60cecdc6412e1a21dc1))
187
- * NFS-1289: Changes from review ([766801f](https://github.com/Staffbase/widget-sdk/commit/766801faefd489163f2191d7f2fa329e68a7fa4d))
188
- * NFS-1289: Comment adjustments from review ([6a5757b](https://github.com/Staffbase/widget-sdk/commit/6a5757b6e7f70648ce1152a67d15d6baae95fb3e))
189
- * NFS-1289: Increase alpha version ([3201add](https://github.com/Staffbase/widget-sdk/commit/3201add07f2dc8bc3cee18c17f30c4fc9c219719))
190
- * 3.3.0-alpha-1 ([ae51620](https://github.com/Staffbase/widget-sdk/commit/ae51620a8510591ef87ffb579ec4eaa5af4ffa84))
191
- * NFS-1289: Rollback incomptible changes from NFS-872 ([d276698](https://github.com/Staffbase/widget-sdk/commit/d2766983ef168d0c7f97b6cb5583d0899b8d9192))
192
- * NFS-1289: Make widgetApi non-optional ([e8ba6cc](https://github.com/Staffbase/widget-sdk/commit/e8ba6cc111c003ec4b4012a883c897fd6de064f9))
193
- * NFS-1289: Add getUserList ([76a3aed](https://github.com/Staffbase/widget-sdk/commit/76a3aedbd7ede00836d6a5dbc514eedf70a45429))
194
- * NFS-1289: Update naming and comments ([76ae96b](https://github.com/Staffbase/widget-sdk/commit/76ae96b9391052fa29617602c1b82f6cb5ca5351))
195
- * NFS-1289: Add user info type ([2f09337](https://github.com/Staffbase/widget-sdk/commit/2f0933796de0878bdf69bd3249068a75c2ac3b1d))
196
- * NFS-1289: Update index ([66b34c5](https://github.com/Staffbase/widget-sdk/commit/66b34c5a4e55222274b14571b694043201d3a838))
197
- * NFS-1289: Add widget api definition ([979d944](https://github.com/Staffbase/widget-sdk/commit/979d944010869f361b934ae181988c22eeb8c7a9))
198
- * add description for uischema ([ca052f4](https://github.com/Staffbase/widget-sdk/commit/ca052f4c68198b1035fa81ed261281079cfee531))
199
- * add description for uischema ([793e83c](https://github.com/Staffbase/widget-sdk/commit/793e83cc4ae969898cba5593086abbea3d5668a3))
200
- * NFS-872: change widget attribute ([596572b](https://github.com/Staffbase/widget-sdk/commit/596572b6121c0ed43180a584affce2d44e8c4046))
201
- * Adding the SBColors type ([436d071](https://github.com/Staffbase/widget-sdk/commit/436d071dff28a4905dd5da0786e3e87f8fe6764e))
202
- * Adding ColorTheme to the widgetApi ([98ab6e2](https://github.com/Staffbase/widget-sdk/commit/98ab6e256d93167da43965f1b1177711a03d8ac2))
203
- * 3.2.1-alpha-groda-1 ([47c6c76](https://github.com/Staffbase/widget-sdk/commit/47c6c76c9fa23f1dcb9052b433971a754e158aeb))
204
- * NFS-1289: Increase alpha version ([b82fa28](https://github.com/Staffbase/widget-sdk/commit/b82fa28d9ec06ed34352d087cc397388b851e3ed))
205
- * Merge branch 'NFS-1289-Add-Widget-Api-Definition' of github.com:Staffbase/widget-sdk into NFS-1289-Add-Widget-Api-Definition ([2acd9fa](https://github.com/Staffbase/widget-sdk/commit/2acd9faf0af7a6b5dc625d2b31b4e53f515597d0))
206
- * NFS-1289: Rollback incomptible changes from NFS-872 ([1006f62](https://github.com/Staffbase/widget-sdk/commit/1006f6201cc2dff7159582e8bde3e6674c057ae5))
207
- * 3.3.0-alpha-1 ([39e2983](https://github.com/Staffbase/widget-sdk/commit/39e29831b7dac6b63c62b4b5ed1f787569784931))
208
- * NFS-1289: Make widgetApi non-optional ([faa8223](https://github.com/Staffbase/widget-sdk/commit/faa82235e71210afe984624143f4a774ee94e897))
209
- * NFS-1289: Add getUserList ([e96311b](https://github.com/Staffbase/widget-sdk/commit/e96311b8a81165ac594d42c0a45592845dc8a0a4))
210
- * NFS-1289: Update naming and comments ([e5593d7](https://github.com/Staffbase/widget-sdk/commit/e5593d76deb6deae7386b16a3ae084ddfdb17f87))
211
- * NFS-1289: Add user info type ([ac5e83b](https://github.com/Staffbase/widget-sdk/commit/ac5e83ba585a7b75698a138f820475415abbe50c))
212
- * NFS-1289: Update index ([ef49c3d](https://github.com/Staffbase/widget-sdk/commit/ef49c3dddcf8f37656f1cf61ee54059e9c9e0c87))
213
- * NFS-1289: Add widget api definition ([a16b267](https://github.com/Staffbase/widget-sdk/commit/a16b267805eccbcb354eb6d2020b90ddfc852d5e))
214
- * Update lib/base-block.ts ([39c40ec](https://github.com/Staffbase/widget-sdk/commit/39c40ec298274f6814b7ed9a25622ea71946928a))
215
- * NFS-1002: adds definitions for the parsing of attributes ([08f5675](https://github.com/Staffbase/widget-sdk/commit/08f5675da41be87b6535c5d4a28dfe1d913f0bd4))
216
-
217
- # [3.3.0](https://github.com/Staffbase/widget-sdk/compare/3.2.0...3.3.0) (2021-05-11)
218
-
219
-
220
- ### Bug Fixes
221
-
222
- * changed package version ([3641fdd](https://github.com/Staffbase/widget-sdk/commit/3641fdd980ba84370f8736c7ec49b3a0c93a273d))
223
- * changed props to contentLanguage #NFS-872 ([f8f0107](https://github.com/Staffbase/widget-sdk/commit/f8f01078f5798239e63f34921c43cfb1fb6e4e21)), closes [#NFS-872](https://github.com/Staffbase/widget-sdk/issues/NFS-872)
224
- * update package-lock.json ([67163cf](https://github.com/Staffbase/widget-sdk/commit/67163cf3445d3f6dc4ae6862461b28409ea22328))
225
- * update package-lock.json ([6480488](https://github.com/Staffbase/widget-sdk/commit/648048892f7804913747c24320c4f71dc7597cf7))
226
-
227
-
228
- ### Chores
229
-
230
- * add deleted block attributes file ([8c639df](https://github.com/Staffbase/widget-sdk/commit/8c639dfbe70197be614af7a4a57041d391caf372))
231
- * add deleted block attributes file ([629d0c5](https://github.com/Staffbase/widget-sdk/commit/629d0c5276cb065979e0c66b3d849e083d73a032))
232
- * add semantic release ([0dc3400](https://github.com/Staffbase/widget-sdk/commit/0dc340015f62702608b107199b977a13bcebdaa3))
233
- * add semantic release ([63e0344](https://github.com/Staffbase/widget-sdk/commit/63e0344939cb24444afab2d1ab0c3553730a5cea))
234
- * change release rules ([32f0520](https://github.com/Staffbase/widget-sdk/commit/32f05208e33801eb925c09d67dcd9ec6ae993b57))
235
- * disabled dryrun ([f390c78](https://github.com/Staffbase/widget-sdk/commit/f390c78d85446decc62b0eb9efa1a346bedb32bd))
236
- * fix blocked release ([9283e21](https://github.com/Staffbase/widget-sdk/commit/9283e210a788bee4c72856ecde5125a8daf45298))
237
- * fix blocked release ([857dcac](https://github.com/Staffbase/widget-sdk/commit/857dcac7093892a3035297bc70b693c5c9a3d501))
238
- * raise min node version ([c41863d](https://github.com/Staffbase/widget-sdk/commit/c41863d877c210b3ee46d5c7a7db77623b3c93ad))
239
- * switched the release plugin ([5c907a6](https://github.com/Staffbase/widget-sdk/commit/5c907a6d46ee77a87b6d71c92dd9e13a3190ab1a))
240
- * use default release rules ([5932645](https://github.com/Staffbase/widget-sdk/commit/59326457e0c73ff68762bf130c80c1b5e0b8725e))
241
-
242
-
243
- ### Code Refactoring
244
-
245
- * make uischema optional ([0a0bc56](https://github.com/Staffbase/widget-sdk/commit/0a0bc5672d7964008f3440164752560ae86c8036))
246
-
247
-
248
- ### Features
249
-
250
- * add ui schema support ([ea16238](https://github.com/Staffbase/widget-sdk/commit/ea16238f0f25da1461a0c3176a872948580bb8dc))
251
- * add ui schema support ([3fe7510](https://github.com/Staffbase/widget-sdk/commit/3fe751072066f3b103c42f653a5f1e5927ee292a))
252
- * set package name ([214990b](https://github.com/Staffbase/widget-sdk/commit/214990b8f0c1ab79c5492d6e88661b6577fce80b))
253
-
254
-
255
- ### Miscellaneous
256
-
257
- * NFS-1002: adds definitions for the parsing of attributes ([8d5e897](https://github.com/Staffbase/widget-sdk/commit/8d5e897f956f97f03b1b7ebd5190b343db9672e9))
258
- * Merge branch 'next' into NFS-1002-parse-methods ([a4fc6e3](https://github.com/Staffbase/widget-sdk/commit/a4fc6e3b26e2fb89787c4f924235e0fdbb0b4a43))
259
- * Make ui schema optional ([3c6e1b1](https://github.com/Staffbase/widget-sdk/commit/3c6e1b104ec99acd97c5febc8ee7544ee5a856fb))
260
- * 3.3.0-beta-2 ([5ee39df](https://github.com/Staffbase/widget-sdk/commit/5ee39dff788cdd90054f097f13d8ca27844d53a0))
261
- * NFS-989: Add colors to the sdk ([eb59ed1](https://github.com/Staffbase/widget-sdk/commit/eb59ed1c7670f91e8974e1648e354d925c4feae5))
262
- * Merge branch 'Add_colors_to_the_SDK' of github.com:Staffbase/widget-sdk into Add_colors_to_the_SDK ([e576c4f](https://github.com/Staffbase/widget-sdk/commit/e576c4f8636ca8938d737bfd449d695171b42eb2))
263
- * Merge branch 'master' into Add_colors_to_the_SDK ([be07592](https://github.com/Staffbase/widget-sdk/commit/be07592ab9f8682d466b78d127bdf0a4cac6cde0))
264
- * NFS-1289: Widget SDK: As a widget developer I want to have user information provided ([7716a6f](https://github.com/Staffbase/widget-sdk/commit/7716a6f590eb3dff8b7d9ee14c84bda1a5d3a7eb))
265
- * NFS-1289: Changes from review ([ccad4b1](https://github.com/Staffbase/widget-sdk/commit/ccad4b1605129db09e840619cf26a76c99d694b4))
266
- * NFS-1289: Changes from review ([18fd04d](https://github.com/Staffbase/widget-sdk/commit/18fd04d635eedbba3f89f60cecdc6412e1a21dc1))
267
- * NFS-1289: Changes from review ([766801f](https://github.com/Staffbase/widget-sdk/commit/766801faefd489163f2191d7f2fa329e68a7fa4d))
268
- * NFS-1289: Comment adjustments from review ([6a5757b](https://github.com/Staffbase/widget-sdk/commit/6a5757b6e7f70648ce1152a67d15d6baae95fb3e))
269
- * NFS-1289: Increase alpha version ([3201add](https://github.com/Staffbase/widget-sdk/commit/3201add07f2dc8bc3cee18c17f30c4fc9c219719))
270
- * 3.3.0-alpha-1 ([ae51620](https://github.com/Staffbase/widget-sdk/commit/ae51620a8510591ef87ffb579ec4eaa5af4ffa84))
271
- * NFS-1289: Rollback incomptible changes from NFS-872 ([d276698](https://github.com/Staffbase/widget-sdk/commit/d2766983ef168d0c7f97b6cb5583d0899b8d9192))
272
- * NFS-1289: Make widgetApi non-optional ([e8ba6cc](https://github.com/Staffbase/widget-sdk/commit/e8ba6cc111c003ec4b4012a883c897fd6de064f9))
273
- * NFS-1289: Add getUserList ([76a3aed](https://github.com/Staffbase/widget-sdk/commit/76a3aedbd7ede00836d6a5dbc514eedf70a45429))
274
- * NFS-1289: Update naming and comments ([76ae96b](https://github.com/Staffbase/widget-sdk/commit/76ae96b9391052fa29617602c1b82f6cb5ca5351))
275
- * NFS-1289: Add user info type ([2f09337](https://github.com/Staffbase/widget-sdk/commit/2f0933796de0878bdf69bd3249068a75c2ac3b1d))
276
- * NFS-1289: Update index ([66b34c5](https://github.com/Staffbase/widget-sdk/commit/66b34c5a4e55222274b14571b694043201d3a838))
277
- * NFS-1289: Add widget api definition ([979d944](https://github.com/Staffbase/widget-sdk/commit/979d944010869f361b934ae181988c22eeb8c7a9))
278
- * add description for uischema ([ca052f4](https://github.com/Staffbase/widget-sdk/commit/ca052f4c68198b1035fa81ed261281079cfee531))
279
- * add description for uischema ([793e83c](https://github.com/Staffbase/widget-sdk/commit/793e83cc4ae969898cba5593086abbea3d5668a3))
280
- * NFS-872: change widget attribute ([596572b](https://github.com/Staffbase/widget-sdk/commit/596572b6121c0ed43180a584affce2d44e8c4046))
281
- * Adding the SBColors type ([436d071](https://github.com/Staffbase/widget-sdk/commit/436d071dff28a4905dd5da0786e3e87f8fe6764e))
282
- * Adding ColorTheme to the widgetApi ([98ab6e2](https://github.com/Staffbase/widget-sdk/commit/98ab6e256d93167da43965f1b1177711a03d8ac2))
283
- * 3.2.1-alpha-groda-1 ([47c6c76](https://github.com/Staffbase/widget-sdk/commit/47c6c76c9fa23f1dcb9052b433971a754e158aeb))
284
- * NFS-1289: Increase alpha version ([b82fa28](https://github.com/Staffbase/widget-sdk/commit/b82fa28d9ec06ed34352d087cc397388b851e3ed))
285
- * Merge branch 'NFS-1289-Add-Widget-Api-Definition' of github.com:Staffbase/widget-sdk into NFS-1289-Add-Widget-Api-Definition ([2acd9fa](https://github.com/Staffbase/widget-sdk/commit/2acd9faf0af7a6b5dc625d2b31b4e53f515597d0))
286
- * NFS-1289: Rollback incomptible changes from NFS-872 ([1006f62](https://github.com/Staffbase/widget-sdk/commit/1006f6201cc2dff7159582e8bde3e6674c057ae5))
287
- * 3.3.0-alpha-1 ([39e2983](https://github.com/Staffbase/widget-sdk/commit/39e29831b7dac6b63c62b4b5ed1f787569784931))
288
- * NFS-1289: Make widgetApi non-optional ([faa8223](https://github.com/Staffbase/widget-sdk/commit/faa82235e71210afe984624143f4a774ee94e897))
289
- * NFS-1289: Add getUserList ([e96311b](https://github.com/Staffbase/widget-sdk/commit/e96311b8a81165ac594d42c0a45592845dc8a0a4))
290
- * NFS-1289: Update naming and comments ([e5593d7](https://github.com/Staffbase/widget-sdk/commit/e5593d76deb6deae7386b16a3ae084ddfdb17f87))
291
- * NFS-1289: Add user info type ([ac5e83b](https://github.com/Staffbase/widget-sdk/commit/ac5e83ba585a7b75698a138f820475415abbe50c))
292
- * NFS-1289: Update index ([ef49c3d](https://github.com/Staffbase/widget-sdk/commit/ef49c3dddcf8f37656f1cf61ee54059e9c9e0c87))
293
- * NFS-1289: Add widget api definition ([a16b267](https://github.com/Staffbase/widget-sdk/commit/a16b267805eccbcb354eb6d2020b90ddfc852d5e))
294
- * Update lib/base-block.ts ([39c40ec](https://github.com/Staffbase/widget-sdk/commit/39c40ec298274f6814b7ed9a25622ea71946928a))
295
- * NFS-1002: adds definitions for the parsing of attributes ([08f5675](https://github.com/Staffbase/widget-sdk/commit/08f5675da41be87b6535c5d4a28dfe1d913f0bd4))
package/CONTRIBUTING.md DELETED
@@ -1,10 +0,0 @@
1
- # Contributing
2
-
3
- Staffbase uses CLAs, or Contributor License Agreements, to manage contributions to Free and Open Source Software projects that it hosts.
4
-
5
- Staffbase uses two versions of the CLA:
6
-
7
- - An **Individual CLA** for individual contributors. This can be signed through CLA Assistant when submitting a commit in GitHub.
8
- - A **Corporate CLA**, for companies that would like to sign one CLA for their contributors. Please contact opensource(at)staffbase.com in this case.
9
-
10
- Staffbase’s two CLAs are based on the Apache Software Foundation CLAs that are widely in use for various free and open source software projects. Our changes are generally limited to replacing Staffbase as the licensee, minor formatting changes and headings added for readability, and to comply with our CLA process integrated into GitHub or our processes around signature and management of the software project.
package/catalog-info.yaml DELETED
@@ -1,11 +0,0 @@
1
- apiVersion: backstage.io/v1alpha1
2
- kind: Component
3
- metadata:
4
- name: widget-sdk
5
- annotations:
6
- github.com/project-slug: Staffbase/widget-sdk
7
- tags:
8
- - TypeScript
9
- spec:
10
- type: service
11
- lifecycle: production
package/lib/base-block.ts DELETED
@@ -1,110 +0,0 @@
1
- /*!
2
- * Copyright 2021, Staffbase GmbH and contributors.
3
- * Licensed under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License.
5
- * You may obtain a copy of the License at
6
- * http://www.apache.org/licenses/LICENSE-2.0
7
- * Unless required by applicable law or agreed to in writing, software
8
- * distributed under the License is distributed on an "AS IS" BASIS,
9
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- * See the License for the specific language governing permissions and
11
- * limitations under the License.
12
- */
13
-
14
- /**
15
- * Base class for custom widgets.
16
- *
17
- * Should be used to extend other custom elements to render their content.
18
- * Provides common editing and render capabilities for Staffbase widgets.
19
- */
20
- export interface BaseBlock extends HTMLElement {
21
- /**
22
- * Called when the widget is rendered in a page.
23
- * Override this method in order to display your widget contents.
24
- *
25
- * Default implementation is a noop.
26
- *
27
- * @param container an `HTMLElement` into which the contents of the widget should be rendered.
28
- * Note that this does not necessarily have to be `this` since the base class might
29
- * render a title, a div with a border, or other decorations.
30
- */
31
- renderBlock(container: HTMLElement): void;
32
-
33
- /**
34
- * Called when the widget is rendered in the WYSIWYG editor.
35
- * override this method in order to display your widget preview.
36
- *
37
- * By default, the editor will display a generic placeholder
38
- * with the widget name and icon.
39
- *
40
- * @param container an `HTMLElement` into which the contents of the widget should be rendered
41
- * Note that this does not necessarily have to be `this` since the base class might
42
- * render a title, a div with a border, or other decorations.
43
- */
44
- renderBlockInEditor(container: HTMLElement): void;
45
-
46
- /**
47
- * Called when the widget is unmounted from the DOM.
48
- *
49
- * Override this in order to implement your unmount logic.
50
- *
51
- * @param container an `HTMLElement` which was used previously to render the widget.
52
- */
53
- unmountBlock(container: HTMLElement): void;
54
-
55
- /**
56
- * Called when an attribute is changed.
57
- *
58
- * Override this in order to get notified about new attribute values.
59
- *
60
- * NOTE: There are attributes that are common to all widgets. They are handled
61
- * inside the base block. Therefore, if you override this method, be sure to
62
- * call `super.attributeChangedCallback()` inside your implementation, in
63
- * order to let the base class know about the arguments that it might be interested in.
64
- */
65
- attributeChangedCallback(
66
- attrName: string,
67
- oldValue: string | undefined,
68
- newValue: string | undefined
69
- ): void;
70
-
71
- /**
72
- * Called after the dialog is closed and the attributes are set on the web component.
73
- *
74
- * Override this if the attributes are handled with a different logic then the default one.
75
- *
76
- * @param attributes A map of attributes, as defined in the block definition, which have the
77
- * types from the form data
78
- *
79
- * NOTE: The default implementation turns every value in a string, except arrays and object, which
80
- * are converted to base64 encoded data uris in the format `data:text/plain;base64,...`
81
- */
82
- parseConfig<T extends Record<string, any>>(attributes: T): Record<string, string>;
83
-
84
- /**
85
- * Called when the config dialog is opened. The dialog uses the parsed attributes, to fill
86
- * the fields with the existing values.
87
- *
88
- * Uses the property blockDefinition.attributes to parse each indidividual attribute and
89
- * returns it in the format, the configuration form needs. The common attributes are handled
90
- * externally
91
- *
92
- * This method is the counter part of parseConfig, the this must be implemented, if parseConfig
93
- * is overriden.
94
- *
95
- * NOTE: The default implementation converts every string to string, boolean or number and decodes
96
- * and parses the data uris to the arrays and objects. Dates are remaining a string!
97
- */
98
- parseAttributes<T extends Record<string, any>>(): T;
99
-
100
- /**
101
- * The content language as defined in the hosting system. Should be used to provide
102
- * the correct localization in the widget.
103
- *
104
- * NOTE: This is not necessarily the same as the UI language, which is defined by the browser.
105
- * When a widget is added to a specific content, the content-language attribute gets automatically set
106
- * to that language.
107
- */
108
- contentLanguage: string;
109
-
110
- }
@@ -1,101 +0,0 @@
1
- /*!
2
- * Copyright 2021, Staffbase GmbH and contributors.
3
- * Licensed under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License.
5
- * You may obtain a copy of the License at
6
- * http://www.apache.org/licenses/LICENSE-2.0
7
- * Unless required by applicable law or agreed to in writing, software
8
- * distributed under the License is distributed on an "AS IS" BASIS,
9
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- * See the License for the specific language governing permissions and
11
- * limitations under the License.
12
- */
13
-
14
- import { BlockFactory } from "./block-factory";
15
- import { JSONSchema7 } from "json-schema";
16
- import {UiSchema} from '@rjsf/core';
17
-
18
- export interface BlockDefinition<Factory = BlockFactory> {
19
- /**
20
- * The tag name of the widget. It must be compatible with
21
- * webcomponent naming conventions.
22
- *
23
- * @see https://www.webcomponents.org/community/articles/how-should-i-name-my-element
24
- */
25
- name: string;
26
-
27
- /**
28
- * The implementation of the web component.
29
- */
30
- factory: Factory;
31
-
32
- /**
33
- * Can be used for extending from a built-in element.
34
- */
35
- options?: ElementDefinitionOptions;
36
-
37
- /**
38
- * DOM attributes of the element, must be in kebab-case.
39
- */
40
- attributes: string[];
41
-
42
- /**
43
- * Set to `inline` if you want the element to behave like a span element
44
- * rather than a div element if not specified, it defaults to `block`.
45
- */
46
- blockLevel?: "block" | "inline";
47
-
48
- /**
49
- * Schema used for defining the configuration form.
50
- *
51
- * @example
52
- * ```json
53
- * {
54
- * "type": "object",
55
- * "required": [
56
- * "firstName",
57
- * "lastName"
58
- * ],
59
- * "properties": {
60
- * "firstName": {
61
- * "type": "string",
62
- * "title": "First name"
63
- * },
64
- * "lastName": {
65
- * "type": "string",
66
- * "title": "Last name"
67
- * }
68
- * }
69
- * }
70
- * ```
71
- * @see https://react-jsonschema-form.readthedocs.io/en/latest/
72
- */
73
- configurationSchema: JSONSchema7;
74
-
75
- /**
76
- *
77
- * Schema to add more customization to the look and feel of the configuration form.
78
- *
79
- * ```json
80
- * {
81
- * "firstName": {
82
- * "ui:help": "Your first name."
83
- * }
84
- * }
85
- * ```
86
- *
87
- * @see https://react-jsonschema-form.readthedocs.io/en/latest/api-reference/uiSchema/
88
- */
89
- uiSchema?: UiSchema;
90
-
91
- /**
92
- * Label displayed in the settings dialog and in the default widget preview.
93
- */
94
- label?: string;
95
-
96
- /**
97
- * Icon displayed on the widget installation page.
98
- * We recommend an icon with the dimensions 32x32 px.
99
- */
100
- iconUrl?: string;
101
- }
@@ -1,56 +0,0 @@
1
- /*!
2
- * Copyright 2021, Staffbase GmbH and contributors.
3
- * Licensed under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License.
5
- * You may obtain a copy of the License at
6
- * http://www.apache.org/licenses/LICENSE-2.0
7
- * Unless required by applicable law or agreed to in writing, software
8
- * distributed under the License is distributed on an "AS IS" BASIS,
9
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- * See the License for the specific language governing permissions and
11
- * limitations under the License.
12
- */
13
-
14
- export interface BlockElement {
15
- /**
16
- * Static getter to determine which HTML attributes should trigger the function 'attributeChangedCallback';
17
- */
18
- // readonly observedAttributes: string[];
19
-
20
- /**
21
- * Invoked when the custom element is first connected to the DOM.
22
- */
23
- connectedCallback: () => void;
24
-
25
- /**
26
- * Invoked when the custom element is disconnected from the DOM.
27
- */
28
- disconnectedCallback: () => void;
29
-
30
- /**
31
- * Invoked when the custom element is moved to a new document.
32
- */
33
- adoptedCallback: () => void;
34
-
35
- /**
36
- * Invoked when one of the attributes of the custom element is added, removed, or changed.
37
- *
38
- * Note that you have to statically register the observed values with the 'observedAttributes' static getter.
39
- *
40
- * @param attrName The changed attributes name
41
- * @param oldValue The old value
42
- * @param newValue The new value
43
- */
44
- attributeChangedCallback: (
45
- attrName: string,
46
- oldValue: string | undefined,
47
- newValue: string | undefined
48
- ) => void;
49
-
50
- /**
51
- * Method to unmount / revert any effects applied by rendering.
52
- * E.g. to be used in editor cases to remove any rendered content
53
- * and revert the block to its initial state.
54
- */
55
- unmount: () => void;
56
- }
package/tsconfig.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "esnext",
4
- "module": "commonjs",
5
- "noEmit": true,
6
-
7
- "strict": true,
8
-
9
- "moduleResolution": "node",
10
- "baseUrl": "./",
11
- "esModuleInterop": true
12
- }
13
- }