@axelor/aos-mobile-core 8.5.21 → 8.5.22

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 (61) hide show
  1. package/lib/components/organisms/DateInput/DateInput.js +2 -1
  2. package/lib/components/organisms/DateInput/DateInput.js.map +1 -1
  3. package/lib/components/pages/CustomFieldForm/CustomFieldForm.d.ts +1 -1
  4. package/lib/components/pages/CustomFieldForm/CustomFieldForm.js +47 -35
  5. package/lib/components/pages/CustomFieldForm/CustomFieldForm.js.map +1 -1
  6. package/lib/components/pages/FormView/Components/Field.d.ts +15 -6
  7. package/lib/components/pages/FormView/Components/Field.js +36 -20
  8. package/lib/components/pages/FormView/Components/Field.js.map +1 -1
  9. package/lib/components/pages/FormView/Components/Panel.d.ts +3 -2
  10. package/lib/components/pages/FormView/Components/Panel.js +20 -18
  11. package/lib/components/pages/FormView/Components/Panel.js.map +1 -1
  12. package/lib/components/pages/FormView/Custom/CustomButton.d.ts +1 -1
  13. package/lib/components/pages/FormView/Custom/CustomPicker.d.ts +11 -8
  14. package/lib/components/pages/FormView/Custom/CustomPicker.js +9 -5
  15. package/lib/components/pages/FormView/Custom/CustomPicker.js.map +1 -1
  16. package/lib/components/pages/FormView/Custom/CustomSearchBar.d.ts +1 -7
  17. package/lib/components/pages/FormView/Custom/CustomSearchBar.js +4 -2
  18. package/lib/components/pages/FormView/Custom/CustomSearchBar.js.map +1 -1
  19. package/lib/components/pages/FormView/FormView.js +49 -43
  20. package/lib/components/pages/FormView/FormView.js.map +1 -1
  21. package/lib/features/authSlice.js +2 -0
  22. package/lib/features/authSlice.js.map +1 -1
  23. package/lib/features/metaJsonFieldSlice.d.ts +6 -6
  24. package/lib/features/metaJsonFieldSlice.js +6 -2
  25. package/lib/features/metaJsonFieldSlice.js.map +1 -1
  26. package/lib/forms/display.helpers.d.ts +8 -4
  27. package/lib/forms/display.helpers.js +75 -32
  28. package/lib/forms/display.helpers.js.map +1 -1
  29. package/lib/forms/studio/api.helpers.d.ts +14 -2
  30. package/lib/forms/studio/api.helpers.js +151 -93
  31. package/lib/forms/studio/api.helpers.js.map +1 -1
  32. package/lib/forms/studio/display.helpers.d.ts +1 -1
  33. package/lib/forms/studio/display.helpers.js +52 -29
  34. package/lib/forms/studio/display.helpers.js.map +1 -1
  35. package/lib/forms/studio/formula.helpers.d.ts +6 -2
  36. package/lib/forms/studio/formula.helpers.js +106 -18
  37. package/lib/forms/studio/formula.helpers.js.map +1 -1
  38. package/lib/forms/studio/permission.helpers.d.ts +1 -0
  39. package/lib/forms/studio/permission.helpers.js +23 -26
  40. package/lib/forms/studio/permission.helpers.js.map +1 -1
  41. package/lib/forms/types.d.ts +3 -1
  42. package/lib/forms/validation.helpers.d.ts +1 -1
  43. package/lib/forms/validation.helpers.js +19 -16
  44. package/lib/forms/validation.helpers.js.map +1 -1
  45. package/lib/i18n/hooks/use-translator.d.ts +2 -1
  46. package/lib/i18n/hooks/use-translator.js +1 -1
  47. package/lib/i18n/hooks/use-translator.js.map +1 -1
  48. package/lib/models/objectFields.js +38 -0
  49. package/lib/models/objectFields.js.map +1 -1
  50. package/lib/models/sortFields.js +2 -0
  51. package/lib/models/sortFields.js.map +1 -1
  52. package/lib/permissions/hooks.js +6 -4
  53. package/lib/permissions/hooks.js.map +1 -1
  54. package/lib/permissions/type.helpers.d.ts +1 -1
  55. package/lib/redux/hooks.d.ts +7 -0
  56. package/lib/redux/hooks.js +10 -1
  57. package/lib/redux/hooks.js.map +1 -1
  58. package/lib/screens/JsonFieldScreen.d.ts +1 -3
  59. package/lib/screens/JsonFieldScreen.js +12 -7
  60. package/lib/screens/JsonFieldScreen.js.map +1 -1
  61. package/package.json +8 -3
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/redux/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EACL,WAAW,IAAI,gBAAgB,EAC/B,WAAW,IAAI,gBAAgB,GAChC,MAAM,aAAa,CAAC;AAErB,MAAM,UAAU,WAAW;IACzB,OAAO,gBAAgB,EAAE,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,QAA6B;IACvD,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC"}
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/redux/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EACL,WAAW,IAAI,gBAAgB,EAC/B,WAAW,IAAI,gBAAgB,EAC/B,QAAQ,IAAI,aAAa,GAC1B,MAAM,aAAa,CAAC;AAErB,MAAM,UAAU,WAAW;IACzB,OAAO,gBAAgB,EAAE,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,QAA6B;IACvD,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,aAAa,EAAE,CAAC,QAAQ,EAAE,CAAC;AACpC,CAAC"}
@@ -1,5 +1,3 @@
1
1
  import React from 'react';
