@nethesis/phone-island 0.2.0

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,36 @@
1
+ // Copyright (C) 2022 Nethesis S.r.l.
2
+ // SPDX-License-Identifier: AGPL-3.0-or-later
3
+
4
+ import { Story, Meta } from '@storybook/react'
5
+ import React from 'react'
6
+ import { App } from '../App'
7
+
8
+ const meta = {
9
+ title: 'App Widget',
10
+ component: App,
11
+ argTypes: {},
12
+ parameters: {
13
+ controls: { expanded: true },
14
+ },
15
+ }
16
+
17
+ export default meta as Meta
18
+
19
+ // On user login
20
+ // /me
21
+ // /login // Token no expire
22
+
23
+ const HOST_NAME: string = 'nv-seb'
24
+ const USERNAME: string = 'foo1'
25
+ const AUTH_TOKEN: string = '791ff10b8666939426eb1b5507e983558f0e5806'
26
+ const SIP_EXTEN: string = '211'
27
+ const SIP_SECRET: string = '0081a9189671e8c3d1ad8b025f92403da'
28
+
29
+ const config = btoa(HOST_NAME + ':' + USERNAME + ':' + AUTH_TOKEN + ':' + SIP_EXTEN + ':' + SIP_SECRET)
30
+
31
+ console.log(config)
32
+
33
+ const Template: Story<any> = (args) => <App dataConfig={config} {...args} />
34
+
35
+ export const Default = Template.bind({})
36
+ Default.args = {}
@@ -0,0 +1,14 @@
1
+ module.exports = {
2
+ content: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'],
3
+ mode: 'jit',
4
+ theme: {
5
+ extend: {},
6
+ },
7
+ variants: {
8
+ extend: {},
9
+ },
10
+ plugins: [],
11
+ corePlugins: {
12
+ preflight: false,
13
+ },
14
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es5",
4
+ "lib": ["dom", "dom.iterable", "esnext"],
5
+ "allowJs": true,
6
+ "skipLibCheck": true,
7
+ "esModuleInterop": true,
8
+ "allowSyntheticDefaultImports": true,
9
+ "strict": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "noFallthroughCasesInSwitch": true,
12
+ "module": "esnext",
13
+ "moduleResolution": "node",
14
+ "resolveJsonModule": true,
15
+ "isolatedModules": true,
16
+ "noEmit": true,
17
+ "jsx": "react",
18
+ "noImplicitAny": false
19
+ },
20
+ "include": ["src", "public/libs"]
21
+ }
@@ -0,0 +1,20 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+ <meta name="theme-color" content="#000000" />
8
+ <!-- IMPORT THE WIDGET CSS -->
9
+ <link rel="stylesheet" type="text/css" href="./static/index.widget.css" />
10
+ <!-- IMPORT THE WIDGET CSS -->
11
+ <title>React Widget</title>
12
+ </head>
13
+ <body>
14
+ <noscript>You need to enable JavaScript to run this app.</noscript>
15
+ <div class="phone-island" data-config="bnYtc2ViOmZvbzE6ZmQzODkxOGI1YTI4YTE4Y2U5ZGM0MzIzNWZhNDEyZTAwYTQ5MjU2YToyMTE6MDA4MWE5MTg5NjcxZThjM2QxYWQ4YjAyNWY5MjQwM2Rh"></div>
16
+ <!-- IMPORT THE WIDGET JS -->
17
+ <script type="text/javascript" src="./static/index.widget.js"></script>
18
+ <!-- IMPORT THE WIDGET JS -->
19
+ </body>
20
+ </html>