@monkvision/common 5.3.1 → 5.3.4
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.
|
@@ -45,6 +45,12 @@ const MyComponent = i18nWrap(function MyComponent(){
|
|
|
45
45
|
/// in i18n.ts
|
|
46
46
|
import { i18nCreateSDKInstance } from '@monkvision/common';
|
|
47
47
|
import en from './translations/en.json';
|
|
48
|
+
import ro from './translations/ro.json';
|
|
49
|
+
import pl from './translations/pl.json';
|
|
50
|
+
import da from './translations/da.json';
|
|
51
|
+
import sv from './translations/sv.json';
|
|
52
|
+
import es from './translations/es.json';
|
|
53
|
+
import pt from './translations/pt.json';
|
|
48
54
|
import fr from './translations/fr.json';
|
|
49
55
|
import de from './translations/de.json';
|
|
50
56
|
import nl from './translations/nl.json';
|
|
@@ -57,6 +63,12 @@ const i18nMyComponent = i18nCreateSDKInstance({
|
|
|
57
63
|
de: { translation: de },
|
|
58
64
|
nl: { translation: nl },
|
|
59
65
|
it: { translation: it },
|
|
66
|
+
pt: { translation: pt },
|
|
67
|
+
es: { translation: es },
|
|
68
|
+
sv: { translation: sv },
|
|
69
|
+
da: { translation: da },
|
|
70
|
+
pl: { translation: pl },
|
|
71
|
+
ro: { translation: ro },
|
|
60
72
|
}
|
|
61
73
|
})
|
|
62
74
|
```
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
14
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
15
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -54,12 +65,22 @@ function useDeviceOrientation(options) {
|
|
|
54
65
|
var _c = (0, react_1.useState)(0), beta = _c[0], setBeta = _c[1];
|
|
55
66
|
var _d = (0, react_1.useState)(0), gamma = _d[0], setGamma = _d[1];
|
|
56
67
|
var handleDeviceOrientationEvent = (0, react_1.useCallback)(function (event) {
|
|
57
|
-
var _a, _b, _c
|
|
58
|
-
var
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
var _a, _b, _c;
|
|
69
|
+
var webkitHeading = event.webkitCompassHeading;
|
|
70
|
+
var heading;
|
|
71
|
+
if (webkitHeading !== undefined) {
|
|
72
|
+
heading = webkitHeading;
|
|
73
|
+
}
|
|
74
|
+
else if (event.alpha !== null) {
|
|
75
|
+
heading = 360 - event.alpha;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
heading = 0;
|
|
79
|
+
}
|
|
80
|
+
setAlpha(heading);
|
|
81
|
+
setBeta((_a = event.beta) !== null && _a !== void 0 ? _a : 0);
|
|
82
|
+
setGamma((_b = event.gamma) !== null && _b !== void 0 ? _b : 0);
|
|
83
|
+
(_c = options === null || options === void 0 ? void 0 : options.onDeviceOrientationEvent) === null || _c === void 0 ? void 0 : _c.call(options, __assign(__assign({}, event), { alpha: heading }));
|
|
63
84
|
}, [options === null || options === void 0 ? void 0 : options.onDeviceOrientationEvent]);
|
|
64
85
|
var requestCompassPermission = (0, react_1.useCallback)(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
65
86
|
var requestPermission, response;
|
|
@@ -83,14 +104,20 @@ function useDeviceOrientation(options) {
|
|
|
83
104
|
});
|
|
84
105
|
}); }, []);
|
|
85
106
|
(0, react_1.useEffect)(function () {
|
|
86
|
-
if (isPermissionGranted) {
|
|
87
|
-
|
|
107
|
+
if (!isPermissionGranted) {
|
|
108
|
+
return undefined;
|
|
88
109
|
}
|
|
110
|
+
var eventType = 'ondeviceorientationabsolute' in window ? 'deviceorientationabsolute' : 'deviceorientation';
|
|
111
|
+
window.addEventListener(eventType, handleDeviceOrientationEvent);
|
|
89
112
|
return function () {
|
|
90
|
-
|
|
91
|
-
window.removeEventListener('deviceorientation', handleDeviceOrientationEvent);
|
|
92
|
-
}
|
|
113
|
+
window.removeEventListener(eventType, handleDeviceOrientationEvent);
|
|
93
114
|
};
|
|
94
115
|
}, [isPermissionGranted, handleDeviceOrientationEvent]);
|
|
95
|
-
return (0, useObjectMemo_1.useObjectMemo)({
|
|
116
|
+
return (0, useObjectMemo_1.useObjectMemo)({
|
|
117
|
+
alpha: alpha,
|
|
118
|
+
beta: beta,
|
|
119
|
+
gamma: gamma,
|
|
120
|
+
isPermissionGranted: isPermissionGranted,
|
|
121
|
+
requestCompassPermission: requestCompassPermission,
|
|
122
|
+
});
|
|
96
123
|
}
|
|
@@ -9,6 +9,12 @@ var types_1 = require("@monkvision/types");
|
|
|
9
9
|
exports.damageTypeLabels = (_a = {},
|
|
10
10
|
_a[types_1.DamageType.SCRATCH] = {
|
|
11
11
|
en: 'Scratch',
|
|
12
|
+
ro: 'Zgârietură',
|
|
13
|
+
pl: 'Zarysowanie',
|
|
14
|
+
da: 'Ridse',
|
|
15
|
+
sv: 'Repa',
|
|
16
|
+
es: 'Arañazo',
|
|
17
|
+
pt: 'Arranhão',
|
|
12
18
|
fr: 'Rayure',
|
|
13
19
|
de: 'Kratzer',
|
|
14
20
|
nl: 'Kras',
|
|
@@ -16,6 +22,12 @@ exports.damageTypeLabels = (_a = {},
|
|
|
16
22
|
},
|
|
17
23
|
_a[types_1.DamageType.DENT] = {
|
|
18
24
|
en: 'Dent',
|
|
25
|
+
ro: 'Avarie',
|
|
26
|
+
pl: 'Wgniecenie',
|
|
27
|
+
da: 'bul',
|
|
28
|
+
sv: 'buckla',
|
|
29
|
+
es: 'Abolladura',
|
|
30
|
+
pt: 'Amassado',
|
|
19
31
|
fr: 'Bosse',
|
|
20
32
|
de: 'Beule',
|
|
21
33
|
nl: 'Deuk',
|
|
@@ -23,6 +35,12 @@ exports.damageTypeLabels = (_a = {},
|
|
|
23
35
|
},
|
|
24
36
|
_a[types_1.DamageType.BROKEN_GLASS] = {
|
|
25
37
|
en: 'Broken Glass',
|
|
38
|
+
ro: 'Parbriz spart',
|
|
39
|
+
pl: 'Pęknięta szyba',
|
|
40
|
+
da: 'Knust glas',
|
|
41
|
+
sv: 'Trasigt glas',
|
|
42
|
+
es: 'Vidrio roto',
|
|
43
|
+
pt: 'Vidro Quebrado',
|
|
26
44
|
fr: 'Bris de glace',
|
|
27
45
|
de: 'Zerbrochenes Glas',
|
|
28
46
|
nl: 'Gebroken glas',
|
|
@@ -30,6 +48,12 @@ exports.damageTypeLabels = (_a = {},
|
|
|
30
48
|
},
|
|
31
49
|
_a[types_1.DamageType.BROKEN_LIGHT] = {
|
|
32
50
|
en: 'Broken Light',
|
|
51
|
+
ro: 'Lumină defectă',
|
|
52
|
+
pl: 'Uszkodzone światło',
|
|
53
|
+
da: 'Defekt lygte',
|
|
54
|
+
sv: 'Trasigt ljus',
|
|
55
|
+
es: 'Luz rota',
|
|
56
|
+
pt: 'Luz Quebrada',
|
|
33
57
|
fr: 'Feu cassé',
|
|
34
58
|
de: 'Kaputtem Licht',
|
|
35
59
|
nl: 'Gebroken licht',
|
|
@@ -37,6 +61,12 @@ exports.damageTypeLabels = (_a = {},
|
|
|
37
61
|
},
|
|
38
62
|
_a[types_1.DamageType.HUBCAP_SCRATCH] = {
|
|
39
63
|
en: 'Hubcap Scratch',
|
|
64
|
+
ro: 'Zgârietură pe capacul roții',
|
|
65
|
+
pl: 'Zarysowanie kołpaka',
|
|
66
|
+
da: 'Dækhætte-ridse',
|
|
67
|
+
sv: 'Navkapsrepa',
|
|
68
|
+
es: 'Arañazo en la tapacubos',
|
|
69
|
+
pt: 'Arranhão na calota',
|
|
40
70
|
fr: 'Enjoliveur rayé',
|
|
41
71
|
de: 'Zerkratzte Radkappe',
|
|
42
72
|
nl: 'Gebroken wieldop',
|
|
@@ -44,6 +74,12 @@ exports.damageTypeLabels = (_a = {},
|
|
|
44
74
|
},
|
|
45
75
|
_a[types_1.DamageType.MISSING_HUBCAP] = {
|
|
46
76
|
en: 'Missing Hubcap',
|
|
77
|
+
ro: 'Capac de roată lipsă',
|
|
78
|
+
pl: 'Brak kołpaka',
|
|
79
|
+
da: 'Manglende hjulkapsel',
|
|
80
|
+
sv: 'Saknad navkapsel',
|
|
81
|
+
es: 'Tapa de rueda faltante',
|
|
82
|
+
pt: 'Calota ausente',
|
|
47
83
|
fr: 'Enjoliveur manquant',
|
|
48
84
|
de: 'Fehlende Radkappe',
|
|
49
85
|
nl: 'Ontbrekende wieldop',
|
|
@@ -51,6 +87,12 @@ exports.damageTypeLabels = (_a = {},
|
|
|
51
87
|
},
|
|
52
88
|
_a[types_1.DamageType.SMASH] = {
|
|
53
89
|
en: 'Smash',
|
|
90
|
+
ro: 'Lovitură',
|
|
91
|
+
pl: 'Zniszcz',
|
|
92
|
+
da: 'Smadr',
|
|
93
|
+
sv: 'Krasch',
|
|
94
|
+
es: 'Aplastar',
|
|
95
|
+
pt: 'Esmague',
|
|
54
96
|
fr: 'Collision',
|
|
55
97
|
de: 'Zusammenstoß',
|
|
56
98
|
nl: 'Botsing',
|
|
@@ -58,6 +100,12 @@ exports.damageTypeLabels = (_a = {},
|
|
|
58
100
|
},
|
|
59
101
|
_a[types_1.DamageType.BODY_CRACK] = {
|
|
60
102
|
en: 'Body Crack',
|
|
103
|
+
ro: 'Fisură în caroserie',
|
|
104
|
+
pl: 'Pęknięcie nadwozia',
|
|
105
|
+
da: 'Karosserirevne',
|
|
106
|
+
sv: 'Karosspricka',
|
|
107
|
+
es: 'Grieta en la carrocería',
|
|
108
|
+
pt: 'Rachadura na carroceria',
|
|
61
109
|
fr: 'Fissure dans la carrosserie',
|
|
62
110
|
de: 'Karosserieriss',
|
|
63
111
|
nl: 'Carrosseriescheur',
|
|
@@ -65,6 +113,12 @@ exports.damageTypeLabels = (_a = {},
|
|
|
65
113
|
},
|
|
66
114
|
_a[types_1.DamageType.MISSING_PIECE] = {
|
|
67
115
|
en: 'Missing Piece',
|
|
116
|
+
ro: 'Piesă lipsă',
|
|
117
|
+
pl: 'Brakujący element',
|
|
118
|
+
da: 'Manglende del',
|
|
119
|
+
sv: 'Saknas',
|
|
120
|
+
es: 'Pieza faltante',
|
|
121
|
+
pt: 'Peça ausente',
|
|
68
122
|
fr: 'Pièce manquante',
|
|
69
123
|
de: 'Fehlendes Teil',
|
|
70
124
|
nl: 'Ontbrekend onderdeel',
|
|
@@ -72,6 +126,12 @@ exports.damageTypeLabels = (_a = {},
|
|
|
72
126
|
},
|
|
73
127
|
_a[types_1.DamageType.RUSTINESS] = {
|
|
74
128
|
en: 'Rustiness',
|
|
129
|
+
ro: 'Rugină',
|
|
130
|
+
pl: 'Korozja',
|
|
131
|
+
da: 'Rust',
|
|
132
|
+
sv: 'Rost',
|
|
133
|
+
es: 'Oxidación',
|
|
134
|
+
pt: 'Corrosão',
|
|
75
135
|
fr: 'Rouille',
|
|
76
136
|
de: 'Rostigkeit',
|
|
77
137
|
nl: 'Roest',
|
|
@@ -79,6 +139,12 @@ exports.damageTypeLabels = (_a = {},
|
|
|
79
139
|
},
|
|
80
140
|
_a[types_1.DamageType.DIRT] = {
|
|
81
141
|
en: 'Dirt',
|
|
142
|
+
ro: 'Murdărie',
|
|
143
|
+
pl: 'Brud',
|
|
144
|
+
da: 'Snavs',
|
|
145
|
+
sv: 'smuts',
|
|
146
|
+
es: 'Suciedad',
|
|
147
|
+
pt: 'Sujeira',
|
|
82
148
|
fr: 'Saleté',
|
|
83
149
|
de: 'Dreck',
|
|
84
150
|
nl: 'Vuil',
|
|
@@ -86,6 +152,12 @@ exports.damageTypeLabels = (_a = {},
|
|
|
86
152
|
},
|
|
87
153
|
_a[types_1.DamageType.MISSHAPE] = {
|
|
88
154
|
en: 'Misshape',
|
|
155
|
+
ro: 'Deformare',
|
|
156
|
+
pl: 'Deformacja',
|
|
157
|
+
da: 'Deformation',
|
|
158
|
+
sv: 'missformning',
|
|
159
|
+
es: 'Deformación',
|
|
160
|
+
pt: 'Deformação',
|
|
89
161
|
fr: 'Forme irrégulière',
|
|
90
162
|
de: 'Fehlform',
|
|
91
163
|
nl: 'Misvorm',
|
|
@@ -93,6 +165,12 @@ exports.damageTypeLabels = (_a = {},
|
|
|
93
165
|
},
|
|
94
166
|
_a[types_1.DamageType.PAINT_PEELING] = {
|
|
95
167
|
en: 'Paint Peeling',
|
|
168
|
+
ro: 'Desprinderea vopselei',
|
|
169
|
+
pl: 'Łuszcząca się farba',
|
|
170
|
+
da: 'Afskallet maling',
|
|
171
|
+
sv: 'Färgflagar',
|
|
172
|
+
es: 'Desprendimiento de pintura',
|
|
173
|
+
pt: 'Descascamento da tinta',
|
|
96
174
|
fr: 'Peinture écaillée',
|
|
97
175
|
de: 'Abblätternde Farbe',
|
|
98
176
|
nl: 'Afbladderende verf',
|
|
@@ -100,6 +178,12 @@ exports.damageTypeLabels = (_a = {},
|
|
|
100
178
|
},
|
|
101
179
|
_a[types_1.DamageType.SCATTERED_SCRATCHES] = {
|
|
102
180
|
en: 'Scattered Scratches',
|
|
181
|
+
ro: 'Zgârieturi împrăștiate',
|
|
182
|
+
pl: 'Rozproszone rysy',
|
|
183
|
+
da: 'Spredte ridser',
|
|
184
|
+
sv: 'Spridda repor',
|
|
185
|
+
es: 'Arañazos dispersos',
|
|
186
|
+
pt: 'Arranhões dispersos',
|
|
103
187
|
fr: 'Rayures éparses',
|
|
104
188
|
de: 'Verstreute Kratzer',
|
|
105
189
|
nl: 'Verspreide krassen',
|
|
@@ -107,6 +191,12 @@ exports.damageTypeLabels = (_a = {},
|
|
|
107
191
|
},
|
|
108
192
|
_a[types_1.DamageType.LIGHT_REFLECTION] = {
|
|
109
193
|
en: 'Light Reflection',
|
|
194
|
+
ro: 'Reflecția luminii',
|
|
195
|
+
pl: 'Odbicie światła',
|
|
196
|
+
da: 'Lysrefleks',
|
|
197
|
+
sv: 'Ljusreflektion',
|
|
198
|
+
es: 'Reflejo de luz',
|
|
199
|
+
pt: 'Reflexo de luz',
|
|
110
200
|
fr: 'Réflexion de la lumière',
|
|
111
201
|
de: 'Lichtreflexion',
|
|
112
202
|
nl: 'Licht Reflectie',
|
|
@@ -114,6 +204,12 @@ exports.damageTypeLabels = (_a = {},
|
|
|
114
204
|
},
|
|
115
205
|
_a[types_1.DamageType.SHADOW] = {
|
|
116
206
|
en: 'Shadow',
|
|
207
|
+
ro: 'Umbră',
|
|
208
|
+
pl: 'Cień',
|
|
209
|
+
da: 'Skygge',
|
|
210
|
+
sv: 'Skugga',
|
|
211
|
+
es: 'Sombra',
|
|
212
|
+
pt: 'Sombra',
|
|
117
213
|
fr: 'Ombre',
|
|
118
214
|
de: 'Schatten',
|
|
119
215
|
nl: 'Schaduw',
|
|
@@ -121,6 +217,12 @@ exports.damageTypeLabels = (_a = {},
|
|
|
121
217
|
},
|
|
122
218
|
_a[types_1.DamageType.CAR_CURVE] = {
|
|
123
219
|
en: 'Car Curve',
|
|
220
|
+
ro: 'Curba vehiculului',
|
|
221
|
+
pl: 'Krzywa pojazdu',
|
|
222
|
+
da: 'Bilkurve',
|
|
223
|
+
sv: 'Bilkurva',
|
|
224
|
+
es: 'Curva del vehículo',
|
|
225
|
+
pt: 'Curva do carro',
|
|
124
226
|
fr: 'Courbe de la voiture',
|
|
125
227
|
de: 'Auto-Kurve',
|
|
126
228
|
nl: 'Auto kromming',
|
|
@@ -128,6 +230,12 @@ exports.damageTypeLabels = (_a = {},
|
|
|
128
230
|
},
|
|
129
231
|
_a[types_1.DamageType.PAINT_DAMAGE] = {
|
|
130
232
|
en: 'Paint Damage',
|
|
233
|
+
ro: 'Deteriorări ale vopselei',
|
|
234
|
+
pl: 'Uszkodzenie lakieru',
|
|
235
|
+
da: 'Lakskade',
|
|
236
|
+
sv: 'Lackskada',
|
|
237
|
+
es: 'Daños en la pintura',
|
|
238
|
+
pt: 'Danos na Pintura',
|
|
131
239
|
fr: 'Dégât sur la peinture',
|
|
132
240
|
de: 'Lackschäden',
|
|
133
241
|
nl: 'Beschadigde verf',
|