@axelor/aos-mobile-ui 7.0.2 → 7.1.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/lib/components/atoms/Icon/Icon.js +4 -6
- package/lib/components/atoms/Icon/Icon.js.map +1 -1
- package/lib/components/atoms/Input/Input.d.ts +5 -2
- package/lib/components/atoms/Input/Input.js +5 -4
- package/lib/components/atoms/Input/Input.js.map +1 -1
- package/lib/components/molecules/FormHtmlInput/FormHtmlInput.js +5 -2
- package/lib/components/molecules/FormHtmlInput/FormHtmlInput.js.map +1 -1
- package/lib/components/molecules/FormIncrementInput/FormIncrementInput.d.ts +8 -3
- package/lib/components/molecules/FormIncrementInput/FormIncrementInput.js +2 -2
- package/lib/components/molecules/FormIncrementInput/FormIncrementInput.js.map +1 -1
- package/lib/components/molecules/FormInput/FormInput.d.ts +6 -1
- package/lib/components/molecules/FormInput/FormInput.js +18 -3
- package/lib/components/molecules/FormInput/FormInput.js.map +1 -1
- package/lib/components/molecules/IconInput/IconInput.d.ts +4 -2
- package/lib/components/molecules/IconInput/IconInput.js +2 -2
- package/lib/components/molecules/IconInput/IconInput.js.map +1 -1
- package/lib/components/molecules/Increment/Increment.d.ts +6 -1
- package/lib/components/molecules/Increment/Increment.js +49 -51
- package/lib/components/molecules/Increment/Increment.js.map +1 -1
- package/lib/components/molecules/Increment/IncrementButton.d.ts +10 -0
- package/lib/components/molecules/Increment/IncrementButton.js +56 -0
- package/lib/components/molecules/Increment/IncrementButton.js.map +1 -0
- package/lib/components/molecules/NotesCard/NotesCard.js +4 -4
- package/lib/components/molecules/NotesCard/NotesCard.js.map +1 -1
- package/lib/components/organisms/AutoCompleteSearch/AutoCompleteSearch.js +22 -4
- package/lib/components/organisms/AutoCompleteSearch/AutoCompleteSearch.js.map +1 -1
- package/lib/components/organisms/AutoCompleteSearch/SearchDetailsPopUp.js +6 -11
- package/lib/components/organisms/AutoCompleteSearch/SearchDetailsPopUp.js.map +1 -1
- package/lib/components/organisms/HeaderContainer/HeaderContainer.d.ts +2 -1
- package/lib/components/organisms/HeaderContainer/HeaderContainer.js +4 -4
- package/lib/components/organisms/HeaderContainer/HeaderContainer.js.map +1 -1
- package/lib/components/organisms/MultiValuePicker/MultiValuePicker.js +16 -3
- package/lib/components/organisms/MultiValuePicker/MultiValuePicker.js.map +1 -1
- package/lib/components/organisms/SearchBar/SearchBar.d.ts +4 -1
- package/lib/components/organisms/SearchBar/SearchBar.js +2 -2
- package/lib/components/organisms/SearchBar/SearchBar.js.map +1 -1
- package/lib/components/templates/ObjectCard/ObjectCard.d.ts +8 -2
- package/lib/components/templates/ObjectCard/ObjectCard.js +20 -2
- package/lib/components/templates/ObjectCard/ObjectCard.js.map +1 -1
- package/lib/config/ConfigContext.d.ts +2 -0
- package/lib/config/ConfigContext.js +18 -0
- package/lib/config/ConfigContext.js.map +1 -1
- package/lib/hooks/use-digit-format.d.ts +1 -0
- package/lib/hooks/use-digit-format.js +33 -0
- package/lib/hooks/use-digit-format.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/utils/formatters.d.ts +1 -1
- package/lib/utils/formatters.js +14 -4
- package/lib/utils/formatters.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-digit-format.js","sourceRoot":"","sources":["../../src/hooks/use-digit-format.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,WAAW,EAAC,MAAM,OAAO,CAAC;AAClC,OAAO,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAC,eAAe,EAAC,MAAM,UAAU,CAAC;AAEzC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,MAAM,EAAC,oBAAoB,EAAC,GAAG,SAAS,EAAE,CAAC;IAE3C,OAAO,WAAW,CAChB,CAAC,cAA+B,EAAE,EAAE;QAClC,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;YACtC,cAAc,GAAG,cAAc,CAAC,QAAQ,EAAE,CAAC;SAC5C;QAED,IAAI,eAAe,CAAC,cAAc,CAAC,EAAE;YACnC,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;SACtD;QAED,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAClE,CAAC,EACD,CAAC,oBAAoB,CAAC,CACvB,CAAC;AACJ,CAAC,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -5,3 +5,4 @@ export { default as File } from './types/file';
|
|
|
5
5
|
export { ConfigProvider, useConfig } from './config/ConfigContext';
|
|
6
6
|
export { OutsideAlerterProvider, useClickOutside, OUTSIDE_INDICATOR, } from './hooks/use-click-outside';
|
|
7
7
|
export { animationUtil } from './tools/AnimationUtil';
|
|
8
|
+
export { useDigitFormat } from './hooks/use-digit-format';
|
package/lib/index.js
CHANGED
|
@@ -22,4 +22,5 @@ export { default as File } from './types/file';
|
|
|
22
22
|
export { ConfigProvider, useConfig } from './config/ConfigContext';
|
|
23
23
|
export { OutsideAlerterProvider, useClickOutside, OUTSIDE_INDICATOR, } from './hooks/use-click-outside';
|
|
24
24
|
export { animationUtil } from './tools/AnimationUtil';
|
|
25
|
+
export { useDigitFormat } from './hooks/use-digit-format';
|
|
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,cAAc,SAAS,CAAC;AACxB,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"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,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,cAAc,EAAC,MAAM,0BAA0B,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare function formatDate(inputDate: string, format: string): string;
|
|
2
|
-
export declare function formatNumber(number: string, decimalSpacer?: string, thousandSpacer?: string): string;
|
|
2
|
+
export declare function formatNumber(number: string | number, decimalSpacer?: string, thousandSpacer?: string, cutDecimalExcess?: (value: number | string) => string): string;
|
|
3
3
|
export declare function unformatNumber(number: string, decimalSpacer?: string, thousandSpacer?: string): string;
|
package/lib/utils/formatters.js
CHANGED
|
@@ -27,11 +27,21 @@ export function formatDate(inputDate, format) {
|
|
|
27
27
|
format = format.replace('DD', day.toString().padStart(2, '0'));
|
|
28
28
|
return format;
|
|
29
29
|
}
|
|
30
|
-
export function formatNumber(number, decimalSpacer = '.', thousandSpacer = ' '
|
|
30
|
+
export function formatNumber(number, decimalSpacer = '.', thousandSpacer = ' ', cutDecimalExcess = value => {
|
|
31
|
+
if (typeof value === 'number') {
|
|
32
|
+
return parseFloat(value.toString()).toFixed(2);
|
|
33
|
+
}
|
|
34
|
+
return parseFloat(value).toFixed(2);
|
|
35
|
+
}) {
|
|
36
|
+
if (typeof number === 'number') {
|
|
37
|
+
number = number.toString();
|
|
38
|
+
}
|
|
31
39
|
if (checkNullString(number)) {
|
|
32
|
-
|
|
40
|
+
number = cutDecimalExcess(0);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
number = cutDecimalExcess(number);
|
|
33
44
|
}
|
|
34
|
-
number = parseFloat(number).toFixed(2);
|
|
35
45
|
const decimalPart = splitInTwo(number)[1];
|
|
36
46
|
const integerPart = splitInTwo(number)[0];
|
|
37
47
|
let result = '';
|
|
@@ -47,7 +57,7 @@ export function formatNumber(number, decimalSpacer = '.', thousandSpacer = ' ')
|
|
|
47
57
|
}
|
|
48
58
|
export function unformatNumber(number, decimalSpacer = '.', thousandSpacer = ' ') {
|
|
49
59
|
if (checkNullString(number)) {
|
|
50
|
-
return
|
|
60
|
+
return '0';
|
|
51
61
|
}
|
|
52
62
|
const JS_THOUSAND_SPACER = '';
|
|
53
63
|
const JS_DECIMAL_SPACER = '.';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../src/utils/formatters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,eAAe,EAAE,UAAU,EAAC,MAAM,WAAW,CAAC;AAEtD,MAAM,UAAU,UAAU,CAAC,SAAiB,EAAE,MAAc;IAC1D,4FAA4F;IAC5F,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;IAEjC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAC3B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAClC,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAEhC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,E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