@axelor/aos-mobile-core 7.1.0 → 7.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/lib/api/metafile-api.d.ts +1 -0
- package/lib/api/metafile-api.js +6 -1
- package/lib/api/metafile-api.js.map +1 -1
- package/lib/apiProviders/utils.d.ts +7 -7
- package/lib/apiProviders/utils.js +18 -22
- package/lib/apiProviders/utils.js.map +1 -1
- package/lib/app/Module.d.ts +15 -2
- package/lib/auth/api/user-api.js +5 -3
- package/lib/auth/api/user-api.js.map +1 -1
- package/lib/auth/features/userSlice.js +7 -1
- package/lib/auth/features/userSlice.js.map +1 -1
- package/lib/auth/i18n/en.json +0 -16
- package/lib/auth/i18n/fr.json +0 -16
- package/lib/auth/index.js +1 -0
- package/lib/auth/index.js.map +1 -1
- package/lib/auth/models/objectFields.js +14 -0
- package/lib/auth/models/objectFields.js.map +1 -1
- package/lib/components/molecules/UploadFileInput/UploadFileInput.d.ts +8 -3
- package/lib/components/molecules/UploadFileInput/UploadFileInput.js +111 -19
- package/lib/components/molecules/UploadFileInput/UploadFileInput.js.map +1 -1
- package/lib/components/molecules/index.d.ts +0 -3
- package/lib/components/molecules/index.js +0 -3
- package/lib/components/molecules/index.js.map +1 -1
- package/lib/components/organisms/DateInput/DateInput.d.ts +2 -1
- package/lib/components/organisms/DateInput/DateInput.js +8 -5
- package/lib/components/organisms/DateInput/DateInput.js.map +1 -1
- package/lib/components/organisms/index.d.ts +1 -6
- package/lib/components/organisms/index.js +1 -6
- package/lib/components/organisms/index.js.map +1 -1
- package/lib/components/templates/index.d.ts +0 -3
- package/lib/components/templates/index.js +0 -3
- package/lib/components/templates/index.js.map +1 -1
- package/lib/header/HeaderActionsProvider.d.ts +3 -4
- package/lib/header/HeaderActionsProvider.js +16 -10
- package/lib/header/HeaderActionsProvider.js.map +1 -1
- package/lib/header/index.d.ts +2 -1
- package/lib/header/index.js +2 -1
- package/lib/header/index.js.map +1 -1
- package/lib/i18n/hooks/use-translator.d.ts +1 -1
- package/lib/i18n/translations/en.json +34 -4
- package/lib/i18n/translations/fr.json +34 -4
- package/lib/navigator/Navigator.js +19 -7
- package/lib/navigator/Navigator.js.map +1 -1
- package/lib/navigator/drawer/DrawerContent.js +39 -21
- package/lib/navigator/drawer/DrawerContent.js.map +1 -1
- package/lib/navigator/drawer/Header.js +26 -6
- package/lib/navigator/drawer/Header.js.map +1 -1
- package/lib/navigator/drawer/Menu.d.ts +2 -1
- package/lib/navigator/drawer/Menu.js +42 -17
- package/lib/navigator/drawer/Menu.js.map +1 -1
- package/lib/navigator/drawer/MenuItem.d.ts +8 -5
- package/lib/navigator/drawer/MenuItem.js +11 -51
- package/lib/navigator/drawer/MenuItem.js.map +1 -1
- package/lib/navigator/drawer/MenuItemEntry.d.ts +12 -0
- package/lib/navigator/drawer/MenuItemEntry.js +89 -0
- package/lib/navigator/drawer/MenuItemEntry.js.map +1 -0
- package/lib/navigator/drawer/SubMenuItem.d.ts +7 -0
- package/lib/navigator/drawer/SubMenuItem.js +34 -0
- package/lib/navigator/drawer/SubMenuItem.js.map +1 -0
- package/lib/navigator/drawer/SubMenuItemList.d.ts +10 -0
- package/lib/navigator/drawer/SubMenuItemList.js +46 -0
- package/lib/navigator/drawer/SubMenuItemList.js.map +1 -0
- package/lib/navigator/menu.helper.d.ts +9 -0
- package/lib/navigator/menu.helper.js +92 -0
- package/lib/navigator/menu.helper.js.map +1 -1
- package/lib/navigator/module.helper.d.ts +5 -0
- package/lib/navigator/module.helper.js +37 -1
- package/lib/navigator/module.helper.js.map +1 -1
- package/lib/screens/LoginScreen.js +47 -73
- package/lib/screens/LoginScreen.js.map +1 -1
- package/lib/screens/SessionManagementScreen.js +41 -21
- package/lib/screens/SessionManagementScreen.js.map +1 -1
- package/lib/sessions/SessionStorage.d.ts +4 -5
- package/lib/sessions/SessionStorage.js +30 -22
- package/lib/sessions/SessionStorage.js.map +1 -1
- package/lib/{components/templates/PopupCreateSession → sessions/components/alerts}/PopupCreateSession.d.ts +2 -2
- package/lib/sessions/components/alerts/PopupCreateSession.js +128 -0
- package/lib/sessions/components/alerts/PopupCreateSession.js.map +1 -0
- package/lib/sessions/components/alerts/PopupEditSession.d.ts +8 -0
- package/lib/sessions/components/alerts/PopupEditSession.js +83 -0
- package/lib/sessions/components/alerts/PopupEditSession.js.map +1 -0
- package/lib/sessions/components/alerts/PopupSession.d.ts +9 -0
- package/lib/sessions/components/alerts/PopupSession.js +84 -0
- package/lib/sessions/components/alerts/PopupSession.js.map +1 -0
- package/lib/sessions/components/alerts/index.d.ts +3 -0
- package/lib/sessions/components/alerts/index.js +21 -0
- package/lib/sessions/components/alerts/index.js.map +1 -0
- package/lib/sessions/components/buttons/DisabledButton.d.ts +7 -0
- package/lib/{components/molecules/LoginButton/LoginButton.js → sessions/components/buttons/DisabledButton.js} +5 -5
- package/lib/sessions/components/buttons/DisabledButton.js.map +1 -0
- package/lib/sessions/components/buttons/LoginButton.js +24 -0
- package/lib/sessions/components/buttons/LoginButton.js.map +1 -0
- package/lib/sessions/components/buttons/UpdateButton.d.ts +6 -0
- package/lib/sessions/components/buttons/UpdateButton.js +24 -0
- package/lib/sessions/components/buttons/UpdateButton.js.map +1 -0
- package/lib/sessions/components/buttons/index.d.ts +3 -0
- package/lib/sessions/components/buttons/index.js +21 -0
- package/lib/sessions/components/buttons/index.js.map +1 -0
- package/lib/sessions/components/display/LogoImage.js.map +1 -0
- package/lib/sessions/components/display/SessionCard.d.ts +9 -0
- package/lib/sessions/components/display/SessionCard.js +185 -0
- package/lib/sessions/components/display/SessionCard.js.map +1 -0
- package/lib/sessions/components/display/SessionListCard.d.ts +10 -0
- package/lib/sessions/components/display/SessionListCard.js +78 -0
- package/lib/sessions/components/display/SessionListCard.js.map +1 -0
- package/lib/sessions/components/display/index.d.ts +3 -0
- package/lib/sessions/components/display/index.js +21 -0
- package/lib/sessions/components/display/index.js.map +1 -0
- package/lib/{components/molecules/ErrorText → sessions/components/error}/ErrorText.js +2 -2
- package/lib/sessions/components/error/ErrorText.js.map +1 -0
- package/lib/sessions/components/error/index.d.ts +1 -0
- package/lib/sessions/components/error/index.js +19 -0
- package/lib/sessions/components/error/index.js.map +1 -0
- package/lib/sessions/components/index.d.ts +5 -0
- package/lib/sessions/components/index.js +23 -0
- package/lib/sessions/components/index.js.map +1 -0
- package/lib/sessions/components/inputs/DefaultCheckbox.d.ts +8 -0
- package/lib/sessions/components/inputs/DefaultCheckbox.js +36 -0
- package/lib/sessions/components/inputs/DefaultCheckbox.js.map +1 -0
- package/lib/{components/organisms/PasswordInput → sessions/components/inputs}/PasswordInput.d.ts +2 -1
- package/lib/{components/organisms/PasswordInput → sessions/components/inputs}/PasswordInput.js +5 -2
- package/lib/sessions/components/inputs/PasswordInput.js.map +1 -0
- package/lib/sessions/components/inputs/SessionInputs.d.ts +12 -0
- package/lib/sessions/components/inputs/SessionInputs.js +177 -0
- package/lib/sessions/components/inputs/SessionInputs.js.map +1 -0
- package/lib/{components/organisms/SessionNameInput → sessions/components/inputs}/SessionNameInput.d.ts +2 -1
- package/lib/{components/organisms/SessionNameInput → sessions/components/inputs}/SessionNameInput.js +5 -2
- package/lib/sessions/components/inputs/SessionNameInput.js.map +1 -0
- package/lib/{components/organisms/UrlInput → sessions/components/inputs}/UrlInput.d.ts +2 -1
- package/lib/{components/organisms/UrlInput → sessions/components/inputs}/UrlInput.js +14 -3
- package/lib/sessions/components/inputs/UrlInput.js.map +1 -0
- package/lib/{components/organisms/UsernameInput → sessions/components/inputs}/UsernameInput.js +10 -2
- package/lib/sessions/components/inputs/UsernameInput.js.map +1 -0
- package/lib/sessions/components/inputs/index.d.ts +6 -0
- package/lib/sessions/components/inputs/index.js +24 -0
- package/lib/sessions/components/inputs/index.js.map +1 -0
- package/lib/sessions/hook.d.ts +1 -1
- package/lib/sessions/hook.js +5 -5
- package/lib/sessions/hook.js.map +1 -1
- package/lib/sessions/index.d.ts +2 -1
- package/lib/sessions/index.js +2 -1
- package/lib/sessions/index.js.map +1 -1
- package/lib/sessions/type.d.ts +2 -1
- package/lib/sessions/type.js.map +1 -1
- package/lib/sessions/utils.d.ts +2 -1
- package/lib/sessions/utils.js +26 -7
- package/lib/sessions/utils.js.map +1 -1
- package/lib/tools/ContactProvider.d.ts +9 -0
- package/lib/tools/ContactProvider.js +98 -0
- package/lib/tools/ContactProvider.js.map +1 -0
- package/lib/tools/contact.helper.d.ts +21 -0
- package/lib/tools/contact.helper.js +136 -0
- package/lib/tools/contact.helper.js.map +1 -0
- package/lib/tools/index.d.ts +1 -0
- package/lib/tools/index.js +1 -0
- package/lib/tools/index.js.map +1 -1
- package/lib/utils/date.d.ts +16 -0
- package/lib/utils/date.js +41 -0
- package/lib/utils/date.js.map +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/index.js.map +1 -1
- package/package.json +8 -5
- package/lib/components/molecules/ErrorText/ErrorText.js.map +0 -1
- package/lib/components/molecules/LoginButton/LoginButton.js.map +0 -1
- package/lib/components/molecules/SessionNumberIndicator/SessionNumberIndicator.d.ts +0 -4
- package/lib/components/molecules/SessionNumberIndicator/SessionNumberIndicator.js +0 -44
- package/lib/components/molecules/SessionNumberIndicator/SessionNumberIndicator.js.map +0 -1
- package/lib/components/organisms/LogoImage/LogoImage.js.map +0 -1
- package/lib/components/organisms/PasswordInput/PasswordInput.js.map +0 -1
- package/lib/components/organisms/SessionButtons/SessionButtons.d.ts +0 -17
- package/lib/components/organisms/SessionButtons/SessionButtons.js +0 -93
- package/lib/components/organisms/SessionButtons/SessionButtons.js.map +0 -1
- package/lib/components/organisms/SessionNameInput/SessionNameInput.js.map +0 -1
- package/lib/components/organisms/UrlInput/UrlInput.js.map +0 -1
- package/lib/components/organisms/UsernameInput/UsernameInput.js.map +0 -1
- package/lib/components/templates/PopupCreateSession/PopupCreateSession.js +0 -171
- package/lib/components/templates/PopupCreateSession/PopupCreateSession.js.map +0 -1
- package/lib/components/templates/PopupSession/PopupSession.d.ts +0 -8
- package/lib/components/templates/PopupSession/PopupSession.js +0 -135
- package/lib/components/templates/PopupSession/PopupSession.js.map +0 -1
- package/lib/components/templates/PopupSessionList/PopupSessionList.d.ts +0 -7
- package/lib/components/templates/PopupSessionList/PopupSessionList.js +0 -107
- package/lib/components/templates/PopupSessionList/PopupSessionList.js.map +0 -1
- /package/lib/{components/molecules/LoginButton → sessions/components/buttons}/LoginButton.d.ts +0 -0
- /package/lib/{components/organisms/LogoImage → sessions/components/display}/LogoImage.d.ts +0 -0
- /package/lib/{components/organisms/LogoImage → sessions/components/display}/LogoImage.js +0 -0
- /package/lib/{components/molecules/ErrorText → sessions/components/error}/ErrorText.d.ts +0 -0
- /package/lib/{components/organisms/UsernameInput → sessions/components/inputs}/UsernameInput.d.ts +0 -0
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
import { storage } from '../storage/Storage';
|
|
19
|
-
import {
|
|
19
|
+
import { manageDefaultSession, migrateOldSessionToNewSystem } from './utils';
|
|
20
20
|
const SESSION_KEY = 'ConnectionSessions';
|
|
21
21
|
class SessionStorage {
|
|
22
22
|
localStorage;
|
|
@@ -31,29 +31,33 @@ class SessionStorage {
|
|
|
31
31
|
if (this.refreshCallBack != null) {
|
|
32
32
|
this.refreshCallBack({
|
|
33
33
|
sessionList: this.getSessionList(),
|
|
34
|
-
|
|
34
|
+
defaultSession: this.getDefaultSession(),
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
getSessionList() {
|
|
39
|
-
const
|
|
40
|
-
|
|
39
|
+
const storageData = this.localStorage.getItem(SESSION_KEY) || [];
|
|
40
|
+
if (storageData.some(_item => _item?.name == null)) {
|
|
41
|
+
this.localStorage.setItem(SESSION_KEY, migrateOldSessionToNewSystem(storageData));
|
|
42
|
+
return this.getSessionList();
|
|
43
|
+
}
|
|
44
|
+
return storageData;
|
|
41
45
|
}
|
|
42
|
-
|
|
46
|
+
getDefaultSession() {
|
|
43
47
|
const sessionList = this.getSessionList();
|
|
44
48
|
if (!Array.isArray(sessionList) || sessionList.length === 0) {
|
|
45
49
|
return null;
|
|
46
50
|
}
|
|
47
|
-
return sessionList.find(_session => _session.
|
|
51
|
+
return sessionList.find(_session => _session.isDefault === true);
|
|
48
52
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
saveSession(session, list) {
|
|
54
|
+
const id = session?.id || `session-${Date.now()}`;
|
|
55
|
+
const _session = { ...session, id };
|
|
56
|
+
if (!Array.isArray(list) || list.length === 0) {
|
|
57
|
+
list = [];
|
|
54
58
|
}
|
|
55
|
-
if (
|
|
56
|
-
|
|
59
|
+
if (session.id != null && list.find(_item => _item.id === session.id)) {
|
|
60
|
+
list = list.map(_item => {
|
|
57
61
|
if (_item.id === session.id) {
|
|
58
62
|
return { ..._item, ...session };
|
|
59
63
|
}
|
|
@@ -61,19 +65,23 @@ class SessionStorage {
|
|
|
61
65
|
});
|
|
62
66
|
}
|
|
63
67
|
else {
|
|
64
|
-
|
|
68
|
+
list.push(_session);
|
|
65
69
|
}
|
|
66
|
-
|
|
67
|
-
this.localStorage.setItem(SESSION_KEY,
|
|
68
|
-
this.updateState();
|
|
70
|
+
list = manageDefaultSession(list, _session);
|
|
71
|
+
this.localStorage.setItem(SESSION_KEY, list);
|
|
69
72
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if (!Array.isArray(sessionList) || sessionList.length === 0) {
|
|
73
|
+
saveHiddenSession(session) {
|
|
74
|
+
if (session == null) {
|
|
73
75
|
return;
|
|
74
76
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
this.saveSession(session, []);
|
|
78
|
+
}
|
|
79
|
+
registerSession({ session }) {
|
|
80
|
+
if (session == null) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
let sessionList = this.getSessionList();
|
|
84
|
+
this.saveSession(session, sessionList);
|
|
77
85
|
this.updateState();
|
|
78
86
|
}
|
|
79
87
|
removeSession({ sessionId }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionStorage.js","sourceRoot":"","sources":["../../src/sessions/SessionStorage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,EAAU,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"SessionStorage.js","sourceRoot":"","sources":["../../src/sessions/SessionStorage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,EAAU,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAC,oBAAoB,EAAE,4BAA4B,EAAC,MAAM,SAAS,CAAC;AAE3E,MAAM,WAAW,GAAG,oBAAoB,CAAC;AAEzC,MAAM,cAAc;IASE;IARZ,eAAe,CAMZ;IAEX,YAAoB,YAAqB;QAArB,iBAAY,GAAZ,YAAY,CAAS;IAAG,CAAC;IAE7C,QAAQ,CAAC,QAAQ;QACf,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC;IAClC,CAAC;IAEO,WAAW;QACjB,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,EAAE;YAChC,IAAI,CAAC,eAAe,CAAC;gBACnB,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE;gBAClC,cAAc,EAAE,IAAI,CAAC,iBAAiB,EAAE;aACzC,CAAC,CAAC;SACJ;IACH,CAAC;IAED,cAAc;QACZ,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QAEjE,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,IAAI,IAAI,CAAC,EAAE;YAClD,IAAI,CAAC,YAAY,CAAC,OAAO,CACvB,WAAW,EACX,4B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PopupCreateSession({ sessionList, popupIsOpen,
|
|
2
|
+
declare function PopupCreateSession({ sessionList, popupIsOpen, handleClose, showUrlInput, modeDebug, testInstanceConfig, releaseInstanceConfig, }: {
|
|
3
3
|
sessionList: any;
|
|
4
4
|
popupIsOpen: any;
|
|
5
|
-
|
|
5
|
+
handleClose: any;
|
|
6
6
|
showUrlInput: any;
|
|
7
7
|
modeDebug: any;
|
|
8
8
|
testInstanceConfig: any;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
19
|
+
import { StyleSheet, View } from 'react-native';
|
|
20
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
21
|
+
import { Icon, PopUp } from '@axelor/aos-mobile-ui';
|
|
22
|
+
import { useTranslator } from '../../../i18n';
|
|
23
|
+
import { ErrorText, SessionInputs } from '../../components';
|
|
24
|
+
import { login } from '../../../features/authSlice';
|
|
25
|
+
import { getStorageUrl, sessionStorage } from '../..';
|
|
26
|
+
import DeviceInfo from 'react-native-device-info';
|
|
27
|
+
const PopupCreateSession = ({ sessionList, popupIsOpen, handleClose, showUrlInput, modeDebug, testInstanceConfig, releaseInstanceConfig, }) => {
|
|
28
|
+
const I18n = useTranslator();
|
|
29
|
+
const dispatch = useDispatch();
|
|
30
|
+
const { loading, error, baseUrl } = useSelector(state => state.auth);
|
|
31
|
+
const urlStorage = useMemo(() => getStorageUrl(), []);
|
|
32
|
+
const defaultUrl = useMemo(() => {
|
|
33
|
+
if (urlStorage != null) {
|
|
34
|
+
return urlStorage;
|
|
35
|
+
}
|
|
36
|
+
if (baseUrl != null) {
|
|
37
|
+
return baseUrl;
|
|
38
|
+
}
|
|
39
|
+
if (modeDebug) {
|
|
40
|
+
return testInstanceConfig?.defaultUrl;
|
|
41
|
+
}
|
|
42
|
+
return releaseInstanceConfig?.url;
|
|
43
|
+
}, [
|
|
44
|
+
baseUrl,
|
|
45
|
+
modeDebug,
|
|
46
|
+
releaseInstanceConfig?.url,
|
|
47
|
+
testInstanceConfig?.defaultUrl,
|
|
48
|
+
urlStorage,
|
|
49
|
+
]);
|
|
50
|
+
const [isBackground, setIsBackground] = useState(false);
|
|
51
|
+
const [isMounted, setIsMounted] = useState(false);
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
setIsMounted(true);
|
|
54
|
+
return () => {
|
|
55
|
+
setIsMounted(false);
|
|
56
|
+
};
|
|
57
|
+
}, []);
|
|
58
|
+
const onPressLogin = useCallback(session => {
|
|
59
|
+
dispatch(login({ ...session })).then(res => {
|
|
60
|
+
if (res.error == null && isMounted) {
|
|
61
|
+
sessionStorage.registerSession({
|
|
62
|
+
session,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}, [dispatch, isMounted]);
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
if (popupIsOpen != null) {
|
|
69
|
+
setIsBackground(false);
|
|
70
|
+
}
|
|
71
|
+
}, [popupIsOpen]);
|
|
72
|
+
const inputProps = useMemo(() => ({
|
|
73
|
+
sessionList,
|
|
74
|
+
session: modeDebug
|
|
75
|
+
? {
|
|
76
|
+
name: DeviceInfo.getApplicationName(),
|
|
77
|
+
url: defaultUrl,
|
|
78
|
+
username: testInstanceConfig?.defaultUsername,
|
|
79
|
+
password: testInstanceConfig?.defaultPassword,
|
|
80
|
+
isDefault: false,
|
|
81
|
+
}
|
|
82
|
+
: { url: defaultUrl, isDefault: false },
|
|
83
|
+
showUrlInput,
|
|
84
|
+
loading,
|
|
85
|
+
mode: 'creation',
|
|
86
|
+
showPopup: value => setIsBackground(!value),
|
|
87
|
+
onValidation: onPressLogin,
|
|
88
|
+
}), [
|
|
89
|
+
defaultUrl,
|
|
90
|
+
loading,
|
|
91
|
+
modeDebug,
|
|
92
|
+
onPressLogin,
|
|
93
|
+
sessionList,
|
|
94
|
+
showUrlInput,
|
|
95
|
+
testInstanceConfig?.defaultPassword,
|
|
96
|
+
testInstanceConfig?.defaultUsername,
|
|
97
|
+
]);
|
|
98
|
+
if (isBackground) {
|
|
99
|
+
return <SessionInputs hidden={true} {...inputProps}/>;
|
|
100
|
+
}
|
|
101
|
+
return (<PopUp visible={popupIsOpen} title={I18n.t('Base_Connection_CreateSession')} style={styles.popup}>
|
|
102
|
+
<View style={styles.popupContainer}>
|
|
103
|
+
{sessionList?.length > 0 && (<Icon name="times" size={20} touchable={true} onPress={handleClose} style={styles.closeIcon}/>)}
|
|
104
|
+
<ErrorText error={error}/>
|
|
105
|
+
<SessionInputs {...inputProps}/>
|
|
106
|
+
</View>
|
|
107
|
+
</PopUp>);
|
|
108
|
+
};
|
|
109
|
+
const styles = StyleSheet.create({
|
|
110
|
+
popup: {
|
|
111
|
+
width: '90%',
|
|
112
|
+
paddingHorizontal: 15,
|
|
113
|
+
paddingRight: 15,
|
|
114
|
+
paddingVertical: 15,
|
|
115
|
+
},
|
|
116
|
+
popupContainer: {
|
|
117
|
+
flexDirection: 'column',
|
|
118
|
+
alignItems: 'center',
|
|
119
|
+
width: '120%',
|
|
120
|
+
},
|
|
121
|
+
closeIcon: {
|
|
122
|
+
position: 'absolute',
|
|
123
|
+
right: 0,
|
|
124
|
+
top: -30,
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
export default PopupCreateSession;
|
|
128
|
+
//# sourceMappingURL=PopupCreateSession.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopupCreateSession.js","sourceRoot":"","sources":["../../../../src/sessions/components/alerts/PopupCreateSession.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACvE,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,aAAa,CAAC;AACrD,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAC,SAAS,EAAE,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAC,KAAK,EAAC,MAAM,6BAA6B,CAAC;AAClD,OAAO,EAAC,aAAa,EAAE,cAAc,EAAC,MAAM,OAAO,CAAC;AACpD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAElD,MAAM,kBAAkB,GAAG,CAAC,EAC1B,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,qBAAqB,GACtB,EAAE,EAAE;IACH,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAC7B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,EAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAC,GAAG,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAEnE,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,aAAa,EAAE,EAA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C,CACT,SAAS,CAAC,CAAC,IAAI,CAAC,CAChB,OAAO,CAAC,CAAC,WAAW,CAAC,CACrB,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EACxB,CACH,CACD;QAAA,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,EACxB;QAAA,CAAC,aAAa,CAAC,IAAI,UAAU,CAAC,EAChC;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE;QACL,KAAK,EAAE,KAAK;QACZ,iBAAiB,EAAE,EAAE;QACrB,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,EAAE;KACpB;IACD,cAAc,EAAE;QACd,aAAa,EAAE,QAAQ;QACvB,UAAU,EAAE,QAAQ;QACpB,KAAK,EAAE,MAAM;KACd;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,CAAC;QACR,GAAG,EAAE,CAAC,EAAE;KACT;CACF,CAAC,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
19
|
+
import { StyleSheet, View } from 'react-native';
|
|
20
|
+
import { useSelector } from 'react-redux';
|
|
21
|
+
import { Icon, PopUp } from '@axelor/aos-mobile-ui';
|
|
22
|
+
import { useTranslator } from '../../../i18n';
|
|
23
|
+
import { ErrorText, SessionInputs } from '../../components';
|
|
24
|
+
import { sessionStorage } from '../..';
|
|
25
|
+
const PopupEditSession = ({ session, sessionList, popupIsOpen, handleClose, showUrlInput, }) => {
|
|
26
|
+
const I18n = useTranslator();
|
|
27
|
+
const { loading, error } = useSelector(state => state.auth);
|
|
28
|
+
const [updateSession, setUpdateSession] = useState(session);
|
|
29
|
+
const [isBackground, setIsBackground] = useState(false);
|
|
30
|
+
const onpressUpdate = useCallback(_session => {
|
|
31
|
+
sessionStorage.registerSession({
|
|
32
|
+
session: { id: updateSession?.id, ..._session },
|
|
33
|
+
});
|
|
34
|
+
handleClose();
|
|
35
|
+
}, [handleClose, updateSession?.id]);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (popupIsOpen != null) {
|
|
38
|
+
setIsBackground(false);
|
|
39
|
+
}
|
|
40
|
+
}, [popupIsOpen]);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
setUpdateSession(() => sessionList?.find(item => item.id === session?.id));
|
|
43
|
+
}, [session, sessionList]);
|
|
44
|
+
const inputProps = useMemo(() => ({
|
|
45
|
+
sessionList,
|
|
46
|
+
session: updateSession,
|
|
47
|
+
showUrlInput,
|
|
48
|
+
loading,
|
|
49
|
+
mode: 'edition',
|
|
50
|
+
showPopup: value => setIsBackground(!value),
|
|
51
|
+
onValidation: onpressUpdate,
|
|
52
|
+
}), [loading, onpressUpdate, sessionList, showUrlInput, updateSession]);
|
|
53
|
+
if (isBackground) {
|
|
54
|
+
return <SessionInputs hidden={true} {...inputProps}/>;
|
|
55
|
+
}
|
|
56
|
+
return (<PopUp visible={popupIsOpen} title={I18n.t('Base_Connection_EditSession')} style={styles.popup}>
|
|
57
|
+
<View style={styles.popupContainer}>
|
|
58
|
+
{sessionList?.length > 0 && (<Icon name="times" size={20} touchable={true} onPress={handleClose} style={styles.closeIcon}/>)}
|
|
59
|
+
<ErrorText error={error}/>
|
|
60
|
+
<SessionInputs {...inputProps}/>
|
|
61
|
+
</View>
|
|
62
|
+
</PopUp>);
|
|
63
|
+
};
|
|
64
|
+
const styles = StyleSheet.create({
|
|
65
|
+
popup: {
|
|
66
|
+
width: '90%',
|
|
67
|
+
paddingHorizontal: 15,
|
|
68
|
+
paddingRight: 15,
|
|
69
|
+
paddingVertical: 15,
|
|
70
|
+
},
|
|
71
|
+
popupContainer: {
|
|
72
|
+
flexDirection: 'column',
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
width: '120%',
|
|
75
|
+
},
|
|
76
|
+
closeIcon: {
|
|
77
|
+
position: 'absolute',
|
|
78
|
+
right: 0,
|
|
79
|
+
top: -30,
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
export default PopupEditSession;
|
|
83
|
+
//# sourceMappingURL=PopupEditSession.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopupEditSession.js","sourceRoot":"","sources":["../../../../src/sessions/components/alerts/PopupEditSession.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACvE,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAC,SAAS,EAAE,aAAa,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,EAAE,EAAE;QAChB,eAAe,EAAE,EAAE;KACpB;IACD,cAAc,EAAE;QACd,aAAa,EAAE,QAAQ;QACvB,UAAU,EAAE,QAAQ;QACpB,KAAK,EAAE,MAAM;KACd;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,CAAC;QACR,GAAG,EAAE,CAAC,EAAE;KACT;CACF,CAAC,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default PopupSession;
|
|
2
|
+
declare function PopupSession({ sessionList, sessionActive, popupIsOpen, handleClose, showUrlInput, testInstanceConfig, }: {
|
|
3
|
+
sessionList: any;
|
|
4
|
+
sessionActive: any;
|
|
5
|
+
popupIsOpen: any;
|
|
6
|
+
handleClose: any;
|
|
7
|
+
showUrlInput: any;
|
|
8
|
+
testInstanceConfig: any;
|
|
9
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
19
|
+
import { StyleSheet, View } from 'react-native';
|
|
20
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
21
|
+
import { Icon, PopUp, useThemeColor } from '@axelor/aos-mobile-ui';
|
|
22
|
+
import { ErrorText, SessionInputs } from '../../components';
|
|
23
|
+
import { login } from '../../../features/authSlice';
|
|
24
|
+
import { sessionStorage } from '../..';
|
|
25
|
+
const PopupSession = ({ sessionList, sessionActive, popupIsOpen, handleClose, showUrlInput, testInstanceConfig, }) => {
|
|
26
|
+
const Colors = useThemeColor();
|
|
27
|
+
const dispatch = useDispatch();
|
|
28
|
+
const { loading, error } = useSelector(state => state.auth);
|
|
29
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
30
|
+
const modeDebug = useMemo(() => __DEV__, []);
|
|
31
|
+
const onPressLogin = useCallback(({ password }) => {
|
|
32
|
+
dispatch(login({
|
|
33
|
+
url: sessionActive.url,
|
|
34
|
+
username: sessionActive.username,
|
|
35
|
+
password,
|
|
36
|
+
}));
|
|
37
|
+
}, [dispatch, sessionActive]);
|
|
38
|
+
const deleteSession = useCallback(() => {
|
|
39
|
+
sessionStorage.removeSession({ sessionId: sessionActive?.id });
|
|
40
|
+
handleClose();
|
|
41
|
+
}, [sessionActive, handleClose]);
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
setIsOpen(popupIsOpen);
|
|
44
|
+
}, [popupIsOpen]);
|
|
45
|
+
if (sessionActive == null) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
return (<PopUp visible={isOpen} title={sessionActive?.name} style={styles.popup}>
|
|
49
|
+
<View style={styles.popupContainer}>
|
|
50
|
+
<Icon name="times" size={20} touchable={true} onPress={handleClose} style={styles.closeIcon}/>
|
|
51
|
+
<ErrorText error={error}/>
|
|
52
|
+
<SessionInputs sessionList={sessionList} session={{
|
|
53
|
+
...sessionActive,
|
|
54
|
+
password: modeDebug ? testInstanceConfig?.defaultPassword : '',
|
|
55
|
+
}} showUrlInput={showUrlInput} loading={loading} mode="connection" showPopup={setIsOpen} onValidation={onPressLogin}/>
|
|
56
|
+
<Icon name="trash-alt" size={20} color={Colors.errorColor.background} touchable={true} onPress={deleteSession} style={styles.binIcon}/>
|
|
57
|
+
</View>
|
|
58
|
+
</PopUp>);
|
|
59
|
+
};
|
|
60
|
+
const styles = StyleSheet.create({
|
|
61
|
+
popup: {
|
|
62
|
+
width: '90%',
|
|
63
|
+
paddingHorizontal: 15,
|
|
64
|
+
paddingRight: 15,
|
|
65
|
+
paddingVertical: 15,
|
|
66
|
+
},
|
|
67
|
+
popupContainer: {
|
|
68
|
+
flexDirection: 'column',
|
|
69
|
+
alignItems: 'center',
|
|
70
|
+
width: '120%',
|
|
71
|
+
},
|
|
72
|
+
closeIcon: {
|
|
73
|
+
position: 'absolute',
|
|
74
|
+
right: 0,
|
|
75
|
+
top: -30,
|
|
76
|
+
},
|
|
77
|
+
binIcon: {
|
|
78
|
+
position: 'absolute',
|
|
79
|
+
right: '1%',
|
|
80
|
+
bottom: '5%',
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
export default PopupSession;
|
|
84
|
+
//# sourceMappingURL=PopupSession.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopupSession.js","sourceRoot":"","sources":["../../../../src/sessions/components/alerts/PopupSession.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACvE,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,aAAa,CAAC;AACrD,OAAO,EAAC,IAAI,EAAE,KAAK,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAC,SAAS,EAAE,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAC,KAAK,EAAC,MAAM,6BAA6B,CAAC;AAClD,OAAO,EAAC,cAAc,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L,KAAK,EAAE,KAAK;QACZ,iBAAiB,EAAE,EAAE;QACrB,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,EAAE;KACpB;IACD,cAAc,EAAE;QACd,aAAa,EAAE,QAAQ;QACvB,UAAU,EAAE,QAAQ;QACpB,KAAK,EAAE,MAAM;KACd;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,CAAC;QACR,GAAG,EAAE,CAAC,EAAE;KACT;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,IAAI;KACb;CACF,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
export { default as PopupCreateSession } from './PopupCreateSession';
|
|
19
|
+
export { default as PopupEditSession } from './PopupEditSession';
|
|
20
|
+
export { default as PopupSession } from './PopupSession';
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sessions/components/alerts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAC"}
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
import React, { useMemo } from 'react';
|
|
19
19
|
import { StyleSheet, View } from 'react-native';
|
|
20
20
|
import { Button, useThemeColor } from '@axelor/aos-mobile-ui';
|
|
21
|
-
import useTranslator from '../../../i18n
|
|
22
|
-
const
|
|
21
|
+
import { useTranslator } from '../../../i18n';
|
|
22
|
+
const DisabledButton = ({ title, onPress, onDisabledPress = () => { }, disabled, }) => {
|
|
23
23
|
const I18n = useTranslator();
|
|
24
24
|
const Colors = useThemeColor();
|
|
25
25
|
const styles = useMemo(() => getStyles(Colors), [Colors]);
|
|
26
26
|
return (<View style={styles.container}>
|
|
27
|
-
<Button style={styles.button} title={I18n.t(
|
|
27
|
+
<Button style={styles.button} title={I18n.t(title)} onPress={disabled ? onDisabledPress : onPress} color={disabled ? Colors.secondaryColor : Colors.primaryColor}/>
|
|
28
28
|
</View>);
|
|
29
29
|
};
|
|
30
30
|
const getStyles = Colors => StyleSheet.create({
|
|
@@ -41,5 +41,5 @@ const getStyles = Colors => StyleSheet.create({
|
|
|
41
41
|
shadowOffset: { width: 0, height: 0 },
|
|
42
42
|
},
|
|
43
43
|
});
|
|
44
|
-
export default
|
|
45
|
-
//# sourceMappingURL=
|
|
44
|
+
export default DisabledButton;
|
|
45
|
+
//# sourceMappingURL=DisabledButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DisabledButton.js","sourceRoot":"","sources":["../../../../src/sessions/components/buttons/DisabledButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAA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CAAC;QACZ,aAAa,EAAE,GAAG;QAClB,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC,UAAU;QAC7C,YAAY,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC;KACpC;CACF,CAAC,CAAC;AAEL,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React from 'react';
|
|
19
|
+
import DisabledButton from './DisabledButton';
|
|
20
|
+
const LoginButton = ({ onPress, onDisabledPress = () => { }, disabled }) => {
|
|
21
|
+
return (<DisabledButton title="Base_Connection_Login" onPress={onPress} disabled={disabled} onDisabledPress={onDisabledPress}/>);
|
|
22
|
+
};
|
|
23
|
+
export default LoginButton;
|
|
24
|
+
//# sourceMappingURL=LoginButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoginButton.js","sourceRoot":"","sources":["../../../../src/sessions/components/buttons/LoginButton.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,WAAW,GAAG,CAAC,EAAC,OAAO,EAAE,eAAe,GAAG,GAAG,EAAE,GAAE,CAAC,EAAE,QAAQ,EAAC,EAAE,EAAE;IACtE,OAAO,CACL,CAAC,cAAc,CACb,KAAK,CAAC,uBAAuB,CAC7B,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,eAAe,CAAC,CAAC,eAAe,CAAC,EACjC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React from 'react';
|
|
19
|
+
import DisabledButton from './DisabledButton';
|
|
20
|
+
const UpdateButton = ({ onPress, onDisabledPress = () => { }, disabled }) => {
|
|
21
|
+
return (<DisabledButton title="Base_Connection_Update" onPress={onPress} disabled={disabled} onDisabledPress={onDisabledPress}/>);
|
|
22
|
+
};
|
|
23
|
+
export default UpdateButton;
|
|
24
|
+
//# sourceMappingURL=UpdateButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpdateButton.js","sourceRoot":"","sources":["../../../../src/sessions/components/buttons/UpdateButton.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,YAAY,GAAG,CAAC,EAAC,OAAO,EAAE,eAAe,GAAG,GAAG,EAAE,GAAE,CAAC,EAAE,QAAQ,EAAC,EAAE,EAAE;IACvE,OAAO,CACL,CAAC,cAAc,CACb,KAAK,CAAC,wBAAwB,CAC9B,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,eAAe,CAAC,CAAC,eAAe,CAAC,EACjC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
export { default as DisabledButton } from './DisabledButton';
|
|
19
|
+
export { default as LoginButton } from './LoginButton';
|
|
20
|
+
export { default as UpdateButton } from './UpdateButton';
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sessions/components/buttons/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogoImage.js","sourceRoot":"","sources":["../../../../src/sessions/components/display/LogoImage.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClE,OAAO,EAAC,KAAK,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAC,OAAO,EAAC,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAE/C,MAAM,cAAc,GAAG,iCAAiC,CAAC;AAEzD,MAAM,SAAS,GAAG,CAAC,EAAC,GAAG,GAAG,IAAI,EAAE,QAAQ,GAAG,UAAU,EAAE,QAAQ,GAAG,IAAI,EAAC,EAAE,EAAE;IACzE,MAAM,eAAe,GAAG,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC;IAE5E,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;IAEtD,MAAM,aAAa,GAAG,OAAO,CAC3B,GAAG,EAAE,CACH,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI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