@staffbase/widget-sdk 3.3.1 → 3.3.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.
@@ -0,0 +1 @@
1
+ * @Staffbase/need-for-speed-devs
@@ -11,8 +11,6 @@ on:
11
11
  env:
12
12
  GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
13
13
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
14
- STAFFBASE_GITHUB_PACKAGES_TOKEN: ${{ secrets.GH_TOKEN }}
15
- STAFFBASE_NPM_JS_TOKEN: ${{ secrets.NPM_TOKEN }}
16
14
 
17
15
  jobs:
18
16
  test:
@@ -0,0 +1,24 @@
1
+ name: Dependency Update
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "0 12 * * 3" # every Wednesday at 12pm UTC
6
+ workflow_dispatch:
7
+
8
+ env:
9
+ NPM_TOKEN: ${{ secrets.STAFFBOT_NPM_TOKEN_PACKAGE_READ }}
10
+ GITHUB_TOKEN: ${{ secrets.STAFFBOT_GITHUB_TOKEN }}
11
+
12
+ jobs:
13
+ npm-audit-fix:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ with:
18
+ persist-credentials: false
19
+ - uses: Staffbase/npm-audit-fix-action@v3.3.0
20
+ with:
21
+ github_token: ${{ secrets.STAFFBOT_GITHUB_TOKEN }}
22
+ github_user: "Staffbot"
23
+ github_email: "staffbot@staffbase.com"
24
+ labels: "dependencies, javascript, security, dev"
package/.releaserc CHANGED
@@ -12,7 +12,7 @@ plugins:
12
12
  - type: "chore"
13
13
  release: false
14
14
  - type: "docs"
15
- release: false
15
+ release: "patch"
16
16
  - type: "refactor"
17
17
  release: false
18
18
  - type: "style"
