@screeb/sdk-angular 0.1.1
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 +111 -0
- package/dist/es/index.d.ts +3 -0
- package/dist/es/index.js +653 -0
- package/dist/es/logger.d.ts +9 -0
- package/dist/es/screeb-config.d.ts +29 -0
- package/dist/es/screeb.d.ts +301 -0
- package/dist/es/screeb.module.d.ts +27 -0
- package/docs/.nojekyll +1 -0
- package/docs/README.md +11 -0
- package/docs/classes/Screeb.md +505 -0
- package/docs/classes/ScreebConfig.md +87 -0
- package/docs/classes/ScreebModule.md +61 -0
- package/package.json +78 -0
package/README.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://screeb.app" alt="Screeb">
|
|
3
|
+
<img src="https://raw.githubusercontent.com/ScreebApp/sdk-js/master/packages/screeb-sdk-angular/readme/screeb-logo.svg?token=GHSAT0AAAAAAB2OOPMGT2QD5TL3IRJN3CKCZDEYHJA" alt="Logo" height="120px" style="margin-top: 20px;"/>
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
<h1 align="center">@screeb/sdk-angular</h1>
|
|
7
|
+
<p align="center">
|
|
8
|
+
Screeb's browser sdk, optimized for Angular.
|
|
9
|
+
|
|
10
|
+
<b>Continuous Product Discovery, Without the Time Sink.</b>
|
|
11
|
+
|
|
12
|
+
<a href="https://screeb.app" alt="Screeb">Screeb</a> is the only Continuous Product Discovery platform that lets you analyse users' behaviour, ask in-app questions, recruit people for interviews and analyse data in a blink with AI.
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="https://github.com/ScreebApp/sdk-js/actions/workflows/node.js.yml" alt="ci">
|
|
17
|
+
<img alt="ci" src="https://github.com/ScreebApp/sdk-js/actions/workflows/node.js.yml/badge.svg">
|
|
18
|
+
</a>
|
|
19
|
+
<a href="https://www.npmjs.com/package/@screeb/sdk-angular" alt="version">
|
|
20
|
+
<img alt="version" src="https://img.shields.io/npm/v/@screeb/sdk-angular.svg" />
|
|
21
|
+
</a>
|
|
22
|
+
<a href="https://bundlephobia.com/package/@screeb/sdk-angular" alt="min size">
|
|
23
|
+
<img alt="min size" src="https://img.shields.io/bundlephobia/min/@screeb/sdk-angular">
|
|
24
|
+
</a>
|
|
25
|
+
<a href="https://bundlephobia.com/package/@screeb/sdk-angular" alt="minzipped size">
|
|
26
|
+
<img alt="minzipped size" src="https://img.shields.io/bundlephobia/minzip/@screeb/sdk-angular">
|
|
27
|
+
</a>
|
|
28
|
+
<img alt="downloads" src="https://badgen.net/npm/dw/@screeb/sdk-angular" />
|
|
29
|
+
</p>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
This library is published in the NPM registry and can be installed using any compatible package manager.
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm install @screeb/sdk-angular --save
|
|
38
|
+
|
|
39
|
+
# For Yarn, use the command below.
|
|
40
|
+
yarn add @screeb/sdk-angular
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Usage
|
|
44
|
+
|
|
45
|
+
Basic usage:
|
|
46
|
+
|
|
47
|
+
In your app bootstrap and/or app module:
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
import { ScreebModule } from "@screeb/sdk-angular";
|
|
51
|
+
|
|
52
|
+
@NgModule({
|
|
53
|
+
imports: [
|
|
54
|
+
// ...
|
|
55
|
+
ScreebModule.forRoot({
|
|
56
|
+
autoInit: true,
|
|
57
|
+
"<your-website-id>",
|
|
58
|
+
"<your-user-id>",
|
|
59
|
+
{
|
|
60
|
+
firstname: '<user-firstname>',
|
|
61
|
+
lastname: '<user-lastname>',
|
|
62
|
+
plan: '<user-plan>',
|
|
63
|
+
last_seen_at: new Date(),
|
|
64
|
+
authenticated: true
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
// ...
|
|
68
|
+
]
|
|
69
|
+
})
|
|
70
|
+
export class AppModule {}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Then, if you need to use Screeb SDK API, in any module:
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
// App
|
|
77
|
+
import { Component, OnInit } from '@angular/core';
|
|
78
|
+
import { ScreebModule } from "@screeb/sdk-angular";
|
|
79
|
+
|
|
80
|
+
@Component({
|
|
81
|
+
selector: 'app',
|
|
82
|
+
template: `...`
|
|
83
|
+
})
|
|
84
|
+
export class AppComponent implements OnInit {
|
|
85
|
+
constructor(
|
|
86
|
+
public screeb: Screeb
|
|
87
|
+
){}
|
|
88
|
+
|
|
89
|
+
ngOnInit() {
|
|
90
|
+
this.screeb.eventTrack("screeb-sdk-angular-example started", {
|
|
91
|
+
test: 123,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
For a working example, see our [Screeb Angular SDK example app](https://github.com/ScreebApp/sdk-js/tree/master/packages/screeb-sdk-angular-example).
|
|
98
|
+
|
|
99
|
+
For a more advanced usage and a complete API documentation, see [documentation generated from source files](https://github.com/ScreebApp/sdk-js/tree/master/packages/screeb-sdk-angular/docs).
|
|
100
|
+
|
|
101
|
+
For further information, see [our developper documentation](https://github.com/ScreebApp/developers).
|
|
102
|
+
|
|
103
|
+
## Support
|
|
104
|
+
For any issues, please contact our support team at support@screeb.com.
|
|
105
|
+
|
|
106
|
+
## Contributing
|
|
107
|
+
All third party contributors acknowledge that any contributions they provide will be made under the same open source license that the open source project is provided under.
|
|
108
|
+
|
|
109
|
+
## License
|
|
110
|
+
|
|
111
|
+
Released under [MIT License](https://github.com/ScreebApp/sdk-js/blob/master/LICENSE).
|