@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.
Files changed (209) hide show
  1. package/lib/api/anomaly-api.d.ts +4 -0
  2. package/lib/api/anomaly-api.js +24 -0
  3. package/lib/api/anomaly-api.js.map +1 -0
  4. package/lib/api/login-api.js +2 -3
  5. package/lib/api/login-api.js.map +1 -1
  6. package/lib/api/user-api.d.ts +4 -0
  7. package/lib/api/user-api.js +31 -0
  8. package/lib/api/user-api.js.map +1 -0
  9. package/lib/apiProviders/Standard/ObjectFieldsProvider.d.ts +1 -0
  10. package/lib/apiProviders/Standard/ObjectFieldsProvider.js +21 -4
  11. package/lib/apiProviders/Standard/ObjectFieldsProvider.js.map +1 -1
  12. package/lib/apiProviders/middlewares/fieldParser.d.ts +2 -0
  13. package/lib/apiProviders/middlewares/fieldParser.js +53 -0
  14. package/lib/apiProviders/middlewares/fieldParser.js.map +1 -0
  15. package/lib/apiProviders/middlewares/index.d.ts +1 -0
  16. package/lib/apiProviders/middlewares/index.js +1 -0
  17. package/lib/apiProviders/middlewares/index.js.map +1 -1
  18. package/lib/apiProviders/utils.js +1 -1
  19. package/lib/apiProviders/utils.js.map +1 -1
  20. package/lib/app/ContextsProvider.js +12 -4
  21. package/lib/app/ContextsProvider.js.map +1 -1
  22. package/lib/app/Module.d.ts +2 -0
  23. package/lib/app/context.helper.js +6 -1
  24. package/lib/app/context.helper.js.map +1 -1
  25. package/lib/auth/models/objectFields.js +3 -3
  26. package/lib/auth/models/objectFields.js.map +1 -1
  27. package/lib/auth/screens/UserScreen.js +7 -4
  28. package/lib/auth/screens/UserScreen.js.map +1 -1
  29. package/lib/components/index.d.ts +1 -0
  30. package/lib/components/index.js +1 -0
  31. package/lib/components/index.js.map +1 -1
  32. package/lib/components/molecules/CameraButton/CameraButton.js +3 -3
  33. package/lib/components/molecules/CameraButton/CameraButton.js.map +1 -1
  34. package/lib/components/molecules/UploadFileInput/UploadFileInput.js +3 -1
  35. package/lib/components/molecules/UploadFileInput/UploadFileInput.js.map +1 -1
  36. package/lib/components/organisms/AnomalyBubble/AnomalyBubble.d.ts +11 -0
  37. package/lib/components/organisms/AnomalyBubble/AnomalyBubble.js +60 -0
  38. package/lib/components/organisms/AnomalyBubble/AnomalyBubble.js.map +1 -0
  39. package/lib/components/organisms/AnomalyList/AnomalyList.d.ts +7 -0
  40. package/lib/components/organisms/AnomalyList/AnomalyList.js +59 -0
  41. package/lib/components/organisms/AnomalyList/AnomalyList.js.map +1 -0
  42. package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.d.ts +2 -1
  43. package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js +18 -5
  44. package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js.map +1 -1
  45. package/lib/components/organisms/index.d.ts +2 -0
  46. package/lib/components/organisms/index.js +2 -0
  47. package/lib/components/organisms/index.js.map +1 -1
  48. package/lib/components/pages/FormView/Alerts/ConstraintsValidatorPopup.d.ts +11 -0
  49. package/lib/components/pages/FormView/Alerts/ConstraintsValidatorPopup.js +33 -0
  50. package/lib/components/pages/FormView/Alerts/ConstraintsValidatorPopup.js.map +1 -0
  51. package/lib/components/pages/FormView/Alerts/index.d.ts +1 -0
  52. package/lib/{sessions/components/buttons → components/pages/FormView/Alerts}/index.js +1 -3
  53. package/lib/components/pages/FormView/Alerts/index.js.map +1 -0
  54. package/lib/components/pages/FormView/Components/Field.d.ts +9 -0
  55. package/lib/components/pages/FormView/Components/Field.js +149 -0
  56. package/lib/components/pages/FormView/Components/Field.js.map +1 -0
  57. package/lib/components/pages/FormView/Components/Panel.d.ts +8 -0
  58. package/lib/components/pages/FormView/Components/Panel.js +84 -0
  59. package/lib/components/pages/FormView/Components/Panel.js.map +1 -0
  60. package/lib/components/pages/FormView/Components/index.d.ts +2 -0
  61. package/lib/components/pages/FormView/Components/index.js +20 -0
  62. package/lib/components/pages/FormView/Components/index.js.map +1 -0
  63. package/lib/components/pages/FormView/Custom/CustomButton.d.ts +10 -0
  64. package/lib/components/pages/FormView/Custom/CustomButton.js +31 -0
  65. package/lib/components/pages/FormView/Custom/CustomButton.js.map +1 -0
  66. package/lib/components/pages/FormView/Custom/CustomPasswordInput.d.ts +11 -0
  67. package/lib/components/pages/FormView/Custom/CustomPasswordInput.js +40 -0
  68. package/lib/components/pages/FormView/Custom/CustomPasswordInput.js.map +1 -0
  69. package/lib/components/pages/FormView/Custom/CustomPicker.d.ts +12 -0
  70. package/lib/components/pages/FormView/Custom/CustomPicker.js +33 -0
  71. package/lib/components/pages/FormView/Custom/CustomPicker.js.map +1 -0
  72. package/lib/components/pages/FormView/Custom/CustomSearchBar.d.ts +12 -0
  73. package/lib/components/pages/FormView/Custom/CustomSearchBar.js +69 -0
  74. package/lib/components/pages/FormView/Custom/CustomSearchBar.js.map +1 -0
  75. package/lib/components/pages/FormView/Custom/index.d.ts +4 -0
  76. package/lib/components/pages/FormView/Custom/index.js +22 -0
  77. package/lib/components/pages/FormView/Custom/index.js.map +1 -0
  78. package/lib/components/pages/FormView/FormView.d.ts +8 -0
  79. package/lib/components/pages/FormView/FormView.js +199 -0
  80. package/lib/components/pages/FormView/FormView.js.map +1 -0
  81. package/lib/components/pages/index.d.ts +4 -0
  82. package/lib/components/pages/index.js +22 -0
  83. package/lib/components/pages/index.js.map +1 -0
  84. package/lib/components/templates/MailMessageView/MailMessageView.js +8 -2
  85. package/lib/components/templates/MailMessageView/MailMessageView.js.map +1 -1
  86. package/lib/components/templates/PopupApplicationNotConfigured/PopupApplicationNotConfigured.js +10 -13
  87. package/lib/components/templates/PopupApplicationNotConfigured/PopupApplicationNotConfigured.js.map +1 -1
  88. package/lib/components/templates/PopupMinimalRequiredVersion/PopupMinimalRequiredVersion.js +15 -25
  89. package/lib/components/templates/PopupMinimalRequiredVersion/PopupMinimalRequiredVersion.js.map +1 -1
  90. package/lib/components/templates/SocialNetworkLinks/SocialNetworkLinks.d.ts +9 -6
  91. package/lib/components/templates/SocialNetworkLinks/SocialNetworkLinks.js +30 -10
  92. package/lib/components/templates/SocialNetworkLinks/SocialNetworkLinks.js.map +1 -1
  93. package/lib/components/templates/UserSearchBar/UserSearchBar.d.ts +14 -0
  94. package/lib/components/templates/UserSearchBar/UserSearchBar.js +34 -0
  95. package/lib/components/templates/UserSearchBar/UserSearchBar.js.map +1 -0
  96. package/lib/components/templates/index.d.ts +1 -0
  97. package/lib/components/templates/index.js +1 -0
  98. package/lib/components/templates/index.js.map +1 -1
  99. package/lib/config/routes.d.ts +3 -0
  100. package/lib/config/routes.js +2 -0
  101. package/lib/config/routes.js.map +1 -1
  102. package/lib/features/formSlice.d.ts +34 -0
  103. package/lib/features/formSlice.js +70 -0
  104. package/lib/features/formSlice.js.map +1 -0
  105. package/lib/features/index.d.ts +3 -0
  106. package/lib/features/index.js +3 -0
  107. package/lib/features/index.js.map +1 -1
  108. package/lib/features/metaJsonFieldSlice.d.ts +34 -0
  109. package/lib/features/metaJsonFieldSlice.js +68 -0
  110. package/lib/features/metaJsonFieldSlice.js.map +1 -0
  111. package/lib/features/userSlice.d.ts +16 -0
  112. package/lib/features/userSlice.js +49 -0
  113. package/lib/features/userSlice.js.map +1 -0
  114. package/lib/forms/FormConfigsProvider.d.ts +20 -0
  115. package/lib/forms/FormConfigsProvider.js +56 -0
  116. package/lib/forms/FormConfigsProvider.js.map +1 -0
  117. package/lib/forms/api.helpers.d.ts +12 -0
  118. package/lib/forms/api.helpers.js +59 -0
  119. package/lib/forms/api.helpers.js.map +1 -0
  120. package/lib/forms/display.helpers.d.ts +9 -0
  121. package/lib/forms/display.helpers.js +150 -0
  122. package/lib/forms/display.helpers.js.map +1 -0
  123. package/lib/forms/index.d.ts +7 -0
  124. package/lib/forms/index.js +25 -0
  125. package/lib/forms/index.js.map +1 -0
  126. package/lib/forms/register.helpers.d.ts +6 -0
  127. package/lib/forms/register.helpers.js +96 -0
  128. package/lib/forms/register.helpers.js.map +1 -0
  129. package/lib/forms/studio/api.helpers.d.ts +37 -0
  130. package/lib/forms/studio/api.helpers.js +162 -0
  131. package/lib/forms/studio/api.helpers.js.map +1 -0
  132. package/lib/forms/studio/display.helpers.d.ts +7 -0
  133. package/lib/forms/studio/display.helpers.js +256 -0
  134. package/lib/forms/studio/display.helpers.js.map +1 -0
  135. package/lib/forms/studio/index.d.ts +2 -0
  136. package/lib/forms/studio/index.js +20 -0
  137. package/lib/forms/studio/index.js.map +1 -0
  138. package/lib/forms/types.d.ts +100 -0
  139. package/lib/forms/types.js +19 -0
  140. package/lib/forms/types.js.map +1 -0
  141. package/lib/forms/validation.helpers.d.ts +10 -0
  142. package/lib/forms/validation.helpers.js +234 -0
  143. package/lib/forms/validation.helpers.js.map +1 -0
  144. package/lib/header/hooks.d.ts +15 -1
  145. package/lib/header/hooks.js +57 -2
  146. package/lib/header/hooks.js.map +1 -1
  147. package/lib/header/types.d.ts +1 -0
  148. package/lib/hooks/use-navigation.d.ts +1 -0
  149. package/lib/hooks/use-navigation.js +4 -1
  150. package/lib/hooks/use-navigation.js.map +1 -1
  151. package/lib/i18n/translations/en.json +52 -1
  152. package/lib/i18n/translations/fr.json +52 -1
  153. package/lib/index.d.ts +2 -1
  154. package/lib/index.js +2 -1
  155. package/lib/index.js.map +1 -1
  156. package/lib/models/index.d.ts +2 -0
  157. package/lib/models/index.js +2 -0
  158. package/lib/models/index.js.map +1 -1
  159. package/lib/models/objectFields.js +3 -0
  160. package/lib/models/objectFields.js.map +1 -1
  161. package/lib/models/searchFields.d.ts +2 -0
  162. package/lib/{sessions/components/buttons/LoginButton.js → models/searchFields.js} +3 -6
  163. package/lib/models/searchFields.js.map +1 -0
  164. package/lib/models/sortFields.d.ts +2 -0
  165. package/lib/{sessions/components/buttons/UpdateButton.js → models/sortFields.js} +3 -6
  166. package/lib/models/sortFields.js.map +1 -0
  167. package/lib/navigator/drawer/Header.js +1 -1
  168. package/lib/navigator/drawer/Header.js.map +1 -1
  169. package/lib/screens/ErrorScreen.js +1 -1
  170. package/lib/screens/ErrorScreen.js.map +1 -1
  171. package/lib/screens/JsonFieldScreen.d.ts +4 -0
  172. package/lib/screens/JsonFieldScreen.js +92 -0
  173. package/lib/screens/JsonFieldScreen.js.map +1 -0
  174. package/lib/screens/index.d.ts +13 -0
  175. package/lib/screens/index.js +9 -0
  176. package/lib/screens/index.js.map +1 -1
  177. package/lib/sessions/components/alerts/PopupCreateSession.js +8 -16
  178. package/lib/sessions/components/alerts/PopupCreateSession.js.map +1 -1
  179. package/lib/sessions/components/alerts/PopupEditSession.js +8 -16
  180. package/lib/sessions/components/alerts/PopupEditSession.js.map +1 -1
  181. package/lib/sessions/components/alerts/PopupSession.js +7 -16
  182. package/lib/sessions/components/alerts/PopupSession.js.map +1 -1
  183. package/lib/sessions/components/index.d.ts +0 -1
  184. package/lib/sessions/components/index.js +0 -1
  185. package/lib/sessions/components/index.js.map +1 -1
  186. package/lib/sessions/components/inputs/SessionInputs.js +9 -7
  187. package/lib/sessions/components/inputs/SessionInputs.js.map +1 -1
  188. package/lib/types/anomaly-type.d.ts +16 -0
  189. package/lib/types/anomaly-type.js +56 -0
  190. package/lib/types/anomaly-type.js.map +1 -0
  191. package/lib/types/index.d.ts +1 -0
  192. package/lib/types/index.js +1 -0
  193. package/lib/types/index.js.map +1 -1
  194. package/lib/utils/displayers.d.ts +1 -0
  195. package/lib/utils/displayers.js +1 -0
  196. package/lib/utils/displayers.js.map +1 -1
  197. package/lib/utils/index.d.ts +1 -1
  198. package/lib/utils/index.js +1 -1
  199. package/lib/utils/index.js.map +1 -1
  200. package/package.json +3 -3
  201. package/lib/sessions/components/buttons/DisabledButton.d.ts +0 -7
  202. package/lib/sessions/components/buttons/DisabledButton.js +0 -45
  203. package/lib/sessions/components/buttons/DisabledButton.js.map +0 -1
  204. package/lib/sessions/components/buttons/LoginButton.d.ts +0 -6
  205. package/lib/sessions/components/buttons/LoginButton.js.map +0 -1
  206. package/lib/sessions/components/buttons/UpdateButton.d.ts +0 -6
  207. package/lib/sessions/components/buttons/UpdateButton.js.map +0 -1
  208. package/lib/sessions/components/buttons/index.d.ts +0 -3
  209. package/lib/sessions/components/buttons/index.js.map +0 -1
