@mtes-mct/monitor-ui 24.21.1 → 24.21.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [24.21.2](https://github.com/MTES-MCT/monitor-ui/compare/v24.21.1...v24.21.2) (2025-06-10)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **icons:** fix PointsCloud color ([9b7950f](https://github.com/MTES-MCT/monitor-ui/commit/9b7950f65686f932c31a5533657603dc98622e5b))
6
+
7
+ ## [24.21.1](https://github.com/MTES-MCT/monitor-ui/compare/v24.21.0...v24.21.1) (2025-06-10)
8
+
9
+ ### Bug Fixes
10
+
11
+ * **icons:** delete background ([4a771d3](https://github.com/MTES-MCT/monitor-ui/commit/4a771d331471ff98ab4456cbe897bf0a501216d5))
12
+
1
13
  ## [24.21.0](https://github.com/MTES-MCT/monitor-ui/compare/v24.20.0...v24.21.0) (2025-06-10)
2
14
 
3
15
  ### Features
@@ -1 +1 @@
1
- {"version":3,"file":"DDCoordinatesInput.d.ts","sourceRoot":"","sources":["../../../src/fields/CoordinatesInput/DDCoordinatesInput.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAI1D,KAAK,uBAAuB,GAAG;IAC7B,WAAW,EAAE,WAAW,GAAG,SAAS,CAAA;IACpC,QAAQ,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,CAAC,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK,IAAI,CAAA;IAC5D,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA;AAcD,wBAAgB,kBAAkB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,uBAAuB,2CA2F9G"}
1
+ {"version":3,"file":"DDCoordinatesInput.d.ts","sourceRoot":"","sources":["../../../src/fields/CoordinatesInput/DDCoordinatesInput.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAI1D,KAAK,uBAAuB,GAAG;IAC7B,WAAW,EAAE,WAAW,GAAG,SAAS,CAAA;IACpC,QAAQ,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,CAAC,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK,IAAI,CAAA;IAC5D,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA;AAcD,wBAAgB,kBAAkB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,uBAAuB,2CAgF9G"}
package/index.js CHANGED
@@ -20705,19 +20705,19 @@ function PointsCloud({ color, size, title, ...nativeProps }) {
20705
20705
  children: [
20706
20706
  /*#__PURE__*/ jsx("path", {
20707
20707
  d: "M8 7.5C8 8.88071 6.88071 10 5.5 10C4.11929 10 3 8.88071 3 7.5C3 6.11929 4.11929 5 5.5 5C6.88071 5 8 6.11929 8 7.5Z",
20708
- fill: "black"
20708
+ fill: "currentColor"
20709
20709
  }),
20710
20710
  /*#__PURE__*/ jsx("path", {
20711
20711
  d: "M12 4.5C12 5.32843 11.3284 6 10.5 6C9.67157 6 9 5.32843 9 4.5C9 3.67157 9.67157 3 10.5 3C11.3284 3 12 3.67157 12 4.5Z",
20712
- fill: "black"
20712
+ fill: "currentColor"
20713
20713
  }),
20714
20714
  /*#__PURE__*/ jsx("path", {
20715
20715
  d: "M9 15C9 16.1046 8.10457 17 7 17C5.89543 17 5 16.1046 5 15C5 13.8954 5.89543 13 7 13C8.10457 13 9 13.8954 9 15Z",
20716
- fill: "black"
20716
+ fill: "currentColor"
20717
20717
  }),
20718
20718
  /*#__PURE__*/ jsx("path", {
20719
20719
  d: "M17 11.5C17 13.433 15.433 15 13.5 15C11.567 15 10 13.433 10 11.5C10 9.567 11.567 8 13.5 8C15.433 8 17 9.567 17 11.5Z",
20720
- fill: "black"
20720
+ fill: "currentColor"
20721
20721
  })
20722
20722
  ]
20723
20723
  })
@@ -56635,10 +56635,16 @@ function toControlledValue(value) {
56635
56635
  return value ? `${value}` : undefined;
56636
56636
  }
56637
56637
  function DDCoordinatesInput({ coordinates, disabled, name, onChange, readOnly }) {
56638
- const [latitude, setLatitude] = useState();
56639
- const [longitude, setLongitude] = useState();
56638
+ const [latitude, setLatitude] = useState(coordinates?.[0]?.toString());
56639
+ const [longitude, setLongitude] = useState(coordinates?.[1]?.toString());
56640
56640
  const [latitudeError, setLatitudeError] = useState(undefined);
56641
56641
  const [longitudeError, setLongitudeError] = useState(undefined);
56642
+ useEffect(()=>{
56643
+ setLatitude(coordinates?.[0]?.toString());
56644
+ setLongitude(coordinates?.[1]?.toString());
56645
+ }, [
56646
+ coordinates
56647
+ ]);
56642
56648
  const handleLatitudeChange = (value)=>{
56643
56649
  setLatitudeError(undefined);
56644
56650
  setLatitude(value);
@@ -56679,18 +56685,6 @@ function DDCoordinatesInput({ coordinates, disabled, name, onChange, readOnly })
56679
56685
  onChange(undefined);
56680
56686
  }
56681
56687
  };
56682
- const formattedLatitude = ()=>{
56683
- if (latitude) {
56684
- return toControlledValue(latitude);
56685
- }
56686
- return toControlledValue(coordinates?.[0]);
56687
- };
56688
- const formattedLongitude = ()=>{
56689
- if (longitude) {
56690
- return toControlledValue(longitude);
56691
- }
56692
- return toControlledValue(coordinates?.[1]);
56693
- };
56694
56688
  return /*#__PURE__*/ jsxs(Box$9, {
56695
56689
  children: [
56696
56690
  /*#__PURE__*/ jsx(DDInput, {
@@ -56700,7 +56694,7 @@ function DDCoordinatesInput({ coordinates, disabled, name, onChange, readOnly })
56700
56694
  onChange: (e)=>handleLatitudeChange(e.target.value),
56701
56695
  placeholder: "Latitude",
56702
56696
  readOnly: readOnly,
56703
- value: formattedLatitude() ?? ''
56697
+ value: toControlledValue(latitude) ?? ''
56704
56698
  }),
56705
56699
  /*#__PURE__*/ jsx(DDInput, {
56706
56700
  "data-cy": "coordinates-dd-input-lon",
@@ -56709,7 +56703,7 @@ function DDCoordinatesInput({ coordinates, disabled, name, onChange, readOnly })
56709
56703
  onChange: (e)=>handleLongitudeChange(e.target.value),
56710
56704
  placeholder: "Longitude",
56711
56705
  readOnly: readOnly,
56712
- value: formattedLongitude() ?? ''
56706
+ value: toControlledValue(longitude) ?? ''
56713
56707
  }),
56714
56708
  /*#__PURE__*/ jsx(CoordinatesType$2, {
56715
56709
  children: "(DD)"
@@ -67032,9 +67026,9 @@ function DMDCoordinatesInput({ coordinates, coordinatesFormat, disabled, name, o
67032
67026
  function completeCoordinates(mask) {
67033
67027
  setError('');
67034
67028
  // eslint-disable-next-line no-underscore-dangle
67035
- const latitude = mask._unmaskedValue.substring(0, 7);
67029
+ const latitude = mask._unmaskedValue.substring(0, 8);
67036
67030
  // eslint-disable-next-line no-underscore-dangle
67037
- const longitude = mask._unmaskedValue.substring(7, mask._unmaskedValue.length);
67031
+ const longitude = mask._unmaskedValue.substring(8, mask._unmaskedValue.length);
67038
67032
  const NS = latitude[latitude.length - 1].toUpperCase();
67039
67033
  if (![
67040
67034
  'N',
@@ -67049,7 +67043,7 @@ function DMDCoordinatesInput({ coordinates, coordinatesFormat, disabled, name, o
67049
67043
  return;
67050
67044
  }
67051
67045
  const latitudeMinutes = parseInt(latitude.substring(2, 4), 10);
67052
- const latitudeSeconds = parseInt(latitude.substring(4, 6), 10);
67046
+ const latitudeSeconds = parseInt(latitude.substring(4, 7), 10);
67053
67047
  const EW = longitude[longitude.length - 1].toUpperCase();
67054
67048
  if (![
67055
67049
  'E',
@@ -67064,9 +67058,9 @@ function DMDCoordinatesInput({ coordinates, coordinatesFormat, disabled, name, o
67064
67058
  return;
67065
67059
  }
67066
67060
  const longitudeMinutes = parseInt(longitude.substring(3, 5), 10);
67067
- const longitudeSeconds = parseInt(longitude.substring(5, 7), 10);
67068
- const dLatitude = dmsToDecimal(latitudeDegrees, latitudeMinutes + 10 ** -2 * latitudeSeconds, 0, NS, 6);
67069
- const dLongitude = dmsToDecimal(longitudeDegrees, longitudeMinutes + 10 ** -2 * longitudeSeconds, 0, EW, 6);
67061
+ const longitudeSeconds = parseInt(longitude.substring(5, 8), 10);
67062
+ const dLatitude = dmsToDecimal(latitudeDegrees, latitudeMinutes + 10 ** -3 * latitudeSeconds, 0, NS, 6);
67063
+ const dLongitude = dmsToDecimal(longitudeDegrees, longitudeMinutes + 10 ** -3 * longitudeSeconds, 0, EW, 6);
67070
67064
  if (isNumeric(dLatitude) && isNumeric(dLongitude)) {
67071
67065
  onChange([
67072
67066
  dLatitude,
@@ -67082,7 +67076,7 @@ function DMDCoordinatesInput({ coordinates, coordinatesFormat, disabled, name, o
67082
67076
  "data-cy": "dmd-coordinates-input",
67083
67077
  disabled: disabled,
67084
67078
  lazy: false,
67085
- mask: "00° 00.00′ a 000° 00.00′ a",
67079
+ mask: "00° 00.000′ a 000° 00.000′ a",
67086
67080
  name: name,
67087
67081
  // @ts-ignore
67088
67082
  onAccept: (_, mask)=>setValue(mask.value),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mtes-mct/monitor-ui",
3
3
  "description": "Common React components, hooks, utilities and CSS stylesheets for MonitorFish, MonitorEnv and RapportNav.",
4
- "version": "24.21.1",
4
+ "version": "24.21.3",
5
5
  "license": "AGPL-3.0",
6
6
  "type": "module",
7
7
  "engines": {