@axelor/aos-mobile-core 7.1.1 → 7.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.
- package/lib/api/anomaly-api.d.ts +4 -0
- package/lib/api/anomaly-api.js +24 -0
- package/lib/api/anomaly-api.js.map +1 -0
- package/lib/api/login-api.js +2 -3
- package/lib/api/login-api.js.map +1 -1
- package/lib/api/metafile-api.d.ts +10 -0
- package/lib/api/metafile-api.js +12 -6
- package/lib/api/metafile-api.js.map +1 -1
- package/lib/api/mobile-config-api.js +9 -15
- package/lib/api/mobile-config-api.js.map +1 -1
- package/lib/api/model-api.d.ts +4 -0
- package/lib/api/model-api.js +28 -0
- package/lib/api/model-api.js.map +1 -0
- package/lib/api/user-api.d.ts +4 -0
- package/lib/api/user-api.js +31 -0
- package/lib/api/user-api.js.map +1 -0
- package/lib/apiProviders/Standard/ObjectFieldsProvider.d.ts +1 -0
- package/lib/apiProviders/Standard/ObjectFieldsProvider.js +21 -4
- package/lib/apiProviders/Standard/ObjectFieldsProvider.js.map +1 -1
- package/lib/apiProviders/middlewares/fieldParser.d.ts +2 -0
- package/lib/apiProviders/middlewares/fieldParser.js +53 -0
- package/lib/apiProviders/middlewares/fieldParser.js.map +1 -0
- package/lib/apiProviders/middlewares/index.d.ts +1 -0
- package/lib/apiProviders/middlewares/index.js +1 -0
- package/lib/apiProviders/middlewares/index.js.map +1 -1
- package/lib/apiProviders/utils.js +16 -4
- package/lib/apiProviders/utils.js.map +1 -1
- package/lib/app/ContextsProvider.js +12 -4
- package/lib/app/ContextsProvider.js.map +1 -1
- package/lib/app/Module.d.ts +2 -0
- package/lib/app/RootNavigator.js +1 -1
- package/lib/app/context.helper.js +6 -1
- package/lib/app/context.helper.js.map +1 -1
- package/lib/auth/components/index.d.ts +1 -0
- package/lib/{sessions/components/buttons → auth/components}/index.js +1 -3
- package/lib/auth/components/index.js.map +1 -0
- package/lib/auth/components/molecules/TranslationsButton/TranslationsButton.d.ts +2 -0
- package/lib/auth/components/molecules/TranslationsButton/TranslationsButton.js +63 -0
- package/lib/auth/components/molecules/TranslationsButton/TranslationsButton.js.map +1 -0
- package/lib/auth/components/molecules/index.d.ts +1 -0
- package/lib/auth/components/molecules/index.js +19 -0
- package/lib/auth/components/molecules/index.js.map +1 -0
- package/lib/auth/features/companySlice.d.ts +1 -1
- package/lib/auth/features/configSlice.d.ts +1 -1
- package/lib/auth/features/languageSlice.d.ts +1 -1
- package/lib/auth/features/userSlice.d.ts +1 -1
- package/lib/auth/features/userSlice.js +0 -4
- package/lib/auth/features/userSlice.js.map +1 -1
- package/lib/auth/models/objectFields.js +3 -3
- package/lib/auth/models/objectFields.js.map +1 -1
- package/lib/auth/screens/SettingsScreen.js +7 -31
- package/lib/auth/screens/SettingsScreen.js.map +1 -1
- package/lib/auth/screens/UserScreen.js +11 -8
- package/lib/auth/screens/UserScreen.js.map +1 -1
- package/lib/components/external/Camera/Camera.js +15 -5
- package/lib/components/external/Camera/Camera.js.map +1 -1
- package/lib/components/external/Camera/CaptureButton.d.ts +2 -1
- package/lib/components/external/Camera/CaptureButton.js +3 -3
- package/lib/components/external/Camera/CaptureButton.js.map +1 -1
- package/lib/components/external/Stopwatch/Stopwatch.d.ts +5 -1
- package/lib/components/external/Stopwatch/Stopwatch.js +35 -11
- package/lib/components/external/Stopwatch/Stopwatch.js.map +1 -1
- package/lib/components/external/Timer/Timer.d.ts +3 -2
- package/lib/components/external/Timer/Timer.js +5 -4
- package/lib/components/external/Timer/Timer.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/molecules/CameraButton/CameraButton.d.ts +12 -0
- package/lib/components/molecules/CameraButton/CameraButton.js +87 -0
- package/lib/components/molecules/CameraButton/CameraButton.js.map +1 -0
- package/lib/components/molecules/UploadFileInput/UploadFileInput.d.ts +3 -1
- package/lib/components/molecules/UploadFileInput/UploadFileInput.js +71 -15
- package/lib/components/molecules/UploadFileInput/UploadFileInput.js.map +1 -1
- package/lib/components/molecules/index.d.ts +1 -0
- package/lib/components/molecules/index.js +1 -0
- package/lib/components/molecules/index.js.map +1 -1
- package/lib/components/organisms/AnomalyBubble/AnomalyBubble.d.ts +11 -0
- package/lib/components/organisms/AnomalyBubble/AnomalyBubble.js +60 -0
- package/lib/components/organisms/AnomalyBubble/AnomalyBubble.js.map +1 -0
- package/lib/components/organisms/AnomalyList/AnomalyList.d.ts +7 -0
- package/lib/components/organisms/AnomalyList/AnomalyList.js +59 -0
- package/lib/components/organisms/AnomalyList/AnomalyList.js.map +1 -0
- package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.d.ts +3 -1
- package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js +18 -4
- package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js.map +1 -1
- package/lib/components/organisms/ScannerAutocompleteSearch/ScannerAutocompleteSearch.d.ts +4 -1
- package/lib/components/organisms/ScannerAutocompleteSearch/ScannerAutocompleteSearch.js +2 -2
- package/lib/components/organisms/ScannerAutocompleteSearch/ScannerAutocompleteSearch.js.map +1 -1
- package/lib/components/organisms/index.d.ts +2 -0
- package/lib/components/organisms/index.js +2 -0
- package/lib/components/organisms/index.js.map +1 -1
- package/lib/components/pages/FormView/Alerts/ConstraintsValidatorPopup.d.ts +11 -0
- package/lib/components/pages/FormView/Alerts/ConstraintsValidatorPopup.js +33 -0
- package/lib/components/pages/FormView/Alerts/ConstraintsValidatorPopup.js.map +1 -0
- package/lib/components/pages/FormView/Alerts/index.d.ts +1 -0
- package/lib/components/pages/FormView/Alerts/index.js +19 -0
- package/lib/components/pages/FormView/Alerts/index.js.map +1 -0
- package/lib/components/pages/FormView/Components/Field.d.ts +9 -0
- package/lib/components/pages/FormView/Components/Field.js +149 -0
- package/lib/components/pages/FormView/Components/Field.js.map +1 -0
- package/lib/components/pages/FormView/Components/Panel.d.ts +8 -0
- package/lib/components/pages/FormView/Components/Panel.js +84 -0
- package/lib/components/pages/FormView/Components/Panel.js.map +1 -0
- package/lib/components/pages/FormView/Components/index.d.ts +2 -0
- package/lib/components/pages/FormView/Components/index.js +20 -0
- package/lib/components/pages/FormView/Components/index.js.map +1 -0
- package/lib/components/pages/FormView/Custom/CustomButton.d.ts +10 -0
- package/lib/components/pages/FormView/Custom/CustomButton.js +31 -0
- package/lib/components/pages/FormView/Custom/CustomButton.js.map +1 -0
- package/lib/components/pages/FormView/Custom/CustomPasswordInput.d.ts +11 -0
- package/lib/components/pages/FormView/Custom/CustomPasswordInput.js +40 -0
- package/lib/components/pages/FormView/Custom/CustomPasswordInput.js.map +1 -0
- package/lib/components/pages/FormView/Custom/CustomPicker.d.ts +12 -0
- package/lib/components/pages/FormView/Custom/CustomPicker.js +33 -0
- package/lib/components/pages/FormView/Custom/CustomPicker.js.map +1 -0
- package/lib/components/pages/FormView/Custom/CustomSearchBar.d.ts +12 -0
- package/lib/components/pages/FormView/Custom/CustomSearchBar.js +69 -0
- package/lib/components/pages/FormView/Custom/CustomSearchBar.js.map +1 -0
- package/lib/components/pages/FormView/Custom/index.d.ts +4 -0
- package/lib/components/pages/FormView/Custom/index.js +22 -0
- package/lib/components/pages/FormView/Custom/index.js.map +1 -0
- package/lib/components/pages/FormView/FormView.d.ts +8 -0
- package/lib/components/pages/FormView/FormView.js +199 -0
- package/lib/components/pages/FormView/FormView.js.map +1 -0
- package/lib/components/pages/index.d.ts +4 -0
- package/lib/components/pages/index.js +22 -0
- package/lib/components/pages/index.js.map +1 -0
- package/lib/components/templates/AttachedFilesView/AttachedFilesView.js +1 -1
- package/lib/components/templates/AttachedFilesView/AttachedFilesView.js.map +1 -1
- package/lib/components/templates/MailMessageView/MailMessageView.js +8 -2
- package/lib/components/templates/MailMessageView/MailMessageView.js.map +1 -1
- package/lib/components/templates/PopupApplicationNotConfigured/PopupApplicationNotConfigured.js +10 -13
- package/lib/components/templates/PopupApplicationNotConfigured/PopupApplicationNotConfigured.js.map +1 -1
- package/lib/components/templates/PopupMinimalRequiredVersion/PopupMinimalRequiredVersion.js +15 -25
- package/lib/components/templates/PopupMinimalRequiredVersion/PopupMinimalRequiredVersion.js.map +1 -1
- package/lib/components/templates/SocialNetworkLinks/SocialNetworkLinks.d.ts +16 -0
- package/lib/components/templates/SocialNetworkLinks/SocialNetworkLinks.js +78 -0
- package/lib/components/templates/SocialNetworkLinks/SocialNetworkLinks.js.map +1 -0
- package/lib/components/templates/UserSearchBar/UserSearchBar.d.ts +14 -0
- package/lib/components/templates/UserSearchBar/UserSearchBar.js +34 -0
- package/lib/components/templates/UserSearchBar/UserSearchBar.js.map +1 -0
- package/lib/components/templates/index.d.ts +2 -0
- package/lib/components/templates/index.js +2 -0
- package/lib/components/templates/index.js.map +1 -1
- package/lib/config/routes.d.ts +23 -20
- package/lib/config/routes.js +2 -0
- package/lib/config/routes.js.map +1 -1
- package/lib/features/attachedFilesSlice.d.ts +1 -1
- package/lib/features/authSlice.d.ts +1 -1
- package/lib/features/cameraScannerSlice.d.ts +2 -2
- package/lib/features/cameraScannerSlice.js +4 -1
- package/lib/features/cameraScannerSlice.js.map +1 -1
- package/lib/features/cameraSlice.d.ts +13 -4
- package/lib/features/cameraSlice.js +4 -1
- package/lib/features/cameraSlice.js.map +1 -1
- package/lib/features/formSlice.d.ts +34 -0
- package/lib/features/formSlice.js +70 -0
- package/lib/features/formSlice.js.map +1 -0
- package/lib/features/index.d.ts +3 -0
- package/lib/features/index.js +3 -0
- package/lib/features/index.js.map +1 -1
- package/lib/features/mailMessageSlice.d.ts +1 -1
- package/lib/features/menuConfigSlice.d.ts +1 -1
- package/lib/features/metaJsonFieldSlice.d.ts +34 -0
- package/lib/features/metaJsonFieldSlice.js +68 -0
- package/lib/features/metaJsonFieldSlice.js.map +1 -0
- package/lib/features/metaModuleSlice.d.ts +1 -1
- package/lib/features/metafileSlice.d.ts +1 -1
- package/lib/features/mobileConfigSlice.d.ts +1 -1
- package/lib/features/onlineSlice.d.ts +1 -1
- package/lib/features/scannerSlice.d.ts +2 -2
- package/lib/features/scannerSlice.js +4 -1
- package/lib/features/scannerSlice.js.map +1 -1
- package/lib/features/userSlice.d.ts +16 -0
- package/lib/features/userSlice.js +49 -0
- package/lib/features/userSlice.js.map +1 -0
- package/lib/forms/FormConfigsProvider.d.ts +20 -0
- package/lib/forms/FormConfigsProvider.js +56 -0
- package/lib/forms/FormConfigsProvider.js.map +1 -0
- package/lib/forms/api.helpers.d.ts +12 -0
- package/lib/forms/api.helpers.js +59 -0
- package/lib/forms/api.helpers.js.map +1 -0
- package/lib/forms/display.helpers.d.ts +9 -0
- package/lib/forms/display.helpers.js +150 -0
- package/lib/forms/display.helpers.js.map +1 -0
- package/lib/forms/index.d.ts +7 -0
- package/lib/forms/index.js +25 -0
- package/lib/forms/index.js.map +1 -0
- package/lib/forms/register.helpers.d.ts +6 -0
- package/lib/forms/register.helpers.js +96 -0
- package/lib/forms/register.helpers.js.map +1 -0
- package/lib/forms/studio/api.helpers.d.ts +37 -0
- package/lib/forms/studio/api.helpers.js +162 -0
- package/lib/forms/studio/api.helpers.js.map +1 -0
- package/lib/forms/studio/display.helpers.d.ts +7 -0
- package/lib/forms/studio/display.helpers.js +256 -0
- package/lib/forms/studio/display.helpers.js.map +1 -0
- package/lib/forms/studio/index.d.ts +2 -0
- package/lib/forms/studio/index.js +20 -0
- package/lib/forms/studio/index.js.map +1 -0
- package/lib/forms/types.d.ts +100 -0
- package/lib/forms/types.js +19 -0
- package/lib/forms/types.js.map +1 -0
- package/lib/forms/validation.helpers.d.ts +10 -0
- package/lib/forms/validation.helpers.js +234 -0
- package/lib/forms/validation.helpers.js.map +1 -0
- package/lib/header/hooks.d.ts +29 -1
- package/lib/header/hooks.js +83 -2
- package/lib/header/hooks.js.map +1 -1
- package/lib/header/types.d.ts +2 -0
- package/lib/hooks/use-navigation.d.ts +1 -0
- package/lib/hooks/use-navigation.js +4 -1
- package/lib/hooks/use-navigation.js.map +1 -1
- package/lib/i18n/component/Translator.d.ts +1 -1
- package/lib/i18n/hooks/use-translator.js +3 -1
- package/lib/i18n/hooks/use-translator.js.map +1 -1
- package/lib/i18n/translations/en.json +53 -1
- package/lib/i18n/translations/fr.json +53 -1
- package/lib/index.d.ts +4 -3
- package/lib/index.js +4 -3
- package/lib/index.js.map +1 -1
- package/lib/models/index.d.ts +2 -0
- package/lib/models/index.js +2 -0
- package/lib/models/index.js.map +1 -1
- package/lib/models/objectFields.js +3 -0
- package/lib/models/objectFields.js.map +1 -1
- package/lib/models/searchFields.d.ts +2 -0
- package/lib/{sessions/components/buttons/LoginButton.js → models/searchFields.js} +3 -6
- package/lib/models/searchFields.js.map +1 -0
- package/lib/models/sortFields.d.ts +2 -0
- package/lib/{sessions/components/buttons/UpdateButton.js → models/sortFields.js} +3 -6
- package/lib/models/sortFields.js.map +1 -0
- package/lib/navigator/Navigator.d.ts +1 -1
- package/lib/navigator/Navigator.js +2 -18
- package/lib/navigator/Navigator.js.map +1 -1
- package/lib/navigator/drawer/Header.js +1 -1
- package/lib/navigator/drawer/Header.js.map +1 -1
- package/lib/redux/store.d.ts +1 -1
- package/lib/screens/BarcodeDisplayScreen.d.ts +4 -0
- package/lib/screens/BarcodeDisplayScreen.js +54 -0
- package/lib/screens/BarcodeDisplayScreen.js.map +1 -0
- package/lib/screens/ErrorScreen.js +1 -1
- package/lib/screens/ErrorScreen.js.map +1 -1
- package/lib/screens/JsonFieldScreen.d.ts +4 -0
- package/lib/screens/JsonFieldScreen.js +92 -0
- package/lib/screens/JsonFieldScreen.js.map +1 -0
- package/lib/screens/SessionManagementScreen.js +1 -1
- package/lib/screens/SessionManagementScreen.js.map +1 -1
- package/lib/screens/index.d.ts +51 -0
- package/lib/screens/index.js +56 -0
- package/lib/screens/index.js.map +1 -0
- package/lib/sessions/components/alerts/PopupCreateSession.d.ts +3 -3
- package/lib/sessions/components/alerts/PopupCreateSession.js +30 -29
- package/lib/sessions/components/alerts/PopupCreateSession.js.map +1 -1
- package/lib/sessions/components/alerts/PopupEditSession.js +9 -16
- package/lib/sessions/components/alerts/PopupEditSession.js.map +1 -1
- package/lib/sessions/components/alerts/PopupSession.js +7 -16
- package/lib/sessions/components/alerts/PopupSession.js.map +1 -1
- package/lib/sessions/components/display/SessionListCard.js +3 -6
- package/lib/sessions/components/display/SessionListCard.js.map +1 -1
- package/lib/sessions/components/index.d.ts +0 -1
- package/lib/sessions/components/index.js +0 -1
- package/lib/sessions/components/index.js.map +1 -1
- package/lib/sessions/components/inputs/SessionInputs.d.ts +2 -1
- package/lib/sessions/components/inputs/SessionInputs.js +18 -13
- package/lib/sessions/components/inputs/SessionInputs.js.map +1 -1
- package/lib/tools/LinkingProvider.d.ts +2 -2
- package/lib/tools/LinkingProvider.js +4 -4
- package/lib/tools/LinkingProvider.js.map +1 -1
- package/lib/types/anomaly-type.d.ts +16 -0
- package/lib/types/anomaly-type.js +56 -0
- package/lib/types/anomaly-type.js.map +1 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/types/index.js.map +1 -1
- package/lib/utils/displayers.d.ts +1 -0
- package/lib/utils/displayers.js +1 -0
- package/lib/utils/displayers.js.map +1 -1
- package/lib/utils/filter.d.ts +4 -0
- package/lib/utils/filter.js +13 -0
- package/lib/utils/filter.js.map +1 -1
- package/lib/utils/formatters.d.ts +1 -0
- package/lib/utils/formatters.js +16 -0
- package/lib/utils/formatters.js.map +1 -1
- package/lib/utils/index.d.ts +3 -3
- package/lib/utils/index.js +3 -3
- package/lib/utils/index.js.map +1 -1
- package/package.json +7 -8
- package/lib/sessions/components/buttons/DisabledButton.d.ts +0 -7
- package/lib/sessions/components/buttons/DisabledButton.js +0 -45
- package/lib/sessions/components/buttons/DisabledButton.js.map +0 -1
- package/lib/sessions/components/buttons/LoginButton.d.ts +0 -6
- package/lib/sessions/components/buttons/LoginButton.js.map +0 -1
- package/lib/sessions/components/buttons/UpdateButton.d.ts +0 -6
- package/lib/sessions/components/buttons/UpdateButton.js.map +0 -1
- package/lib/sessions/components/buttons/index.d.ts +0 -3
- package/lib/sessions/components/buttons/index.js.map +0 -1
|
@@ -16,12 +16,13 @@
|
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
import React, { useMemo } from 'react';
|
|
19
|
-
import { StyleSheet,
|
|
20
|
-
import {
|
|
19
|
+
import { Platform, StyleSheet, View } from 'react-native';
|
|
20
|
+
import { Alert, Button, checkNullString, Text, useThemeColor, } from '@axelor/aos-mobile-ui';
|
|
21
21
|
import useTranslator from '../../../i18n/hooks/use-translator';
|
|
22
22
|
import { linkingProvider } from '../../../tools/LinkingProvider';
|
|
23
23
|
import { logout } from '../../../features/authSlice';
|
|
24
24
|
import { useDispatch } from '../../../redux/hooks';
|
|
25
|
+
const BUTTON_WIDTH = 250;
|
|
25
26
|
const PopupMinimalRequiredVersion = ({ versionCheckConfig, onRefresh }) => {
|
|
26
27
|
const I18n = useTranslator();
|
|
27
28
|
const Colors = useThemeColor();
|
|
@@ -32,32 +33,21 @@ const PopupMinimalRequiredVersion = ({ versionCheckConfig, onRefresh }) => {
|
|
|
32
33
|
const handleUpdate = () => {
|
|
33
34
|
linkingProvider.openBrowser(url);
|
|
34
35
|
};
|
|
35
|
-
return (<
|
|
36
|
-
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
return (<Alert visible={true} title={I18n.t('Base_Information')}>
|
|
37
|
+
<Text>{I18n.t('Base_MinimalRequiredVersion')}</Text>
|
|
38
|
+
<View style={styles.buttonsContainer}>
|
|
39
|
+
{checkNullString(url) ? (<Text style={styles.noURLText}>{I18n.t('Base_Contact_Admin')}</Text>) : (<Button width={BUTTON_WIDTH} title={I18n.t('Base_Update')} iconName="angle-double-up" onPress={handleUpdate}/>)}
|
|
40
|
+
<Button width={BUTTON_WIDTH} color={Colors.secondaryColor} title={I18n.t('Base_Refresh')} iconName="refresh" FontAwesome5={false} onPress={onRefresh}/>
|
|
41
|
+
<Button width={BUTTON_WIDTH} color={Colors.errorColor} title={I18n.t('Base_Logout')} iconName="power-off" onPress={() => dispatch(logout())}/>
|
|
42
|
+
</View>
|
|
43
|
+
</Alert>);
|
|
40
44
|
};
|
|
41
45
|
const styles = StyleSheet.create({
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
paddingHorizontal: 15,
|
|
45
|
-
paddingRight: 15,
|
|
46
|
-
paddingVertical: 15,
|
|
46
|
+
buttonsContainer: {
|
|
47
|
+
marginTop: 10,
|
|
47
48
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
flexDirection: 'column',
|
|
51
|
-
justifyContent: 'center',
|
|
52
|
-
alignItems: 'center',
|
|
53
|
-
},
|
|
54
|
-
btn: {
|
|
55
|
-
height: 70,
|
|
56
|
-
marginVertical: '1%',
|
|
57
|
-
},
|
|
58
|
-
text: {
|
|
59
|
-
textAlign: 'center',
|
|
60
|
-
fontSize: 16,
|
|
49
|
+
noURLText: {
|
|
50
|
+
marginBottom: 10,
|
|
61
51
|
},
|
|
62
52
|
});
|
|
63
53
|
export default PopupMinimalRequiredVersion;
|
package/lib/components/templates/PopupMinimalRequiredVersion/PopupMinimalRequiredVersion.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopupMinimalRequiredVersion.js","sourceRoot":"","sources":["../../../../src/components/templates/PopupMinimalRequiredVersion/PopupMinimalRequiredVersion.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"PopupMinimalRequiredVersion.js","sourceRoot":"","sources":["../../../../src/components/templates/PopupMinimalRequiredVersion/PopupMinimalRequiredVersion.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CA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 -0,0 +1,16 @@
|
|
|
1
|
+
interface ContactData {
|
|
2
|
+
name?: string;
|
|
3
|
+
lastName?: string;
|
|
4
|
+
fullName?: string;
|
|
5
|
+
company?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const SocialNetworkLinks: ({ style, size, data, googleColor, hideGoogle, linkedinColor, hideLinkedin, }: {
|
|
8
|
+
style?: any;
|
|
9
|
+
size?: number;
|
|
10
|
+
data: ContactData;
|
|
11
|
+
googleColor?: string;
|
|
12
|
+
hideGoogle?: boolean;
|
|
13
|
+
linkedinColor?: string;
|
|
14
|
+
hideLinkedin?: boolean;
|
|
15
|
+
}) => JSX.Element;
|
|
16
|
+
export default SocialNetworkLinks;
|
|
@@ -0,0 +1,78 @@
|
|
|
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 { StyleSheet, View } from 'react-native';
|
|
20
|
+
import { Icon, useThemeColor } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import { linkingProvider } from '../../../tools';
|
|
22
|
+
const splitFullName = _data => {
|
|
23
|
+
const fullName = _data?.split(' ');
|
|
24
|
+
if (fullName?.length === 2) {
|
|
25
|
+
return { firstName: fullName[0], lastName: fullName[1] };
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
return { firstName: fullName, lastName: '' };
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const formatGoogleSearch = ({ name, lastName, fullName, company, }) => {
|
|
32
|
+
let result = '';
|
|
33
|
+
if (name != null && lastName != null) {
|
|
34
|
+
result = result.concat(name).concat('+').concat(lastName);
|
|
35
|
+
}
|
|
36
|
+
else if (fullName != null) {
|
|
37
|
+
const _names = splitFullName(fullName);
|
|
38
|
+
result = result
|
|
39
|
+
.concat(_names.firstName)
|
|
40
|
+
.concat('+')
|
|
41
|
+
.concat(_names.lastName);
|
|
42
|
+
}
|
|
43
|
+
if (company != null) {
|
|
44
|
+
result = result.concat('+').concat(company).concat('+');
|
|
45
|
+
}
|
|
46
|
+
return result;
|
|
47
|
+
};
|
|
48
|
+
const formatLinkedinSearch = ({ name, lastName, fullName, company, }) => {
|
|
49
|
+
if (name != null && lastName != null) {
|
|
50
|
+
return `pub/dir/${name}/${lastName}`;
|
|
51
|
+
}
|
|
52
|
+
else if (fullName != null) {
|
|
53
|
+
const _names = splitFullName(fullName);
|
|
54
|
+
return `pub/dir/${_names.firstName}/${_names.lastName}`;
|
|
55
|
+
}
|
|
56
|
+
if (company) {
|
|
57
|
+
return `company/${company}`;
|
|
58
|
+
}
|
|
59
|
+
return '';
|
|
60
|
+
};
|
|
61
|
+
const SocialNetworkLinks = ({ style, size = 20, data, googleColor, hideGoogle = false, linkedinColor, hideLinkedin = false, }) => {
|
|
62
|
+
const Colors = useThemeColor();
|
|
63
|
+
return (<View style={[styles.container, style]}>
|
|
64
|
+
{!hideGoogle && (<Icon style={styles.icon} name="google" FontAwesome5={false} color={googleColor || Colors.primaryColor.background} touchable={true} size={size} onPress={() => linkingProvider.openBrowser(`https://www.google.com/search?q=${formatGoogleSearch(data)}&gws_rd=cr`)}/>)}
|
|
65
|
+
{!hideLinkedin && (<Icon style={styles.icon} name="linkedin" FontAwesome5={false} color={linkedinColor || Colors.primaryColor.background} touchable={true} size={size} onPress={() => linkingProvider.openBrowser(`https://www.linkedin.com/${formatLinkedinSearch(data)}`, false)}/>)}
|
|
66
|
+
</View>);
|
|
67
|
+
};
|
|
68
|
+
const styles = StyleSheet.create({
|
|
69
|
+
container: {
|
|
70
|
+
flexDirection: 'row',
|
|
71
|
+
alignContent: 'center',
|
|
72
|
+
},
|
|
73
|
+
icon: {
|
|
74
|
+
marginHorizontal: 7,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
export default SocialNetworkLinks;
|
|
78
|
+
//# sourceMappingURL=SocialNetworkLinks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SocialNetworkLinks.js","sourceRoot":"","sources":["../../../../src/components/templates/SocialNetworkLinks/SocialNetworkLinks.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,IAAI,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAE/C,MAAM,aAAa,GAAG,KAAK,CAAC,EAAE;IAC5B,MAAM,QAAQ,GAAG,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACnC,IAAI,QAAQ,EAAE,MAAM,KAAK,CAAC,EAAE;QAC1B,OAAO,EAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAC,CAAC;KACxD;SAAM;QACL,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAC,CAAC;KAC5C;AACH,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,EAC1B,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,OAA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M,CAAC;IAC/B,SAAS,EAAE;QACT,aAAa,EAAE,KAAK;QACpB,YAAY,EAAE,QAAQ;KACvB;IACD,IAAI,EAAE;QACJ,gBAAgB,EAAE,CAAC;KACpB;CACF,CAAC,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default UserSearchBar;
|
|
2
|
+
declare function UserSearchBar({ style, title, defaultValue, onChange, readonly, required, showDetailsPopup, navigate, oneFilter, isFocus, showTitle, }: {
|
|
3
|
+
style?: any;
|
|
4
|
+
title?: string;
|
|
5
|
+
defaultValue?: any;
|
|
6
|
+
onChange?: () => void;
|
|
7
|
+
readonly?: boolean;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
showDetailsPopup?: boolean;
|
|
10
|
+
navigate?: boolean;
|
|
11
|
+
oneFilter?: boolean;
|
|
12
|
+
isFocus?: boolean;
|
|
13
|
+
showTitle?: boolean;
|
|
14
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
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 } from 'react';
|
|
19
|
+
import { AutoCompleteSearch } from '@axelor/aos-mobile-ui';
|
|
20
|
+
import { useDispatch, useSelector } from '../../../redux/hooks';
|
|
21
|
+
import { useTranslator } from '../../../i18n';
|
|
22
|
+
import { searchUser } from '../../../features/userSlice';
|
|
23
|
+
import { displayItemFullname } from '../../../utils/displayers';
|
|
24
|
+
const UserSearchBar = ({ style = null, title = 'Base_User', defaultValue = null, onChange = () => { }, readonly = false, required = false, showDetailsPopup = true, navigate = false, oneFilter = false, isFocus = false, showTitle = true, }) => {
|
|
25
|
+
const I18n = useTranslator();
|
|
26
|
+
const dispatch = useDispatch();
|
|
27
|
+
const { userList, loadingUser, moreLoading, isListEnd } = useSelector(state => state.userList);
|
|
28
|
+
const searchUserTypeAPI = useCallback(({ page = 0, searchValue }) => {
|
|
29
|
+
dispatch(searchUser({ page, searchValue }));
|
|
30
|
+
}, [dispatch]);
|
|
31
|
+
return (<AutoCompleteSearch title={showTitle && I18n.t(title)} objectList={userList} value={defaultValue} required={required} readonly={readonly} onChangeValue={onChange} fetchData={searchUserTypeAPI} displayValue={displayItemFullname} placeholder={I18n.t(title)} showDetailsPopup={showDetailsPopup} loadingList={loadingUser} moreLoading={moreLoading} isListEnd={isListEnd} navigate={navigate} oneFilter={oneFilter} isFocus={isFocus} style={style}/>);
|
|
32
|
+
};
|
|
33
|
+
export default UserSearchBar;
|
|
34
|
+
//# sourceMappingURL=UserSearchBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserSearchBar.js","sourceRoot":"","sources":["../../../../src/components/templates/UserSearchBar/UserSearchBar.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAC,MAAM,OAAO,CAAC;AACzC,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAC5C,OAAO,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,CAAC,CAAC,mBAAmB,CAAC,CAClC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAC3B,gBAAgB,CAAC,CAAC,gBAAgB,CAAC,CACnC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,KAAK,CAAC,CAAC,KAAK,CAAC,EACb,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -2,3 +2,5 @@ export { default as AttachedFilesView } from "./AttachedFilesView/AttachedFilesV
|
|
|
2
2
|
export { default as MailMessageView } from "./MailMessageView/MailMessageView";
|
|
3
3
|
export { default as PopupApplicationNotConfigured } from "./PopupApplicationNotConfigured/PopupApplicationNotConfigured";
|
|
4
4
|
export { default as PopupMinimalRequiredVersion } from "./PopupMinimalRequiredVersion/PopupMinimalRequiredVersion";
|
|
5
|
+
export { default as SocialNetworkLinks } from "./SocialNetworkLinks/SocialNetworkLinks";
|
|
6
|
+
export { default as UserSearchBar } from "./UserSearchBar/UserSearchBar";
|
|
@@ -19,4 +19,6 @@ export { default as AttachedFilesView } from './AttachedFilesView/AttachedFilesV
|
|
|
19
19
|
export { default as MailMessageView } from './MailMessageView/MailMessageView';
|
|
20
20
|
export { default as PopupApplicationNotConfigured } from './PopupApplicationNotConfigured/PopupApplicationNotConfigured';
|
|
21
21
|
export { default as PopupMinimalRequiredVersion } from './PopupMinimalRequiredVersion/PopupMinimalRequiredVersion';
|
|
22
|
+
export { default as SocialNetworkLinks } from './SocialNetworkLinks/SocialNetworkLinks';
|
|
23
|
+
export { default as UserSearchBar } from './UserSearchBar/UserSearchBar';
|
|
22
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/templates/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAC,OAAO,IAAI,6BAA6B,EAAC,MAAM,+DAA+D,CAAC;AACvH,OAAO,EAAC,OAAO,IAAI,2BAA2B,EAAC,MAAM,2DAA2D,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/templates/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAC,OAAO,IAAI,6BAA6B,EAAC,MAAM,+DAA+D,CAAC;AACvH,OAAO,EAAC,OAAO,IAAI,2BAA2B,EAAC,MAAM,2DAA2D,CAAC;AACjH,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,+BAA+B,CAAC"}
|
package/lib/config/routes.d.ts
CHANGED
|
@@ -1,37 +1,40 @@
|
|
|
1
1
|
export default routes;
|
|
2
2
|
declare namespace routes {
|
|
3
3
|
namespace AOS6 {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
let App: string;
|
|
5
|
+
let AppBase: string;
|
|
6
|
+
let AppCrm: string;
|
|
7
|
+
let AppExpense: string;
|
|
8
|
+
let AppHeldesk: string;
|
|
9
|
+
let AppStock: string;
|
|
10
|
+
let AppSupplychain: string;
|
|
11
|
+
let AppMobileSettings: string;
|
|
12
|
+
let TraceBack: string;
|
|
13
|
+
let EmailAddress: string;
|
|
14
|
+
let MailMessages: string;
|
|
14
15
|
}
|
|
15
16
|
namespace AOS7 {
|
|
16
|
-
|
|
17
|
+
let App_1: string;
|
|
17
18
|
export { App_1 as App };
|
|
18
|
-
|
|
19
|
+
let AppBase_1: string;
|
|
19
20
|
export { AppBase_1 as AppBase };
|
|
20
|
-
|
|
21
|
+
let AppCrm_1: string;
|
|
21
22
|
export { AppCrm_1 as AppCrm };
|
|
22
|
-
|
|
23
|
+
let AppExpense_1: string;
|
|
24
|
+
export { AppExpense_1 as AppExpense };
|
|
25
|
+
let AppHeldesk_1: string;
|
|
23
26
|
export { AppHeldesk_1 as AppHeldesk };
|
|
24
|
-
|
|
27
|
+
let AppStock_1: string;
|
|
25
28
|
export { AppStock_1 as AppStock };
|
|
26
|
-
|
|
29
|
+
let AppSupplychain_1: string;
|
|
27
30
|
export { AppSupplychain_1 as AppSupplychain };
|
|
28
|
-
|
|
31
|
+
let AppMobileSettings_1: string;
|
|
29
32
|
export { AppMobileSettings_1 as AppMobileSettings };
|
|
30
|
-
|
|
33
|
+
let TraceBack_1: string;
|
|
31
34
|
export { TraceBack_1 as TraceBack };
|
|
32
|
-
|
|
35
|
+
let EmailAddress_1: string;
|
|
33
36
|
export { EmailAddress_1 as EmailAddress };
|
|
34
|
-
|
|
37
|
+
let MailMessages_1: string;
|
|
35
38
|
export { MailMessages_1 as MailMessages };
|
|
36
39
|
}
|
|
37
40
|
}
|
package/lib/config/routes.js
CHANGED
|
@@ -20,6 +20,7 @@ const routes = {
|
|
|
20
20
|
App: '/ws/rest/com.axelor.apps.base.db.App',
|
|
21
21
|
AppBase: '/ws/rest/com.axelor.apps.base.db.AppBase',
|
|
22
22
|
AppCrm: '/ws/rest/com.axelor.apps.base.db.AppCrm',
|
|
23
|
+
AppExpense: '/ws/rest/com.axelor.apps.base.db.AppExpense',
|
|
23
24
|
AppHeldesk: '/ws/rest/com.axelor.app.base.db.AppHelpdesk',
|
|
24
25
|
AppStock: '/ws/rest/com.axelor.apps.base.db.AppStock',
|
|
25
26
|
AppSupplychain: '/ws/rest/com.axelor.apps.base.db.AppSupplychain',
|
|
@@ -32,6 +33,7 @@ const routes = {
|
|
|
32
33
|
App: '/ws/rest/com.axelor.studio.db.App',
|
|
33
34
|
AppBase: '/ws/rest/com.axelor.studio.db.AppBase',
|
|
34
35
|
AppCrm: '/ws/rest/com.axelor.studio.db.AppCrm',
|
|
36
|
+
AppExpense: '/ws/rest/com.axelor.studio.db.AppExpense',
|
|
35
37
|
AppHeldesk: '/ws/rest/com.axelor.studio.db.AppHelpdesk',
|
|
36
38
|
AppStock: '/ws/rest/com.axelor.studio.db.AppStock',
|
|
37
39
|
AppSupplychain: '/ws/rest/com.axelor.studio.db.AppSupplychain',
|
package/lib/config/routes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/config/routes.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,MAAM,GAAG;IACb,IAAI,EAAE;QACJ,GAAG,EAAE,sCAAsC;QAC3C,OAAO,EAAE,0CAA0C;QACnD,MAAM,EAAE,yCAAyC;QACjD,UAAU,EAAE,6CAA6C;QACzD,QAAQ,EAAE,2CAA2C;QACrD,cAAc,EAAE,iDAAiD;QACjE,iBAAiB,EAAE,oDAAoD;QACvE,SAAS,EAAE,4CAA4C;QACvD,YAAY,EAAE,kDAAkD;QAChE,YAAY,EAAE,kDAAkD;KACjE;IACD,IAAI,EAAE;QACJ,GAAG,EAAE,mCAAmC;QACxC,OAAO,EAAE,uCAAuC;QAChD,MAAM,EAAE,sCAAsC;QAC9C,UAAU,EAAE,2CAA2C;QACvD,QAAQ,EAAE,wCAAwC;QAClD,cAAc,EAAE,8CAA8C;QAC9D,iBAAiB,EAAE,iDAAiD;QACpE,SAAS,EAAE,4CAA4C;QACvD,YAAY,EAAE,6CAA6C;QAC3D,YAAY,EAAE,cAAc;KAC7B;CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/config/routes.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,MAAM,GAAG;IACb,IAAI,EAAE;QACJ,GAAG,EAAE,sCAAsC;QAC3C,OAAO,EAAE,0CAA0C;QACnD,MAAM,EAAE,yCAAyC;QACjD,UAAU,EAAE,6CAA6C;QACzD,UAAU,EAAE,6CAA6C;QACzD,QAAQ,EAAE,2CAA2C;QACrD,cAAc,EAAE,iDAAiD;QACjE,iBAAiB,EAAE,oDAAoD;QACvE,SAAS,EAAE,4CAA4C;QACvD,YAAY,EAAE,kDAAkD;QAChE,YAAY,EAAE,kDAAkD;KACjE;IACD,IAAI,EAAE;QACJ,GAAG,EAAE,mCAAmC;QACxC,OAAO,EAAE,uCAAuC;QAChD,MAAM,EAAE,sCAAsC;QAC9C,UAAU,EAAE,0CAA0C;QACtD,UAAU,EAAE,2CAA2C;QACvD,QAAQ,EAAE,wCAAwC;QAClD,cAAc,EAAE,8CAA8C;QAC9D,iBAAiB,EAAE,iDAAiD;QACpE,SAAS,EAAE,4CAA4C;QACvD,YAAY,EAAE,6CAA6C;QAC3D,YAAY,EAAE,cAAc;KAC7B;CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -7,12 +7,12 @@ interface CameraScannerSliceState {
|
|
|
7
7
|
cameraKey: string | null;
|
|
8
8
|
barcode: Barcode | null;
|
|
9
9
|
}
|
|
10
|
-
export declare const enableCameraScanner: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "cameraScanner/enableCameraScanner">, scanBarcode: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "cameraScanner/scanBarcode">, disableCameraScanner: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"cameraScanner/disableCameraScanner">;
|
|
10
|
+
export declare const enableCameraScanner: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "cameraScanner/enableCameraScanner">, scanBarcode: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "cameraScanner/scanBarcode">, disableCameraScanner: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"cameraScanner/disableCameraScanner">, clearBarcode: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"cameraScanner/clearBarcode">;
|
|
11
11
|
export declare const useCameraScannerSelector: () => CameraScannerSliceState;
|
|
12
12
|
export declare const useCameraScannerValueByKey: (key: string) => Barcode | null;
|
|
13
13
|
declare const _default: import("redux").Reducer<{
|
|
14
14
|
isEnabled: boolean;
|
|
15
15
|
cameraKey: any;
|
|
16
16
|
barcode: any;
|
|
17
|
-
}
|
|
17
|
+
}>;
|
|
18
18
|
export default _default;
|
|
@@ -40,9 +40,12 @@ const cameraScannerSlice = createSlice({
|
|
|
40
40
|
state.cameraKey = null;
|
|
41
41
|
state.barcode = null;
|
|
42
42
|
},
|
|
43
|
+
clearBarcode(state) {
|
|
44
|
+
state.barcode = null;
|
|
45
|
+
},
|
|
43
46
|
},
|
|
44
47
|
});
|
|
45
|
-
export const { enableCameraScanner, scanBarcode, disableCameraScanner } = cameraScannerSlice.actions;
|
|
48
|
+
export const { enableCameraScanner, scanBarcode, disableCameraScanner, clearBarcode, } = cameraScannerSlice.actions;
|
|
46
49
|
const selectCameraScanner = state => state.cameraScanner;
|
|
47
50
|
export const useCameraScannerSelector = () => useSelector(selectCameraScanner);
|
|
48
51
|
export const useCameraScannerValueByKey = key => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cameraScannerSlice.js","sourceRoot":"","sources":["../../src/features/cameraScannerSlice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAC9B,O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F,eAAe,kBAAkB,CAAC,OAAO,CAAC"}
|
|
@@ -1,14 +1,23 @@
|
|
|
1
|
+
export interface CameraPhoto {
|
|
2
|
+
name: string;
|
|
3
|
+
pictureExtention: string;
|
|
4
|
+
dateTime: string;
|
|
5
|
+
type: string;
|
|
6
|
+
size: number;
|
|
7
|
+
base64: string;
|
|
8
|
+
fullBase64: string;
|
|
9
|
+
}
|
|
1
10
|
interface CameraSliceState {
|
|
2
11
|
isEnabled: boolean;
|
|
3
12
|
cameraKey: string | null;
|
|
4
|
-
photo:
|
|
13
|
+
photo: CameraPhoto | null;
|
|
5
14
|
}
|
|
6
|
-
export declare const enableCamera: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "camera/enableCamera">, takePhoto: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "camera/takePhoto">, disableCamera: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"camera/disableCamera">;
|
|
15
|
+
export declare const enableCamera: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "camera/enableCamera">, takePhoto: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "camera/takePhoto">, disableCamera: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"camera/disableCamera">, clearPhoto: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"camera/clearPhoto">;
|
|
7
16
|
export declare const useCameraSelector: () => CameraSliceState;
|
|
8
|
-
export declare const useCameraValueByKey: (key: string) =>
|
|
17
|
+
export declare const useCameraValueByKey: (key: string) => CameraPhoto | null;
|
|
9
18
|
declare const _default: import("redux").Reducer<{
|
|
10
19
|
isEnabled: boolean;
|
|
11
20
|
cameraKey: any;
|
|
12
21
|
photo: any;
|
|
13
|
-
}
|
|
22
|
+
}>;
|
|
14
23
|
export default _default;
|
|
@@ -34,6 +34,9 @@ const cameraSlice = createSlice({
|
|
|
34
34
|
takePhoto(state, action) {
|
|
35
35
|
state.photo = action.payload;
|
|
36
36
|
},
|
|
37
|
+
clearPhoto(state) {
|
|
38
|
+
state.photo = null;
|
|
39
|
+
},
|
|
37
40
|
disableCamera(state) {
|
|
38
41
|
state.isEnabled = false;
|
|
39
42
|
state.cameraKey = null;
|
|
@@ -41,7 +44,7 @@ const cameraSlice = createSlice({
|
|
|
41
44
|
},
|
|
42
45
|
},
|
|
43
46
|
});
|
|
44
|
-
export const { enableCamera, takePhoto, disableCamera } = cameraSlice.actions;
|
|
47
|
+
export const { enableCamera, takePhoto, disableCamera, clearPhoto } = cameraSlice.actions;
|
|
45
48
|
const selectCamera = state => state.camera;
|
|
46
49
|
export const useCameraSelector = () => useSelector(selectCamera);
|
|
47
50
|
export const useCameraValueByKey = key => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cameraSlice.js","sourceRoot":"","sources":["../../src/features/cameraSlice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"cameraSlice.js","sourceRoot":"","sources":["../../src/features/cameraSlice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAkB7C,MAAM,WAAW,GAAG,WAAW,CAAC;IAC9B,IAAI,EAAE,QAAQ;IACd,YAAY,EAAE;QACZ,SAAS,EAAE,KAAK;QAChB,SAAS,EAAE,IAAI;QACf,KAAK,EAAE,IAAI;KACZ;IACD,QAAQ,EAAE;QACR,YAAY,CAAC,KAAK,EAAE,MAAM;YACxB,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;YACvB,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC;YACjC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC;QACrB,CAAC;QACD,SAAS,CAAC,KAAK,EAAE,MAAM;YACrB,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC;QAC/B,CAAC;QACD,UAAU,CAAC,KAAK;YACd,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC;QACrB,CAAC;QACD,aAAa,CAAC,KAAK;YACjB,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC;YACxB,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;YACvB,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC;QACrB,CAAC;KACF;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,EAAC,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAC,GAC/D,WAAW,CAAC,OAAO,CAAC;AAEtB,MAAM,YAAY,GAAG,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;AAE3C,MAAM,CAAC,MAAM,iBAAiB,GAA2B,GAAG,EAAE,CAC5D,WAAW,CAAC,YAAY,CAAC,CAAC;AAE5B,MAAM,CAAC,MAAM,mBAAmB,GAAwC,GAAG,CAAC,EAAE;IAC5E,MAAM,EAAC,SAAS,EAAE,KAAK,EAAC,GAAG,iBAAiB,EAAE,CAAC;IAC/C,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,EACxC,CAAC,SAAS,EAAE,GAAG,EAAE,KAAK,CAAC,CACxB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,OAAO,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export const createRecord: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
2
|
+
state?: unknown;
|
|
3
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction>;
|
|
4
|
+
extra?: unknown;
|
|
5
|
+
rejectValue?: unknown;
|
|
6
|
+
serializedErrorType?: unknown;
|
|
7
|
+
pendingMeta?: unknown;
|
|
8
|
+
fulfilledMeta?: unknown;
|
|
9
|
+
rejectedMeta?: unknown;
|
|
10
|
+
}>;
|
|
11
|
+
export const updateRecord: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
12
|
+
state?: unknown;
|
|
13
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction>;
|
|
14
|
+
extra?: unknown;
|
|
15
|
+
rejectValue?: unknown;
|
|
16
|
+
serializedErrorType?: unknown;
|
|
17
|
+
pendingMeta?: unknown;
|
|
18
|
+
fulfilledMeta?: unknown;
|
|
19
|
+
rejectedMeta?: unknown;
|
|
20
|
+
}>;
|
|
21
|
+
export const refreshRecord: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
22
|
+
state?: unknown;
|
|
23
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction>;
|
|
24
|
+
extra?: unknown;
|
|
25
|
+
rejectValue?: unknown;
|
|
26
|
+
serializedErrorType?: unknown;
|
|
27
|
+
pendingMeta?: unknown;
|
|
28
|
+
fulfilledMeta?: unknown;
|
|
29
|
+
rejectedMeta?: unknown;
|
|
30
|
+
}>;
|
|
31
|
+
export const clearRecord: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"form/clearRecord">;
|
|
32
|
+
export const formReducer: import("redux").Reducer<import("immer/dist/internal").WritableDraft<{
|
|
33
|
+
record: {};
|
|
34
|
+
}>>;
|
|
@@ -0,0 +1,70 @@
|
|
|
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 { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
19
|
+
import { handlerApiCall } from '../apiProviders/utils';
|
|
20
|
+
import { createRecord as _createRecord, updateRecord as _updateRecord, refreshRecord as _refreshRecord, } from '../forms/api.helpers';
|
|
21
|
+
export const createRecord = createAsyncThunk('form/createRecord', async function (data, { getState }) {
|
|
22
|
+
return handlerApiCall({
|
|
23
|
+
fetchFunction: _createRecord,
|
|
24
|
+
data: data,
|
|
25
|
+
action: 'Base_SliceAction_CreateRecord',
|
|
26
|
+
getState: getState,
|
|
27
|
+
responseOptions: { isArrayResponse: false, showToast: true },
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
export const updateRecord = createAsyncThunk('form/updateRecord', async function (data, { getState }) {
|
|
31
|
+
return handlerApiCall({
|
|
32
|
+
fetchFunction: _updateRecord,
|
|
33
|
+
data: data,
|
|
34
|
+
action: 'Base_SliceAction_UpdateRecord',
|
|
35
|
+
getState: getState,
|
|
36
|
+
responseOptions: { isArrayResponse: false, showToast: true },
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
export const refreshRecord = createAsyncThunk('form/refreshRecord', async function (data, { getState }) {
|
|
40
|
+
return handlerApiCall({
|
|
41
|
+
fetchFunction: _refreshRecord,
|
|
42
|
+
data: data,
|
|
43
|
+
action: 'Base_SliceAction_RefreshRecord',
|
|
44
|
+
getState: getState,
|
|
45
|
+
responseOptions: { isArrayResponse: false },
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
const initialState = {
|
|
49
|
+
record: {},
|
|
50
|
+
};
|
|
51
|
+
const formSlice = createSlice({
|
|
52
|
+
name: 'form',
|
|
53
|
+
initialState,
|
|
54
|
+
reducers: {
|
|
55
|
+
clearRecord: state => {
|
|
56
|
+
state.record = {};
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
extraReducers: builder => {
|
|
60
|
+
builder.addCase(updateRecord.fulfilled, (state, action) => {
|
|
61
|
+
state.record = action.payload;
|
|
62
|
+
});
|
|
63
|
+
builder.addCase(refreshRecord.fulfilled, (state, action) => {
|
|
64
|
+
state.record = action.payload;
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
export const { clearRecord } = formSlice.actions;
|
|
69
|
+
export const formReducer = formSlice.reducer;
|
|
70
|
+
//# sourceMappingURL=formSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formSlice.js","sourceRoot":"","sources":["../../src/features/formSlice.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAC,MAAM,uBAAuB,CAAC;AACrD,OAAO,EACL,YAAY,IAAI,aAAa,EAC7B,YAAY,IAAI,aAAa,EAC7B,aAAa,IAAI,cAAc,GAChC,MAAM,sBAAsB,CAAC;AAE9B,MAAM,CAAC,MAAM,YAAY,GAAG,gBAAgB,CAC1C,mBAAmB,EACnB,KAAK,WAAW,IAAI,EAAE,EAAC,QAAQ,EAAC;IAC9B,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,aAAa;QAC5B,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,+BAA+B;QACvC,QAAQ,EAAE,QAAQ;QAClB,eAAe,EAAE,EAAC,eAAe,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAC;KAC3D,CAAC,CAAC;AACL,CAAC,CACF,CAAC;AAEF,MAA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MAAM,CAAC,OAAO,CAAC;QAChC,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,EAAC,WAAW,EAAC,GAAG,SAAS,CAAC,OAAO,CAAC;AAE/C,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC,OAAO,CAAC"}
|
package/lib/features/index.d.ts
CHANGED
|
@@ -2,10 +2,13 @@ export { attachedFilesReducer as attachedFiles } from "./attachedFilesSlice";
|
|
|
2
2
|
export { authReducer as auth } from "./authSlice";
|
|
3
3
|
export { default as cameraScanner } from "./cameraScannerSlice";
|
|
4
4
|
export { default as camera } from "./cameraSlice";
|
|
5
|
+
export { formReducer as form } from "./formSlice";
|
|
5
6
|
export { mailMessagesReducer as mailMessages } from "./mailMessageSlice";
|
|
6
7
|
export { menuConfigReducer as menuConfig } from "./menuConfigSlice";
|
|
7
8
|
export { metafileReducer as metafile } from "./metafileSlice";
|
|
9
|
+
export { metaJsonFieldReducer as metaJsonField } from "./metaJsonFieldSlice";
|
|
8
10
|
export { metaModuleReducer as metaModule } from "./metaModuleSlice";
|
|
9
11
|
export { mobileConfigReducer as mobileConfig } from "./mobileConfigSlice";
|
|
10
12
|
export { onlineReducer as online } from "./onlineSlice";
|
|
11
13
|
export { default as scanner } from "./scannerSlice";
|
|
14
|
+
export { userListReducer as userList } from "./userSlice";
|
package/lib/features/index.js
CHANGED
|
@@ -19,11 +19,14 @@ export { attachedFilesReducer as attachedFiles } from './attachedFilesSlice';
|
|
|
19
19
|
export { authReducer as auth } from './authSlice';
|
|
20
20
|
export { default as cameraScanner } from './cameraScannerSlice';
|
|
21
21
|
export { default as camera } from './cameraSlice';
|
|
22
|
+
export { formReducer as form } from './formSlice';
|
|
22
23
|
export { mailMessagesReducer as mailMessages } from './mailMessageSlice';
|
|
23
24
|
export { menuConfigReducer as menuConfig } from './menuConfigSlice';
|
|
24
25
|
export { metafileReducer as metafile } from './metafileSlice';
|
|
26
|
+
export { metaJsonFieldReducer as metaJsonField } from './metaJsonFieldSlice';
|
|
25
27
|
export { metaModuleReducer as metaModule } from './metaModuleSlice';
|
|
26
28
|
export { mobileConfigReducer as mobileConfig } from './mobileConfigSlice';
|
|
27
29
|
export { onlineReducer as online } from './onlineSlice';
|
|
28
30
|
export { default as scanner } from './scannerSlice';
|
|
31
|
+
export { userListReducer as userList } from './userSlice';
|
|
29
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/features/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,oBAAoB,IAAI,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAC,WAAW,IAAI,IAAI,EAAC,MAAM,aAAa,CAAC;AAChD,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,eAAe,CAAC;AAChD,OAAO,EAAC,mBAAmB,IAAI,YAAY,EAAC,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAC,iBAAiB,IAAI,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAC,eAAe,IAAI,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAC,iBAAiB,IAAI,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAC,mBAAmB,IAAI,YAAY,EAAC,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAC,aAAa,IAAI,MAAM,EAAC,MAAM,eAAe,CAAC;AACtD,OAAO,EAAC,OAAO,IAAI,OAAO,EAAC,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/features/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,oBAAoB,IAAI,aAAa,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