@@ -0,0 +1,11 @@
1
+ interface AnomalyBubbleProps {
2
+ objectName: string;
3
+ objectId: number;
4
+ isIndicationDisabled?: boolean;
5
+ indicatorPosition?: 'left' | 'right';
6
+ size?: number;
7
+ style?: any;
8
+ textIndicationStyle?: any;
9
+ }
10
+ declare const AnomalyBubble: ({ objectName, objectId, isIndicationDisabled, indicatorPosition, size, style, textIndicationStyle, }: AnomalyBubbleProps) => JSX.Element;
11
+ export default AnomalyBubble;
@@ -0,0 +1,60 @@
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, { useState, useEffect, useMemo } from 'react';
19
+ import { InfoBubble, useThemeColor } from '@axelor/aos-mobile-ui';
20
+ import { fetchAnomalies } from '../../../api/anomaly-api';
21
+ import { Anomaly } from '../../../types';
22
+ const AnomalyBubble = ({ objectName, objectId, isIndicationDisabled = false, indicatorPosition, size, style, textIndicationStyle, }) => {
23
+ const Colors = useThemeColor();
24
+ const [anomalyList, setAnomalyList] = useState([]);
25
+ useEffect(() => {
26
+ let isMounted = true;
27
+ fetchAnomalies({ objectName, objectId })
28
+ .then(response => {
29
+ let checks = [];
30
+ let otherChecks = [];
31
+ if (response?.data?.object?.checks) {
32
+ checks = response?.data?.object?.checks;
33
+ }
34
+ if (response?.data?.object?.otherChecks) {
35
+ otherChecks = response?.data?.object?.otherChecks?.flatMap(otherCheck => otherCheck.checks);
36
+ }
37
+ if (isMounted) {
38
+ setAnomalyList(Anomaly.sortType([...checks, ...otherChecks]));
39
+ }
40
+ })
41
+ .catch(() => setAnomalyList([]));
42
+ return () => {
43
+ isMounted = false;
44
+ };
45
+ }, [objectName, objectId]);
46
+ const displayAnomaly = useMemo(() => {
47
+ if (Array.isArray(anomalyList) && anomalyList.length !== 0) {
48
+ return anomalyList[0];
49
+ }
50
+ else {
51
+ return null;
52
+ }
53
+ }, [anomalyList]);
54
+ if (!displayAnomaly) {
55
+ return null;
56
+ }
57
+ return (<InfoBubble style={style} textIndicationStyle={textIndicationStyle} iconName="exclamation-triangle" badgeColor={Anomaly.getTypeColor(displayAnomaly.checkType, Colors)} indication={isIndicationDisabled ? null : displayAnomaly.message} size={size} position={indicatorPosition} coloredBubble={false}/>);
58
+ };
59
+ export default AnomalyBubble;
60
+ //# sourceMappingURL=AnomalyBubble.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnomalyBubble.js","sourceRoot":"","sources":["../../../../src/components/organisms/AnomalyBubble/AnomalyBubble.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAC,cAAc,EAAC,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAYvC,MAAM,aAAa,GAAG,CAAC,EACrB,UAAU,EACV,QAAQ,EACR,oBAAoB,GAAG,KAAK,EAC5B,iBAAiB,EACjB,IAAI,EACJ,KAAK,EACL,mBAAmB,GACA,EAAE,EAAE;IACvB,MAAM,MAAM,GA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I,CAAC;SACb;IACH,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,CAAC,UAAU,CACT,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,mBAAmB,CAAC,CAAC,mBAAmB,CAAC,CACzC,QAAQ,CAAC,sBAAsB,CAC/B,UAAU,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CACnE,UAAU,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CACjE,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,QAAQ,CAAC,CAAC,iBAAiB,CAAC,CAC5B,aAAa,CAAC,CAAC,KAAK,CAAC,EACrB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,7 @@
1
+ interface AnomalyListProps {
2
+ objectName: string;
3
+ objectId: number;
4
+ style?: any;
5
+ }
6
+ declare const AnomalyList: ({ objectName, objectId, style }: AnomalyListProps) => JSX.Element;
7
+ export default AnomalyList;
@@ -0,0 +1,59 @@
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, { useState, useEffect } from 'react';
19
+ import { FlatList, StyleSheet } from 'react-native';
20
+ import { Label, useThemeColor } from '@axelor/aos-mobile-ui';
21
+ import { fetchAnomalies } from '../../../api/anomaly-api';
22
+ import { Anomaly } from '../../../types';
23
+ const AnomalyList = ({ objectName, objectId, style }) => {
24
+ const Colors = useThemeColor();
25
+ const [anomalyList, setAnomalyList] = useState([]);
26
+ useEffect(() => {
27
+ let isMounted = true;
28
+ fetchAnomalies({ objectName, objectId })
29
+ .then(response => {
30
+ if (response?.data?.object?.checks) {
31
+ const checks = response?.data?.object?.checks;
32
+ if (isMounted) {
33
+ setAnomalyList(Anomaly.sortType(checks));
34
+ }
35
+ }
36
+ })
37
+ .catch(() => setAnomalyList([]));
38
+ return () => {
39
+ isMounted = false;
40
+ };
41
+ }, [objectName, objectId]);
42
+ if (!Array.isArray(anomalyList) || anomalyList.length === 0) {
43
+ return null;
44
+ }
45
+ return (<FlatList style={[styles.container, style]} data={anomalyList} renderItem={({ item }) => (<Label style={styles.label} message={item?.message} iconName="exclamation-triangle" color={Anomaly.getTypeColor(item?.checkType, Colors)} showClose/>)}/>);
46
+ };
47
+ const styles = StyleSheet.create({
48
+ container: {
49
+ flexGrow: 0,
50
+ paddingTop: 5,
51
+ },
52
+ label: {
53
+ width: '96%',
54
+ alignSelf: 'center',
55
+ marginVertical: 5,
56
+ },
57
+ });
58
+ export default AnomalyList;
59
+ //# sourceMappingURL=AnomalyList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnomalyList.js","sourceRoot":"","sources":["../../../../src/components/organisms/AnomalyList/AnomalyList.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AACjD,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAClD,OAAO,EAAC,KAAK,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAC,cAAc,EAAC,MAA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tB,CAAC,KAAK,CACJ,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACpB,OAAO,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CACvB,QAAQ,CAAC,sBAAsB,CAC/B,KAAK,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CACrD,SAAS,EACT,CACH,CAAC,EACF,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,QAAQ,EAAE,CAAC;QACX,UAAU,EAAE,CAAC;KACd;IACD,KAAK,EAAE;QACL,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,QAAQ;QACnB,cAAc,EAAE,CAAC;KAClB;CACF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -1,9 +1,10 @@
1
1
  export default HeaderOptionsMenu;
