@nethesis/phone-island 0.2.0 → 0.2.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/dist/index.css +1 -0
- package/package.json +8 -3
- package/.eslintrc.json +0 -41
- package/.prettierrc +0 -9
- package/.storybook/main.js +0 -20
- package/.storybook/preview.js +0 -11
- package/decs.d.ts +0 -1
- package/postcss.config.js +0 -5
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -18
- package/rollup.config.ts +0 -59
- package/scripts/buildUtils.js +0 -28
- package/src/App.tsx +0 -467
- package/src/index.css +0 -9
- package/src/index.ts +0 -2
- package/src/index.widget.tsx +0 -22
- package/src/lib/janus.js +0 -3661
- package/src/stories/App.stories.tsx +0 -36
- package/tailwind.config.js +0 -14
- package/tsconfig.json +0 -21
- package/widget-example/index.html +0 -20
package/dist/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.absolute{position:absolute}.bottom-6{bottom:1.5rem}.left-20{left:5rem}.ml-5{margin-left:1.25rem}.flex{display:flex}.hidden{display:none}.h-3{height:.75rem}.w-fit{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.w-3{width:.75rem}.transform{-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-col{flex-direction:column}.content-center{align-content:center}.items-center{align-items:center}.justify-center{justify-content:center}.gap-5{gap:1.25rem}.gap-3{gap:.75rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.rounded{border-radius:.25rem}.border{border-width:1px}.border-transparent{border-color:transparent}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity))}.px-10{padding-left:2.5rem;padding-right:2.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-sm{font-size:.875rem;line-height:1.25rem}.font-medium{font-weight:500}.leading-4{line-height:1rem}.tracking-wide{letter-spacing:.025em}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity))}.focus\:z-20:focus{z-index:20}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-green-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(34 197 94/var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus\:ring-offset-black:focus{--tw-ring-offset-color:#000}.disabled\:opacity-75:disabled{opacity:.75}
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nethesis/phone-island",
|
|
3
3
|
"author": "Nethesis",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"private": false,
|
|
6
|
+
"files": [
|
|
7
|
+
"./dist/**"
|
|
8
|
+
],
|
|
6
9
|
"dependencies": {
|
|
7
10
|
"@swc/helpers": "^0.4.12",
|
|
8
11
|
"@testing-library/jest-dom": "^5.11.4",
|
|
@@ -23,8 +26,10 @@
|
|
|
23
26
|
"build:css": "NODE_ENV=production npx tailwindcss -o ./dist/index.css --minify",
|
|
24
27
|
"build:widget": "parcel build ./src/index.widget.tsx --dist-dir dist-widget --no-source-maps",
|
|
25
28
|
"serve:widget": "rm -rf ./widget-example/static/* && cp -rf ./dist-widget/* ./widget-example/static && npx http-server ./widget-example -o -c-1",
|
|
26
|
-
"build-storybook": "build-storybook -s public"
|
|
27
|
-
|
|
29
|
+
"build-storybook": "build-storybook -s public"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
28
33
|
},
|
|
29
34
|
"eslintConfig": {
|
|
30
35
|
"extends": [
|
package/.eslintrc.json
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"browser": true,
|
|
4
|
-
"es2021": true,
|
|
5
|
-
"jest": true
|
|
6
|
-
},
|
|
7
|
-
"extends": [
|
|
8
|
-
"eslint:recommended",
|
|
9
|
-
"plugin:react/recommended",
|
|
10
|
-
"plugin:@typescript-eslint/recommended",
|
|
11
|
-
"prettier",
|
|
12
|
-
"plugin:storybook/recommended"
|
|
13
|
-
],
|
|
14
|
-
"parser": "@typescript-eslint/parser",
|
|
15
|
-
"parserOptions": {
|
|
16
|
-
"ecmaFeatures": {
|
|
17
|
-
"jsx": true
|
|
18
|
-
},
|
|
19
|
-
"ecmaVersion": "latest",
|
|
20
|
-
"sourceType": "module"
|
|
21
|
-
},
|
|
22
|
-
"plugins": [
|
|
23
|
-
"react",
|
|
24
|
-
"react-hooks",
|
|
25
|
-
"@typescript-eslint",
|
|
26
|
-
"prettier"
|
|
27
|
-
],
|
|
28
|
-
"rules": {
|
|
29
|
-
"react/react-in-jsx-scope": "off",
|
|
30
|
-
"camelcase": "error",
|
|
31
|
-
"spaced-comment": "error",
|
|
32
|
-
"quotes": ["error", "single"],
|
|
33
|
-
"no-duplicate-imports": "error",
|
|
34
|
-
"react/display-name": false
|
|
35
|
-
},
|
|
36
|
-
"settings": {
|
|
37
|
-
"import/resolver": {
|
|
38
|
-
"typescript": {}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
package/.prettierrc
DELETED
package/.storybook/main.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
stories: ['../src/**/*.stories.@(ts|tsx|js|jsx)'],
|
|
3
|
-
addons: [
|
|
4
|
-
'@storybook/addon-links',
|
|
5
|
-
'@storybook/addon-essentials',
|
|
6
|
-
'@storybook/addon-actions',
|
|
7
|
-
{
|
|
8
|
-
name: '@storybook/addon-postcss',
|
|
9
|
-
options: {
|
|
10
|
-
postcssLoaderOptions: {
|
|
11
|
-
implementation: require('postcss'),
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
// https://storybook.js.org/docs/react/configure/typescript#mainjs-configuration
|
|
17
|
-
typescript: {
|
|
18
|
-
check: true // type-check stories during Storybook build
|
|
19
|
-
}
|
|
20
|
-
}
|
package/.storybook/preview.js
DELETED
package/decs.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module 'janus-gateway'
|
package/postcss.config.js
DELETED
package/public/favicon.ico
DELETED
|
Binary file
|
package/public/index.html
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<meta name="theme-color" content="#000000" />
|
|
7
|
-
<meta name="description" content="Web site created using create-react-app" />
|
|
8
|
-
|
|
9
|
-
<title>React App</title>
|
|
10
|
-
</head>
|
|
11
|
-
<body>
|
|
12
|
-
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
13
|
-
<code>
|
|
14
|
-
<p>Start developing the component running the following command in your terminal:</p>
|
|
15
|
-
<h2>npm run dev</h2>
|
|
16
|
-
</code>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
package/rollup.config.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import resolve from '@rollup/plugin-node-resolve'
|
|
2
|
-
import commonjs from '@rollup/plugin-commonjs'
|
|
3
|
-
import typescript from '@rollup/plugin-typescript'
|
|
4
|
-
import postcss from 'rollup-plugin-postcss'
|
|
5
|
-
import babel from '@rollup/plugin-babel'
|
|
6
|
-
import { terser } from 'rollup-plugin-terser'
|
|
7
|
-
import { getFiles } from './scripts/buildUtils'
|
|
8
|
-
import generatePackageJson from 'rollup-plugin-generate-package-json'
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
input: ['./src/index.ts', ...getFiles('./src/components', ['.js', '.ts', '.jsx', '.tsx'])],
|
|
12
|
-
output: [
|
|
13
|
-
{
|
|
14
|
-
format: 'cjs',
|
|
15
|
-
dir: 'dist',
|
|
16
|
-
sourcemap: true,
|
|
17
|
-
preserveModules: true,
|
|
18
|
-
preserveModulesRoot: 'src',
|
|
19
|
-
exports: 'named',
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
plugins: [
|
|
23
|
-
resolve({
|
|
24
|
-
browser: true,
|
|
25
|
-
}),
|
|
26
|
-
commonjs(),
|
|
27
|
-
typescript({
|
|
28
|
-
tsconfig: './tsconfig.json',
|
|
29
|
-
declaration: true,
|
|
30
|
-
declarationDir: 'dist',
|
|
31
|
-
exclude: [
|
|
32
|
-
'src/*.widget.{js,jsx,ts,tsx}',
|
|
33
|
-
'src/stories/**',
|
|
34
|
-
'src/tests/**',
|
|
35
|
-
'node_modules',
|
|
36
|
-
'dist',
|
|
37
|
-
'lib/janus.js',
|
|
38
|
-
],
|
|
39
|
-
}),
|
|
40
|
-
babel({
|
|
41
|
-
include: ['**.js', 'node_modules/**'],
|
|
42
|
-
babelHelpers: 'bundled',
|
|
43
|
-
presets: ['@babel/preset-env'],
|
|
44
|
-
}),
|
|
45
|
-
postcss(),
|
|
46
|
-
terser(),
|
|
47
|
-
generatePackageJson({
|
|
48
|
-
baseContents: (pkg) => ({
|
|
49
|
-
name: pkg.name,
|
|
50
|
-
author: pkg.author,
|
|
51
|
-
dependencies: pkg.dependencies,
|
|
52
|
-
private: pkg.private,
|
|
53
|
-
main: './index.js',
|
|
54
|
-
types: './index.d.ts',
|
|
55
|
-
}),
|
|
56
|
-
}),
|
|
57
|
-
],
|
|
58
|
-
external: ['react', 'react-dom', 'react-scripts'],
|
|
59
|
-
}
|
package/scripts/buildUtils.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/* eslint-disable import/prefer-default-export */
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
|
|
4
|
-
export const getFiles = (entry, extensions = [], excludeExtensions = []) => {
|
|
5
|
-
let fileNames = [];
|
|
6
|
-
const dirs = fs.readdirSync(entry);
|
|
7
|
-
|
|
8
|
-
dirs.forEach((dir) => {
|
|
9
|
-
const path = `${entry}/${dir}`;
|
|
10
|
-
|
|
11
|
-
if (fs.lstatSync(path).isDirectory()) {
|
|
12
|
-
fileNames = [
|
|
13
|
-
...fileNames,
|
|
14
|
-
...getFiles(path, extensions, excludeExtensions),
|
|
15
|
-
];
|
|
16
|
-
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
if (!excludeExtensions.some((exclude) => dir.endsWith(exclude))
|
|
21
|
-
&& extensions.some((ext) => dir.endsWith(ext))
|
|
22
|
-
) {
|
|
23
|
-
fileNames.push(path);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
return fileNames;
|
|
28
|
-
};
|