@axelor/aos-mobile-core 7.1.3 → 7.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/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 +1 -1
- 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/context.helper.js +6 -1
- package/lib/app/context.helper.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/UserScreen.js +12 -5
- package/lib/auth/screens/UserScreen.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.js +3 -3
- package/lib/components/molecules/CameraButton/CameraButton.js.map +1 -1
- package/lib/components/molecules/UploadFileInput/UploadFileInput.js +3 -1
- package/lib/components/molecules/UploadFileInput/UploadFileInput.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/DateInput/DateInput.js +3 -3
- package/lib/components/organisms/DateInput/DateInput.js.map +1 -1
- package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.d.ts +2 -1
- package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js +18 -5
- package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.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/{sessions/components/buttons → components/pages/FormView/Alerts}/index.js +1 -3
- package/lib/components/pages/FormView/Alerts/index.js.map +1 -0
- package/lib/components/pages/FormView/Components/Field.d.ts +10 -0
- package/lib/components/pages/FormView/Components/Field.js +146 -0
- package/lib/components/pages/FormView/Components/Field.js.map +1 -0
- package/lib/components/pages/FormView/Components/Panel.d.ts +9 -0
- package/lib/components/pages/FormView/Components/Panel.js +96 -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 +193 -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/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 +9 -6
- package/lib/components/templates/SocialNetworkLinks/SocialNetworkLinks.js +30 -10
- package/lib/components/templates/SocialNetworkLinks/SocialNetworkLinks.js.map +1 -1
- 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 +1 -0
- package/lib/components/templates/index.js +1 -0
- package/lib/components/templates/index.js.map +1 -1
- package/lib/config/routes.d.ts +3 -0
- package/lib/config/routes.js +2 -0
- package/lib/config/routes.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/metaJsonFieldSlice.d.ts +34 -0
- package/lib/features/metaJsonFieldSlice.js +68 -0
- package/lib/features/metaJsonFieldSlice.js.map +1 -0
- 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 +18 -0
- package/lib/forms/display.helpers.js +225 -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 +15 -1
- package/lib/header/hooks.js +57 -2
- package/lib/header/hooks.js.map +1 -1
- package/lib/header/types.d.ts +1 -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/translations/en.json +52 -1
- package/lib/i18n/translations/fr.json +52 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- 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/drawer/Header.js +1 -1
- package/lib/navigator/drawer/Header.js.map +1 -1
- 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/index.d.ts +13 -0
- package/lib/screens/index.js +9 -0
- package/lib/screens/index.js.map +1 -1
- package/lib/sessions/components/alerts/PopupCreateSession.js +8 -16
- package/lib/sessions/components/alerts/PopupCreateSession.js.map +1 -1
- package/lib/sessions/components/alerts/PopupEditSession.js +8 -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/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.js +9 -7
- package/lib/sessions/components/inputs/SessionInputs.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/index.d.ts +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/index.js.map +1 -1
- package/package.json +3 -3
- 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
|
@@ -19,13 +19,12 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
19
19
|
import { ActivityIndicator, StyleSheet, View } from 'react-native';
|
|
20
20
|
import { useDispatch } from 'react-redux';
|
|
21
21
|
import DeviceInfo from 'react-native-device-info';
|
|
22
|
-
import { WarningCard, checkNullString, useThemeColor, } from '@axelor/aos-mobile-ui';
|
|
22
|
+
import { Button, WarningCard, checkNullString, useThemeColor, } from '@axelor/aos-mobile-ui';
|
|
23
23
|
import { DefaultCheckbox, SessionNameInput, UrlInput, UsernameInput, PasswordInput, } from '../inputs';
|
|
24
24
|
import { useScanActivator, useScannerDeviceActivator, } from '../../../hooks/use-scan-activator';
|
|
25
25
|
import { clearScan, useScannedValueByKey, useScannerSelector, } from '../../../features/scannerSlice';
|
|
26
26
|
import { clearBarcode, useCameraScannerValueByKey, } from '../../../features/cameraScannerSlice';
|
|
27
27
|
import { isUrlValid } from '../../../features/authSlice';
|
|
28
|
-
import { LoginButton, UpdateButton } from '../buttons';
|
|
29
28
|
import { useTranslator } from '../../../i18n';
|
|
30
29
|
const getScanKey = mode => `urlUsername_${mode}_inputs`;
|
|
31
30
|
const MODE = {
|
|
@@ -161,14 +160,17 @@ const SessionInputs = ({ style, sessionList, session, showUrlInput, loading, mod
|
|
|
161
160
|
: Colors.secondaryColor_dark.background} style={styles.input} showRequiredFields={showRequiredFields}/>
|
|
162
161
|
<PasswordInput value={form?.password} onChange={_value => handleFieldChange(_value, FIELDS.password)} readOnly={loading} style={styles.input} showRequiredFields={showRequiredFields} hidden={mode === MODE.edition}/>
|
|
163
162
|
<DefaultCheckbox value={form?.isDefault} onChange={_value => handleFieldChange(_value, FIELDS.isDefault)} hidden={mode === MODE.connection || mode === MODE.unique}/>
|
|
164
|
-
{loading ? (<ActivityIndicator size="large"/>) : ((mode === MODE.edition
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
disabled,
|
|
168
|
-
}))}
|
|
163
|
+
{loading ? (<ActivityIndicator size="large"/>) : (<Button title={I18n.t(mode === MODE.edition
|
|
164
|
+
? 'Base_Connection_Update'
|
|
165
|
+
: 'Base_Connection_Login')} onPress={() => onValidation(form)} disabled={disabled} onDisabledPress={() => setShowRequiredFields(true)} style={styles.button}/>)}
|
|
169
166
|
</View>);
|
|
170
167
|
};
|
|
171
168
|
const styles = StyleSheet.create({
|
|
169
|
+
button: {
|
|
170
|
+
marginTop: 15,
|
|
171
|
+
width: 150,
|
|
172
|
+
height: 30,
|
|
173
|
+
},
|
|
172
174
|
input: {
|
|
173
175
|
width: '100%',
|
|
174
176
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionInputs.js","sourceRoot":"","sources":["../../../../src/sessions/components/inputs/SessionInputs.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACvE,OAAO,EAAC,iBAAiB,EAAE,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AACjE,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EACL,WAAW,EACX,eAAe,EACf,aAAa,GACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,aAAa,EACb,aAAa,GACd,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,SAAS,EACT,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,YAAY,EACZ,0BAA0B,GAC3B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAC,UAAU,EAAC,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"SessionInputs.js","sourceRoot":"","sources":["../../../../src/sessions/components/inputs/SessionInputs.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACvE,OAAO,EAAC,iBAAiB,EAAE,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AACjE,OAAO,EAAC,WAAW,EAAC,MAAM,aAA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AClC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,eAAe,CAAC,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,CACnD,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EACrB,CACH,CACH;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,MAAM,EAAE;QACN,SAAS,EAAE,EAAE;QACb,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,EAAE;KACX;IACD,KAAK,EAAE;QACL,KAAK,EAAE,MAAM;KACd;IACD,WAAW,EAAE;QACX,KAAK,EAAE,KAAK;KACb;CACF,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ThemeColors } from '@axelor/aos-mobile-ui';
|
|
2
|
+
interface Anomaly {
|
|
3
|
+
version: number;
|
|
4
|
+
message: string;
|
|
5
|
+
checkType: string;
|
|
6
|
+
modelName: string;
|
|
7
|
+
}
|
|
8
|
+
declare class Anomaly {
|
|
9
|
+
static type: {
|
|
10
|
+
Error: string;
|
|
11
|
+
Alert: string;
|
|
12
|
+
};
|
|
13
|
+
static getTypeColor: (type: string, Colors: ThemeColors) => import("@axelor/aos-mobile-ui").Color;
|
|
14
|
+
static sortType: (anomalyList: Anomaly[]) => Anomaly[];
|
|
15
|
+
}
|
|
16
|
+
export default Anomaly;
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
class Anomaly {
|
|
19
|
+
static type = {
|
|
20
|
+
Error: 'error',
|
|
21
|
+
Alert: 'alert',
|
|
22
|
+
};
|
|
23
|
+
static getTypeColor = (type, Colors) => {
|
|
24
|
+
switch (type) {
|
|
25
|
+
case this.type.Error:
|
|
26
|
+
return Colors.errorColor;
|
|
27
|
+
case this.type.Alert:
|
|
28
|
+
return Colors.warningColor;
|
|
29
|
+
default:
|
|
30
|
+
console.warn(`Type provided with value ${type} is not supported by anomaly`);
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
static sortType = (anomalyList) => {
|
|
35
|
+
const BEFORE = -1;
|
|
36
|
+
const EQUAL = 0;
|
|
37
|
+
const AFTER = 1;
|
|
38
|
+
if (!Array.isArray(anomalyList) || anomalyList.length === 0) {
|
|
39
|
+
return [];
|
|
40
|
+
}
|
|
41
|
+
return anomalyList.sort((a, b) => {
|
|
42
|
+
if (a.checkType === b.checkType) {
|
|
43
|
+
return EQUAL;
|
|
44
|
+
}
|
|
45
|
+
else if (a.checkType === this.type.Error &&
|
|
46
|
+
b.checkType === this.type.Alert) {
|
|
47
|
+
return BEFORE;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
return AFTER;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export default Anomaly;
|
|
56
|
+
//# sourceMappingURL=anomaly-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anomaly-type.js","sourceRoot":"","sources":["../../src/types/an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AC;;AAGJ,eAAe,OAAO,CAAC"}
|
package/lib/types/index.d.ts
CHANGED
package/lib/types/index.js
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
+
export { default as Anomaly } from './anomaly-type';
|
|
18
19
|
export { default as MailMessageNotificationType } from './mail-message-notification-type';
|
|
19
20
|
export { default as StopwatchType } from './stopwatch-type';
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
package/lib/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,2BAA2B,EAAC,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAC,OAAO,IAAI,2BAA2B,EAAC,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,kBAAkB,CAAC"}
|
package/lib/utils/displayers.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"displayers.js","sourceRoot":"","sources":["../../src/utils/displayers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAS,EAAU,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC"}
|
|
1
|
+
{"version":3,"file":"displayers.js","sourceRoot":"","sources":["../../src/utils/displayers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAS,EAAU,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;AAChE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAS,EAAU,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC"}
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { updateAgendaItems } from './agenda';
|
|
2
2
|
export { isDate, isDateTime, getNextMonth, getPreviousMonth, diffDate, sameDate, incrementDate, getDay, getMonth, getFullDateItems, } from './date';
|
|
3
|
-
export { displayItemName } from './displayers';
|
|
3
|
+
export { displayItemName, displayItemFullname } from './displayers';
|
|
4
4
|
export { formatDate, formatDateTime, formatTime, formatScan, formatURL, getNowDateZonesISOString, getDateZonesISOString, formatRequestBody, } from './formatters';
|
|
5
5
|
export { useBinaryImageUri, useBinaryPictureUri, useMetafileUri } from './image';
|
|
6
6
|
export { filterList, filterListContain } from './list';
|
package/lib/utils/index.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
export { updateAgendaItems } from './agenda';
|
|
19
19
|
export { isDate, isDateTime, getNextMonth, getPreviousMonth, diffDate, sameDate, incrementDate, getDay, getMonth, getFullDateItems, } from './date';
|
|
20
|
-
export { displayItemName } from './displayers';
|
|
20
|
+
export { displayItemName, displayItemFullname } from './displayers';
|
|
21
21
|
export { formatDate, formatDateTime, formatTime, formatScan, formatURL, getNowDateZonesISOString, getDateZonesISOString, formatRequestBody, } from './formatters';
|
|
22
22
|
export { useBinaryImageUri, useBinaryPictureUri, useMetafileUri } from './image';
|
|
23
23
|
export { filterList, filterListContain } from './list';
|
package/lib/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAA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AE,UAAU,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AAC7E,OAAO,EAAC,UAAU,EAAE,kBAAkB,EAAC,MAAM,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axelor/aos-mobile-core",
|
|
3
|
-
"version": "7.1
|
|
3
|
+
"version": "7.2.1",
|
|
4
4
|
"author": "Axelor",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"publishConfig": {
|
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
"vision-camera-code-scanner": "^0.2.0"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@axelor/aos-mobile-error": "7.1
|
|
88
|
-
"@axelor/aos-mobile-ui": "7.1
|
|
87
|
+
"@axelor/aos-mobile-error": "7.2.1",
|
|
88
|
+
"@axelor/aos-mobile-ui": "7.2.1",
|
|
89
89
|
"@react-navigation/drawer": "6.6.3",
|
|
90
90
|
"@react-navigation/native": "6.1.7",
|
|
91
91
|
"@react-navigation/native-stack": "6.9.13",
|
|
@@ -1,45 +0,0 @@
|
|
|
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, { useMemo } from 'react';
|
|
19
|
-
import { StyleSheet, View } from 'react-native';
|
|
20
|
-
import { Button, useThemeColor } from '@axelor/aos-mobile-ui';
|
|
21
|
-
import { useTranslator } from '../../../i18n';
|
|
22
|
-
const DisabledButton = ({ title, onPress, onDisabledPress = () => { }, disabled, }) => {
|
|
23
|
-
const I18n = useTranslator();
|
|
24
|
-
const Colors = useThemeColor();
|
|
25
|
-
const styles = useMemo(() => getStyles(Colors), [Colors]);
|
|
26
|
-
return (<View style={styles.container}>
|
|
27
|
-
<Button style={styles.button} title={I18n.t(title)} onPress={disabled ? onDisabledPress : onPress} color={disabled ? Colors.secondaryColor : Colors.primaryColor}/>
|
|
28
|
-
</View>);
|
|
29
|
-
};
|
|
30
|
-
const getStyles = Colors => StyleSheet.create({
|
|
31
|
-
container: {
|
|
32
|
-
alignItems: 'center',
|
|
33
|
-
},
|
|
34
|
-
button: {
|
|
35
|
-
marginTop: 15,
|
|
36
|
-
width: 150,
|
|
37
|
-
height: 30,
|
|
38
|
-
elevation: 5,
|
|
39
|
-
shadowOpacity: 0.5,
|
|
40
|
-
shadowColor: Colors.secondaryColor.background,
|
|
41
|
-
shadowOffset: { width: 0, height: 0 },
|
|
42
|
-
},
|
|
43
|
-
});
|
|
44
|
-
export default DisabledButton;
|
|
45
|
-
//# sourceMappingURL=DisabledButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DisabledButton.js","sourceRoot":"","sources":["../../../../src/sessions/components/buttons/DisabledButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,MAAM,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe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
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|