2
- declare function HeaderOptionsMenu({ model, modelId, actions, disableMailMessages, attachedFileScreenTitle, barcodeFieldname, }: {
2
+ declare function HeaderOptionsMenu({ model, modelId, actions, disableMailMessages, disableJsonFields, attachedFileScreenTitle, barcodeFieldname, }: {
3
3
  model: any;
4
4
  modelId: any;
5
5
  actions?: any[];
6
6
  disableMailMessages: any;
7
+ disableJsonFields: any;
7
8
  attachedFileScreenTitle: any;
8
9
  barcodeFieldname: any;
9
10
  }): JSX.Element;
@@ -21,19 +21,32 @@ import { DropdownMenu, DropdownMenuItem } from '@axelor/aos-mobile-ui';
21
21
  import { HeaderOptionMenuItem } from '../../molecules';
22
22
  import { useBasicActions } from '../../../header';
23
23
  const SMALLEST_WINDOW_WIDTH = 300;
24
- const HeaderOptionsMenu = ({ model, modelId, actions = [], disableMailMessages, attachedFileScreenTitle, barcodeFieldname, }) => {
25
- const { mailMessagesAction, attachedFilesAction, barcodeAction } = useBasicActions({
24
+ const HeaderOptionsMenu = ({ model, modelId, actions = [], disableMailMessages, disableJsonFields, attachedFileScreenTitle, barcodeFieldname, }) => {
25
+ const { mailMessagesAction, attachedFilesAction, barcodeAction, jsonFieldsAction, } = useBasicActions({
26
26
  model,
27
27
  modelId,
28
28
  disableMailMessages,
29
- attachedFileScreenTitle,
30
29
  barcodeFieldname,
30
+ disableJsonFields,
31
+ attachedFileScreenTitle,
31
32
  });
32
33
  const collapseMenuItems = useMemo(() => Dimensions.get('window').width <= SMALLEST_WINDOW_WIDTH, []);
33
34
  const MenuItem = useMemo(() => (collapseMenuItems ? DropdownMenuItem : HeaderOptionMenuItem), [collapseMenuItems]);
34
- const allActions = useMemo(() => [attachedFilesAction, mailMessagesAction, barcodeAction, ...actions]
35
+ const allActions = useMemo(() => [
36
+ attachedFilesAction,
37
+ mailMessagesAction,
38
+ barcodeAction,
39
+ jsonFieldsAction,
40
+ ...actions,
41
+ ]
35
42
  .filter(_action => !_action.hideIf)
36
- .sort((a, b) => a.order - b.order), [actions, attachedFilesAction, barcodeAction, mailMessagesAction]);
43
+ .sort((a, b) => a.order - b.order), [
44
+ actions,
45
+ attachedFilesAction,
46
+ barcodeAction,
47
+ jsonFieldsAction,
48
+ mailMessagesAction,
49
+ ]);
37
50
  const headerActions = useMemo(() => allActions.filter(_action => _action.showInHeader).slice(0, 2), [allActions]);
38
51
  const menuActions = useMemo(() => allActions.filter(_action => !headerActions.some(_header => _header.key === _action.key)), [allActions, headerActions]);
39
52
  const HeaderItemList = useMemo(() => headerActions.map((_action, index) => (<MenuItem key={_action.key + index} icon={_action.iconName} color={_action.iconColor} indicator={_action.indicator} placeholder={_action.title} FontAwesome5={_action.FontAwesome5} hideIf={_action.hideIf} disableIf={_action.disableIf} onPress={_action.onPress}/>)), [headerActions]);
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderOptionsMenu.js","sourceRoot":"","sources":["../../../../src/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAA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EAAE,KAAK;QACpB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,gBAAgB,EAAE,EAAE;KACrB;CACF,CAAC,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"HeaderOptionsMenu.js","sourceRoot":"","sources":["../../../../src/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAC,YAAY,EAAE,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAC,oBAAoB,EAAC,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAEhD,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAElC,MAAM,iBAAiB,GAAG,CAAC,EACzB,KAAK,EACL,OAAO,EACP,OAAO,GAAG,EAAE,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,GACjB,EAAE,EAAE;IACH,MAAM,EACJ,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,GACjB,GAAG,eAAe,CAAC;QAClB,KAAK;QACL,OAAO;QACP,mBAAmB;QACnB,gBAAgB;QAChB,iBAAiB;QACjB,uBAAuB;KACxB,CAAC,CAAC;IAEH,MAAM,iBAAiB,GAAG,OAAO,CAC/B,GAAG,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,IAAI,qBAAqB,EAC7D,EAAE,CACH,CAAC;IAEF,MAAM,QAAQ,GAAG,OAAO,CACtB,GAAG,EAAE,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,oBAAoB,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AAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;MAAA,CAAC,cAAc,CACf;MAAA,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,CAC1E;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,YAAY,EAAE,EAAE;QAChB,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,gBAAgB,EAAE,EAAE;KACrB;CACF,CAAC,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
@@ -1,3 +1,5 @@
1
+ export { default as AnomalyBubble } from "./AnomalyBubble/AnomalyBubble";
2
+ export { default as AnomalyList } from "./AnomalyList/AnomalyList";
1
3
  export { default as AOSImage } from "./AOSImage/AOSImage";
2
4
  export { default as AOSImageBubble } from "./AOSImageBubble/AOSImageBubble";
3
5
  export { default as DateInput } from "./DateInput/DateInput";
@@ -15,6 +15,8 @@
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 AnomalyBubble } from './AnomalyBubble/AnomalyBubble';
19
+ export { default as AnomalyList } from './AnomalyList/AnomalyList';
18
20
  export { default as AOSImage } from './AOSImage/AOSImage';
19
21
  export { default as AOSImageBubble } from './AOSImageBubble/AOSImageBubble';
20
22
  export { default as DateInput } from './DateInput/DateInput';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/organisms/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAC,OAAO,I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,OAAO,EAAC,OAAO,IAAI,sBAAsB,EAAC,MAAM,iDAAiD,CAAC;AAClG,OAAO,EAAC,OAAO,IAAI,2BAA2B,EAAC,MAAM,2DAA2D,CAAC;AACjH,OAAO,EAAC,OAAO,IAAI,yBAAyB,EAAC,MAAM,uDAAuD,CAAC"}
@@ -0,0 +1,11 @@
1
+ interface ErrorItem {
2
+ attr?: string;
3
+ message: string;
4
+ values?: any;
5
+ translatable?: boolean;
6
+ }
7
+ declare const ConstraintsValidatorPopup: ({ onContinue, errors, }: {
8
+ onContinue: () => void;
9
+ errors: ErrorItem[];
10
+ }) => JSX.Element;
11
+ export default ConstraintsValidatorPopup;
@@ -0,0 +1,33 @@
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 { Alert, Text, UnorderedList } from '@axelor/aos-mobile-ui';
20
+ import useTranslator from '../../../../i18n/hooks/use-translator';
21
+ const ConstraintsValidatorPopup = ({ onContinue, errors, }) => {
22
+ const I18n = useTranslator();
23
+ return (<Alert visible={true} title={I18n.t('Base_Error')} confirmButtonConfig={{ width: 50, title: null, onPress: onContinue }} translator={I18n.t}>
24
+ <Text>{I18n.t('Base_InvalidConstraints')}</Text>
25
+ <UnorderedList data={errors} renderItem={({ item }) => (<Text key={`${item.attr} - ${item.message}`}>
26
+ {item.translatable
27
+ ? `${item.attr} ${I18n.t(item.message, item.values)}`
28
+ : item.message}
29
+ </Text>)}/>
30
+ </Alert>);
31
+ };
32
+ export default ConstraintsValidatorPopup;
33
+ //# sourceMappingURL=ConstraintsValidatorPopup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConstraintsValidatorPopup.js","sourceRoot":"","sources":["../../../../../src/components/pages/FormView/Alerts/ConstraintsValidatorPopup.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,KAAK,EAAE,IAAI,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACjE,OAAO,aAAa,MAAM,uCAAuC,CAAC;AASlE,MAAM,yBAAyB,GAAG,CAAC,EACjC,UAAU,EACV,MAAM,GAIP,EAAE,EAAE;IACH,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,OAAO,CACL,CAAC,KAAK,CACJ,OAAO,CAAC,CAAC,IAAI,CAAC,CACd,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAC5B,mBAAmB,CAAC,CAAC,EAAC,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAC,CAAC,CACnE,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACnB;MAAA,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,EAAE,IAAI,CAC/C;MAAA,CAAC,aAAa,CACZ,IAAI,CAAC,CAAC,MAAM,CAAC,CACb,UAAU,CAAC,CAAC,CAAC,EAAC,IAAI,EAAoB,EAAE,EAAE,CAAC,CACzC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,CAC1C;YAAA,CAAC,IAAI,CAAC,YAAY;gBAChB,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE;gBACrD,CAAC,CAAC,IAAI,CAAC,OAAO,CAClB;UAAA,EAAE,IAAI,CAAC,CACR,CAAC,EAEN;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1 @@
1
+ export { default as ConstraintsValidatorPopup } from './ConstraintsValidatorPopup';
@@ -15,7 +15,5 @@
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 DisabledButton } from './DisabledButton';
19
- export { default as LoginButton } from './LoginButton';
20
- export { default as UpdateButton } from './UpdateButton';
18
+ export { default as ConstraintsValidatorPopup } from './ConstraintsValidatorPopup';
21
19
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/pages/FormView/Alerts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,yBAAyB,EAAC,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { DisplayField, States } from '../../../../forms';
2
+ interface FieldProps {
3
+ handleFieldChange: (newValue: any, fieldName: string) => void;
4
+ _field: DisplayField;
5
+ object: any;
6
+ globalReadonly?: (values?: States) => boolean;
7
+ }
8
+ declare const Field: ({ handleFieldChange, _field, object, globalReadonly, }: FieldProps) => JSX.Element;
9
+ export default Field;
@@ -0,0 +1,149 @@
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, useState, useMemo } from 'react';
19
+ import { Dimensions, Platform, StyleSheet, View, } from 'react-native';
20
+ import { Checkbox, FormHtmlInput, FormIncrementInput, FormInput, InfoBubble, Label, StarScore, Text, useThemeColor, } from '@axelor/aos-mobile-ui';
21
+ import { getKeyboardType, getWidget, validateFieldSchema, } from '../../../../forms';
22
+ import { useTranslator } from '../../../../i18n';
23
+ import { useSelector } from '../../../../redux/hooks';
24
+ import { UploadFileInput } from '../../../molecules';
25
+ import { DateInput } from '../../../organisms';
26
+ import { CustomPasswordInput } from '../Custom';
27
+ const Field = ({ handleFieldChange, _field, object, globalReadonly = () => false, }) => {
28
+ const I18n = useTranslator();
29
+ const Colors = useThemeColor();
30
+ const value = object?.[_field.key];
31
+ const storeState = useSelector((state) => state);
32
+ const [error, setError] = useState();
33
+ const handleValidate = useCallback((_value) => {
34
+ validateFieldSchema(_field, _value)
35
+ .then(() => {
36
+ setError(null);
37
+ })
38
+ .catch(_error => {
39
+ setError(`${_field.key} ${I18n.t(_error.message)}`);
40
+ });
41
+ }, [I18n, _field]);
42
+ const handleChange = useCallback((_value) => {
43
+ handleValidate(_value);
44
+ handleFieldChange(_value, _field.key);
45
+ }, [_field.key, handleFieldChange, handleValidate]);
46
+ const isHidden = useMemo(() => {
47
+ return _field.hideIf({ objectState: object, storeState: storeState });
48
+ }, [_field, object, storeState]);
49
+ const isRequired = useMemo(() => {
50
+ return (_field.required ||
51
+ _field.requiredIf({ objectState: object, storeState: storeState }));
52
+ }, [_field, object, storeState]);
53
+ const isReadonly = useMemo(() => {
54
+ return (globalReadonly({ objectState: object, storeState: storeState }) ||
55
+ _field.readonly ||
56
+ _field.readonlyIf({ objectState: object, storeState: storeState }));
57
+ }, [_field, globalReadonly, object, storeState]);
58
+ const fieldStyle = useMemo(() => ({
59
+ width: `${_field.parentPanel != null ? 100 : 90}%`,
60
+ alignSelf: 'center',
61
+ }), [_field]);
62
+ const getComponent = () => {
63
+ switch (getWidget(_field)) {
64
+ case 'custom':
65
+ return _field.customComponent({
66
+ style: fieldStyle,
67
+ title: I18n.t(_field.titleKey),
68
+ defaultValue: value,
69
+ onChange: handleChange,
70
+ required: isRequired,
71
+ readonly: isReadonly,
72
+ ..._field.options,
73
+ });
74
+ case 'checkbox':
75
+ return (<Checkbox style={[fieldStyle, styles.checkbox]} title={I18n.t(_field.titleKey)} isDefaultChecked={value} onChange={handleChange} disabled={isReadonly} {..._field.options}/>);
76
+ case 'star':
77
+ return (<StarScore size={25} score={value} onPress={handleChange} editMode={!isReadonly} showMissingStar={true} {..._field.options}/>);
78
+ case 'file':
79
+ return (<UploadFileInput style={fieldStyle} title={I18n.t(_field.titleKey)} defaultValue={value} onUpload={handleChange} required={isRequired} readonly={isReadonly} {..._field.options}/>);
80
+ case 'date':
81
+ return (<DateInput style={fieldStyle} title={I18n.t(_field.titleKey)} mode={_field.type} defaultDate={value ? new Date(value) : null} onDateChange={_date => {
82
+ const isoDate = _date.toISOString();
83
+ if (_field.type === 'datetime') {
84
+ handleChange(isoDate);
85
+ }
86
+ else {
87
+ const tmp = isoDate?.split('T');
88
+ handleChange(_field.type === 'date' ? tmp[0] : tmp[1]);
89
+ }
90
+ }} required={isRequired} readonly={isReadonly} nullable={true} {..._field.options}/>);
91
+ case 'label':
92
+ return (<Label style={fieldStyle} message={I18n.t(_field.titleKey)} {..._field.options}/>);
93
+ case 'password':
94
+ return (<CustomPasswordInput style={fieldStyle} title={I18n.t(_field.titleKey)} defaultValue={value} onChange={handleChange} required={isRequired} readonly={isReadonly} {..._field.options}/>);
95
+ case 'HTML':
96
+ return (<FormHtmlInput style={fieldStyle} title={I18n.t(_field.titleKey)} defaultValue={value} onChange={handleChange} required={isRequired} readonly={isReadonly} {..._field.options}/>);
97
+ case 'increment':
98
+ return (<FormIncrementInput style={fieldStyle} title={I18n.t(_field.titleKey)} defaultValue={value} onChange={handleChange} decimalSpacer={I18n.t('Base_DecimalSpacer')} thousandSpacer={I18n.t('Base_ThousandSpacer')} required={isRequired} readOnly={isReadonly} keyboardType={getKeyboardType(_field)} {..._field.options}/>);
99
+ default:
100
+ return (<FormInput style={fieldStyle} title={I18n.t(_field.titleKey)} defaultValue={value} onChange={handleChange} required={isRequired} readOnly={isReadonly} keyboardType={getKeyboardType(_field)} {..._field.options}/>);
101
+ }
102
+ };
103
+ if (isHidden) {
104
+ return null;
105
+ }
106
+ return (<View style={[
107
+ styles.container,
108
+ Platform.OS === 'ios' ? styles.zIndexContainer : null,
109
+ ]}>
110
+ {_field.helperKey != null && (<InfoBubble iconName="info" indication={I18n.t(_field.helperKey)} badgeColor={Colors.infoColor} size={15} style={[
111
+ styles.info,
112
+ _field.parentPanel != null ? styles.infoParent : null,
113
+ ]} textIndicationStyle={styles.infoIndicator}/>)}
114
+ {getComponent()}
115
+ {error != null && (<Text textColor={Colors.errorColor.background} style={styles.error}>
116
+ {error}
117
+ </Text>)}
118
+ </View>);
119
+ };
120
+ const styles = StyleSheet.create({
121
+ checkbox: {
122
+ marginVertical: 5,
123
+ marginLeft: 15,
124
+ },
125
+ container: {
126
+ alignSelf: 'center',
127
+ width: '100%',
128
+ },
129
+ zIndexContainer: {
130
+ zIndex: 30,
131
+ },
132
+ info: {
133
+ position: 'absolute',
134
+ left: 10,
135
+ top: -2,
136
+ },
137
+ infoParent: {
138
+ left: -8,
139
+ },
140
+ infoIndicator: {
141
+ left: 20,
142
+ width: Dimensions.get('window').width * 0.7,
143
+ },
144
+ error: {
145
+ marginLeft: 5,
146
+ },
147
+ });
148
+ export default Field;
149
+ //# sourceMappingURL=Field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Field.js","sourceRoot":"","sources":["../../../../../src/components/pages/FormView/Components/Field.t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AC,CAAC,KAAK,GAAG,GAAG;KAC5C;IACD,KAAK,EAAE;QACL,UAAU,EAAE,CAAC;KACd;CACF,CAAC,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from 'react';
2
+ import { DisplayField, DisplayPanel } from '../../../../forms';
3
+ interface PanelProps {
4
+ renderItem: (item: DisplayPanel | DisplayField) => ReactNode;
5
+ _panel: DisplayPanel;
6
+ }
7
+ declare const Panel: ({ renderItem, _panel }: PanelProps) => JSX.Element;
8
+ export default Panel;
@@ -0,0 +1,84 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React, { useMemo } from 'react';
19
+ import { StyleSheet, View } from 'react-native';
20
+ import { DropdownCard, HorizontalRule, Text } from '@axelor/aos-mobile-ui';
21
+ import { useTranslator } from '../../../../i18n';
22
+ import { DEFAULT_COLSPAN } from '../../../../forms';
23
+ const Panel = ({ renderItem, _panel }) => {
24
+ const I18n = useTranslator();
25
+ const panelStyle = useMemo(() => ({
26
+ alignItems: 'center',
27
+ flexDirection: _panel.direction ?? 'row',
28
+ width: `${_panel.colSpan > 0 && _panel.colSpan < 12
29
+ ? (Math.min(_panel.colSpan, DEFAULT_COLSPAN) / DEFAULT_COLSPAN) * 100
30
+ : _panel.parent == null
31
+ ? 100
32
+ : 90}%`,
33
+ paddingHorizontal: _panel.parent != null ? null : 17,
34
+ paddingLeft: _panel.parent != null ? 5 : null,
35
+ paddingRight: _panel.parent != null ? 5 : null,
36
+ }), [_panel]);
37
+ if (!Array.isArray(_panel.content) || _panel.content.length === 0) {
38
+ return <View key={_panel.key} style={panelStyle}/>;
39
+ }
40
+ if (_panel.isCollaspible) {
41
+ return (<DropdownCard key={_panel.key} title={I18n.t(_panel.titleKey)}>
42
+ {_panel.content.map(renderItem)}
43
+ </DropdownCard>);
44
+ }
45
+ if (_panel.titleKey != null) {
46
+ return (<View key={_panel.key} style={[panelStyle, styles.container]}>
47
+ <Text style={styles.title}>{I18n.t(_panel.titleKey)}</Text>
48
+ <HorizontalRule style={styles.line}/>
49
+ <View style={[
50
+ {
51
+ flexDirection: panelStyle.flexDirection,
52
+ },
53
+ styles.content,
54
+ ]}>
55
+ {_panel.content.map(renderItem)}
56
+ </View>
57
+ </View>);
58
+ }
59
+ return (<View key={_panel.key} style={panelStyle}>
60
+ {_panel.content.map(renderItem)}
61
+ </View>);
62
+ };
63
+ const styles = StyleSheet.create({
64
+ container: {
65
+ flexDirection: 'column',
66
+ },
67
+ title: {
68
+ alignSelf: 'flex-start',
69
+ marginLeft: 10,
70
+ fontSize: 16,
71
+ fontWeight: 'bold',
72
+ },
73
+ line: {
74
+ marginVertical: 4,
75
+ width: '100%',
76
+ alignSelf: 'center',
77
+ },
78
+ content: {
79
+ alignItems: 'center',
80
+ width: '100%',
81
+ },
82
+ });
83
+ export default Panel;
84
+ //# sourceMappingURL=Panel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Panel.js","sourceRoot":"","sources":["../../../../../src/components/pages/FormView/Components/Panel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAY,OAAO,EAAC,MAAM,OAAO,CAAC;AAChD,OAAO,EAAY,UAAU,EAAE,IAAI,EAAY,MAAM,cAAc,CAAC;AACpE,OAAO,EAAC,YAAY,EAAE,cAAc,EAAE,IAAI,EAAC,MA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C,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,aAAa,EAAE,QAAQ;KACxB;IACD,KAAK,EAAE;QACL,SAAS,EAAE,YAAY;QACvB,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;KACnB;IACD,IAAI,EAAE;QACJ,cAAc,EAAE,CAAC;QACjB,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,QAAQ;KACpB;IACD,OAAO,EAAE;QACP,UAAU,EAAE,QAAQ;QACpB,KAAK,EAAE,MAAM;KACd;CACF,CAAC,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as Field } from './Field';
2
+ export { default as Panel } from './Panel';
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ export { default as Field } from './Field';
19
+ export { default as Panel } from './Panel';
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/pages/FormView/Components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,MAAM,SAAS,CAAC;AACzC,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,MAAM,SAAS,CAAC"}