@mtes-mct/monitor-ui 18.4.2 → 18.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.
- package/CHANGELOG.md +12 -0
- package/fields/PhoneInput.d.ts.map +1 -1
- package/index.js +13 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [18.4.2](https://github.com/MTES-MCT/monitor-ui/compare/v18.4.1...v18.4.2) (2024-07-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **components:** add tertiary to dropdown ([805e34e](https://github.com/MTES-MCT/monitor-ui/commit/805e34eb2e6a1c8d44e1b9c738f77c8f13186721))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Buid System & Dependencies
|
|
10
|
+
|
|
11
|
+
* **dev-deps:** bump the non-major-dev-dependencies group across 1 directory with 17 updates ([5313127](https://github.com/MTES-MCT/monitor-ui/commit/53131272261e00bbf36e68b8a2e051a6c06a9b86))
|
|
12
|
+
|
|
1
13
|
## [18.4.1](https://github.com/MTES-MCT/monitor-ui/compare/v18.4.0...v18.4.1) (2024-07-02)
|
|
2
14
|
|
|
3
15
|
### Bug Fixes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneInput.d.ts","sourceRoot":"","sources":["../../src/fields/PhoneInput.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAIvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,oBAAoB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC1C,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,U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"}
|
package/index.js
CHANGED
|
@@ -68557,6 +68557,12 @@ const internationalFormat = {
|
|
|
68557
68557
|
},
|
|
68558
68558
|
mask: '`@@ #[00] 000 000 000 000'
|
|
68559
68559
|
};
|
|
68560
|
+
const internationalFrenchFormat = {
|
|
68561
|
+
definitions: {
|
|
68562
|
+
'@': /0/
|
|
68563
|
+
},
|
|
68564
|
+
mask: '`@@ 00 00 00 00 00'
|
|
68565
|
+
};
|
|
68560
68566
|
const frenchFormat = {
|
|
68561
68567
|
definitions: {
|
|
68562
68568
|
'#': /[1-9]/,
|
|
@@ -68593,18 +68599,22 @@ const defaultFormat = {
|
|
|
68593
68599
|
$isTransparent: isTransparent,
|
|
68594
68600
|
disabled: disabled,
|
|
68595
68601
|
dispatch: (appended, dynamicMasked)=>{
|
|
68596
|
-
const phoneNumber = dynamicMasked.unmaskedValue + appended;
|
|
68602
|
+
const phoneNumber = (dynamicMasked.unmaskedValue + appended).replace(/\s+/g, '');
|
|
68597
68603
|
if (phoneNumber.startsWith('00')) {
|
|
68604
|
+
if (value && value.length === 12 && phoneNumber === value) {
|
|
68605
|
+
return dynamicMasked.compiledMasks[1];
|
|
68606
|
+
}
|
|
68598
68607
|
return dynamicMasked.compiledMasks[0];
|
|
68599
68608
|
}
|
|
68600
68609
|
if (phoneNumber.startsWith('0') && value && value.length <= 10 && phoneNumber === value) {
|
|
68601
|
-
return dynamicMasked.compiledMasks[
|
|
68610
|
+
return dynamicMasked.compiledMasks[2];
|
|
68602
68611
|
}
|
|
68603
|
-
return dynamicMasked.compiledMasks[
|
|
68612
|
+
return dynamicMasked.compiledMasks[3];
|
|
68604
68613
|
},
|
|
68605
68614
|
id: name,
|
|
68606
68615
|
mask: [
|
|
68607
68616
|
internationalFormat,
|
|
68617
|
+
internationalFrenchFormat,
|
|
68608
68618
|
frenchFormat,
|
|
68609
68619
|
defaultFormat
|
|
68610
68620
|
],
|
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": "18.
|
|
4
|
+
"version": "18.5.1",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|