codenotch-react 1.0.8 → 1.0.10
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/index.d.ts +1 -5
- package/index.js +1 -25
- package/package.json +6 -2
package/index.d.ts
CHANGED
|
@@ -30,8 +30,4 @@ export interface ICodenotchAppProps {
|
|
|
30
30
|
baseUrl?: string;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
export type CodenotchApp<T> = React.FC<(ICodenotchAppProps & T)>;
|
|
34
|
-
|
|
35
|
-
export class CodenotchAppComponent extends React.Component<ICodenotchAppProps> {
|
|
36
|
-
|
|
37
|
-
}
|
|
33
|
+
export type CodenotchApp<T> = React.FC<(ICodenotchAppProps & T)>;
|
package/index.js
CHANGED
|
@@ -1,31 +1,7 @@
|
|
|
1
|
-
const React = require('react');
|
|
2
|
-
|
|
3
1
|
const CODENOTCH_ENV = {
|
|
4
2
|
|
|
5
3
|
};
|
|
6
4
|
|
|
7
|
-
class CodenotchAppComponent extends React.Component {
|
|
8
|
-
constructor(props) {
|
|
9
|
-
super(props);
|
|
10
|
-
// Initialiser l'environnement Codenotch avec les props
|
|
11
|
-
if (props.clusterUrl) {
|
|
12
|
-
CODENOTCH_ENV.clusterUrl = props.clusterUrl;
|
|
13
|
-
}
|
|
14
|
-
if (props.serviceName) {
|
|
15
|
-
CODENOTCH_ENV.serviceName = props.serviceName;
|
|
16
|
-
}
|
|
17
|
-
if (props.tenantName) {
|
|
18
|
-
CODENOTCH_ENV.tenantName = props.tenantName;
|
|
19
|
-
}
|
|
20
|
-
if (props.userId) {
|
|
21
|
-
CODENOTCH_ENV.userId = props.userId;
|
|
22
|
-
}
|
|
23
|
-
if (props.accessToken) {
|
|
24
|
-
CODENOTCH_ENV.accessToken = props.accessToken;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
5
|
function useCodenotch() {
|
|
30
6
|
console.log("useCodenotch has been called");
|
|
31
7
|
return {
|
|
@@ -127,4 +103,4 @@ function useCodenotchApp(props) {
|
|
|
127
103
|
return useCodenotch();
|
|
128
104
|
}
|
|
129
105
|
|
|
130
|
-
module.exports = { useCodenotch, useCodenotchApp
|
|
106
|
+
module.exports = { useCodenotch, useCodenotchApp };
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codenotch-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
|
-
"
|
|
6
|
+
"type": "module",
|
|
7
|
+
"author": "Codenotch SA",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@types/react": "^16.9.0"
|
|
10
|
+
}
|
|
7
11
|
}
|