@mtes-mct/monitor-ui 23.1.1 → 23.1.2
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 +26 -0
- package/index.js +8 -35
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
## [23.1.1](https://github.com/MTES-MCT/monitor-ui/compare/v23.1.0...v23.1.1) (2024-09-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Styles
|
|
5
|
+
|
|
6
|
+
* **elements:** fix close button size in SingleTag ([ff8a1b5](https://github.com/MTES-MCT/monitor-ui/commit/ff8a1b5f7bf2ba4b05d791ea038a9b25dde41665))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **fields:** add debounce ([79b19fb](https://github.com/MTES-MCT/monitor-ui/commit/79b19fb37eae38612feab4328021d4d233775844))
|
|
12
|
+
* **fields:** apply review comment ([8e864da](https://github.com/MTES-MCT/monitor-ui/commit/8e864da6d96b7b211200bfe01eabba0c1283a675))
|
|
13
|
+
* **fields:** fix pointer-events ([13d1955](https://github.com/MTES-MCT/monitor-ui/commit/13d195566a61c99e9aae297f201dce4c425cfbc9))
|
|
14
|
+
* **fields:** handle undefined min/max prop in DateRangePicker number inputs ([8e10304](https://github.com/MTES-MCT/monitor-ui/commit/8e10304f20266839f7c727c686f0ad1038f8b0a9))
|
|
15
|
+
* **fields:** memoize list props ([54c4d3f](https://github.com/MTES-MCT/monitor-ui/commit/54c4d3f2090a6f470362dc85bdde45e9f26cb944))
|
|
16
|
+
* **fields:** set default listProps value to empty object in Select ([88ce94f](https://github.com/MTES-MCT/monitor-ui/commit/88ce94feff3c509c771586013f98be1a1cba5def))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Buid System & Dependencies
|
|
20
|
+
|
|
21
|
+
* **dev-deps:** bump rollup from 4.21.2 to 4.22.4 ([4684626](https://github.com/MTES-MCT/monitor-ui/commit/4684626b83cc16ab102c46ed4891fcfe0cde7ff2))
|
|
22
|
+
* **dev-deps:** bump the non-major-dev-dependencies group across 1 directory with 23 updates ([491a8c6](https://github.com/MTES-MCT/monitor-ui/commit/491a8c64b5f9d00d88bded52b868b5d9aa279398))
|
|
23
|
+
* **dev-deps:** bump vite from 5.4.3 to 5.4.6 ([8268198](https://github.com/MTES-MCT/monitor-ui/commit/8268198bc7156700bf58c2be2449623857dab67d))
|
|
24
|
+
* **dev-deps:** upgrade dev deps in /e2e/release/sample ([1581c0a](https://github.com/MTES-MCT/monitor-ui/commit/1581c0ab0e00134d51fe9caa54c8204adc416d3f))
|
|
25
|
+
* **e2e:** remove useless browserslist in e2e release sample package.json ([398e20a](https://github.com/MTES-MCT/monitor-ui/commit/398e20a21ca3b42a74d0df5116983865d527edf7))
|
|
26
|
+
|
|
1
27
|
## [23.1.0](https://github.com/MTES-MCT/monitor-ui/compare/v23.0.0...v23.1.0) (2024-09-25)
|
|
2
28
|
|
|
3
29
|
|
package/index.js
CHANGED
|
@@ -53288,32 +53288,21 @@ NewWindow.defaultProps = {
|
|
|
53288
53288
|
// An error here most likely happens when trying to access stylesheets from other domains,
|
|
53289
53289
|
// which is a CORS violation and should be ignored.
|
|
53290
53290
|
// eslint-disable-next-line no-console
|
|
53291
|
-
console.debug(err);
|
|
53292
53291
|
return;
|
|
53293
53292
|
}
|
|
53294
53293
|
if (rules) {
|
|
53295
|
-
// IE11 is very slow for appendChild, so use plain string here
|
|
53296
|
-
const ruleText = [];
|
|
53297
53294
|
// Write the text of each rule into the body of the style element
|
|
53298
|
-
Array.from(
|
|
53299
|
-
|
|
53300
|
-
|
|
53301
|
-
|
|
53302
|
-
|
|
53303
|
-
// need to assemble them
|
|
53304
|
-
returnText = getKeyFrameText(cssRule);
|
|
53305
|
-
} else if ([
|
|
53306
|
-
CSSRule.IMPORT_RULE,
|
|
53307
|
-
CSSRule.FONT_FACE_RULE
|
|
53308
|
-
].includes(type)) {
|
|
53295
|
+
const ruleText = Array.from(rules).flat().map((cssRule)=>{
|
|
53296
|
+
if ([
|
|
53297
|
+
'CSSImportRule',
|
|
53298
|
+
'CSSFontFaceRule'
|
|
53299
|
+
].includes(cssRule.constructor.name)) {
|
|
53309
53300
|
// Check if the cssRule type is CSSImportRule (3) or CSSFontFaceRule (5)
|
|
53310
53301
|
// to handle local imports on a about:blank page
|
|
53311
53302
|
// '/custom.css' turns to 'http://my-site.com/custom.css'
|
|
53312
|
-
|
|
53313
|
-
} else {
|
|
53314
|
-
returnText = cssRule.cssText;
|
|
53303
|
+
return fixUrlForRule(cssRule);
|
|
53315
53304
|
}
|
|
53316
|
-
|
|
53305
|
+
return cssRule.cssText;
|
|
53317
53306
|
});
|
|
53318
53307
|
const newStyleEl = target.createElement('style');
|
|
53319
53308
|
newStyleEl.textContent = ruleText.join('\n');
|
|
@@ -53328,22 +53317,6 @@ NewWindow.defaultProps = {
|
|
|
53328
53317
|
});
|
|
53329
53318
|
target.head.appendChild(headFrag);
|
|
53330
53319
|
}
|
|
53331
|
-
/**
|
|
53332
|
-
* Make keyframe rules.
|
|
53333
|
-
*/ // This should be `CSSRule` instead of `any` but this code is a bit tedious.
|
|
53334
|
-
function getKeyFrameText(cssRule/** CSSRule */ ) {
|
|
53335
|
-
const tokens = [
|
|
53336
|
-
'@keyframes',
|
|
53337
|
-
cssRule.name,
|
|
53338
|
-
'{'
|
|
53339
|
-
];
|
|
53340
|
-
Array.from(cssRule.cssRules).forEach((keyframesCssRule)=>{
|
|
53341
|
-
// type === CSSRule.KEYFRAME_RULE should always be true
|
|
53342
|
-
tokens.push(keyframesCssRule.keyText, '{', keyframesCssRule.style.cssText, '}');
|
|
53343
|
-
});
|
|
53344
|
-
tokens.push('}');
|
|
53345
|
-
return tokens.join(' ');
|
|
53346
|
-
}
|
|
53347
53320
|
/**
|
|
53348
53321
|
* Handle local import urls.
|
|
53349
53322
|
*/ function fixUrlForRule(cssRule) {
|
|
@@ -69313,7 +69286,7 @@ function Select({ className, customSearch, customSearchMinQueryLength = 1, disab
|
|
|
69313
69286
|
if (!boxRef.current) {
|
|
69314
69287
|
return;
|
|
69315
69288
|
}
|
|
69316
|
-
const divs = boxRef.current.querySelectorAll(
|
|
69289
|
+
const divs = boxRef.current.querySelectorAll(`[id="${originalProps.name}-listbox"] div`);
|
|
69317
69290
|
const targetDiv = divs[2];
|
|
69318
69291
|
/**
|
|
69319
69292
|
* Reset the 'pointer-events' style
|
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": "23.1.
|
|
4
|
+
"version": "23.1.2",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|