@axelor/aos-mobile-ui 6.4.1 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/lib/components/atoms/HtmlInput/HtmlInput.d.ts +6 -1
- package/lib/components/atoms/HtmlInput/HtmlInput.js +30 -20
- package/lib/components/atoms/HtmlInput/HtmlInput.js.map +1 -1
- package/lib/components/atoms/Input/Input.d.ts +1 -1
- package/lib/components/atoms/index.d.ts +0 -1
- package/lib/components/atoms/index.js +0 -1
- package/lib/components/atoms/index.js.map +1 -1
- package/lib/components/molecules/Badge/Badge.d.ts +2 -2
- package/lib/components/molecules/Badge/Badge.js +6 -4
- package/lib/components/molecules/Badge/Badge.js.map +1 -1
- package/lib/components/molecules/Checkbox/Checkbox.d.ts +11 -0
- package/lib/components/molecules/Checkbox/Checkbox.js +52 -0
- package/lib/components/molecules/Checkbox/Checkbox.js.map +1 -0
- package/lib/components/molecules/Chip/Chip.d.ts +3 -2
- package/lib/components/molecules/Chip/Chip.js +4 -3
- package/lib/components/molecules/Chip/Chip.js.map +1 -1
- package/lib/components/molecules/CircleButton/CircleButton.d.ts +8 -0
- package/lib/components/molecules/CircleButton/CircleButton.js +47 -0
- package/lib/components/molecules/CircleButton/CircleButton.js.map +1 -0
- package/lib/components/molecules/FormHtmlInput/FormHtmlInput.d.ts +11 -0
- package/lib/components/molecules/FormHtmlInput/FormHtmlInput.js +60 -0
- package/lib/components/molecules/FormHtmlInput/FormHtmlInput.js.map +1 -0
- package/lib/components/molecules/FormIncrementInput/FormIncrementInput.d.ts +11 -0
- package/lib/components/molecules/FormIncrementInput/FormIncrementInput.js +64 -0
- package/lib/components/molecules/FormIncrementInput/FormIncrementInput.js.map +1 -0
- package/lib/components/molecules/FormInput/FormInput.d.ts +11 -0
- package/lib/components/molecules/FormInput/FormInput.js +59 -0
- package/lib/components/molecules/FormInput/FormInput.js.map +1 -0
- package/lib/components/molecules/Increment/Increment.d.ts +3 -1
- package/lib/components/molecules/Increment/Increment.js +3 -3
- package/lib/components/molecules/Increment/Increment.js.map +1 -1
- package/lib/components/molecules/InfoBubble/InfoBubble.js +6 -5
- package/lib/components/molecules/InfoBubble/InfoBubble.js.map +1 -1
- package/lib/components/molecules/MessageBox/MessageBox.js +20 -11
- package/lib/components/molecules/MessageBox/MessageBox.js.map +1 -1
- package/lib/components/molecules/NotesCard/NotesCard.d.ts +2 -1
- package/lib/components/molecules/NotesCard/NotesCard.js +13 -15
- package/lib/components/molecules/NotesCard/NotesCard.js.map +1 -1
- package/lib/components/molecules/PanelTabs/PanelTabs.d.ts +13 -0
- package/lib/components/molecules/PanelTabs/PanelTabs.js +93 -0
- package/lib/components/molecules/PanelTabs/PanelTabs.js.map +1 -0
- package/lib/components/molecules/SelectionContainer/SelectionContainer.js +1 -1
- package/lib/components/molecules/SelectionContainer/SelectionContainer.js.map +1 -1
- package/lib/components/molecules/StarScore/StarScore.d.ts +3 -1
- package/lib/components/molecules/StarScore/StarScore.js +16 -5
- package/lib/components/molecules/StarScore/StarScore.js.map +1 -1
- package/lib/components/molecules/ToggleSwitch/ToggleSwitch.d.ts +3 -2
- package/lib/components/molecules/ToggleSwitch/ToggleSwitch.js +4 -4
- package/lib/components/molecules/ToggleSwitch/ToggleSwitch.js.map +1 -1
- package/lib/components/molecules/ViewAllContainer/ViewAllContainer.d.ts +4 -4
- package/lib/components/molecules/index.d.ts +6 -0
- package/lib/components/molecules/index.js +6 -0
- package/lib/components/molecules/index.js.map +1 -1
- package/lib/components/organisms/ChipSelect/ChipSelect.d.ts +14 -3
- package/lib/components/organisms/ChipSelect/ChipSelect.js +39 -6
- package/lib/components/organisms/ChipSelect/ChipSelect.js.map +1 -1
- package/lib/components/organisms/DropdownCardSwitch/DropdownCardSwitch.d.ts +2 -1
- package/lib/components/organisms/DropdownCardSwitch/DropdownCardSwitch.js +11 -2
- package/lib/components/organisms/DropdownCardSwitch/DropdownCardSwitch.js.map +1 -1
- package/lib/components/organisms/FloatingButton/FloatingButton.d.ts +16 -0
- package/lib/components/organisms/FloatingButton/FloatingButton.js +106 -0
- package/lib/components/organisms/FloatingButton/FloatingButton.js.map +1 -0
- package/lib/components/organisms/ImageBubble/ImageBubble.d.ts +1 -1
- package/lib/components/organisms/ImageBubble/ImageBubble.js +6 -5
- package/lib/components/organisms/ImageBubble/ImageBubble.js.map +1 -1
- package/lib/components/organisms/MultiSelectValue/MultiSelectValue.d.ts +9 -0
- package/lib/components/organisms/MultiSelectValue/MultiSelectValue.js +49 -0
- package/lib/components/organisms/MultiSelectValue/MultiSelectValue.js.map +1 -0
- package/lib/components/organisms/MultiValuePicker/MultiValuePicker.d.ts +2 -1
- package/lib/components/organisms/MultiValuePicker/MultiValuePicker.js +7 -4
- package/lib/components/organisms/MultiValuePicker/MultiValuePicker.js.map +1 -1
- package/lib/components/organisms/Picker/Picker.d.ts +3 -1
- package/lib/components/organisms/Picker/Picker.js +21 -5
- package/lib/components/organisms/Picker/Picker.js.map +1 -1
- package/lib/components/organisms/index.d.ts +2 -0
- package/lib/components/organisms/index.js +2 -0
- package/lib/components/organisms/index.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/strings.d.ts +1 -0
- package/lib/utils/strings.js +8 -0
- package/lib/utils/strings.js.map +1 -1
- package/package.json +2 -4
- package/lib/components/atoms/RenderHtml/RenderHtml.d.ts +0 -6
- package/lib/components/atoms/RenderHtml/RenderHtml.js +0 -50
- package/lib/components/atoms/RenderHtml/RenderHtml.js.map +0 -1
package/lib/index.js
CHANGED
|
@@ -20,6 +20,7 @@ export * from './theme';
|
|
|
20
20
|
export { getCommonStyles } from './utils/commons-styles';
|
|
21
21
|
export { default as File } from './types/file';
|
|
22
22
|
export { ConfigProvider, useConfig } from './config/ConfigContext';
|
|
23
|
-
export { OutsideAlerterProvider, useClickOutside, } from './hooks/use-click-outside';
|
|
23
|
+
export { OutsideAlerterProvider, useClickOutside, OUTSIDE_INDICATOR, } from './hooks/use-click-outside';
|
|
24
24
|
export { animationUtil } from './tools/AnimationUtil';
|
|
25
|
+
export { formatNumber, unformatNumber } from './utils/formatters';
|
|
25
26
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAC,OAAO,IAAI,IAAI,EAAC,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAC,cAAc,EAAE,SAAS,EAAC,MAAM,wBAAwB,CAAC;AACjE,OAAO,EACL,sBAAsB,EACtB,eAAe,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAC,OAAO,IAAI,IAAI,EAAC,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAC,cAAc,EAAE,SAAS,EAAC,MAAM,wBAAwB,CAAC;AACjE,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAC,YAAY,EAAE,cAAc,EAAC,MAAM,oBAAoB,CAAC"}
|
package/lib/utils/strings.d.ts
CHANGED
package/lib/utils/strings.js
CHANGED
|
@@ -30,4 +30,12 @@ export function checkNullString(message) {
|
|
|
30
30
|
return newMessage == null || newMessage === '';
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
+
export function sliceString(string, maxStringLength) {
|
|
34
|
+
if (string.length > maxStringLength) {
|
|
35
|
+
return string.slice(0, maxStringLength - 3) + '...';
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
return string;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
33
41
|
//# sourceMappingURL=strings.js.map
|
package/lib/utils/strings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings.js","sourceRoot":"","sources":["../../src/utils/strings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,UAAU,UAAU,CAAC,KAAa,EAAE,MAAM,GAAG,GAAG;IACpD,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAO;IACrC,IAAI,OAAO,IAAI,IAAI,EAAE;QACnB,OAAO,IAAI,CAAC;KACb;SAAM;QACL,IAAI,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC5C,OAAO,UAAU,IAAI,IAAI,IAAI,UAAU,KAAK,EAAE,CAAC;KAChD;AACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"strings.js","sourceRoot":"","sources":["../../src/utils/strings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,UAAU,UAAU,CAAC,KAAa,EAAE,MAAM,GAAG,GAAG;IACpD,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAO;IACrC,IAAI,OAAO,IAAI,IAAI,EAAE;QACnB,OAAO,IAAI,CAAC;KACb;SAAM;QACL,IAAI,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC5C,OAAO,UAAU,IAAI,IAAI,IAAI,UAAU,KAAK,EAAE,CAAC;KAChD;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,MAAc,EAAE,eAAuB;IACjE,IAAI,MAAM,CAAC,MAAM,GAAG,eAAe,EAAE;QACnC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,eAAe,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;KACrD;SAAM;QACL,OAAO,MAAM,CAAC;KACf;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axelor/aos-mobile-ui",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.0",
|
|
4
4
|
"author": "Axelor",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"publishConfig": {
|
|
@@ -27,8 +27,7 @@
|
|
|
27
27
|
"react-native": "*",
|
|
28
28
|
"react-native-pell-rich-editor": "1.8.8",
|
|
29
29
|
"react-native-system-navigation-bar": "2.2.0",
|
|
30
|
-
"react-native-vector-icons": "^9.2.0"
|
|
31
|
-
"react-native-render-html": "^6.3.4"
|
|
30
|
+
"react-native-vector-icons": "^9.2.0"
|
|
32
31
|
},
|
|
33
32
|
"devDependencies": {
|
|
34
33
|
"@babel/runtime": "^7.19.0",
|
|
@@ -43,7 +42,6 @@
|
|
|
43
42
|
"react-native-webview": "11.26.0",
|
|
44
43
|
"react-native-system-navigation-bar": "2.2.0",
|
|
45
44
|
"react-native-pell-rich-editor": "1.8.8",
|
|
46
|
-
"react-native-render-html": "^6.3.4",
|
|
47
45
|
"react-native-vector-icons": "^9.2.0"
|
|
48
46
|
}
|
|
49
47
|
}
|
|
@@ -1,50 +0,0 @@
|
|
|
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 { useThemeColor } from '../../../theme/ThemeContext';
|
|
20
|
-
import ReactNativeRenderHTML, { HTMLContentModel, HTMLElementModel, } from 'react-native-render-html';
|
|
21
|
-
const PERCENTAGE_WIDTH_NOTES = 0.95;
|
|
22
|
-
const RenderHtml = ({ data, widthNotes }) => {
|
|
23
|
-
const Colors = useThemeColor();
|
|
24
|
-
if (data == null || data === '') {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
const fontElementModel = HTMLElementModel.fromCustomModel({
|
|
28
|
-
tagName: 'font',
|
|
29
|
-
contentModel: HTMLContentModel.mixed,
|
|
30
|
-
getUADerivedStyleFromAttributes({ face, color, size }) {
|
|
31
|
-
let style = { fontFamily: '', color: '', fontSize: '' };
|
|
32
|
-
if (face) {
|
|
33
|
-
style.fontFamily = face;
|
|
34
|
-
}
|
|
35
|
-
if (color) {
|
|
36
|
-
style.color = color;
|
|
37
|
-
}
|
|
38
|
-
if (size) {
|
|
39
|
-
style.fontSize = size;
|
|
40
|
-
}
|
|
41
|
-
return style;
|
|
42
|
-
},
|
|
43
|
-
});
|
|
44
|
-
const customHTMLElementModels = { font: fontElementModel };
|
|
45
|
-
return (<ReactNativeRenderHTML source={{
|
|
46
|
-
html: data,
|
|
47
|
-
}} customHTMLElementModels={customHTMLElementModels} contentWidth={widthNotes != null ? widthNotes * PERCENTAGE_WIDTH_NOTES : 100} baseStyle={{ color: Colors.text }}/>);
|
|
48
|
-
};
|
|
49
|
-
export default RenderHtml;
|
|
50
|
-
//# sourceMappingURL=RenderHtml.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RenderHtml.js","sourceRoot":"","sources":["../../../../src/components/atoms/RenderHtml/RenderHtml.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,aAAa,EAAC,MAAM,6BAA6B,CAAC;AAC1D,OAAO,qBAAqB,EAAE,EAC5B,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAElC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAOpC,MAAM,UAAU,GAAG,CAAC,EAAC,IAAI,EAAE,UAAU,EAAkB,EAAE,EAAE;IACzD,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAE/B,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,EAAE,EAAE;QAC/B,OAAO,IAAI,CAAC;KACb;IAED,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,eAAe,CAAC;QACxD,OAAO,EAAE,MAAM;QACf,YAAY,EAAE,gBAAgB,CAAC,KAAK;QACpC,+BAA+B,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAC;YACjD,IAAI,KAAK,GAAG,EAAC,UAAU,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAC,CAAC;YACtD,IAAI,IAAI,EAAE;gBACR,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC;aACzB;YACD,IAAI,KAAK,EAAE;gBACT,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;aACrB;YACD,IAAI,IAAI,EAAE;gBACR,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;aACvB;YACD,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC,CAAC;IAEH,MAAM,uBAAuB,GAAG,EAAC,IAAI,EAAE,gBAAgB,EAAC,CAAC;IAEzD,OAAO,CACL,CAAC,qBAAqB,CACpB,MAAM,CAAC,CAAC;YACN,IAAI,EAAE,IAAI;SACX,CAAC,CACF,uBAAuB,CAAC,CAAC,uBAAuB,CAAC,CACjD,YAAY,CAAC,CACX,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,UAAU,GAAG,sBAAsB,CAAC,CAAC,CAAC,GAAG,CAC/D,CACD,SAAS,CAAC,CAAC,EAAC,KAAK,EAAE,MAAM,CAAC,IAAI,EAAC,CAAC,EAChC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|