@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.
Files changed (211) 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 +12 -5
  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/DateInput/DateInput.js +3 -3
  43. package/lib/components/organisms/DateInput/DateInput.js.map +1 -1
  44. package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.d.ts +2 -1
  45. package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js +18 -5
  46. package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js.map +1 -1
  47. package/lib/components/organisms/index.d.ts +2 -0
  48. package/lib/components/organisms/index.js +2 -0
  49. package/lib/components/organisms/index.js.map +1 -1
  50. package/lib/components/pages/FormView/Alerts/ConstraintsValidatorPopup.d.ts +11 -0
  51. package/lib/components/pages/FormView/Alerts/ConstraintsValidatorPopup.js +33 -0
  52. package/lib/components/pages/FormView/Alerts/ConstraintsValidatorPopup.js.map +1 -0
  53. package/lib/components/pages/FormView/Alerts/index.d.ts +1 -0
  54. package/lib/{sessions/components/buttons → components/pages/FormView/Alerts}/index.js +1 -3
  55. package/lib/components/pages/FormView/Alerts/index.js.map +1 -0
  56. package/lib/components/pages/FormView/Components/Field.d.ts +10 -0
  57. package/lib/components/pages/FormView/Components/Field.js +146 -0
  58. package/lib/components/pages/FormView/Components/Field.js.map +1 -0
  59. package/lib/components/pages/FormView/Components/Panel.d.ts +9 -0
  60. package/lib/components/pages/FormView/Components/Panel.js +96 -0
  61. package/lib/components/pages/FormView/Components/Panel.js.map +1 -0
  62. package/lib/components/pages/FormView/Components/index.d.ts +2 -0
  63. package/lib/components/pages/FormView/Components/index.js +20 -0
  64. package/lib/components/pages/FormView/Components/index.js.map +1 -0
  65. package/lib/components/pages/FormView/Custom/CustomButton.d.ts +10 -0
  66. package/lib/components/pages/FormView/Custom/CustomButton.js +31 -0
  67. package/lib/components/pages/FormView/Custom/CustomButton.js.map +1 -0
  68. package/lib/components/pages/FormView/Custom/CustomPasswordInput.d.ts +11 -0
  69. package/lib/components/pages/FormView/Custom/CustomPasswordInput.js +40 -0
  70. package/lib/components/pages/FormView/Custom/CustomPasswordInput.js.map +1 -0
  71. package/lib/components/pages/FormView/Custom/CustomPicker.d.ts +12 -0
  72. package/lib/components/pages/FormView/Custom/CustomPicker.js +33 -0
  73. package/lib/components/pages/FormView/Custom/CustomPicker.js.map +1 -0
  74. package/lib/components/pages/FormView/Custom/CustomSearchBar.d.ts +12 -0
  75. package/lib/components/pages/FormView/Custom/CustomSearchBar.js +69 -0
  76. package/lib/components/pages/FormView/Custom/CustomSearchBar.js.map +1 -0
  77. package/lib/components/pages/FormView/Custom/index.d.ts +4 -0
  78. package/lib/components/pages/FormView/Custom/index.js +22 -0
  79. package/lib/components/pages/FormView/Custom/index.js.map +1 -0
  80. package/lib/components/pages/FormView/FormView.d.ts +8 -0
  81. package/lib/components/pages/FormView/FormView.js +193 -0
  82. package/lib/components/pages/FormView/FormView.js.map +1 -0
  83. package/lib/components/pages/index.d.ts +4 -0
  84. package/lib/components/pages/index.js +22 -0
  85. package/lib/components/pages/index.js.map +1 -0
  86. package/lib/components/templates/MailMessageView/MailMessageView.js +8 -2
  87. package/lib/components/templates/MailMessageView/MailMessageView.js.map +1 -1
  88. package/lib/components/templates/PopupApplicationNotConfigured/PopupApplicationNotConfigured.js +10 -13
  89. package/lib/components/templates/PopupApplicationNotConfigured/PopupApplicationNotConfigured.js.map +1 -1
  90. package/lib/components/templates/PopupMinimalRequiredVersion/PopupMinimalRequiredVersion.js +15 -25
  91. package/lib/components/templates/PopupMinimalRequiredVersion/PopupMinimalRequiredVersion.js.map +1 -1
  92. package/lib/components/templates/SocialNetworkLinks/SocialNetworkLinks.d.ts +9 -6
  93. package/lib/components/templates/SocialNetworkLinks/SocialNetworkLinks.js +30 -10
  94. package/lib/components/templates/SocialNetworkLinks/SocialNetworkLinks.js.map +1 -1
  95. package/lib/components/templates/UserSearchBar/UserSearchBar.d.ts +14 -0
  96. package/lib/components/templates/UserSearchBar/UserSearchBar.js +34 -0
  97. package/lib/components/templates/UserSearchBar/UserSearchBar.js.map +1 -0
  98. package/lib/components/templates/index.d.ts +1 -0
  99. package/lib/components/templates/index.js +1 -0
  100. package/lib/components/templates/index.js.map +1 -1
  101. package/lib/config/routes.d.ts +3 -0
  102. package/lib/config/routes.js +2 -0
  103. package/lib/config/routes.js.map +1 -1
  104. package/lib/features/formSlice.d.ts +34 -0
  105. package/lib/features/formSlice.js +70 -0
  106. package/lib/features/formSlice.js.map +1 -0
  107. package/lib/features/index.d.ts +3 -0
  108. package/lib/features/index.js +3 -0
  109. package/lib/features/index.js.map +1 -1
  110. package/lib/features/metaJsonFieldSlice.d.ts +34 -0
  111. package/lib/features/metaJsonFieldSlice.js +68 -0
  112. package/lib/features/metaJsonFieldSlice.js.map +1 -0
  113. package/lib/features/userSlice.d.ts +16 -0
  114. package/lib/features/userSlice.js +49 -0
  115. package/lib/features/userSlice.js.map +1 -0
  116. package/lib/forms/FormConfigsProvider.d.ts +20 -0
  117. package/lib/forms/FormConfigsProvider.js +56 -0
  118. package/lib/forms/FormConfigsProvider.js.map +1 -0
  119. package/lib/forms/api.helpers.d.ts +12 -0
  120. package/lib/forms/api.helpers.js +59 -0
  121. package/lib/forms/api.helpers.js.map +1 -0
  122. package/lib/forms/display.helpers.d.ts +18 -0
  123. package/lib/forms/display.helpers.js +225 -0
  124. package/lib/forms/display.helpers.js.map +1 -0
  125. package/lib/forms/index.d.ts +7 -0
  126. package/lib/forms/index.js +25 -0
  127. package/lib/forms/index.js.map +1 -0
  128. package/lib/forms/register.helpers.d.ts +6 -0
  129. package/lib/forms/register.helpers.js +96 -0
  130. package/lib/forms/register.helpers.js.map +1 -0
  131. package/lib/forms/studio/api.helpers.d.ts +37 -0
  132. package/lib/forms/studio/api.helpers.js +162 -0
  133. package/lib/forms/studio/api.helpers.js.map +1 -0
  134. package/lib/forms/studio/display.helpers.d.ts +7 -0
  135. package/lib/forms/studio/display.helpers.js +256 -0
  136. package/lib/forms/studio/display.helpers.js.map +1 -0
  137. package/lib/forms/studio/index.d.ts +2 -0
  138. package/lib/forms/studio/index.js +20 -0
  139. package/lib/forms/studio/index.js.map +1 -0
  140. package/lib/forms/types.d.ts +100 -0
  141. package/lib/forms/types.js +19 -0
  142. package/lib/forms/types.js.map +1 -0
  143. package/lib/forms/validation.helpers.d.ts +10 -0
  144. package/lib/forms/validation.helpers.js +234 -0
  145. package/lib/forms/validation.helpers.js.map +1 -0
  146. package/lib/header/hooks.d.ts +15 -1
  147. package/lib/header/hooks.js +57 -2
  148. package/lib/header/hooks.js.map +1 -1
  149. package/lib/header/types.d.ts +1 -0
  150. package/lib/hooks/use-navigation.d.ts +1 -0
  151. package/lib/hooks/use-navigation.js +4 -1
  152. package/lib/hooks/use-navigation.js.map +1 -1
  153. package/lib/i18n/translations/en.json +52 -1
  154. package/lib/i18n/translations/fr.json +52 -1
  155. package/lib/index.d.ts +2 -1
  156. package/lib/index.js +2 -1
  157. package/lib/index.js.map +1 -1
  158. package/lib/models/index.d.ts +2 -0
  159. package/lib/models/index.js +2 -0
  160. package/lib/models/index.js.map +1 -1
  161. package/lib/models/objectFields.js +3 -0
  162. package/lib/models/objectFields.js.map +1 -1
  163. package/lib/models/searchFields.d.ts +2 -0
  164. package/lib/{sessions/components/buttons/LoginButton.js → models/searchFields.js} +3 -6
  165. package/lib/models/searchFields.js.map +1 -0
  166. package/lib/models/sortFields.d.ts +2 -0
  167. package/lib/{sessions/components/buttons/UpdateButton.js → models/sortFields.js} +3 -6
  168. package/lib/models/sortFields.js.map +1 -0
  169. package/lib/navigator/drawer/Header.js +1 -1
  170. package/lib/navigator/drawer/Header.js.map +1 -1
  171. package/lib/screens/ErrorScreen.js +1 -1
  172. package/lib/screens/ErrorScreen.js.map +1 -1
  173. package/lib/screens/JsonFieldScreen.d.ts +4 -0
  174. package/lib/screens/JsonFieldScreen.js +92 -0
  175. package/lib/screens/JsonFieldScreen.js.map +1 -0
  176. package/lib/screens/index.d.ts +13 -0
  177. package/lib/screens/index.js +9 -0
  178. package/lib/screens/index.js.map +1 -1
  179. package/lib/sessions/components/alerts/PopupCreateSession.js +8 -16
  180. package/lib/sessions/components/alerts/PopupCreateSession.js.map +1 -1
  181. package/lib/sessions/components/alerts/PopupEditSession.js +8 -16
  182. package/lib/sessions/components/alerts/PopupEditSession.js.map +1 -1
  183. package/lib/sessions/components/alerts/PopupSession.js +7 -16
  184. package/lib/sessions/components/alerts/PopupSession.js.map +1 -1
  185. package/lib/sessions/components/index.d.ts +0 -1
  186. package/lib/sessions/components/index.js +0 -1
  187. package/lib/sessions/components/index.js.map +1 -1
  188. package/lib/sessions/components/inputs/SessionInputs.js +9 -7
  189. package/lib/sessions/components/inputs/SessionInputs.js.map +1 -1
  190. package/lib/types/anomaly-type.d.ts +16 -0
  191. package/lib/types/anomaly-type.js +56 -0
  192. package/lib/types/anomaly-type.js.map +1 -0
  193. package/lib/types/index.d.ts +1 -0
  194. package/lib/types/index.js +1 -0
  195. package/lib/types/index.js.map +1 -1
  196. package/lib/utils/displayers.d.ts +1 -0
  197. package/lib/utils/displayers.js +1 -0
  198. package/lib/utils/displayers.js.map +1 -1
  199. package/lib/utils/index.d.ts +1 -1
  200. package/lib/utils/index.js +1 -1
  201. package/lib/utils/index.js.map +1 -1
  202. package/package.json +3 -3
  203. package/lib/sessions/components/buttons/DisabledButton.d.ts +0 -7
  204. package/lib/sessions/components/buttons/DisabledButton.js +0 -45
  205. package/lib/sessions/components/buttons/DisabledButton.js.map +0 -1
  206. package/lib/sessions/components/buttons/LoginButton.d.ts +0 -6
  207. package/lib/sessions/components/buttons/LoginButton.js.map +0 -1
  208. package/lib/sessions/components/buttons/UpdateButton.d.ts +0 -6
  209. package/lib/sessions/components/buttons/UpdateButton.js.map +0 -1
  210. package/lib/sessions/components/buttons/index.d.ts +0 -3
  211. package/lib/sessions/components/buttons/index.js.map +0 -1
