@trackunit/custom-field-components 0.0.719 → 0.0.723
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/index.cjs.js +1 -1
- package/index.esm.js +2 -2
- package/package.json +1 -1
- package/translation.cjs.js +11 -11
- package/translation.cjs13.js +8 -8
- package/translation.cjs4.js +6 -6
- package/translation.cjs9.js +3 -3
- package/translation.esm.js +11 -11
- package/translation.esm13.js +8 -8
- package/translation.esm4.js +6 -6
- package/translation.esm9.js +3 -3
package/index.cjs.js
CHANGED
|
@@ -401,7 +401,7 @@ const useCustomFieldResolver = ({ field, definition, register, setValue, formSta
|
|
|
401
401
|
const unit = unitPreference === "US_CUSTOMARY" && field.definition.unitUs
|
|
402
402
|
? field.definition.unitUs
|
|
403
403
|
: field.definition.unitSi;
|
|
404
|
-
const value = irisAppRuntimeCore.
|
|
404
|
+
const value = irisAppRuntimeCore.getCustomFieldValueForDisplayInUI(fieldValue, unit, unitPreference, language);
|
|
405
405
|
return value;
|
|
406
406
|
}
|
|
407
407
|
else {
|
package/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { registerTranslations, useNamespaceTranslation } from '@trackunit/i18n-library-translation';
|
|
3
|
-
import {
|
|
3
|
+
import { getCustomFieldValueForDisplayInUI } from '@trackunit/iris-app-runtime-core';
|
|
4
4
|
import { FormGroup, Checkbox, DateField, Select, useGetPhoneValidationRules, NumberField, TextField, PhoneField, ActionButton } from '@trackunit/react-form-components';
|
|
5
5
|
import { exhaustiveCheck } from '@trackunit/shared-utils';
|
|
6
6
|
import * as React from 'react';
|
|
@@ -378,7 +378,7 @@ const useCustomFieldResolver = ({ field, definition, register, setValue, formSta
|
|
|
378
378
|
const unit = unitPreference === "US_CUSTOMARY" && field.definition.unitUs
|
|
379
379
|
? field.definition.unitUs
|
|
380
380
|
: field.definition.unitSi;
|
|
381
|
-
const value =
|
|
381
|
+
const value = getCustomFieldValueForDisplayInUI(fieldValue, unit, unitPreference, language);
|
|
382
382
|
return value;
|
|
383
383
|
}
|
|
384
384
|
else {
|
package/package.json
CHANGED
package/translation.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var translation = {
|
|
4
|
-
"customfield.unit.acre": "
|
|
4
|
+
"customfield.unit.acre": "Acre",
|
|
5
5
|
"customfield.unit.amperehour": "Ah",
|
|
6
6
|
"customfield.unit.bar": "bar",
|
|
7
7
|
"customfield.unit.centimetre": "cm",
|
|
@@ -11,17 +11,17 @@ var translation = {
|
|
|
11
11
|
"customfield.unit.gallon_liquid": "gal",
|
|
12
12
|
"customfield.unit.gram": "g",
|
|
13
13
|
"customfield.unit.hectare": "ha",
|
|
14
|
-
"customfield.unit.hour": "
|
|
15
|
-
"customfield.unit.inch": "
|
|
14
|
+
"customfield.unit.hour": "Std.",
|
|
15
|
+
"customfield.unit.inch": "Zoll",
|
|
16
16
|
"customfield.unit.kilogram": "kg",
|
|
17
|
-
"customfield.unit.kilogram_per_hour": "kg/
|
|
18
|
-
"customfield.unit.kilogram_per_second": "kg/
|
|
17
|
+
"customfield.unit.kilogram_per_hour": "kg/Std.",
|
|
18
|
+
"customfield.unit.kilogram_per_second": "kg/Sek.",
|
|
19
19
|
"customfield.unit.kilometre": "km",
|
|
20
20
|
"customfield.unit.kilometre_per_hour": "km/h",
|
|
21
21
|
"customfield.unit.kilopascal": "kPa",
|
|
22
22
|
"customfield.unit.kilowatt": "kW",
|
|
23
23
|
"customfield.unit.kilowatthour": "kWh",
|
|
24
|
-
"customfield.unit.litre": "
|
|
24
|
+
"customfield.unit.litre": "l",
|
|
25
25
|
"customfield.unit.metre": "m",
|
|
26
26
|
"customfield.unit.metre_per_second": "m/s",
|
|
27
27
|
"customfield.unit.metre_per_second_squared": "m/s²",
|
|
@@ -31,18 +31,18 @@ var translation = {
|
|
|
31
31
|
"customfield.unit.newton": "N",
|
|
32
32
|
"customfield.unit.ounce": "oz",
|
|
33
33
|
"customfield.unit.pascal": "Pa",
|
|
34
|
-
"customfield.unit.pound": "
|
|
35
|
-
"customfield.unit.pound_per_hour": "lb/
|
|
34
|
+
"customfield.unit.pound": "Pfund",
|
|
35
|
+
"customfield.unit.pound_per_hour": "lb/h",
|
|
36
36
|
"customfield.unit.pound_per_second": "lb/s",
|
|
37
37
|
"customfield.unit.pound_per_square_inch": "psi",
|
|
38
38
|
"customfield.unit.square_foot": "ft²",
|
|
39
39
|
"customfield.unit.square_kilometre": "km²",
|
|
40
40
|
"customfield.unit.square_metre": "m²",
|
|
41
|
-
"customfield.unit.ton": "
|
|
42
|
-
"customfield.unit.ton_us": "
|
|
41
|
+
"customfield.unit.ton": "Tonne",
|
|
42
|
+
"customfield.unit.ton_us": "Tonne (US)",
|
|
43
43
|
"customfield.unit.volt": "V",
|
|
44
44
|
"customfield.unit.watt": "W",
|
|
45
|
-
"customfield.unit.yard": "
|
|
45
|
+
"customfield.unit.yard": "Yard"
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
exports["default"] = translation;
|
package/translation.cjs13.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var translation = {
|
|
4
|
-
"customfield.unit.acre": "
|
|
4
|
+
"customfield.unit.acre": "acru",
|
|
5
5
|
"customfield.unit.amperehour": "Ah",
|
|
6
6
|
"customfield.unit.bar": "bar",
|
|
7
7
|
"customfield.unit.centimetre": "cm",
|
|
@@ -11,17 +11,17 @@ var translation = {
|
|
|
11
11
|
"customfield.unit.gallon_liquid": "gal",
|
|
12
12
|
"customfield.unit.gram": "g",
|
|
13
13
|
"customfield.unit.hectare": "ha",
|
|
14
|
-
"customfield.unit.hour": "
|
|
14
|
+
"customfield.unit.hour": "oră",
|
|
15
15
|
"customfield.unit.inch": "in",
|
|
16
16
|
"customfield.unit.kilogram": "kg",
|
|
17
|
-
"customfield.unit.kilogram_per_hour": "kg/
|
|
17
|
+
"customfield.unit.kilogram_per_hour": "kg/oră",
|
|
18
18
|
"customfield.unit.kilogram_per_second": "kg/s",
|
|
19
19
|
"customfield.unit.kilometre": "km",
|
|
20
20
|
"customfield.unit.kilometre_per_hour": "km/h",
|
|
21
21
|
"customfield.unit.kilopascal": "kPa",
|
|
22
22
|
"customfield.unit.kilowatt": "kW",
|
|
23
23
|
"customfield.unit.kilowatthour": "kWh",
|
|
24
|
-
"customfield.unit.litre": "
|
|
24
|
+
"customfield.unit.litre": "l",
|
|
25
25
|
"customfield.unit.metre": "m",
|
|
26
26
|
"customfield.unit.metre_per_second": "m/s",
|
|
27
27
|
"customfield.unit.metre_per_second_squared": "m/s²",
|
|
@@ -32,17 +32,17 @@ var translation = {
|
|
|
32
32
|
"customfield.unit.ounce": "oz",
|
|
33
33
|
"customfield.unit.pascal": "Pa",
|
|
34
34
|
"customfield.unit.pound": "lb",
|
|
35
|
-
"customfield.unit.pound_per_hour": "lb/
|
|
35
|
+
"customfield.unit.pound_per_hour": "lb/oră",
|
|
36
36
|
"customfield.unit.pound_per_second": "lb/s",
|
|
37
37
|
"customfield.unit.pound_per_square_inch": "psi",
|
|
38
38
|
"customfield.unit.square_foot": "ft²",
|
|
39
39
|
"customfield.unit.square_kilometre": "km²",
|
|
40
40
|
"customfield.unit.square_metre": "m²",
|
|
41
|
-
"customfield.unit.ton": "
|
|
42
|
-
"customfield.unit.ton_us": "
|
|
41
|
+
"customfield.unit.ton": "tonă",
|
|
42
|
+
"customfield.unit.ton_us": "tonă (SUA)",
|
|
43
43
|
"customfield.unit.volt": "V",
|
|
44
44
|
"customfield.unit.watt": "W",
|
|
45
|
-
"customfield.unit.yard": "
|
|
45
|
+
"customfield.unit.yard": "yard"
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
exports["default"] = translation;
|
package/translation.cjs4.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var translation = {
|
|
4
|
-
"customfield.unit.acre": "
|
|
4
|
+
"customfield.unit.acre": "are",
|
|
5
5
|
"customfield.unit.amperehour": "Ah",
|
|
6
6
|
"customfield.unit.bar": "bar",
|
|
7
7
|
"customfield.unit.centimetre": "cm",
|
|
@@ -11,13 +11,13 @@ var translation = {
|
|
|
11
11
|
"customfield.unit.gallon_liquid": "gal",
|
|
12
12
|
"customfield.unit.gram": "g",
|
|
13
13
|
"customfield.unit.hectare": "ha",
|
|
14
|
-
"customfield.unit.hour": "
|
|
15
|
-
"customfield.unit.inch": "
|
|
14
|
+
"customfield.unit.hour": "uur",
|
|
15
|
+
"customfield.unit.inch": "inch",
|
|
16
16
|
"customfield.unit.kilogram": "kg",
|
|
17
|
-
"customfield.unit.kilogram_per_hour": "kg/
|
|
17
|
+
"customfield.unit.kilogram_per_hour": "kg/u",
|
|
18
18
|
"customfield.unit.kilogram_per_second": "kg/s",
|
|
19
19
|
"customfield.unit.kilometre": "km",
|
|
20
|
-
"customfield.unit.kilometre_per_hour": "km/
|
|
20
|
+
"customfield.unit.kilometre_per_hour": "km/u",
|
|
21
21
|
"customfield.unit.kilopascal": "kPa",
|
|
22
22
|
"customfield.unit.kilowatt": "kW",
|
|
23
23
|
"customfield.unit.kilowatthour": "kWh",
|
|
@@ -32,7 +32,7 @@ var translation = {
|
|
|
32
32
|
"customfield.unit.ounce": "oz",
|
|
33
33
|
"customfield.unit.pascal": "Pa",
|
|
34
34
|
"customfield.unit.pound": "lb",
|
|
35
|
-
"customfield.unit.pound_per_hour": "lb/
|
|
35
|
+
"customfield.unit.pound_per_hour": "lb/u",
|
|
36
36
|
"customfield.unit.pound_per_second": "lb/s",
|
|
37
37
|
"customfield.unit.pound_per_square_inch": "psi",
|
|
38
38
|
"customfield.unit.square_foot": "ft²",
|
package/translation.cjs9.js
CHANGED
|
@@ -32,14 +32,14 @@ var translation = {
|
|
|
32
32
|
"customfield.unit.ounce": "oz",
|
|
33
33
|
"customfield.unit.pascal": "Pa",
|
|
34
34
|
"customfield.unit.pound": "lb",
|
|
35
|
-
"customfield.unit.pound_per_hour": "lb/
|
|
35
|
+
"customfield.unit.pound_per_hour": "lb/h",
|
|
36
36
|
"customfield.unit.pound_per_second": "lb/s",
|
|
37
37
|
"customfield.unit.pound_per_square_inch": "psi",
|
|
38
38
|
"customfield.unit.square_foot": "ft²",
|
|
39
39
|
"customfield.unit.square_kilometre": "km²",
|
|
40
40
|
"customfield.unit.square_metre": "m²",
|
|
41
|
-
"customfield.unit.ton": "
|
|
42
|
-
"customfield.unit.ton_us": "
|
|
41
|
+
"customfield.unit.ton": "tonn",
|
|
42
|
+
"customfield.unit.ton_us": "tonn (USA)",
|
|
43
43
|
"customfield.unit.volt": "V",
|
|
44
44
|
"customfield.unit.watt": "W",
|
|
45
45
|
"customfield.unit.yard": "yd"
|
package/translation.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var translation = {
|
|
2
|
-
"customfield.unit.acre": "
|
|
2
|
+
"customfield.unit.acre": "Acre",
|
|
3
3
|
"customfield.unit.amperehour": "Ah",
|
|
4
4
|
"customfield.unit.bar": "bar",
|
|
5
5
|
"customfield.unit.centimetre": "cm",
|
|
@@ -9,17 +9,17 @@ var translation = {
|
|
|
9
9
|
"customfield.unit.gallon_liquid": "gal",
|
|
10
10
|
"customfield.unit.gram": "g",
|
|
11
11
|
"customfield.unit.hectare": "ha",
|
|
12
|
-
"customfield.unit.hour": "
|
|
13
|
-
"customfield.unit.inch": "
|
|
12
|
+
"customfield.unit.hour": "Std.",
|
|
13
|
+
"customfield.unit.inch": "Zoll",
|
|
14
14
|
"customfield.unit.kilogram": "kg",
|
|
15
|
-
"customfield.unit.kilogram_per_hour": "kg/
|
|
16
|
-
"customfield.unit.kilogram_per_second": "kg/
|
|
15
|
+
"customfield.unit.kilogram_per_hour": "kg/Std.",
|
|
16
|
+
"customfield.unit.kilogram_per_second": "kg/Sek.",
|
|
17
17
|
"customfield.unit.kilometre": "km",
|
|
18
18
|
"customfield.unit.kilometre_per_hour": "km/h",
|
|
19
19
|
"customfield.unit.kilopascal": "kPa",
|
|
20
20
|
"customfield.unit.kilowatt": "kW",
|
|
21
21
|
"customfield.unit.kilowatthour": "kWh",
|
|
22
|
-
"customfield.unit.litre": "
|
|
22
|
+
"customfield.unit.litre": "l",
|
|
23
23
|
"customfield.unit.metre": "m",
|
|
24
24
|
"customfield.unit.metre_per_second": "m/s",
|
|
25
25
|
"customfield.unit.metre_per_second_squared": "m/s²",
|
|
@@ -29,18 +29,18 @@ var translation = {
|
|
|
29
29
|
"customfield.unit.newton": "N",
|
|
30
30
|
"customfield.unit.ounce": "oz",
|
|
31
31
|
"customfield.unit.pascal": "Pa",
|
|
32
|
-
"customfield.unit.pound": "
|
|
33
|
-
"customfield.unit.pound_per_hour": "lb/
|
|
32
|
+
"customfield.unit.pound": "Pfund",
|
|
33
|
+
"customfield.unit.pound_per_hour": "lb/h",
|
|
34
34
|
"customfield.unit.pound_per_second": "lb/s",
|
|
35
35
|
"customfield.unit.pound_per_square_inch": "psi",
|
|
36
36
|
"customfield.unit.square_foot": "ft²",
|
|
37
37
|
"customfield.unit.square_kilometre": "km²",
|
|
38
38
|
"customfield.unit.square_metre": "m²",
|
|
39
|
-
"customfield.unit.ton": "
|
|
40
|
-
"customfield.unit.ton_us": "
|
|
39
|
+
"customfield.unit.ton": "Tonne",
|
|
40
|
+
"customfield.unit.ton_us": "Tonne (US)",
|
|
41
41
|
"customfield.unit.volt": "V",
|
|
42
42
|
"customfield.unit.watt": "W",
|
|
43
|
-
"customfield.unit.yard": "
|
|
43
|
+
"customfield.unit.yard": "Yard"
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
export { translation as default };
|
package/translation.esm13.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var translation = {
|
|
2
|
-
"customfield.unit.acre": "
|
|
2
|
+
"customfield.unit.acre": "acru",
|
|
3
3
|
"customfield.unit.amperehour": "Ah",
|
|
4
4
|
"customfield.unit.bar": "bar",
|
|
5
5
|
"customfield.unit.centimetre": "cm",
|
|
@@ -9,17 +9,17 @@ var translation = {
|
|
|
9
9
|
"customfield.unit.gallon_liquid": "gal",
|
|
10
10
|
"customfield.unit.gram": "g",
|
|
11
11
|
"customfield.unit.hectare": "ha",
|
|
12
|
-
"customfield.unit.hour": "
|
|
12
|
+
"customfield.unit.hour": "oră",
|
|
13
13
|
"customfield.unit.inch": "in",
|
|
14
14
|
"customfield.unit.kilogram": "kg",
|
|
15
|
-
"customfield.unit.kilogram_per_hour": "kg/
|
|
15
|
+
"customfield.unit.kilogram_per_hour": "kg/oră",
|
|
16
16
|
"customfield.unit.kilogram_per_second": "kg/s",
|
|
17
17
|
"customfield.unit.kilometre": "km",
|
|
18
18
|
"customfield.unit.kilometre_per_hour": "km/h",
|
|
19
19
|
"customfield.unit.kilopascal": "kPa",
|
|
20
20
|
"customfield.unit.kilowatt": "kW",
|
|
21
21
|
"customfield.unit.kilowatthour": "kWh",
|
|
22
|
-
"customfield.unit.litre": "
|
|
22
|
+
"customfield.unit.litre": "l",
|
|
23
23
|
"customfield.unit.metre": "m",
|
|
24
24
|
"customfield.unit.metre_per_second": "m/s",
|
|
25
25
|
"customfield.unit.metre_per_second_squared": "m/s²",
|
|
@@ -30,17 +30,17 @@ var translation = {
|
|
|
30
30
|
"customfield.unit.ounce": "oz",
|
|
31
31
|
"customfield.unit.pascal": "Pa",
|
|
32
32
|
"customfield.unit.pound": "lb",
|
|
33
|
-
"customfield.unit.pound_per_hour": "lb/
|
|
33
|
+
"customfield.unit.pound_per_hour": "lb/oră",
|
|
34
34
|
"customfield.unit.pound_per_second": "lb/s",
|
|
35
35
|
"customfield.unit.pound_per_square_inch": "psi",
|
|
36
36
|
"customfield.unit.square_foot": "ft²",
|
|
37
37
|
"customfield.unit.square_kilometre": "km²",
|
|
38
38
|
"customfield.unit.square_metre": "m²",
|
|
39
|
-
"customfield.unit.ton": "
|
|
40
|
-
"customfield.unit.ton_us": "
|
|
39
|
+
"customfield.unit.ton": "tonă",
|
|
40
|
+
"customfield.unit.ton_us": "tonă (SUA)",
|
|
41
41
|
"customfield.unit.volt": "V",
|
|
42
42
|
"customfield.unit.watt": "W",
|
|
43
|
-
"customfield.unit.yard": "
|
|
43
|
+
"customfield.unit.yard": "yard"
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
export { translation as default };
|
package/translation.esm4.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var translation = {
|
|
2
|
-
"customfield.unit.acre": "
|
|
2
|
+
"customfield.unit.acre": "are",
|
|
3
3
|
"customfield.unit.amperehour": "Ah",
|
|
4
4
|
"customfield.unit.bar": "bar",
|
|
5
5
|
"customfield.unit.centimetre": "cm",
|
|
@@ -9,13 +9,13 @@ var translation = {
|
|
|
9
9
|
"customfield.unit.gallon_liquid": "gal",
|
|
10
10
|
"customfield.unit.gram": "g",
|
|
11
11
|
"customfield.unit.hectare": "ha",
|
|
12
|
-
"customfield.unit.hour": "
|
|
13
|
-
"customfield.unit.inch": "
|
|
12
|
+
"customfield.unit.hour": "uur",
|
|
13
|
+
"customfield.unit.inch": "inch",
|
|
14
14
|
"customfield.unit.kilogram": "kg",
|
|
15
|
-
"customfield.unit.kilogram_per_hour": "kg/
|
|
15
|
+
"customfield.unit.kilogram_per_hour": "kg/u",
|
|
16
16
|
"customfield.unit.kilogram_per_second": "kg/s",
|
|
17
17
|
"customfield.unit.kilometre": "km",
|
|
18
|
-
"customfield.unit.kilometre_per_hour": "km/
|
|
18
|
+
"customfield.unit.kilometre_per_hour": "km/u",
|
|
19
19
|
"customfield.unit.kilopascal": "kPa",
|
|
20
20
|
"customfield.unit.kilowatt": "kW",
|
|
21
21
|
"customfield.unit.kilowatthour": "kWh",
|
|
@@ -30,7 +30,7 @@ var translation = {
|
|
|
30
30
|
"customfield.unit.ounce": "oz",
|
|
31
31
|
"customfield.unit.pascal": "Pa",
|
|
32
32
|
"customfield.unit.pound": "lb",
|
|
33
|
-
"customfield.unit.pound_per_hour": "lb/
|
|
33
|
+
"customfield.unit.pound_per_hour": "lb/u",
|
|
34
34
|
"customfield.unit.pound_per_second": "lb/s",
|
|
35
35
|
"customfield.unit.pound_per_square_inch": "psi",
|
|
36
36
|
"customfield.unit.square_foot": "ft²",
|
package/translation.esm9.js
CHANGED
|
@@ -30,14 +30,14 @@ var translation = {
|
|
|
30
30
|
"customfield.unit.ounce": "oz",
|
|
31
31
|
"customfield.unit.pascal": "Pa",
|
|
32
32
|
"customfield.unit.pound": "lb",
|
|
33
|
-
"customfield.unit.pound_per_hour": "lb/
|
|
33
|
+
"customfield.unit.pound_per_hour": "lb/h",
|
|
34
34
|
"customfield.unit.pound_per_second": "lb/s",
|
|
35
35
|
"customfield.unit.pound_per_square_inch": "psi",
|
|
36
36
|
"customfield.unit.square_foot": "ft²",
|
|
37
37
|
"customfield.unit.square_kilometre": "km²",
|
|
38
38
|
"customfield.unit.square_metre": "m²",
|
|
39
|
-
"customfield.unit.ton": "
|
|
40
|
-
"customfield.unit.ton_us": "
|
|
39
|
+
"customfield.unit.ton": "tonn",
|
|
40
|
+
"customfield.unit.ton_us": "tonn (USA)",
|
|
41
41
|
"customfield.unit.volt": "V",
|
|
42
42
|
"customfield.unit.watt": "W",
|
|
43
43
|
"customfield.unit.yard": "yd"
|