@axelor/aos-mobile-core 7.1.2 → 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/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 +7 -4
- 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/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 +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/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 +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 +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
|
@@ -0,0 +1,234 @@
|
|
|
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 { array, boolean, number, object, setLocale, string } from 'yup';
|
|
19
|
+
import { getFields } from './display.helpers';
|
|
20
|
+
export const updateRequiredFieldsOfConfig = (config, { objectState, storeState }) => {
|
|
21
|
+
if (config == null) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
const fields = getFields(config);
|
|
25
|
+
const result = { ...config.fields };
|
|
26
|
+
fields.forEach(_item => {
|
|
27
|
+
result[_item.key] = {
|
|
28
|
+
..._item,
|
|
29
|
+
required: _item.required || _item.requiredIf({ objectState, storeState }),
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
return { ...config, fields: result };
|
|
33
|
+
};
|
|
34
|
+
export const isObjectMissingRequiredField = (content, config) => {
|
|
35
|
+
if (config == null) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
if (content == null) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
const fields = getFields(config);
|
|
42
|
+
const requiredFieldNames = fields
|
|
43
|
+
.filter(_item => _item.required === true)
|
|
44
|
+
.map(_item => _item.key);
|
|
45
|
+
return requiredFieldNames.some(_fieldName => content?.[_fieldName] == null);
|
|
46
|
+
};
|
|
47
|
+
export const mapErrorWithTranslationKey = () => {
|
|
48
|
+
setLocale({
|
|
49
|
+
mixed: {
|
|
50
|
+
notType: function notType(_ref) {
|
|
51
|
+
switch (_ref.type) {
|
|
52
|
+
case 'string':
|
|
53
|
+
return 'Base_FormValidation_String';
|
|
54
|
+
case 'number':
|
|
55
|
+
return 'Base_FormValidation_Number';
|
|
56
|
+
case 'boolean':
|
|
57
|
+
return 'Base_FormValidation_Boolean';
|
|
58
|
+
case 'array':
|
|
59
|
+
return 'Base_FormValidation_Array';
|
|
60
|
+
default:
|
|
61
|
+
return 'Base_FormValidation_Object';
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
required: 'Base_FormValidation_Required',
|
|
65
|
+
},
|
|
66
|
+
string: {
|
|
67
|
+
length: ({ length }) => ({
|
|
68
|
+
key: 'Base_FormValidation_String_Length',
|
|
69
|
+
values: { length },
|
|
70
|
+
}),
|
|
71
|
+
min: ({ min }) => ({ key: 'Base_FormValidation_String_Min', values: { min } }),
|
|
72
|
+
max: ({ max }) => ({ key: 'Base_FormValidation_String_Max', values: { max } }),
|
|
73
|
+
matches: ({ regex }) => ({
|
|
74
|
+
key: 'Base_FormValidation_String_Match',
|
|
75
|
+
values: { regex },
|
|
76
|
+
}),
|
|
77
|
+
email: 'Base_FormValidation_String_Email',
|
|
78
|
+
url: 'Base_FormValidation_String_Url',
|
|
79
|
+
uuid: 'Base_FormValidation_String_UUID',
|
|
80
|
+
trim: 'Base_FormValidation_String_Trim',
|
|
81
|
+
lowercase: 'Base_FormValidation_String_Lowercase',
|
|
82
|
+
uppercase: 'Base_FormValidation_String_Uppercase',
|
|
83
|
+
},
|
|
84
|
+
number: {
|
|
85
|
+
min: ({ min }) => ({ key: 'Base_FormValidation_Number_Min', values: { min } }),
|
|
86
|
+
max: ({ max }) => ({ key: 'Base_FormValidation_Number_Max', values: { max } }),
|
|
87
|
+
lessThan: ({ less }) => ({
|
|
88
|
+
key: 'Base_FormValidation_Number_LessThan',
|
|
89
|
+
values: { less },
|
|
90
|
+
}),
|
|
91
|
+
moreThan: ({ more }) => ({
|
|
92
|
+
key: 'Base_FormValidation_Number_MoreThan',
|
|
93
|
+
values: { more },
|
|
94
|
+
}),
|
|
95
|
+
positive: 'Base_FormValidation_Number_Positive',
|
|
96
|
+
negative: 'Base_FormValidation_Number_Negative',
|
|
97
|
+
integer: 'Base_FormValidation_Number_Integer',
|
|
98
|
+
},
|
|
99
|
+
date: {
|
|
100
|
+
min: ({ min }) => ({ key: 'Base_FormValidation_Date_Min', values: { min } }),
|
|
101
|
+
max: ({ max }) => ({ key: 'Base_FormValidation_Date_Max', values: { max } }),
|
|
102
|
+
},
|
|
103
|
+
boolean: {
|
|
104
|
+
isValue: ({ value }) => ({
|
|
105
|
+
key: 'Base_FormValidation_Boolean_IsValue',
|
|
106
|
+
values: { value },
|
|
107
|
+
}),
|
|
108
|
+
},
|
|
109
|
+
object: {
|
|
110
|
+
noUnknown: ({ unknown }) => ({
|
|
111
|
+
key: 'Base_FormValidation_Object_Unknown',
|
|
112
|
+
values: { unknown },
|
|
113
|
+
}),
|
|
114
|
+
},
|
|
115
|
+
array: {
|
|
116
|
+
min: ({ min }) => ({ key: 'Base_FormValidation_Array_Min', values: { min } }),
|
|
117
|
+
max: ({ max }) => ({ key: 'Base_FormValidation_Array_Max', values: { max } }),
|
|
118
|
+
length: ({ length }) => ({
|
|
119
|
+
key: 'Base_FormValidation_Array_Length',
|
|
120
|
+
values: { length },
|
|
121
|
+
}),
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
const createValidationSchema = (config) => {
|
|
126
|
+
const fields = getFields(config);
|
|
127
|
+
let schemaConfig = {};
|
|
128
|
+
fields
|
|
129
|
+
.filter(_field => !_field.readonly)
|
|
130
|
+
.filter(_field => _field.widget !== 'label')
|
|
131
|
+
.forEach(_field => {
|
|
132
|
+
schemaConfig[_field.key] = getFieldSchema(_field);
|
|
133
|
+
});
|
|
134
|
+
return object(schemaConfig);
|
|
135
|
+
};
|
|
136
|
+
const getRequiredCondition = (schema, _field) => {
|
|
137
|
+
if (_field.required) {
|
|
138
|
+
return schema.required();
|
|
139
|
+
}
|
|
140
|
+
return schema.nullable();
|
|
141
|
+
};
|
|
142
|
+
const getFieldSchema = (field) => {
|
|
143
|
+
let schema = null;
|
|
144
|
+
switch (field.type) {
|
|
145
|
+
case 'string':
|
|
146
|
+
case 'email':
|
|
147
|
+
case 'url':
|
|
148
|
+
case 'phone':
|
|
149
|
+
case 'date':
|
|
150
|
+
case 'datetime':
|
|
151
|
+
case 'time':
|
|
152
|
+
schema = string();
|
|
153
|
+
break;
|
|
154
|
+
case 'number':
|
|
155
|
+
schema = number();
|
|
156
|
+
break;
|
|
157
|
+
case 'boolean':
|
|
158
|
+
schema = boolean();
|
|
159
|
+
break;
|
|
160
|
+
case 'array':
|
|
161
|
+
schema = array().of(object());
|
|
162
|
+
break;
|
|
163
|
+
case 'object':
|
|
164
|
+
schema = object().shape({
|
|
165
|
+
id: getRequiredCondition(number().positive().integer(), field),
|
|
166
|
+
version: number().min(0).integer().nullable(),
|
|
167
|
+
});
|
|
168
|
+
break;
|
|
169
|
+
default:
|
|
170
|
+
throw new Error(`Type ${field.type} is not managed for schema creation`);
|
|
171
|
+
}
|
|
172
|
+
if (field.validationOptions == null) {
|
|
173
|
+
switch (field.type) {
|
|
174
|
+
case 'email':
|
|
175
|
+
schema = schema.email();
|
|
176
|
+
break;
|
|
177
|
+
case 'url':
|
|
178
|
+
schema = schema.url();
|
|
179
|
+
break;
|
|
180
|
+
case 'phone':
|
|
181
|
+
schema = schema.matches(/^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s./0-9]*$/g, 'Base_FormValidation_PhoneNumber');
|
|
182
|
+
break;
|
|
183
|
+
case 'date':
|
|
184
|
+
schema = schema.matches(/^\d{4}-\d{2}-\d{2}$/g, 'Base_FormValidation_Date');
|
|
185
|
+
break;
|
|
186
|
+
case 'datetime':
|
|
187
|
+
schema = schema.matches(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?Z$/g, 'Base_FormValidation_DateTime');
|
|
188
|
+
break;
|
|
189
|
+
default:
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
for (const [key, _options] of Object.entries(field.validationOptions)) {
|
|
195
|
+
if (_options?.value != null) {
|
|
196
|
+
if (_options?.customErrorKey != null) {
|
|
197
|
+
schema = schema?.[key](_options.value, _options.customErrorKey);
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
schema = schema?.[key](_options.value);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
if (_options?.customErrorKey != null) {
|
|
205
|
+
schema = schema?.[key](_options.customErrorKey);
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
schema = schema?.[key]();
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return getRequiredCondition(schema, field);
|
|
214
|
+
};
|
|
215
|
+
export async function validateSchema(content, value) {
|
|
216
|
+
return createValidationSchema(content).validate(value, {
|
|
217
|
+
abortEarly: false,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
export async function validateFieldSchema(field, value) {
|
|
221
|
+
return getFieldSchema(field).validate(value);
|
|
222
|
+
}
|
|
223
|
+
export function getValidationErrors(err) {
|
|
224
|
+
return err.inner?.map(e => {
|
|
225
|
+
const message = typeof e.message === 'object' ? e.message?.key : e.message;
|
|
226
|
+
return {
|
|
227
|
+
attr: e.path,
|
|
228
|
+
message: message,
|
|
229
|
+
values: typeof e.message === 'object' ? e.message?.values : null,
|
|
230
|
+
translatable: !message.includes(e.path),
|
|
231
|
+
};
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
//# sourceMappingURL=validation.helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.helpers.js","sourceRoot":"","sources":["../../src/forms/validation.helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAS,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAC,MAAM,KAAK,CAAC;AAC9E,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAG5C,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAC1C,MAAY,EACZ,EAAC,WAAW,EAAE,UAAU,EAAsC,EACx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,KAAK,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,GAAQ;IAC1C,OAAO,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE;QACxB,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QAE3E,OAAO;YACL,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,OAAO,EAAE,OAAO;YAChB,MAAM,EAAE,OAAO,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI;YAChE,YAAY,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;SACxC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/lib/header/hooks.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export function useBasicActions({ model, modelId, disableMailMessages, attachedFileScreenTitle, barcodeFieldname, }: {
|
|
1
|
+
export function useBasicActions({ model, modelId, disableMailMessages, disableJsonFields, attachedFileScreenTitle, barcodeFieldname, }: {
|
|
2
2
|
model: any;
|
|
3
3
|
modelId: any;
|
|
4
4
|
disableMailMessages: any;
|
|
5
|
+
disableJsonFields?: boolean;
|
|
5
6
|
attachedFileScreenTitle: any;
|
|
6
7
|
barcodeFieldname?: string;
|
|
7
8
|
}): {
|
|
@@ -35,6 +36,15 @@ export function useBasicActions({ model, modelId, disableMailMessages, attachedF
|
|
|
35
36
|
onPress: () => void;
|
|
36
37
|
showInHeader: boolean;
|
|
37
38
|
};
|
|
39
|
+
jsonFieldsAction: {
|
|
40
|
+
key: string;
|
|
41
|
+
order: number;
|
|
42
|
+
title: string;
|
|
43
|
+
iconName: string;
|
|
44
|
+
hideIf: boolean;
|
|
45
|
+
onPress: () => void;
|
|
46
|
+
showInHeader: boolean;
|
|
47
|
+
};
|
|
38
48
|
} | {
|
|
39
49
|
mailMessagesAction: {
|
|
40
50
|
key: string;
|
|
@@ -48,4 +58,8 @@ export function useBasicActions({ model, modelId, disableMailMessages, attachedF
|
|
|
48
58
|
key: string;
|
|
49
59
|
hideIf: boolean;
|
|
50
60
|
};
|
|
61
|
+
jsonFieldsAction: {
|
|
62
|
+
key: string;
|
|
63
|
+
hideIf: boolean;
|
|
64
|
+
};
|
|
51
65
|
};
|
package/lib/header/hooks.js
CHANGED
|
@@ -23,14 +23,20 @@ import { countUnreadMailMessages } from '../features/mailMessageSlice';
|
|
|
23
23
|
import { useTranslator } from '../i18n';
|
|
24
24
|
import { checkNullString } from '../utils';
|
|
25
25
|
import { fetchModel } from '../api/model-api';
|
|
26
|
-
|
|
26
|
+
import { useOnline } from '../features/onlineSlice';
|
|
27
|
+
import { getNetInfo } from '../api/net-info-utils';
|
|
28
|
+
import { fetchJsonFieldsOfModel } from '../forms';
|
|
29
|
+
export const useBasicActions = ({ model, modelId, disableMailMessages, disableJsonFields = false, attachedFileScreenTitle, barcodeFieldname = 'barCode', }) => {
|
|
27
30
|
const navigation = useNavigation();
|
|
28
31
|
const I18n = useTranslator();
|
|
32
|
+
const online = useOnline();
|
|
29
33
|
const dispatch = useDispatch();
|
|
30
34
|
const { attachments } = useSelector(state => state.attachedFiles);
|
|
31
35
|
const { unreadMessages } = useSelector(state => state.mailMessages);
|
|
32
36
|
const [disableAttachementFiles, setDisableAttachementFiles] = useState(true);
|
|
33
37
|
const [disableBarcode, setDisableBarcode] = useState(true);
|
|
38
|
+
const [disableCustomView, setDisableCustomView] = useState(true);
|
|
39
|
+
const [isConnected, setIsConnected] = useState(true);
|
|
34
40
|
const modelConfigured = useMemo(() => !checkNullString(model) && modelId != null, [model, modelId]);
|
|
35
41
|
const countUnreadMessagesAPI = useCallback(() => {
|
|
36
42
|
if (modelConfigured) {
|
|
@@ -58,6 +64,21 @@ export const useBasicActions = ({ model, modelId, disableMailMessages, attachedF
|
|
|
58
64
|
})
|
|
59
65
|
.then(object => setDisableBarcode(object?.[barcodeFieldname] == null));
|
|
60
66
|
}, [barcodeFieldname, model, modelId]);
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
fetchJsonFieldsOfModel({ modelName: model })
|
|
69
|
+
.catch(() => setDisableCustomView(true))
|
|
70
|
+
.then(res => {
|
|
71
|
+
setDisableCustomView(res?.data?.total == null || res.data.total === 0);
|
|
72
|
+
});
|
|
73
|
+
}, [model]);
|
|
74
|
+
const checkInternetConnection = useCallback(async () => {
|
|
75
|
+
const { isConnected: _isConnected } = await getNetInfo();
|
|
76
|
+
setIsConnected(_isConnected);
|
|
77
|
+
}, []);
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
const interval = setInterval(checkInternetConnection, 2000);
|
|
80
|
+
return () => clearInterval(interval.current);
|
|
81
|
+
}, [checkInternetConnection]);
|
|
61
82
|
const mailMessagesAction = useMemo(() => {
|
|
62
83
|
return {
|
|
63
84
|
key: 'mailMessages',
|
|
@@ -113,19 +134,53 @@ export const useBasicActions = ({ model, modelId, disableMailMessages, attachedF
|
|
|
113
134
|
showInHeader: true,
|
|
114
135
|
};
|
|
115
136
|
}, [I18n, barcodeFieldname, disableBarcode, model, modelId, navigation]);
|
|
137
|
+
const jsonFieldsAction = useMemo(() => {
|
|
138
|
+
return {
|
|
139
|
+
key: 'metaJsonFields',
|
|
140
|
+
order: 30,
|
|
141
|
+
title: I18n.t('Base_MetaJsonFields'),
|
|
142
|
+
iconName: 'object-group',
|
|
143
|
+
hideIf: disableCustomView ||
|
|
144
|
+
disableJsonFields ||
|
|
145
|
+
!online.isEnabled ||
|
|
146
|
+
!isConnected,
|
|
147
|
+
onPress: () => navigation.navigate('JsonFieldScreen', {
|
|
148
|
+
model,
|
|
149
|
+
modelId,
|
|
150
|
+
}),
|
|
151
|
+
showInHeader: true,
|
|
152
|
+
};
|
|
153
|
+
}, [
|
|
154
|
+
I18n,
|
|
155
|
+
disableCustomView,
|
|
156
|
+
disableJsonFields,
|
|
157
|
+
online.isEnabled,
|
|
158
|
+
isConnected,
|
|
159
|
+
navigation,
|
|
160
|
+
model,
|
|
161
|
+
modelId,
|
|
162
|
+
]);
|
|
116
163
|
return useMemo(() => {
|
|
117
164
|
if (modelConfigured) {
|
|
118
165
|
return {
|
|
119
166
|
mailMessagesAction,
|
|
120
167
|
attachedFilesAction,
|
|
121
168
|
barcodeAction,
|
|
169
|
+
jsonFieldsAction,
|
|
122
170
|
};
|
|
123
171
|
}
|
|
124
172
|
return {
|
|
125
173
|
mailMessagesAction: { key: 'mailMessages', hideIf: true },
|
|
126
174
|
attachedFilesAction: { key: 'attachedFiles', hideIf: true },
|
|
127
175
|
barcodeAction: { key: 'barcode', hideIf: true },
|
|
176
|
+
jsonFieldsAction: { key: 'metaJsonFields', hideIf: true },
|
|
128
177
|
};
|
|
129
|
-
}, [
|
|
178
|
+
}, [
|
|
179
|
+
attachedFilesAction,
|
|
180
|
+
barcodeAction,
|
|
181
|
+
jsonFieldsAction,
|
|
182
|
+
mailMessagesAction,
|
|
183
|
+
modelConfigured,
|
|
184
|
+
]);
|
|
130
185
|
};
|
|
131
186
|
//# sourceMappingURL=hooks.js.map
|
package/lib/header/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/header/hooks.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAChE,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,aAAa,CAAC;AACrD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,uBAAuB,EAAC,MAA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aAAa;gBACb,gBAAgB;aACjB,CAAC;SACH;QAED,OAAO;YACL,kBAAkB,EAAE,EAAC,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAC;YACvD,mBAAmB,EAAE,EAAC,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,EAAC;YACzD,aAAa,EAAE,EAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAC;YAC7C,gBAAgB,EAAE,EAAC,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAC;SACxD,CAAC;IACJ,CAAC,EAAE;QACD,mBAAmB;QACnB,aAAa;QACb,gBAAgB;QAChB,kBAAkB;QAClB,eAAe;KAChB,CAAC,CAAC;AACL,CAAC,CAAC"}
|
package/lib/header/types.d.ts
CHANGED
|
@@ -15,8 +15,11 @@
|
|
|
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
|
-
import { useNavigation as useReactNavigation } from '@react-navigation/native';
|
|
18
|
+
import { useNavigation as useReactNavigation, useIsFocused as useReactIsFocused, } from '@react-navigation/native';
|
|
19
19
|
export const useNavigation = () => {
|
|
20
20
|
return useReactNavigation();
|
|
21
21
|
};
|
|
22
|
+
export const useIsFocused = () => {
|
|
23
|
+
return useReactIsFocused();
|
|
24
|
+
};
|
|
22
25
|
//# sourceMappingURL=use-navigation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-navigation.js","sourceRoot":"","sources":["../../src/hooks/use-navigation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"use-navigation.js","sourceRoot":"","sources":["../../src/hooks/use-navigation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,aAAa,IAAI,kBAAkB,EACnC,YAAY,IAAI,iBAAiB,GAClC,MAAM,0BAA0B,CAAC;AAElC,MAAM,CAAC,MAAM,aAAa,GAAG,GAAQ,EAAE;IACrC,OAAO,kBAAkB,EAAE,CAAC;AAC9B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAY,EAAE;IACxC,OAAO,iBAAiB,EAAE,CAAC;AAC7B,CAAC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Base_User": "User",
|
|
2
3
|
"Base_AddedOn": "Added on",
|
|
3
4
|
"Base_OK": "Ok",
|
|
4
5
|
"Base_NoMoreItems": "No more items.",
|
|
@@ -108,6 +109,48 @@
|
|
|
108
109
|
"Base_Month_Oct": "Oct",
|
|
109
110
|
"Base_Month_Nov": "Nov",
|
|
110
111
|
"Base_Month_Dec": "Dec",
|
|
112
|
+
"Base_InvalidConstraints": "Some constraints are invalid.",
|
|
113
|
+
"Base_MetaJsonFields": "Custom fields",
|
|
114
|
+
"Base_Studio_RefreshConfig": "Refresh view",
|
|
115
|
+
"Base_FormNotFound": "The requested form cannot be found, please contact an administrator.",
|
|
116
|
+
"Base_FormValidation_String": "must be a string",
|
|
117
|
+
"Base_FormValidation_Number": "must be a number",
|
|
118
|
+
"Base_FormValidation_Boolean": "must be a boolean",
|
|
119
|
+
"Base_FormValidation_Array": "must be an array",
|
|
120
|
+
"Base_FormValidation_Object": "must be an object",
|
|
121
|
+
"Base_FormValidation_Required": "is required",
|
|
122
|
+
"Base_FormValidation_PhoneNumber": "must be a valid phone number",
|
|
123
|
+
"Base_FormValidation_String_Email": "must be a valid email",
|
|
124
|
+
"Base_FormValidation_String_Url": "must be a valid url",
|
|
125
|
+
"Base_FormValidation_String_Length": "must be exactly {{length}} characters",
|
|
126
|
+
"Base_FormValidation_String_Min": "must be at least {{min}} characters",
|
|
127
|
+
"Base_FormValidation_String_Max": "must be at most {{max}} characters",
|
|
128
|
+
"Base_FormValidation_String_Match": "must match the following: {{regex}}",
|
|
129
|
+
"Base_FormValidation_String_UUID": "must be a valid UUID",
|
|
130
|
+
"Base_FormValidation_String_Trim": "must be a trimmed string",
|
|
131
|
+
"Base_FormValidation_String_Lowercase": "must be a lowercase string",
|
|
132
|
+
"Base_FormValidation_String_Uppercase": "must be a uppercase string",
|
|
133
|
+
"Base_FormValidation_Number_Min": "must be greater than or equal to {{min}}",
|
|
134
|
+
"Base_FormValidation_Number_Max": "must be less than or equal to {{max}}",
|
|
135
|
+
"Base_FormValidation_Number_LessThan": "must be less than {{less}}",
|
|
136
|
+
"Base_FormValidation_Number_MoreThan": "must be greater than {{more}}",
|
|
137
|
+
"Base_FormValidation_Number_Positive": "must be a positive number",
|
|
138
|
+
"Base_FormValidation_Number_Negative": "must be a negative number",
|
|
139
|
+
"Base_FormValidation_Number_Integer": "must be an integer",
|
|
140
|
+
"Base_FormValidation_Date": "must be a date",
|
|
141
|
+
"Base_FormValidation_DateTime": "must be a datetime",
|
|
142
|
+
"Base_FormValidation_Date_Min": "must be later than {{min}}",
|
|
143
|
+
"Base_FormValidation_Date_Max": "must be at earlier than {{max}}",
|
|
144
|
+
"Base_FormValidation_Boolean_IsValue": "must be {{value}}",
|
|
145
|
+
"Base_FormValidation_Object_Unknown": "has unspecified keys: {{unknown}}",
|
|
146
|
+
"Base_FormValidation_Array_Min": "must have at least {{min}} items",
|
|
147
|
+
"Base_FormValidation_Array_Max": "must have less than or equal to {{max}} items",
|
|
148
|
+
"Base_FormValidation_Array_Length": "must have {{length}} items",
|
|
149
|
+
"Base_FormAction_Save": "Save",
|
|
150
|
+
"Base_FormAction_Create": "Create",
|
|
151
|
+
"Base_FormAction_Update": "update",
|
|
152
|
+
"Base_FormAction_Refresh": "Refresh",
|
|
153
|
+
"Base_FormAction_Reset": "Reset",
|
|
111
154
|
"Base_SliceAction_FetchAttachedFiles": "fetch attached files",
|
|
112
155
|
"Base_SliceAction_FetchFilesDetails": "fetch file details",
|
|
113
156
|
"Base_SliceAction_FetchMetaModule": "fetch meta modules",
|
|
@@ -121,5 +164,13 @@
|
|
|
121
164
|
"Base_SliceAction_MarkMailMessageAsRead": "mark mail message as read",
|
|
122
165
|
"Base_SliceAction_MarkAllMailMessageAsRead": "mark all mail messages as read",
|
|
123
166
|
"Base_SliceAction_FetchMenuConfig": "fetch menu config",
|
|
124
|
-
"Base_SliceAction_FetchMobileConfig": "fetch mobile config"
|
|
167
|
+
"Base_SliceAction_FetchMobileConfig": "fetch mobile config",
|
|
168
|
+
"Base_SliceAction_CreateRecord": "create record",
|
|
169
|
+
"Base_SliceAction_UpdateRecord": "update record",
|
|
170
|
+
"Base_SliceAction_RefreshRecord": "refresh record",
|
|
171
|
+
"Base_SliceAction_FetchJsonFieldsOfModel": "fetch custom fields of model",
|
|
172
|
+
"Base_SliceAction_FetchDataOfModel": "fetch data of model",
|
|
173
|
+
"Base_SliceAction_UpdateJsonFieldsObject": "update custom fields of object",
|
|
174
|
+
"Base_SliceAction_FetchAnomalies": "fetch anomalies of object",
|
|
175
|
+
"Base_SliceAction_SearchUser": "search user"
|
|
125
176
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Base_User": "Utilisateur",
|
|
2
3
|
"Base_AddedOn": "Ajouté le",
|
|
3
4
|
"Base_OK": "Ok",
|
|
4
5
|
"Base_NoMoreItems": "Fin de la liste.",
|
|
@@ -108,6 +109,48 @@
|
|
|
108
109
|
"Base_Month_Oct": "Oct.",
|
|
109
110
|
"Base_Month_Nov": "Nov.",
|
|
110
111
|
"Base_Month_Dec": "Déc.",
|
|
112
|
+
"Base_InvalidConstraints": "Certaines contraintes ne sont pas respectées.",
|
|
113
|
+
"Base_MetaJsonFields": "Champs studio",
|
|
114
|
+
"Base_Studio_RefreshConfig": "Actualiser la vue",
|
|
115
|
+
"Base_FormNotFound": "Le formulaire demandé est introuvable, merci de contacter un administrateur.",
|
|
116
|
+
"Base_FormValidation_String": "doit être une chaîne de caractères",
|
|
117
|
+
"Base_FormValidation_Number": "doit être un nombre",
|
|
118
|
+
"Base_FormValidation_Boolean": "doit être un booléen",
|
|
119
|
+
"Base_FormValidation_Array": "doit être un tableau",
|
|
120
|
+
"Base_FormValidation_Object": "doit être un objet JSON",
|
|
121
|
+
"Base_FormValidation_Required": "est requis",
|
|
122
|
+
"Base_FormValidation_PhoneNumber": "doit être un numéro de téléphone valide",
|
|
123
|
+
"Base_FormValidation_String_Email": "doit être un email valide",
|
|
124
|
+
"Base_FormValidation_String_Url": "doit être une url valide",
|
|
125
|
+
"Base_FormValidation_String_Length": "doit avoir exactement {{length}} caractères",
|
|
126
|
+
"Base_FormValidation_String_Min": "doit avoir au moins {{min}} caractères",
|
|
127
|
+
"Base_FormValidation_String_Max": "doit avoir au plus {{max}} caractères",
|
|
128
|
+
"Base_FormValidation_String_Match": "doit correspondre à: {{regex}}",
|
|
129
|
+
"Base_FormValidation_String_UUID": "doit être un UUID valide",
|
|
130
|
+
"Base_FormValidation_String_Trim": "doit être une chaîne de caractères rognée",
|
|
131
|
+
"Base_FormValidation_String_Lowercase": "doit être une chaîne de caractères en minuscule",
|
|
132
|
+
"Base_FormValidation_String_Uppercase": "doit être une chaîne de caractères en majuscule",
|
|
133
|
+
"Base_FormValidation_Number_Min": "doit être supérieur ou égal à {{min}}",
|
|
134
|
+
"Base_FormValidation_Number_Max": "doit être inférieur ou égal à {{max}}",
|
|
135
|
+
"Base_FormValidation_Number_LessThan": "doit être inférieur à {{less}}",
|
|
136
|
+
"Base_FormValidation_Number_MoreThan": "doit être supérieur à {{more}}",
|
|
137
|
+
"Base_FormValidation_Number_Positive": "doit être positif",
|
|
138
|
+
"Base_FormValidation_Number_Negative": "doit être négatif",
|
|
139
|
+
"Base_FormValidation_Number_Integer": "doit être entier",
|
|
140
|
+
"Base_FormValidation_Date": "doit être une date",
|
|
141
|
+
"Base_FormValidation_DateTime": "doit être une date & heure",
|
|
142
|
+
"Base_FormValidation_Date_Min": "doit être après le {{min}}",
|
|
143
|
+
"Base_FormValidation_Date_Max": "doit être avant le {{max}}",
|
|
144
|
+
"Base_FormValidation_Boolean_IsValue": "doit être à {{value}}",
|
|
145
|
+
"Base_FormValidation_Object_Unknown": "possède des clés non spécifiées: {{unknown}}",
|
|
146
|
+
"Base_FormValidation_Array_Min": "doit avoir au moins {{min}} éléments",
|
|
147
|
+
"Base_FormValidation_Array_Max": "doit avoir au plus {{max}} éléments",
|
|
148
|
+
"Base_FormValidation_Array_Length": "doit avoir exactement {{length}} éléments",
|
|
149
|
+
"Base_FormAction_Save": "Sauvegarder",
|
|
150
|
+
"Base_FormAction_Create": "Créer",
|
|
151
|
+
"Base_FormAction_Update": "Mettre à jour",
|
|
152
|
+
"Base_FormAction_Refresh": "Actualiser",
|
|
153
|
+
"Base_FormAction_Reset": "Réinitialiser",
|
|
111
154
|
"Base_SliceAction_FetchAttachedFiles": "récupération des fichiers joints",
|
|
112
155
|
"Base_SliceAction_FetchFilesDetails": "récupération des détails du fichier",
|
|
113
156
|
"Base_SliceAction_FetchMetaModule": "récupération des modules",
|
|
@@ -121,5 +164,13 @@
|
|
|
121
164
|
"Base_SliceAction_MarkMailMessageAsRead": "marquer le message comme lu",
|
|
122
165
|
"Base_SliceAction_MarkAllMailMessageAsRead": "marquer tous les messages comme lus",
|
|
123
166
|
"Base_SliceAction_FetchMenuConfig": "récupération des configs de menus",
|
|
124
|
-
"Base_SliceAction_FetchMobileConfig": "récupération des configs mobile"
|
|
167
|
+
"Base_SliceAction_FetchMobileConfig": "récupération des configs mobile",
|
|
168
|
+
"Base_SliceAction_CreateRecord": "création de l'objet",
|
|
169
|
+
"Base_SliceAction_UpdateRecord": "mise à jour de l'objet",
|
|
170
|
+
"Base_SliceAction_RefreshRecord": "actualisation de l'objet",
|
|
171
|
+
"Base_SliceAction_FetchJsonFieldsOfModel": "récupération des champs studio du modèle",
|
|
172
|
+
"Base_SliceAction_FetchDataOfModel": "récupération des données du model",
|
|
173
|
+
"Base_SliceAction_UpdateJsonFieldsObject": "mise à jour des champs studio de l'objet",
|
|
174
|
+
"Base_SliceAction_FetchAnomalies": "récupération des anomalies d'un object",
|
|
175
|
+
"Base_SliceAction_SearchUser": "récupération des utilisateurs"
|
|
125
176
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -20,4 +20,5 @@ export * from './auth';
|
|
|
20
20
|
export * from './i18n';
|
|
21
21
|
export * from './config';
|
|
22
22
|
export * from './header';
|
|
23
|
-
export
|
|
23
|
+
export * from './forms';
|
|
24
|
+
export { useNavigation, useIsFocused } from './hooks/use-navigation';
|
package/lib/index.js
CHANGED
|
@@ -37,5 +37,6 @@ export * from './auth';
|
|
|
37
37
|
export * from './i18n';
|
|
38
38
|
export * from './config';
|
|
39
39
|
export * from './header';
|
|
40
|
-
export
|
|
40
|
+
export * from './forms';
|
|
41
|
+
export { useNavigation, useIsFocused } from './hooks/use-navigation';
|
|
41
42
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,OAAO,CAAC;AACtB,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAChD,OAAO,EAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAC,KAAK,EAAE,MAAM,EAAC,MAAM,sBAAsB,CAAC;AACnD,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,UAAU,EACV,SAAS,EACT,WAAW,EACX,OAAO,IAAI,cAAc,GAC1B,MAAM,yBAAyB,CAAC;AACj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S,EACT,WAAW,EACX,OAAO,IAAI,cAAc,GAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,UAAU,EACV,aAAa,EACb,OAAO,IAAI,aAAa,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,eAAe,EACf,SAAS,EACT,MAAM,IAAI,YAAY,EACtB,OAAO,IAAI,aAAa,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AACvD,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAC,aAAa,EAAE,YAAY,EAAC,MAAM,wBAAwB,CAAC"}
|
package/lib/models/index.d.ts
CHANGED
package/lib/models/index.js
CHANGED
|
@@ -16,4 +16,6 @@
|
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
export { core_modelAPI } from './objectFields';
|
|
19
|
+
export { core_searchFields } from './searchFields';
|
|
20
|
+
export { core_sortFields } from './sortFields';
|
|
19
21
|
//# sourceMappingURL=index.js.map
|
package/lib/models/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAC,eAAe,EAAC,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectFields.js","sourceRoot":"","sources":["../../src/models/objectFields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAe,gBAAgB,EAAC,MAAM,QAAQ,CAAC;AAEtD,MAAM,CAAC,MAAM,aAAa,GAAiB;IACzC,eAAe,EAAE,gBAAgB,CAAC,MAAM,CAAC;QACvC,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAAE;QAC/B,aAAa,EAAE,gBAAgB,CAAC,MAAM,EAAE;QACxC,eAAe,EAAE,gBAAgB,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC;KAC3E,CAAC;IACF,aAAa,EAAE,gBAAgB,CAAC,MAAM,CAAC;QACrC,QAAQ,EAAE,gBAAgB,CAAC,MAAM,EAAE;QACnC,SAAS,EAAE,gBAAgB,CAAC,MAAM,EAAE;KACrC,CAAC;CACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"objectFields.js","sourceRoot":"","sources":["../../src/models/objectFields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAe,gBAAgB,EAAC,MAAM,QAAQ,CAAC;AAEtD,MAAM,CAAC,MAAM,aAAa,GAAiB;IACzC,eAAe,EAAE,gBAAgB,CAAC,MAAM,CAAC;QACvC,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAAE;QAC/B,aAAa,EAAE,gBAAgB,CAAC,MAAM,EAAE;QACxC,eAAe,EAA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