andoncloud-sdk 1.4.34 → 1.4.35
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 +14 -18
- package/dist/andoncloud-sdk.js +24 -24
- package/dist/andoncloud-sdk.js.map +1 -1
- package/dist/app/__tests__/loginWithPassword.d.ts +1 -0
- package/dist/app/components/app.d.ts +3 -0
- package/dist/app/components/authRedirect.d.ts +2 -0
- package/dist/app/components/container.d.ts +18 -0
- package/dist/app/components/container.styles.d.ts +20 -0
- package/dist/app/components/container.test.d.ts +1 -0
- package/dist/app/components/header.d.ts +36 -0
- package/dist/app/components/header.styles.d.ts +38 -0
- package/dist/app/components/header.test.d.ts +1 -0
- package/dist/app/components/loader.d.ts +5 -0
- package/dist/app/components/loginForm.d.ts +28 -0
- package/dist/app/components/loginForm.test.d.ts +1 -0
- package/dist/app/components/loginModal.d.ts +31 -0
- package/dist/app/components/loginModal.test.d.ts +1 -0
- package/dist/app/components/loginRedirect.d.ts +2 -0
- package/dist/app/components/networkError.d.ts +3 -0
- package/dist/app/components/router.d.ts +4 -0
- package/dist/app/hooks/useLogin.d.ts +2 -0
- package/dist/app/hooks/useLoginStatus.d.ts +4 -0
- package/dist/app/hooks/useModalHook/ModalContext.d.ts +7 -0
- package/dist/app/hooks/useModalHook/ModalProvider.d.ts +4 -0
- package/dist/app/hooks/useModalHook/index.d.ts +3 -0
- package/dist/app/hooks/useModalHook/useModal.d.ts +8 -0
- package/dist/app/hooks/useQueryParams.d.ts +2 -0
- package/dist/app/pages/ErrorPage.d.ts +11 -0
- package/dist/app/pages/LoginPage.d.ts +14 -0
- package/dist/app/providers/authConfig.d.ts +5 -0
- package/dist/app/stores/appStore.d.ts +8 -0
- package/dist/app/stores/sessionStore.d.ts +49 -0
- package/dist/app/stores/userStore.d.ts +8 -0
- package/dist/app/testing/index.d.ts +1 -0
- package/dist/app/theme.d.ts +2 -0
- package/dist/app/utils/cookies-manager.d.ts +7 -0
- package/dist/app/utils/fetch.d.ts +9 -0
- package/dist/app/utils/service-worker.d.ts +1 -0
- package/dist/index.d.ts +8 -11
- package/dist/locales/i18n.d.ts +22 -0
- package/dist/locales/index.d.ts +2 -0
- package/dist/serviceWorkerRegistration.d.ts +2 -0
- package/dist/setupTests.d.ts +1 -0
- package/dist/version.d.ts +1 -0
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -14,8 +14,8 @@ Change the version number in package.json in order to publish code to npm.
|
|
|
14
14
|
|
|
15
15
|
### Router:
|
|
16
16
|
|
|
17
|
-
Use
|
|
18
|
-
|
|
17
|
+
Use `<AndonCloudRouter/>` instead of your react-router.
|
|
18
|
+
import AndonCloudRouter from 'andoncloud-sdk';
|
|
19
19
|
|
|
20
20
|
<AndonCloudRouter shouldAuthenticate history={browserHistory} baseUrl={Config.API_URL}>
|
|
21
21
|
...
|
|
@@ -24,14 +24,14 @@ Use ```<AndonCloudRouter/>``` instead of your react-router.
|
|
|
24
24
|
### Container
|
|
25
25
|
|
|
26
26
|
You can pass all the props that you want, but you HAVE TO pass baseUrl prop with base url to your api.
|
|
27
|
-
Wrap your outer container with
|
|
27
|
+
Wrap your outer container with `<Container/>` in order to use the provided header and navigation drawer. Remember to pass baseUrl to Container.
|
|
28
28
|
|
|
29
29
|
import Container from 'andoncloud-sdk';
|
|
30
30
|
|
|
31
31
|
<Container baseUrl={Config.API_URL} >
|
|
32
32
|
...
|
|
33
33
|
</Container>
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
Pass showAcLogo and showCompanyLogo to Container in order to disable logotypes in the header.
|
|
36
36
|
|
|
37
37
|
import Container from 'andoncloud-sdk';
|
|
@@ -39,7 +39,7 @@ Pass showAcLogo and showCompanyLogo to Container in order to disable logotypes i
|
|
|
39
39
|
<Container baseUrl={Config.API_URL} showAcLogo={false} showCompanyLogo={false} >
|
|
40
40
|
...
|
|
41
41
|
</Container>
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
### Push notification
|
|
44
44
|
|
|
45
45
|
To use push notification you have to include initializeAndonCloudNotification and you have to mount it in your main controller.
|
|
@@ -63,25 +63,21 @@ Add to main component
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
To receive push notification even when card is closed you need to create Service Worker
|
|
66
|
-
To do it you need to copy ServiceWorker
|
|
66
|
+
To do it you need to copy ServiceWorker `firebase-messaging-sw.js` to main folder.
|
|
67
67
|
|
|
68
|
-
1. Install
|
|
68
|
+
1. Install `CopyWebpackPlugin` using `npm install --save-dev copy-webpack-plugin`
|
|
69
69
|
2. Add to your webpack-dist.conf.js:
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
new CopyWebpackPlugin([
|
|
76
|
-
{ from: 'service_workers/firebase-messaging-sw.js' }
|
|
77
|
-
])
|
|
78
|
-
|
|
79
|
-
Minimum resolution: 1024x600
|
|
80
|
-
|
|
71
|
+
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
72
|
+
const path = require('path');
|
|
81
73
|
|
|
74
|
+
new CopyWebpackPlugin([
|
|
75
|
+
{ from: 'service_workers/firebase-messaging-sw.js' }
|
|
76
|
+
])
|
|
82
77
|
|
|
83
|
-
|
|
78
|
+
Minimum resolution: 1024x600
|
|
84
79
|
|
|
80
|
+
---
|
|
85
81
|
|
|
86
82
|
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
|
87
83
|
|