@trackunit/custom-field-components 0.0.760 → 0.0.761
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 +63 -42
- package/index.esm.js +63 -42
- package/package.json +1 -1
- package/src/translation.d.ts +2 -2
- package/src/useUnitTranslation.d.ts +2 -2
package/index.cjs.js
CHANGED
|
@@ -32,48 +32,69 @@ function _interopNamespace(e) {
|
|
|
32
32
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
33
33
|
|
|
34
34
|
var defaultTranslations = {
|
|
35
|
-
"customfield.unit.
|
|
36
|
-
"customfield.unit.
|
|
37
|
-
"customfield.unit.
|
|
38
|
-
"customfield.unit.
|
|
39
|
-
"customfield.unit.
|
|
40
|
-
"customfield.unit.
|
|
41
|
-
"customfield.unit.
|
|
42
|
-
"customfield.unit.
|
|
43
|
-
"customfield.unit.
|
|
44
|
-
"customfield.unit.
|
|
45
|
-
"customfield.unit.
|
|
46
|
-
"customfield.unit.
|
|
47
|
-
"customfield.unit.
|
|
48
|
-
"customfield.unit.
|
|
49
|
-
"customfield.unit.
|
|
50
|
-
"customfield.unit.
|
|
51
|
-
"customfield.unit.
|
|
52
|
-
"customfield.unit.
|
|
53
|
-
"customfield.unit.
|
|
54
|
-
"customfield.unit.
|
|
55
|
-
"customfield.unit.
|
|
56
|
-
"customfield.unit.
|
|
57
|
-
"customfield.unit.
|
|
58
|
-
"customfield.unit.
|
|
59
|
-
"customfield.unit.
|
|
60
|
-
"customfield.unit.
|
|
61
|
-
"customfield.unit.
|
|
62
|
-
"customfield.unit.
|
|
63
|
-
"customfield.unit.
|
|
64
|
-
"customfield.unit.
|
|
65
|
-
"customfield.unit.
|
|
66
|
-
"customfield.unit.
|
|
67
|
-
"customfield.unit.
|
|
68
|
-
"customfield.unit.
|
|
69
|
-
"customfield.unit.
|
|
70
|
-
"customfield.unit.
|
|
71
|
-
"customfield.unit.
|
|
72
|
-
"customfield.unit.
|
|
73
|
-
"customfield.unit.
|
|
74
|
-
"customfield.unit.
|
|
75
|
-
"customfield.unit.
|
|
76
|
-
"customfield.unit.
|
|
35
|
+
"customfield.unit.ACRE": "acre",
|
|
36
|
+
"customfield.unit.AMPERE": "A",
|
|
37
|
+
"customfield.unit.AMPERE_HOUR": "Ah",
|
|
38
|
+
"customfield.unit.ARE": "a",
|
|
39
|
+
"customfield.unit.BAR": "bar",
|
|
40
|
+
"customfield.unit.CELSIUS": "°C",
|
|
41
|
+
"customfield.unit.CENTIMETRE": "cm",
|
|
42
|
+
"customfield.unit.CUBIC_FOOT": "ft³",
|
|
43
|
+
"customfield.unit.CUBIC_METRE": "m³",
|
|
44
|
+
"customfield.unit.DAY": "days",
|
|
45
|
+
"customfield.unit.DEGREE_ANGLE": "°",
|
|
46
|
+
"customfield.unit.FAHRENHEIT": "°F",
|
|
47
|
+
"customfield.unit.FOOT": "ft",
|
|
48
|
+
"customfield.unit.G_FORCE": "G",
|
|
49
|
+
"customfield.unit.GALLON_LIQUID": "gal",
|
|
50
|
+
"customfield.unit.GALLONS_PER_HOUR": "gal/h",
|
|
51
|
+
"customfield.unit.GRAM": "g",
|
|
52
|
+
"customfield.unit.HECTARE": "ha",
|
|
53
|
+
"customfield.unit.HERTZ": "Hz",
|
|
54
|
+
"customfield.unit.HOUR": "h",
|
|
55
|
+
"customfield.unit.INCH": "in",
|
|
56
|
+
"customfield.unit.INCHES_OF_WATER": "inAq",
|
|
57
|
+
"customfield.unit.KILOGRAM": "kg",
|
|
58
|
+
"customfield.unit.KILOGRAM_PER_HOUR": "kg/h",
|
|
59
|
+
"customfield.unit.KILOGRAM_PER_SECOND": "kg/s",
|
|
60
|
+
"customfield.unit.KILOMETRE": "km",
|
|
61
|
+
"customfield.unit.KILOMETRE_PER_HOUR": "km/h",
|
|
62
|
+
"customfield.unit.KILOPASCAL": "kPa",
|
|
63
|
+
"customfield.unit.KILOWATT": "kW",
|
|
64
|
+
"customfield.unit.KILOWATT_HOUR": "kWh",
|
|
65
|
+
"customfield.unit.LITRE": "L",
|
|
66
|
+
"customfield.unit.LITRES_PER_HOUR": "L/h",
|
|
67
|
+
"customfield.unit.METRE": "m",
|
|
68
|
+
"customfield.unit.METRE_PER_SECOND": "m/s",
|
|
69
|
+
"customfield.unit.METRE_PER_SECOND_SQUARED": "m/s²",
|
|
70
|
+
"customfield.unit.METRIC_TON": "ton",
|
|
71
|
+
"customfield.unit.MILE": "mi",
|
|
72
|
+
"customfield.unit.MILE_PER_HOUR": "mph",
|
|
73
|
+
"customfield.unit.MILLIMETRE": "mm",
|
|
74
|
+
"customfield.unit.MILLISECOND": "ms",
|
|
75
|
+
"customfield.unit.MINUTE": "min",
|
|
76
|
+
"customfield.unit.MONTH": "months",
|
|
77
|
+
"customfield.unit.NEWTON": "N",
|
|
78
|
+
"customfield.unit.OUNCE": "oz",
|
|
79
|
+
"customfield.unit.PASCAL": "Pa",
|
|
80
|
+
"customfield.unit.PERCENT": "%",
|
|
81
|
+
"customfield.unit.POUND": "lb",
|
|
82
|
+
"customfield.unit.POUND_PER_HOUR": "lb/h",
|
|
83
|
+
"customfield.unit.POUND_PER_SECOND": "lb/s",
|
|
84
|
+
"customfield.unit.POUND_PER_SQUARE_INCH": "psi",
|
|
85
|
+
"customfield.unit.REVOLUTIONS_PER_MINUTE": "rpm",
|
|
86
|
+
"customfield.unit.SECOND": "s",
|
|
87
|
+
"customfield.unit.SQUARE_FOOT": "ft²",
|
|
88
|
+
"customfield.unit.SQUARE_KILOMETRE": "km²",
|
|
89
|
+
"customfield.unit.SQUARE_METRE": "m²",
|
|
90
|
+
"customfield.unit.TON": "ton",
|
|
91
|
+
"customfield.unit.US_TON": "ton (US)",
|
|
92
|
+
"customfield.unit.VOLT": "V",
|
|
93
|
+
"customfield.unit.VOLT_AMPERE": "VA",
|
|
94
|
+
"customfield.unit.WATT": "W",
|
|
95
|
+
"customfield.unit.WEEK": "wk",
|
|
96
|
+
"customfield.unit.YARD": "yd",
|
|
97
|
+
"customfield.unit.YEAR": "years"
|
|
77
98
|
};
|
|
78
99
|
|
|
79
100
|
/** The translation namespace for this library */
|
package/index.esm.js
CHANGED
|
@@ -9,48 +9,69 @@ import { useWatch } from 'react-hook-form';
|
|
|
9
9
|
import { v4 } from 'uuid';
|
|
10
10
|
|
|
11
11
|
var defaultTranslations = {
|
|
12
|
-
"customfield.unit.
|
|
13
|
-
"customfield.unit.
|
|
14
|
-
"customfield.unit.
|
|
15
|
-
"customfield.unit.
|
|
16
|
-
"customfield.unit.
|
|
17
|
-
"customfield.unit.
|
|
18
|
-
"customfield.unit.
|
|
19
|
-
"customfield.unit.
|
|
20
|
-
"customfield.unit.
|
|
21
|
-
"customfield.unit.
|
|
22
|
-
"customfield.unit.
|
|
23
|
-
"customfield.unit.
|
|
24
|
-
"customfield.unit.
|
|
25
|
-
"customfield.unit.
|
|
26
|
-
"customfield.unit.
|
|
27
|
-
"customfield.unit.
|
|
28
|
-
"customfield.unit.
|
|
29
|
-
"customfield.unit.
|
|
30
|
-
"customfield.unit.
|
|
31
|
-
"customfield.unit.
|
|
32
|
-
"customfield.unit.
|
|
33
|
-
"customfield.unit.
|
|
34
|
-
"customfield.unit.
|
|
35
|
-
"customfield.unit.
|
|
36
|
-
"customfield.unit.
|
|
37
|
-
"customfield.unit.
|
|
38
|
-
"customfield.unit.
|
|
39
|
-
"customfield.unit.
|
|
40
|
-
"customfield.unit.
|
|
41
|
-
"customfield.unit.
|
|
42
|
-
"customfield.unit.
|
|
43
|
-
"customfield.unit.
|
|
44
|
-
"customfield.unit.
|
|
45
|
-
"customfield.unit.
|
|
46
|
-
"customfield.unit.
|
|
47
|
-
"customfield.unit.
|
|
48
|
-
"customfield.unit.
|
|
49
|
-
"customfield.unit.
|
|
50
|
-
"customfield.unit.
|
|
51
|
-
"customfield.unit.
|
|
52
|
-
"customfield.unit.
|
|
53
|
-
"customfield.unit.
|
|
12
|
+
"customfield.unit.ACRE": "acre",
|
|
13
|
+
"customfield.unit.AMPERE": "A",
|
|
14
|
+
"customfield.unit.AMPERE_HOUR": "Ah",
|
|
15
|
+
"customfield.unit.ARE": "a",
|
|
16
|
+
"customfield.unit.BAR": "bar",
|
|
17
|
+
"customfield.unit.CELSIUS": "°C",
|
|
18
|
+
"customfield.unit.CENTIMETRE": "cm",
|
|
19
|
+
"customfield.unit.CUBIC_FOOT": "ft³",
|
|
20
|
+
"customfield.unit.CUBIC_METRE": "m³",
|
|
21
|
+
"customfield.unit.DAY": "days",
|
|
22
|
+
"customfield.unit.DEGREE_ANGLE": "°",
|
|
23
|
+
"customfield.unit.FAHRENHEIT": "°F",
|
|
24
|
+
"customfield.unit.FOOT": "ft",
|
|
25
|
+
"customfield.unit.G_FORCE": "G",
|
|
26
|
+
"customfield.unit.GALLON_LIQUID": "gal",
|
|
27
|
+
"customfield.unit.GALLONS_PER_HOUR": "gal/h",
|
|
28
|
+
"customfield.unit.GRAM": "g",
|
|
29
|
+
"customfield.unit.HECTARE": "ha",
|
|
30
|
+
"customfield.unit.HERTZ": "Hz",
|
|
31
|
+
"customfield.unit.HOUR": "h",
|
|
32
|
+
"customfield.unit.INCH": "in",
|
|
33
|
+
"customfield.unit.INCHES_OF_WATER": "inAq",
|
|
34
|
+
"customfield.unit.KILOGRAM": "kg",
|
|
35
|
+
"customfield.unit.KILOGRAM_PER_HOUR": "kg/h",
|
|
36
|
+
"customfield.unit.KILOGRAM_PER_SECOND": "kg/s",
|
|
37
|
+
"customfield.unit.KILOMETRE": "km",
|
|
38
|
+
"customfield.unit.KILOMETRE_PER_HOUR": "km/h",
|
|
39
|
+
"customfield.unit.KILOPASCAL": "kPa",
|
|
40
|
+
"customfield.unit.KILOWATT": "kW",
|
|
41
|
+
"customfield.unit.KILOWATT_HOUR": "kWh",
|
|
42
|
+
"customfield.unit.LITRE": "L",
|
|
43
|
+
"customfield.unit.LITRES_PER_HOUR": "L/h",
|
|
44
|
+
"customfield.unit.METRE": "m",
|
|
45
|
+
"customfield.unit.METRE_PER_SECOND": "m/s",
|
|
46
|
+
"customfield.unit.METRE_PER_SECOND_SQUARED": "m/s²",
|
|
47
|
+
"customfield.unit.METRIC_TON": "ton",
|
|
48
|
+
"customfield.unit.MILE": "mi",
|
|
49
|
+
"customfield.unit.MILE_PER_HOUR": "mph",
|
|
50
|
+
"customfield.unit.MILLIMETRE": "mm",
|
|
51
|
+
"customfield.unit.MILLISECOND": "ms",
|
|
52
|
+
"customfield.unit.MINUTE": "min",
|
|
53
|
+
"customfield.unit.MONTH": "months",
|
|
54
|
+
"customfield.unit.NEWTON": "N",
|
|
55
|
+
"customfield.unit.OUNCE": "oz",
|
|
56
|
+
"customfield.unit.PASCAL": "Pa",
|
|
57
|
+
"customfield.unit.PERCENT": "%",
|
|
58
|
+
"customfield.unit.POUND": "lb",
|
|
59
|
+
"customfield.unit.POUND_PER_HOUR": "lb/h",
|
|
60
|
+
"customfield.unit.POUND_PER_SECOND": "lb/s",
|
|
61
|
+
"customfield.unit.POUND_PER_SQUARE_INCH": "psi",
|
|
62
|
+
"customfield.unit.REVOLUTIONS_PER_MINUTE": "rpm",
|
|
63
|
+
"customfield.unit.SECOND": "s",
|
|
64
|
+
"customfield.unit.SQUARE_FOOT": "ft²",
|
|
65
|
+
"customfield.unit.SQUARE_KILOMETRE": "km²",
|
|
66
|
+
"customfield.unit.SQUARE_METRE": "m²",
|
|
67
|
+
"customfield.unit.TON": "ton",
|
|
68
|
+
"customfield.unit.US_TON": "ton (US)",
|
|
69
|
+
"customfield.unit.VOLT": "V",
|
|
70
|
+
"customfield.unit.VOLT_AMPERE": "VA",
|
|
71
|
+
"customfield.unit.WATT": "W",
|
|
72
|
+
"customfield.unit.WEEK": "wk",
|
|
73
|
+
"customfield.unit.YARD": "yd",
|
|
74
|
+
"customfield.unit.YEAR": "years"
|
|
54
75
|
};
|
|
55
76
|
|
|
56
77
|
/** The translation namespace for this library */
|
package/package.json
CHANGED
package/src/translation.d.ts
CHANGED
|
@@ -15,8 +15,8 @@ export declare const translations: TranslationResource<TranslationKeys>;
|
|
|
15
15
|
/**
|
|
16
16
|
* Local useTranslation for this specific library
|
|
17
17
|
*/
|
|
18
|
-
export declare const useTranslation: () => [TransForLibs<"customfield.unit.
|
|
19
|
-
t: TransForLibs<"customfield.unit.
|
|
18
|
+
export declare const useTranslation: () => [TransForLibs<"customfield.unit.ACRE" | "customfield.unit.AMPERE" | "customfield.unit.AMPERE_HOUR" | "customfield.unit.ARE" | "customfield.unit.BAR" | "customfield.unit.CELSIUS" | "customfield.unit.CENTIMETRE" | "customfield.unit.CUBIC_FOOT" | "customfield.unit.CUBIC_METRE" | "customfield.unit.DAY" | "customfield.unit.DEGREE_ANGLE" | "customfield.unit.FAHRENHEIT" | "customfield.unit.FOOT" | "customfield.unit.G_FORCE" | "customfield.unit.GALLON_LIQUID" | "customfield.unit.GALLONS_PER_HOUR" | "customfield.unit.GRAM" | "customfield.unit.HECTARE" | "customfield.unit.HERTZ" | "customfield.unit.HOUR" | "customfield.unit.INCH" | "customfield.unit.INCHES_OF_WATER" | "customfield.unit.KILOGRAM" | "customfield.unit.KILOGRAM_PER_HOUR" | "customfield.unit.KILOGRAM_PER_SECOND" | "customfield.unit.KILOMETRE" | "customfield.unit.KILOMETRE_PER_HOUR" | "customfield.unit.KILOPASCAL" | "customfield.unit.KILOWATT" | "customfield.unit.KILOWATT_HOUR" | "customfield.unit.LITRE" | "customfield.unit.LITRES_PER_HOUR" | "customfield.unit.METRE" | "customfield.unit.METRE_PER_SECOND" | "customfield.unit.METRE_PER_SECOND_SQUARED" | "customfield.unit.METRIC_TON" | "customfield.unit.MILE" | "customfield.unit.MILE_PER_HOUR" | "customfield.unit.MILLIMETRE" | "customfield.unit.MILLISECOND" | "customfield.unit.MINUTE" | "customfield.unit.MONTH" | "customfield.unit.NEWTON" | "customfield.unit.OUNCE" | "customfield.unit.PASCAL" | "customfield.unit.PERCENT" | "customfield.unit.POUND" | "customfield.unit.POUND_PER_HOUR" | "customfield.unit.POUND_PER_SECOND" | "customfield.unit.POUND_PER_SQUARE_INCH" | "customfield.unit.REVOLUTIONS_PER_MINUTE" | "customfield.unit.SECOND" | "customfield.unit.SQUARE_FOOT" | "customfield.unit.SQUARE_KILOMETRE" | "customfield.unit.SQUARE_METRE" | "customfield.unit.TON" | "customfield.unit.US_TON" | "customfield.unit.VOLT" | "customfield.unit.VOLT_AMPERE" | "customfield.unit.WATT" | "customfield.unit.WEEK" | "customfield.unit.YARD" | "customfield.unit.YEAR">, import("i18next").i18n, boolean] & {
|
|
19
|
+
t: TransForLibs<"customfield.unit.ACRE" | "customfield.unit.AMPERE" | "customfield.unit.AMPERE_HOUR" | "customfield.unit.ARE" | "customfield.unit.BAR" | "customfield.unit.CELSIUS" | "customfield.unit.CENTIMETRE" | "customfield.unit.CUBIC_FOOT" | "customfield.unit.CUBIC_METRE" | "customfield.unit.DAY" | "customfield.unit.DEGREE_ANGLE" | "customfield.unit.FAHRENHEIT" | "customfield.unit.FOOT" | "customfield.unit.G_FORCE" | "customfield.unit.GALLON_LIQUID" | "customfield.unit.GALLONS_PER_HOUR" | "customfield.unit.GRAM" | "customfield.unit.HECTARE" | "customfield.unit.HERTZ" | "customfield.unit.HOUR" | "customfield.unit.INCH" | "customfield.unit.INCHES_OF_WATER" | "customfield.unit.KILOGRAM" | "customfield.unit.KILOGRAM_PER_HOUR" | "customfield.unit.KILOGRAM_PER_SECOND" | "customfield.unit.KILOMETRE" | "customfield.unit.KILOMETRE_PER_HOUR" | "customfield.unit.KILOPASCAL" | "customfield.unit.KILOWATT" | "customfield.unit.KILOWATT_HOUR" | "customfield.unit.LITRE" | "customfield.unit.LITRES_PER_HOUR" | "customfield.unit.METRE" | "customfield.unit.METRE_PER_SECOND" | "customfield.unit.METRE_PER_SECOND_SQUARED" | "customfield.unit.METRIC_TON" | "customfield.unit.MILE" | "customfield.unit.MILE_PER_HOUR" | "customfield.unit.MILLIMETRE" | "customfield.unit.MILLISECOND" | "customfield.unit.MINUTE" | "customfield.unit.MONTH" | "customfield.unit.NEWTON" | "customfield.unit.OUNCE" | "customfield.unit.PASCAL" | "customfield.unit.PERCENT" | "customfield.unit.POUND" | "customfield.unit.POUND_PER_HOUR" | "customfield.unit.POUND_PER_SECOND" | "customfield.unit.POUND_PER_SQUARE_INCH" | "customfield.unit.REVOLUTIONS_PER_MINUTE" | "customfield.unit.SECOND" | "customfield.unit.SQUARE_FOOT" | "customfield.unit.SQUARE_KILOMETRE" | "customfield.unit.SQUARE_METRE" | "customfield.unit.TON" | "customfield.unit.US_TON" | "customfield.unit.VOLT" | "customfield.unit.VOLT_AMPERE" | "customfield.unit.WATT" | "customfield.unit.WEEK" | "customfield.unit.YARD" | "customfield.unit.YEAR">;
|
|
20
20
|
i18n: import("i18next").i18n;
|
|
21
21
|
ready: boolean;
|
|
22
22
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type UnitType =
|
|
1
|
+
import { UnitOfMeasurementType } from "@trackunit/iris-app-runtime-core-api";
|
|
2
|
+
export type UnitType = UnitOfMeasurementType | undefined | null;
|
|
3
3
|
/**
|
|
4
4
|
* Returns the translation for a unit.
|
|
5
5
|
*/
|