package/CHANGELOG.md CHANGED
@@ -1,3 +1,100 @@
1
+ ## [3.3.4](https://github.com/Staffbase/widget-sdk/compare/3.3.3...3.3.4) (2021-11-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * fix peer dependency ([13d1cba](https://github.com/Staffbase/widget-sdk/commit/13d1cba452d46a165b88d233412fc0ef54585aa8))
7
+
8
+
9
+ ### Build System
10
+
11
+ * **deps:** npm audit fix ([6e7a417](https://github.com/Staffbase/widget-sdk/commit/6e7a417b42a86845528f605ae18bbff448d5f77f))
12
+ * **deps:** npm audit fix ([4bade01](https://github.com/Staffbase/widget-sdk/commit/4bade0131d073e9859dbbb8cc6862035fef9493f))
13
+ * **deps:** npm audit fix ([89951f4](https://github.com/Staffbase/widget-sdk/commit/89951f4aa7db18babc21918bab37a6da10d330b9))
14
+ * **deps:** npm audit fix ([330760c](https://github.com/Staffbase/widget-sdk/commit/330760cb4971042d132a93700fedecff16cde89b))
15
+ * **deps:** npm audit fix ([856ca6b](https://github.com/Staffbase/widget-sdk/commit/856ca6b503229bae8ebf841b0637868515f3367e))
16
+
17
+
18
+ ### Chores
19
+
20
+ * add dependency update bot ([48be50e](https://github.com/Staffbase/widget-sdk/commit/48be50e36508ab89cb17f0b5643162180a7b7d38))
21
+ * exchange token vars ([4ef9c78](https://github.com/Staffbase/widget-sdk/commit/4ef9c78bf81e9b272f4014cd5e8df1cb6b2d2f3b))
22
+ * exchange token vars ([80bebb5](https://github.com/Staffbase/widget-sdk/commit/80bebb5825c5f7d410f3bc2d1493d492d757a2e4))
23
+ * remove unneeded env vars ([c368fde](https://github.com/Staffbase/widget-sdk/commit/c368fdee2473b0ff7fa8b54464740200718370bd))
24
+ * remove unneeded env vars ([a823c98](https://github.com/Staffbase/widget-sdk/commit/a823c98a51a5d9b928ce857d36e5ced7f8e10d98))
25
+ * remove yarn ([5fb934f](https://github.com/Staffbase/widget-sdk/commit/5fb934f3aadc7eef2aea60a31b6b812335483b8f))
26
+ * removed unneeded env var ([52960df](https://github.com/Staffbase/widget-sdk/commit/52960dfef49d00432ebc00a3f84a3a902aaefc6f))
27
+ * update dependencies ([d9a807b](https://github.com/Staffbase/widget-sdk/commit/d9a807b5da9f13f7b811df673a2290040557ca72))
28
+ * **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))
29
+
30
+
31
+ ### Miscellaneous
32
+
33
+ * ([ed1232c](https://github.com/Staffbase/widget-sdk/commit/ed1232c889fb7294283312b3a8461ca969842d14))
34
+ * Set env variable ([9da7ec4](https://github.com/Staffbase/widget-sdk/commit/9da7ec4f026efb52beb920f0c5791ab7e201ab9c))
35
+ * Add env variable ([f0e5b1f](https://github.com/Staffbase/widget-sdk/commit/f0e5b1fdd07fd2f04ce3008c8b82260c27acd967))
36
+ * ([1622de1](https://github.com/Staffbase/widget-sdk/commit/1622de1c0741fe438e7efa7d706cb1c9c94d12ee))
37
+
38
+ ## [3.3.3](https://github.com/Staffbase/widget-sdk/compare/3.3.2...3.3.3) (2021-09-01)
39
+
40
+
41
+ ### Bug Fixes
42
+
43
+ * dependency update ([c9de860](https://github.com/Staffbase/widget-sdk/commit/c9de860af14e902ebf58c32bc84700cdf3b18a53))
44
+
45
+
46
+ ### Chores
47
+
48
+ * npm audit fix ([9176053](https://github.com/Staffbase/widget-sdk/commit/9176053a1d453df87e5e8f2ae316a42098adcb8a))
49
+ * **deps:** bump trim-newlines from 3.0.0 to 3.0.1 ([9d34aec](https://github.com/Staffbase/widget-sdk/commit/9d34aec5ff491dafcad315fa41c32e8b4aac98d6))
50
+ * Trigger push ([66e5c87](https://github.com/Staffbase/widget-sdk/commit/66e5c879cf8c34e25ff00439b7d14c0a576cc028))
51
+ * **deps:** bump normalize-url from 6.0.0 to 6.0.1 ([f1ec4cb](https://github.com/Staffbase/widget-sdk/commit/f1ec4cbffb8264d8d0f376a7cfea2500815fa704))
52
+ * Trigger push ([84035d4](https://github.com/Staffbase/widget-sdk/commit/84035d446f4e2c400d988e1551de877a9a90f4eb))
53
+ * update dependencies ([b18d9ac](https://github.com/Staffbase/widget-sdk/commit/b18d9ac734459784f457b4120a9816ba743f53d6))
54
+ * **deps:** bump normalize-url from 6.0.0 to 6.0.1 ([178e0f0](https://github.com/Staffbase/widget-sdk/commit/178e0f05286dbb2dc27e375b03eb4c19989fb17a))
55
+ * **deps:** bump trim-newlines from 3.0.0 to 3.0.1 ([e4f0e7b](https://github.com/Staffbase/widget-sdk/commit/e4f0e7bd9517ecbcb95663545d002819bc80648e))
56
+
57
+
58
+ ### Miscellaneous
59
+
60
+ * NFS-000: Release new version ([1bbeb5b](https://github.com/Staffbase/widget-sdk/commit/1bbeb5bb76675cffc127441a305cf9311bf57af1))
61
+ * NFS-000: Dependency update ([f0c12f6](https://github.com/Staffbase/widget-sdk/commit/f0c12f6a74893028e94475240b2aa4c28aa8c9a2))
62
+ * 3.3.3-beta.1 ([6e21d16](https://github.com/Staffbase/widget-sdk/commit/6e21d16ee70d130a7c2f2c03a899290b7637db66))
63
+ * 3.3.3-beta.0 ([6f9859e](https://github.com/Staffbase/widget-sdk/commit/6f9859e28420ce1d97ca886574b40ab67af3c096))
64
+ * NFS-000: Dependency update ([ffa68ed](https://github.com/Staffbase/widget-sdk/commit/ffa68edd3c617c8b3f2e5611efd5ad8b40aab854))
65
+ * 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)
66
+
67
+ ## [3.3.2](https://github.com/Staffbase/widget-sdk/compare/3.3.1...3.3.2) (2021-05-25)
68
+
69
+
70
+ ### Chores
71
+
72
+ * add scripts to generate docs ([30ec320](https://github.com/Staffbase/widget-sdk/commit/30ec320a9a0d82d4b83496dd04da710a17bc2c99))
73
+ * change release rule for docs ([a4a6d13](https://github.com/Staffbase/widget-sdk/commit/a4a6d136c78e39380b1e8f2e2c63c58507803ed6))
74
+ * fix dependencies ([68ea122](https://github.com/Staffbase/widget-sdk/commit/68ea122d30bf67235439869cffdda35fde6d35e8))
75
+
76
+
77
+ ### Documentation
78
+
79
+ * add example for the json schema ([f454896](https://github.com/Staffbase/widget-sdk/commit/f45489631c1a67046b298fa0234a44f6d8bb2d93))
80
+ * add more to the readme ([15f59fe](https://github.com/Staffbase/widget-sdk/commit/15f59fe1206f27dade3dd9f1fe66c5c914edae36))
81
+ * add typedoc and generated docs files ([7241869](https://github.com/Staffbase/widget-sdk/commit/7241869d1080b41e144e5ec14c23c0dc9104ed7e))
82
+ * add typedoc and generated docs files ([8c61df0](https://github.com/Staffbase/widget-sdk/commit/8c61df0a3f98aaa82cb1ccc8a3d161cf57d4c3ce))
83
+ * Apply suggestions from code review ([b69f838](https://github.com/Staffbase/widget-sdk/commit/b69f83823674ca1a105345fa6a99d38963d4a557))
84
+ * create new doc files ([f3d72f2](https://github.com/Staffbase/widget-sdk/commit/f3d72f232b1e805cab195cdd8ab646b020a70ec9))
85
+ * fix missing comment line ([abe01df](https://github.com/Staffbase/widget-sdk/commit/abe01df6f8e18a173ec4edd8b237a30cc24c81b4))
86
+ * fix wording, remove readme and defined links ([0454faf](https://github.com/Staffbase/widget-sdk/commit/0454faf9d793a62d9ab2d3fc93054125a70bcd7b))
87
+ * update documentation ([54f9212](https://github.com/Staffbase/widget-sdk/commit/54f92123879b889b93e7690f29f69d641de93edd))
88
+ * update generated docs ([8cb1a22](https://github.com/Staffbase/widget-sdk/commit/8cb1a229b58b927d1d90dcc51bb979d565a1ecf9))
89
+ * updated generated doc ([c7eeede](https://github.com/Staffbase/widget-sdk/commit/c7eeeded002f2ec468de58c478262bf30a520459))
90
+
91
+
92
+ ### Miscellaneous
93
+
94
+ * Merge branch 'master' into nfs-1164-documentation ([d911c98](https://github.com/Staffbase/widget-sdk/commit/d911c98b947767a29d7b2349b97f9bb17171eb4f))
95
+ * Next Release ([fd88885](https://github.com/Staffbase/widget-sdk/commit/fd88885a245639601d471ee6a4d51cb994fb9b15))
96
+ * Merge branch 'next' into nfs-1164-documentation ([92881b1](https://github.com/Staffbase/widget-sdk/commit/92881b173480451aa9b6731f336e7b96d30898f3))
97
+
1
98
  ## [3.3.1](https://github.com/Staffbase/widget-sdk/compare/3.3.0...3.3.1) (2021-05-19)
2
99
 
3
100
 
package/README.md CHANGED
@@ -1,3 +1,36 @@
1
+
1
2
  # Staffbase Widget SDK
2
3
 
3
- Type definitions and utilities for Staffbase widgets.
4
+ This library is a set of TypeScript definitions, which helps you to develop a custom widget for the Staffbase ecosystem.
5
+
6
+
7
+
8
+ ## Installation
9
+
10
+ Install the Widget SDK with npm:
11
+
12
+ ```bash
13
+ npm install -D @staffbase/widget-sdk
14
+ ```
15
+
16
+ Install the Widget SDK with yarn:
17
+
18
+ ```bash
19
+ yarn add -D @staffbase/widget-sdk
20
+ ```
21
+
22
+ ## Documentation
23
+
24
+ The documentation for all the modules can be found in the [docs](./docs/Home.md) folder.
25
+
26
+
27
+ ## Support
28
+
29
+ For support, create an issue in this repository.
30
+
31
+
32
+ ## License
33
+
34
+ [Apache 2.0](https://choosealicense.com/licenses/apache-2.0/)
35
+
36
+
@@ -0,0 +1,11 @@
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/docs/Home.md ADDED
@@ -0,0 +1,74 @@
1
+ # @staffbase/widget-sdk
2
+
3
+ ## Table of contents
4
+
5
+ ### Interfaces
6
+
7
+ - [BaseBlock](../wiki/Interface:%20BaseBlock)
8
+ - [BlockAttributes](../wiki/Interface:%20BlockAttributes)
9
+ - [BlockDefinition](../wiki/Interface:%20BlockDefinition)
10
+ - [BlockElement](../wiki/Interface:%20BlockElement)
11
+ - [ColorTheme](../wiki/Interface:%20ColorTheme)
12
+ - [ExternalBlockDefinition](../wiki/Interface:%20ExternalBlockDefinition)
13
+ - [SBColors](../wiki/Interface:%20SBColors)
14
+ - [SBFileType](../wiki/Interface:%20SBFileType)
15
+ - [SBImageEntity](../wiki/Interface:%20SBImageEntity)
16
+ - [SBUserAvatar](../wiki/Interface:%20SBUserAvatar)
17
+ - [SBUserProfile](../wiki/Interface:%20SBUserProfile)
18
+ - [UserListItem](../wiki/Interface:%20UserListItem)
19
+ - [UserListRequestQuery](../wiki/Interface:%20UserListRequestQuery)
20
+ - [UserListResponse](../wiki/Interface:%20UserListResponse)
21
+ - [WidgetApi](../wiki/Interface:%20WidgetApi)
22
+
23
+ ## Type aliases
24
+
25
+ ### BlockFactory
26
+
27
+ Ƭ **BlockFactory**: (`Base`: () => [*BaseBlock*](../wiki/Interface:%20BaseBlock), `widgetApi`: [*WidgetApi*](../wiki/Interface:%20WidgetApi)) => CustomElementConstructor
28
+
29
+ Factory for the custom widgets.
30
+
31
+ **`param`** base class for the custom widgets to inherit from.
32
+ The class itself is a subclass of `HTMLElement` of the relevant `window` object,
33
+ with additional functionality.
34
+
35
+ **`param`** API providing methods for additional information by the Staffbase framework
36
+
37
+ **`example`**
38
+ const factory: BlockFactory = Base => {
39
+
40
+ return class CustomBlock extends Base {
41
+ constructor() {
42
+ super();
43
+ }
44
+
45
+ // widget implementation follows ...
46
+ }
47
+ };
48
+
49
+ #### Type declaration:
50
+
51
+ ▸ (`Base`: () => [*BaseBlock*](../wiki/Interface:%20BaseBlock), `widgetApi`: [*WidgetApi*](../wiki/Interface:%20WidgetApi)): CustomElementConstructor
52
+
53
+ #### Parameters:
54
+
55
+ | Name | Type |
56
+ | :------ | :------ |
57
+ | `Base` | () => [*BaseBlock*](../wiki/Interface:%20BaseBlock) |
58
+ | `widgetApi` | [*WidgetApi*](../wiki/Interface:%20WidgetApi) |
59
+
60
+ **Returns:** CustomElementConstructor
61
+
62
+ ___
63
+
64
+ ### UserListSorting
65
+
66
+ Ƭ **UserListSorting**: ``"lastname"`` \| ``"created"`` \| ``"updated"``
67
+
68
+ The sorting order of the user list.
69
+
70
+ **`param`** sort response by lastName_ASC_firstName_ASC (default)
71
+
72
+ **`param`** sort by date of creation descending
73
+
74
+ **`param`** sort by date of last update descending