@colisweb/rescript-toolkit 3.5.0 → 3.5.1

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.
Binary file
package/locale/fr.json CHANGED
@@ -54,6 +54,11 @@
54
54
  "defaultMessage": "Non",
55
55
  "message": "Non"
56
56
  },
57
+ {
58
+ "id": "_7790a47d",
59
+ "defaultMessage": "<lat></lat>, <lng></lng>",
60
+ "message": "<lat></lat>, <lng></lng>"
61
+ },
57
62
  {
58
63
  "id": "_8f8eb0df",
59
64
  "defaultMessage": "Vendredi",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colisweb/rescript-toolkit",
3
- "version": "3.5.0",
3
+ "version": "3.5.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "clean": "rescript clean",
@@ -11,9 +11,31 @@ let make = (~coordinates: Toolkit__Decoders.Coordinates.t, ~copyWrapperClassName
11
11
  <div className="inline-flex flex-row items-center gap-2 text-info-600">
12
12
  <ReactIcons.MdMyLocation size=15 />
13
13
  <p className="e2e-coordinates-gps">
14
- {`${coordinates.latitude->Js.Float.toFixedWithPrecision(
15
- ~digits=3,
16
- )}, ${coordinates.longitude->Js.Float.toFixedWithPrecision(~digits=3)}`->React.string}
14
+ <FormattedMessage
15
+ defaultMessage={"<lat></lat>, <lng></lng>"}
16
+ values={{
17
+ "lat": _ =>
18
+ <FormattedNumberParts value={coordinates.latitude} maximumFractionDigits={10}>
19
+ {(~formattedNumberParts) => {
20
+ <>
21
+ {(formattedNumberParts[0]->Option.getUnsafe).value->React.string}
22
+ {"."->React.string}
23
+ {(formattedNumberParts[2]->Option.getUnsafe).value->React.string}
24
+ </>
25
+ }}
26
+ </FormattedNumberParts>,
27
+ "lng": _ =>
28
+ <FormattedNumberParts value={coordinates.longitude} maximumFractionDigits={10}>
29
+ {(~formattedNumberParts) => {
30
+ <>
31
+ {(formattedNumberParts[0]->Option.getUnsafe).value->React.string}
32
+ {"."->React.string}
33
+ {(formattedNumberParts[2]->Option.getUnsafe).value->React.string}
34
+ </>
35
+ }}
36
+ </FormattedNumberParts>,
37
+ }}
38
+ />
17
39
  </p>
18
40
  </div>
19
41
  </Toolkit__Ui_CopyWrapper>