@axelor/aos-mobile-core 9.0.16 → 9.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/organisms/DateInput/DateInput.js +2 -1
- package/lib/components/organisms/DateInput/DateInput.js.map +1 -1
- package/lib/components/pages/CustomFieldForm/CustomFieldForm.d.ts +1 -1
- package/lib/components/pages/CustomFieldForm/CustomFieldForm.js +47 -35
- package/lib/components/pages/CustomFieldForm/CustomFieldForm.js.map +1 -1
- package/lib/components/pages/FormView/Components/Field.d.ts +15 -6
- package/lib/components/pages/FormView/Components/Field.js +36 -20
- package/lib/components/pages/FormView/Components/Field.js.map +1 -1
- package/lib/components/pages/FormView/Components/Panel.d.ts +3 -2
- package/lib/components/pages/FormView/Components/Panel.js +20 -18
- package/lib/components/pages/FormView/Components/Panel.js.map +1 -1
- package/lib/components/pages/FormView/Custom/CustomButton.d.ts +1 -1
- package/lib/components/pages/FormView/Custom/CustomPicker.d.ts +11 -8
- package/lib/components/pages/FormView/Custom/CustomPicker.js +9 -5
- package/lib/components/pages/FormView/Custom/CustomPicker.js.map +1 -1
- package/lib/components/pages/FormView/Custom/CustomSearchBar.d.ts +1 -7
- package/lib/components/pages/FormView/Custom/CustomSearchBar.js +4 -2
- package/lib/components/pages/FormView/Custom/CustomSearchBar.js.map +1 -1
- package/lib/components/pages/FormView/FormView.js +49 -43
- package/lib/components/pages/FormView/FormView.js.map +1 -1
- package/lib/features/authSlice.js +2 -0
- package/lib/features/authSlice.js.map +1 -1
- package/lib/features/metaJsonFieldSlice.d.ts +6 -6
- package/lib/features/metaJsonFieldSlice.js +6 -2
- package/lib/features/metaJsonFieldSlice.js.map +1 -1
- package/lib/forms/display.helpers.d.ts +8 -4
- package/lib/forms/display.helpers.js +75 -32
- package/lib/forms/display.helpers.js.map +1 -1
- package/lib/forms/studio/api.helpers.d.ts +14 -2
- package/lib/forms/studio/api.helpers.js +151 -93
- package/lib/forms/studio/api.helpers.js.map +1 -1
- package/lib/forms/studio/display.helpers.d.ts +1 -1
- package/lib/forms/studio/display.helpers.js +52 -29
- package/lib/forms/studio/display.helpers.js.map +1 -1
- package/lib/forms/studio/formula.helpers.d.ts +6 -2
- package/lib/forms/studio/formula.helpers.js +106 -19
- package/lib/forms/studio/formula.helpers.js.map +1 -1
- package/lib/forms/studio/permission.helpers.d.ts +1 -0
- package/lib/forms/studio/permission.helpers.js +23 -26
- package/lib/forms/studio/permission.helpers.js.map +1 -1
- package/lib/forms/types.d.ts +3 -1
- package/lib/forms/validation.helpers.d.ts +1 -1
- package/lib/forms/validation.helpers.js +19 -16
- package/lib/forms/validation.helpers.js.map +1 -1
- package/lib/i18n/hooks/use-translator.d.ts +2 -1
- package/lib/i18n/hooks/use-translator.js +1 -1
- package/lib/i18n/hooks/use-translator.js.map +1 -1
- package/lib/models/objectFields.js +38 -0
- package/lib/models/objectFields.js.map +1 -1
- package/lib/models/sortFields.js +2 -0
- package/lib/models/sortFields.js.map +1 -1
- package/lib/permissions/hooks.js +6 -4
- package/lib/permissions/hooks.js.map +1 -1
- package/lib/permissions/type.helpers.d.ts +1 -1
- package/lib/redux/hooks.d.ts +7 -0
- package/lib/redux/hooks.js +10 -1
- package/lib/redux/hooks.js.map +1 -1
- package/lib/screens/JsonFieldScreen.d.ts +1 -3
- package/lib/screens/JsonFieldScreen.js +12 -7
- package/lib/screens/JsonFieldScreen.js.map +1 -1
- package/package.json +8 -3
package/lib/redux/hooks.js
CHANGED
|
@@ -15,11 +15,20 @@
|
|
|
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 { useSelector as useReduxSelector, useDispatch as useReduxDispatch, } from 'react-redux';
|
|
18
|
+
import { useSelector as useReduxSelector, useDispatch as useReduxDispatch, useStore as useReduxStore, } from 'react-redux';
|
|
19
19
|
export function useDispatch() {
|
|
20
20
|
return useReduxDispatch();
|
|
21
21
|
}
|
|
22
22
|
export function useSelector(selector) {
|
|
23
23
|
return useReduxSelector(selector);
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Gives the whole store state without subscribing to it: the value is the one of
|
|
27
|
+
* the current render and no store update triggers a new one. Use it when the
|
|
28
|
+
* component already re-renders on its own for every case which matters, and
|
|
29
|
+
* `useSelector` when a change of the state has to be followed.
|
|
30
|
+
*/
|
|
31
|
+
export function useStoreState() {
|
|
32
|
+
return useReduxStore().getState();
|
|
33
|
+
}
|
|
25
34
|
//# sourceMappingURL=hooks.js.map
|
package/lib/redux/hooks.js.map
CHANGED
|
@@ -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,
|
|
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"}
|
|
@@ -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
|
|
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:
|
|
40
|
+
onPress: refreshConfig,
|
|
36
41
|
},
|
|
37
42
|
],
|
|
38
43
|
});
|
|
39
|
-
}, [I18n]);
|
|
40
|
-
return (<CustomFieldForm model={model} modelId={modelId} readonlyButton
|
|
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
|
-
]}
|
|
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;
|
|
1
|
+
{"version":3,"file":"JsonFieldScreen.js","sourceRoot":"","sources":["../../src/screens/JsonFieldScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAC,qBAAqB,EAAC,MAAM,WAAW,CAAC;AAChD,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAC,oBAAoB,EAAC,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAC,aAAa,EAAC,MAAM,SAAS,CAAC;AAEtC,MAAM,eAAe,GAAG,CAAC,EAAC,KAAK,EAAM,EAAE,EAAE;IACvC,MAAM,EAAC,KAAK,EAAE,OAAO,EAAC,GAAG,KAAK,EAAE,MAAM,IAAI,EAAE,CAAC;IAC7C,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEhD,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,EAAE;QACrC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QAC5B,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;IAC1C,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,SAAS,CAAC,GAAG,EAAE;QACb,qBAAqB,CAAC,aAAa,CAAC,6BAA6B,EAAE;YACjE,OAAO,EAAE;gBACP;oBACE,GAAG,EAAE,eAAe;oBACpB,KAAK,EAAE,EAAE;oBACT,YAAY,EAAE,KAAK;oBACnB,QAAQ,EAAE,cAAc;oBACxB,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,2BAA2B,CAAC;oBAC1C,OAAO,EAAE,aAAa;iBACvB;aACF;SACF,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;IAE1B,OAAO,CACL,CAAC,eAAe,CACd,GAAG,CAAC,CAAC,UAAU,CAAC,CAChB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,cAAc,CACd,iBAAiB,CAAC,CAAC;YACjB;gBACE,GAAG,EAAE,iBAAiB;gBACtB,IAAI,EAAE,QAAQ;gBACd,gBAAgB,EAAE,IAAI;gBACtB,mBAAmB,EAAE,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": "9.0.
|
|
3
|
+
"version": "9.0.17",
|
|
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": "9.0.
|
|
28
|
-
"@axelor/aos-mobile-ui": "9.0.
|
|
32
|
+
"@axelor/aos-mobile-error": "9.0.17",
|
|
33
|
+
"@axelor/aos-mobile-ui": "9.0.17",
|
|
29
34
|
"@react-navigation/drawer": "7.7.13",
|
|
30
35
|
"@react-navigation/native": "7.1.28",
|
|
31
36
|
"@react-navigation/native-stack": "7.10.1",
|