2
- declare const JsonFieldScreen: ({ route }: {
3
- route: any;
4
- }) => React.JSX.Element;
2
+ declare const JsonFieldScreen: ({ route }: any) => React.JSX.Element;
5
3
  export default JsonFieldScreen;
@@ -15,14 +15,19 @@
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 React, { useEffect, useState } from 'react';
19
- import { CustomFieldForm } from '../components';
18
+ import React, { useCallback, useEffect, useState } from 'react';
20
19
  import { headerActionsProvider } from '../header';
20
+ import { CustomFieldForm } from '../components';
21
+ import { clearModelMetaCaches } from '../forms';
21
22
  import { useTranslator } from '../i18n';
22
23
  const JsonFieldScreen = ({ route }) => {
23
- const { model, modelId } = route.params;
24
+ const { model, modelId } = route?.params ?? {};
24
25
  const I18n = useTranslator();
25
26
  const [refreshKey, setRefreshKey] = useState(0);
27
+ const refreshConfig = useCallback(() => {
28
+ clearModelMetaCaches(model);
29
+ setRefreshKey(_current => _current + 1);
30
+ }, [model]);
26
31
  useEffect(() => {
27
32
  headerActionsProvider.registerModel('core_metaJsonFields_details', {
28
33
  actions: [
@@ -32,19 +37,19 @@ const JsonFieldScreen = ({ route }) => {
32
37
  showInHeader: false,
33
38
  iconName: 'arrow-repeat',
34
39
  title: I18n.t('Base_Studio_RefreshConfig'),
35
- onPress: () => setRefreshKey(_current => _current + 1),
40
+ onPress: refreshConfig,
36
41
  },
37
42
  ],
38
43
  });
39
- }, [I18n]);
40
- return (<CustomFieldForm model={model} modelId={modelId} readonlyButton={true} additionalActions={[
44
+ }, [I18n, refreshConfig]);
45
+ return (<CustomFieldForm key={refreshKey} model={model} modelId={modelId} readonlyButton additionalActions={[
41
46
  {
42
47
  key: 'validateChanges',
43
48
  type: 'update',
44
49
  useDefaultAction: true,
45
50
  readonlyAfterAction: true,
46
51
  },
47
- ]} key={refreshKey}/>);
52
+ ]}/>);
48
53
  };
49
54
  export default JsonFieldScreen;
50
55
  //# sourceMappingURL=JsonFieldScreen.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"JsonFieldScreen.js","sourceRoot":"","sources":["../../src/screens/JsonFieldScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACjD,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAC,qBAAqB,EAAC,MAAM,WAAW,CAAC;AAChD,OAAO,EAAC,aAAa,EAAC,MAAM,SAAS,CAAC;AAEtC,MAAM,eAAe,GAAG,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE;IAClC,MAAM,EAAC,KAAK,EAAE,OAAO,EAAC,GAAG,KAAK,CAAC,MAAM,CAAC;IACtC,MAAM,IAAI,GAAG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IAAI;aAC1B;SACF,CAAC,EACF,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "@axelor/aos-mobile-core",
3
- "version": "8.5.21",
3
+ "version": "8.5.22",
4
4
  "author": "Axelor",
5
5
  "license": "AGPL-3.0-only",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/axelor/axelor-mobile.git",
9
+ "directory": "packages/core"
10
+ },
6
11
  "publishConfig": {
7
12
  "access": "public"
8
13
  },
@@ -24,8 +29,8 @@
24
29
  "license:add": "npx add-copyright-header --generate --dir 'src'"
25
30
  },
26
31
  "dependencies": {
27
- "@axelor/aos-mobile-error": "8.5.21",
28
- "@axelor/aos-mobile-ui": "8.5.21",
32
+ "@axelor/aos-mobile-error": "8.5.22",
33
+ "@axelor/aos-mobile-ui": "8.5.22",
29
34
  "@react-navigation/drawer": "7.5.9",
30
35
  "@react-navigation/native": "7.1.18",
31
36
  "@react-navigation/native-stack": "7.3.27",