@@ -0,0 +1,96 @@
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, getZIndex, getZIndexStyle, } from '../../../../forms';
23
+ const Panel = ({ renderItem, formContent, _panel }) => {
24
+ const I18n = useTranslator();
25
+ const zIndex = useMemo(() => {
26
+ return getZIndex(formContent, _panel.key);
27
+ }, [_panel.key, formContent]);
28
+ const panelStyle = useMemo(() => ({
29
+ alignItems: 'center',
30
+ flexDirection: _panel.direction ?? 'row',
31
+ width: `${_panel.colSpan > 0 && _panel.colSpan < 12
32
+ ? (Math.min(_panel.colSpan, DEFAULT_COLSPAN) / DEFAULT_COLSPAN) * 100
33
+ : _panel.parent == null
34
+ ? 100
35
+ : 90}%`,
36
+ paddingHorizontal: _panel.parent != null ? null : 17,
37
+ paddingLeft: _panel.parent != null ? 5 : null,
38
+ paddingRight: _panel.parent != null ? 5 : null,
39
+ }), [_panel]);
40
+ if (!Array.isArray(_panel.content) || _panel.content.length === 0) {
41
+ return <View key={_panel.key} style={panelStyle}/>;
42
+ }
43
+ if (_panel.isCollapsible) {
44
+ return (<DropdownCard key={_panel.key} title={I18n.t(_panel.titleKey)} styleContainer={getZIndexStyle(zIndex)}>
45
+ <View style={[
46
+ styles.content,
47
+ {
48
+ flexDirection: panelStyle.flexDirection,
49
+ },
50
+ getZIndexStyle(zIndex + 1),
51
+ ]}>
52
+ {_panel.content.map(renderItem)}
53
+ </View>
54
+ </DropdownCard>);
55
+ }
56
+ if (_panel.titleKey != null) {
57
+ return (<View key={_panel.key} style={[panelStyle, styles.container, getZIndexStyle(zIndex)]}>
58
+ <Text style={styles.title}>{I18n.t(_panel.titleKey)}</Text>
59
+ <HorizontalRule style={styles.line}/>
60
+ <View style={[
61
+ styles.content,
62
+ {
63
+ flexDirection: panelStyle.flexDirection,
64
+ },
65
+ getZIndexStyle(zIndex + 1),
66
+ ]}>
67
+ {_panel.content.map(renderItem)}
68
+ </View>
69
+ </View>);
70
+ }
71
+ return (<View key={_panel.key} style={[panelStyle, getZIndexStyle(zIndex)]}>
72
+ {_panel.content.map(renderItem)}
73
+ </View>);
74
+ };
75
+ const styles = StyleSheet.create({
76
+ container: {
77
+ flexDirection: 'column',
78
+ },
79
+ title: {
80
+ alignSelf: 'flex-start',
81
+ marginLeft: 10,
82
+ fontSize: 16,
83
+ fontWeight: 'bold',
84
+ },
85
+ line: {
86
+ marginVertical: 4,
87
+ width: '100%',
88
+ alignSelf: 'center',
89
+ },
90
+ content: {
91
+ alignItems: 'center',
92
+ width: '100%',
93
+ },
94
+ });
95
+ export default Panel;
96
+ //# 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,EA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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"}
@@ -0,0 +1,10 @@
1
+ import { customComponentOptions } from '../../../../forms/types';
2
+ interface props extends customComponentOptions {
3
+ item: any;
4
+ object?: any;
5
+ style?: any;
6
+ title?: string;
7
+ readonly?: boolean;
8
+ }
9
+ declare const CustomButton: ({ item, style, title, readonly }: props) => JSX.Element;
10
+ export default CustomButton;
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React, { useCallback } from 'react';
19
+ import { useSelector } from 'react-redux';
20
+ import { Button, useThemeColor } from '@axelor/aos-mobile-ui';
21
+ import { executeButtonAction } from '../../../../forms/studio/api.helpers';
22
+ const CustomButton = ({ item, style, title, readonly }) => {
23
+ const Colors = useThemeColor();
24
+ const { object } = useSelector((state) => state.metaJsonField);
25
+ const handlePress = useCallback(() => {
26
+ executeButtonAction(item.onClick, item.uniqueModel, object);
27
+ }, [item, object]);
28
+ return (<Button style={style} onPress={handlePress} title={title} disabled={readonly} color={readonly ? Colors.secondaryColor : Colors.primaryColor}/>);
29
+ };
30
+ export default CustomButton;
31
+ //# sourceMappingURL=CustomButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomButton.js","sourceRoot":"","sources":["../../../../../src/components/pages/FormView/Custom/CustomButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAC,MAAM,OAAO,CAAC;AACzC,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,MAAM,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAC,mBAAmB,EAAC,MAAM,sCAAsC,CAAC;AAUzE,MAAM,YAAY,GAAG,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAQ,EAAE,EAAE;IAC7D,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAE/B,MAAM,EAAC,MAAM,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAElE,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE;QACnC,mBAAmB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAEnB,OAAO,CACL,CAAC,MAAM,CACL,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,OAAO,CAAC,CAAC,WAAW,CAAC,CACrB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,EAC9D,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { customComponentOptions } from '../../../../forms/types';
2
+ interface props extends customComponentOptions {
3
+ style?: any;
4
+ title?: string;
5
+ defaultValue?: any;
6
+ onChange: (value: any) => void;
7
+ required?: boolean;
8
+ readonly?: boolean;
9
+ }
10
+ declare const CustomPasswordInput: ({ style, title, defaultValue, onChange, required, readonly, }: props) => JSX.Element;
11
+ export default CustomPasswordInput;
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React from 'react';
19
+ import { StyleSheet, View } from 'react-native';
20
+ import { Text } from '@axelor/aos-mobile-ui';
21
+ import { PasswordInput } from '../../../../sessions';
22
+ const CustomPasswordInput = ({ style, title, defaultValue, onChange, required, readonly, }) => {
23
+ return (<View style={style}>
24
+ <Text style={styles.title}>{title}</Text>
25
+ <PasswordInput style={styles.input} value={defaultValue} onChange={onChange} readOnly={readonly} showRequiredFields={required}/>
26
+ </View>);
27
+ };
28
+ const styles = StyleSheet.create({
29
+ title: {
30
+ marginLeft: 10,
31
+ },
32
+ input: {
33
+ width: '100%',
34
+ alignSelf: 'center',
35
+ height: 40,
36
+ marginHorizontal: 0,
37
+ },
38
+ });
39
+ export default CustomPasswordInput;
40
+ //# sourceMappingURL=CustomPasswordInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomPasswordInput.js","sourceRoot":"","sources":["../../../../../src/components/pages/FormView/Custom/CustomPasswordInput.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,IAAI,EAAC,MAAM,uBAAuB,CAAC;AAE3C,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAWnD,MAAM,mBAAmB,GAAG,CAAC,EAC3B,KAAK,EACL,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,QAAQ,GACF,EAAE,EAAE;IACV,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CACjB;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,CACxC;MAAA,CAAC,aAAa,CACZ,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACpB,KAAK,CAAC,CAAC,YAAY,CAAC,CACpB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,kBAAkB,CAAC,CAAC,QAAQ,CAAC,EAEjC;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE;QACL,UAAU,EAAE,EAAE;KACf;IACD,KAAK,EAAE;QACL,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,QAAQ;QACnB,MAAM,EAAE,EAAE;QACV,gBAAgB,EAAE,CAAC;KACpB;CACF,CAAC,CAAC;AAEH,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { customComponentOptions } from '../../../../forms/types';
2
+ interface props extends customComponentOptions {
3
+ item: any;
4
+ style?: any;
5
+ title?: string;
6
+ defaultValue?: any;
7
+ onChange: () => any;
8
+ required?: boolean;
9
+ readonly?: boolean;
10
+ }
11
+ declare const CustomPicker: ({ item, style, title, defaultValue, onChange, required, readonly, }: props) => JSX.Element;
12
+ export default CustomPicker;
@@ -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, { useEffect, useState } from 'react';
19
+ import { Picker } from '@axelor/aos-mobile-ui';
20
+ import { fetchSelectionOptions } from '../../../../forms/studio/api.helpers';
21
+ const CustomPicker = ({ item, style, title, defaultValue, onChange, required, readonly, }) => {
22
+ const [selection, setSelection] = useState([]);
23
+ useEffect(() => {
24
+ fetchSelectionOptions({
25
+ modelName: item.uniqueModel,
26
+ attrsPanelName: item.modelField,
27
+ fieldName: item.name,
28
+ }).then(setSelection);
29
+ }, [item]);
30
+ return (<Picker style={style} title={title} onValueChange={onChange} listItems={selection} labelField="name" valueField="id" defaultValue={defaultValue} required={required} readonly={readonly} isScrollViewContainer={true}/>);
31
+ };
32
+ export default CustomPicker;
33
+ //# sourceMappingURL=CustomPicker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomPicker.js","sourceRoot":"","sources":["../../../../../src/components/pages/FormView/Custom/CustomPicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACjD,OAAO,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAE7C,OAAO,EAAC,qBAAqB,EAAC,MAAM,sCAAsC,CAAC;AAiB3E,MAAM,YAAY,GAAG,CAAC,EACpB,IAAI,EACJ,KAAK,EACL,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,QAAQ,GACF,EAAE,EAAE;IACV,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAkB,EAAE,CAAC,CAAC;IAEhE,SAAS,CAAC,GAAG,EAAE;QACb,qBAAqB,CAAC;YACpB,SAAS,EAAE,IAAI,CAAC,WAAW;YAC3B,cAAc,EAAE,IAAI,CAAC,UAAU;YAC/B,SAAS,EAAE,IAAI,CAAC,IAAI;SACrB,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACxB,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,OAAO,CACL,CAAC,MAAM,CACL,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,aAAa,CAAC,CAAC,QAAQ,CAAC,CACxB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,UAAU,CAAC,MAAM,CACjB,UAAU,CAAC,IAAI,CACf,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,qBAAqB,CAAC,CAAC,IAAI,CAAC,EAC5B,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { customComponentOptions } from '../../../../forms/types';
2
+ interface props extends customComponentOptions {
3
+ item: any;
4
+ style?: any;
5
+ title?: string;
6
+ defaultValue?: any;
7
+ onChange: () => any;
8
+ required?: boolean;
9
+ readonly?: boolean;
10
+ }
11
+ declare const CustomSearchBar: ({ item, style, title, defaultValue, onChange, required, readonly, }: props) => JSX.Element;
12
+ export default CustomSearchBar;
@@ -0,0 +1,69 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React, { useCallback, useEffect, useState } from 'react';
19
+ import { AutoCompleteSearch } from '@axelor/aos-mobile-ui';
20
+ import { fetchModelFields, fetchData, } from '../../../../forms/studio/api.helpers';
21
+ const CustomSearchBar = ({ item, style, title, defaultValue, onChange, required, readonly, }) => {
22
+ const [searchFields, setSearchFields] = useState([]);
23
+ const [loading, setLoading] = useState(false);
24
+ const [moreLoading, setMoreLoading] = useState(false);
25
+ const [isListEnd, setIsListEnd] = useState(false);
26
+ const [data, setData] = useState([]);
27
+ useEffect(() => {
28
+ fetchModelFields({ modelName: item.targetModel }).then(setSearchFields);
29
+ }, [item]);
30
+ const searchClientAndProspectAPI = useCallback(({ page = 0, searchValue }) => {
31
+ if (page == null || page === 0) {
32
+ setLoading(true);
33
+ }
34
+ else {
35
+ setMoreLoading(true);
36
+ }
37
+ fetchData({
38
+ page,
39
+ searchValue,
40
+ modelName: item.targetModel,
41
+ domain: item.domain,
42
+ searchFields,
43
+ })
44
+ .catch(() => {
45
+ setLoading(false);
46
+ setMoreLoading(false);
47
+ })
48
+ .then(_data => {
49
+ setLoading(false);
50
+ setMoreLoading(false);
51
+ if (page == null || page === 0) {
52
+ setData(_data);
53
+ setIsListEnd(false);
54
+ }
55
+ else {
56
+ if (Array.isArray(_data) && _data.length > 0) {
57
+ setIsListEnd(false);
58
+ setData(_current => [..._current, ..._data]);
59
+ }
60
+ else {
61
+ setIsListEnd(true);
62
+ }
63
+ }
64
+ });
65
+ }, [item, searchFields]);
66
+ return (<AutoCompleteSearch style={style} title={title} objectList={data} value={defaultValue} required={required} readonly={readonly} onChangeValue={onChange} fetchData={searchClientAndProspectAPI} displayValue={_item => _item[searchFields?.length > 0 ? searchFields[0] : 'name']} placeholder={title} showDetailsPopup={true} loadingList={loading} moreLoading={moreLoading} isListEnd={isListEnd}/>);
67
+ };
68
+ export default CustomSearchBar;
69
+ //# sourceMappingURL=CustomSearchBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomSearchBar.js","sourceRoot":"","sources":["../../../../../src/components/pages/FormView/Custom/CustomSearchBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EACL,gBAAgB,EACh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AAC,CAAC,OAAO,CAAC,CACrB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,SAAS,CAAC,CAAC,SAAS,CAAC,EACrB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { default as CustomButton } from './CustomButton';
2
+ export { default as CustomPasswordInput } from './CustomPasswordInput';
3
+ export { default as CustomPicker } from './CustomPicker';
4
+ export { default as CustomSearchBar } from './CustomSearchBar';
@@ -0,0 +1,22 @@
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 CustomButton } from './CustomButton';
19
+ export { default as CustomPasswordInput } from './CustomPasswordInput';
20
+ export { default as CustomPicker } from './CustomPicker';
21
+ export { default as CustomSearchBar } from './CustomSearchBar';
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/pages/FormView/Custom/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Action } from '../../../forms';
2
+ interface FormProps {
3
+ defaultValue?: any;
4
+ formKey: string;
5
+ actions: Action[];
6
+ }
7
+ declare const FormView: ({ defaultValue, formKey, actions }: FormProps) => JSX.Element;
8
+ export default FormView;
@@ -0,0 +1,193 @@
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, { useEffect, useMemo, useState } from 'react';
19
+ import { StyleSheet, View } from 'react-native';
20
+ import { useDispatch, useSelector } from 'react-redux';
21
+ import { Button, KeyboardAvoidingScrollView, Screen, WarningCard, } from '@axelor/aos-mobile-ui';
22
+ import { useTranslator } from '../../../i18n';
23
+ import { getButtonTitleKey, getConfigItems, getFields, getValidationErrors, getZIndexStyle, isField, isObjectMissingRequiredField, mapErrorWithTranslationKey, sortContent, updateRequiredFieldsOfConfig, useFormConfig, validateSchema, } from '../../../forms';
24
+ import { Field as FieldComponent, Panel as PanelComponent } from './Components';
25
+ import { ConstraintsValidatorPopup } from './Alerts';
26
+ import { clearRecord, createRecord, refreshRecord, updateRecord, } from '../../../features/formSlice';
27
+ import { isEmpty } from '../../../utils';
28
+ const FormView = ({ defaultValue = {}, formKey, actions }) => {
29
+ const I18n = useTranslator();
30
+ const dispatch = useDispatch();
31
+ const { config } = useFormConfig(formKey);
32
+ const storeState = useSelector((state) => state);
33
+ const { record } = useSelector((state) => state.form);
34
+ const [object, setObject] = useState(defaultValue);
35
+ const [errors, setErrors] = useState();
36
+ const formContent = useMemo(() => sortContent(config), [config]);
37
+ useEffect(() => {
38
+ mapErrorWithTranslationKey();
39
+ }, []);
40
+ useEffect(() => {
41
+ dispatch(clearRecord());
42
+ }, [dispatch]);
43
+ useEffect(() => {
44
+ setObject(_current => {
45
+ if (isEmpty(record)) {
46
+ if (isEmpty(defaultValue) || _current === defaultValue) {
47
+ return _current;
48
+ }
49
+ else {
50
+ return defaultValue;
51
+ }
52
+ }
53
+ if (_current === record) {
54
+ return _current;
55
+ }
56
+ else {
57
+ return record;
58
+ }
59
+ });
60
+ }, [defaultValue, record]);
61
+ const handleFieldChange = (newValue, fieldName) => {
62
+ setObject(_current => {
63
+ if (_current?.[fieldName] === newValue) {
64
+ return _current;
65
+ }
66
+ const updatedObject = _current != null ? { ..._current } : null;
67
+ updatedObject[fieldName] = newValue;
68
+ getFields(config)
69
+ .filter(_field => _field.dependsOn != null)
70
+ .filter(_field => Object.keys(_field.dependsOn).includes(fieldName))
71
+ .forEach(_field => {
72
+ updatedObject[_field.key] = _field.dependsOn[fieldName]({
73
+ newValue,
74
+ storeState,
75
+ objectState: updatedObject,
76
+ dispatch,
77
+ });
78
+ });
79
+ return updatedObject;
80
+ });
81
+ };
82
+ const getButtonConfig = (_action) => {
83
+ const buttonConfig = { title: getButtonTitleKey(_action) };
84
+ if (_action.customAction != null) {
85
+ buttonConfig.onPress = () => _action.customAction({
86
+ handleObjectChange: setObject,
87
+ objectState: object,
88
+ storeState,
89
+ handleReset,
90
+ dispatch,
91
+ });
92
+ }
93
+ else {
94
+ switch (_action.type) {
95
+ case 'create':
96
+ buttonConfig.onPress = () => {
97
+ dispatch(createRecord({
98
+ modelName: config.modelName,
99
+ data: object,
100
+ }));
101
+ handleReset();
102
+ };
103
+ break;
104
+ case 'update':
105
+ buttonConfig.onPress = () => {
106
+ dispatch(updateRecord({
107
+ modelName: config.modelName,
108
+ data: object,
109
+ }));
110
+ };
111
+ break;
112
+ case 'refresh':
113
+ buttonConfig.onPress = () => {
114
+ dispatch(refreshRecord({
115
+ modelName: config.modelName,
116
+ id: object?.id,
117
+ }));
118
+ };
119
+ break;
120
+ case 'reset':
121
+ buttonConfig.onPress = handleReset;
122
+ break;
123
+ default:
124
+ buttonConfig.onPress = () => console.log(object);
125
+ break;
126
+ }
127
+ }
128
+ return buttonConfig;
129
+ };
130
+ const renderAction = (_action) => {
131
+ if (_action.hideIf?.({ objectState: object, storeState })) {
132
+ return null;
133
+ }
134
+ const buttonConfig = getButtonConfig(_action);
135
+ const isDisabled = (_action.needRequiredFields
136
+ ? isObjectMissingRequiredField(object, updateRequiredFieldsOfConfig(config, {
137
+ objectState: object,
138
+ storeState,
139
+ }))
140
+ : false) || _action.disabledIf?.({ objectState: object, storeState });
141
+ return (<Button key={_action.key} iconName={_action.iconName} color={_action.color} title={I18n.t(buttonConfig.title)} onPress={() => handleValidate(buttonConfig.onPress, _action.needValidation)} disabled={isDisabled}/>);
142
+ };
143
+ const handleValidate = (_action, needValidation) => {
144
+ if (needValidation) {
145
+ return validateSchema(config, object)
146
+ .then(() => {
147
+ _action(object);
148
+ })
149
+ .catch(_error => {
150
+ setErrors(getValidationErrors(_error));
151
+ });
152
+ }
153
+ return new Promise(resolve => {
154
+ _action(object);
155
+ resolve();
156
+ });
157
+ };
158
+ const handleReset = () => {
159
+ setObject(defaultValue);
160
+ };
161
+ const renderItem = (item) => {
162
+ if (isField(item)) {
163
+ return (<FieldComponent key={`${item.key} - ${item.order}`} handleFieldChange={handleFieldChange} _field={item} object={object} globalReadonly={config.readonlyIf} formContent={getConfigItems(config)}/>);
164
+ }
165
+ return (<PanelComponent key={`${item.key} - ${item.order}`} renderItem={renderItem} formContent={getConfigItems(config)} _panel={item}/>);
166
+ };
167
+ if (config == null) {
168
+ return (<View>
169
+ <WarningCard errorMessage={I18n.t('Base_FormNotFound')}/>
170
+ </View>);
171
+ }
172
+ return (<Screen fixedItems={actions.length === 0 ? undefined : actions.map(renderAction)} removeSpaceOnTop={true}>
173
+ <KeyboardAvoidingScrollView keyboardOffset={{
174
+ ios: 70,
175
+ android: 100,
176
+ }} style={styles.scroll}>
177
+ {Array.isArray(errors) && (<ConstraintsValidatorPopup onContinue={() => setErrors(null)} errors={errors}/>)}
178
+ <View style={[styles.container, getZIndexStyle(5)]}>
179
+ {formContent.map(renderItem)}
180
+ </View>
181
+ </KeyboardAvoidingScrollView>
182
+ </Screen>);
183
+ };
184
+ const styles = StyleSheet.create({
185
+ scroll: {
186
+ height: null,
187
+ },
188
+ container: {
189
+ alignItems: 'center',
190
+ },
191
+ });
192
+ export default FormView;
193
+ //# sourceMappingURL=FormView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormView.js","sourceRoot":"","sources":["../../../../src/components/pages/FormView/FormView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,aAAa,CAAC;AACrD,OAAO,EACL,MAAM,EACN,0BAA0B,EAC1B,MAAM,EACN,WAAW,GACZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAC5C,OAAO,EAIL,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,mBAAmB,EACnB,cAAc,EACd,OAAO,EACP,4BAA4B,EAC5B,0BAA0B,EAC1B,WAAW,EACX,4BAA4B,EAC5B,aAAa,EACb,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,KAAK,IAAI,cAAc,EAAE,KAAK,IAAI,cAAc,EAAC,MAAM,cAAc,CAAC;AAC9E,OAAO,EAAC,yBAAyB,EAAC,MAA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IAAI,CAAC,CACR,CAAC;KACH;IAED,OAAO,CACL,CAAC,MAAM,CACL,UAAU,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CACzE,gBAAgB,CAAC,CAAC,IAAI,CAAC,CACvB;MAAA,CAAC,0BAA0B,CACzB,cAAc,CAAC,CAAC;YACd,GAAG,EAAE,EAAE;YACP,OAAO,EAAE,GAAG;SACb,CAAC,CACF,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CACrB;QAAA,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CACxB,CAAC,yBAAyB,CACxB,UAAU,CAAC,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAClC,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CACD;QAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CACjD;UAAA,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAC9B;QAAA,EAAE,IAAI,CACR;MAAA,EAAE,0BAA0B,CAC9B;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,MAAM,EAAE;QACN,MAAM,EAAE,IAAI;KACb;IACD,SAAS,EAAE;QACT,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { default as FormView } from './FormView/FormView';
2
+ export * from './FormView/Alerts';
3
+ export { Field as FieldComponent, Panel as PanelComponent, } from './FormView/Components';
4
+ export * from './FormView/Custom';