@mtes-mct/monitor-ui 24.5.0 → 24.6.0
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/cypress/index.js +18 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [24.5.0](https://github.com/MTES-MCT/monitor-ui/compare/v24.4.0...v24.5.0) (2024-11-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **icons:** modify icons for selection [scare and polygons] ([1d9b566](https://github.com/MTES-MCT/monitor-ui/commit/1d9b566ade9c0d638484853e547056d738477841))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Buid System & Dependencies
|
|
10
|
+
|
|
11
|
+
* **dev-deps:** bump the all-non-major-dependencies group ([69cb9ab](https://github.com/MTES-MCT/monitor-ui/commit/69cb9abfe8cde9a158f6a1d756e0f6fb2d440c63))
|
|
12
|
+
|
|
1
13
|
## [24.4.0](https://github.com/MTES-MCT/monitor-ui/compare/v24.3.1...v24.4.0) (2024-10-29)
|
|
2
14
|
|
|
3
15
|
|
package/cypress/index.js
CHANGED
|
@@ -62,12 +62,27 @@ function findButton(label, preSelector, { index, prevSubjectElement }) {
|
|
|
62
62
|
if (buttonElementByTitle) {
|
|
63
63
|
return buttonElementByTitle;
|
|
64
64
|
}
|
|
65
|
-
const
|
|
65
|
+
const buttonRoleElement = findElementByText(`${preSelector}[role="button"]`, label, {
|
|
66
66
|
index,
|
|
67
67
|
inElement: prevSubjectElement
|
|
68
68
|
});
|
|
69
|
-
if (
|
|
70
|
-
return
|
|
69
|
+
if (buttonRoleElement) {
|
|
70
|
+
return buttonRoleElement;
|
|
71
|
+
}
|
|
72
|
+
const buttonRoleElementByAriaLabel = prevSubjectElement ? prevSubjectElement.querySelectorAll(`${preSelector}[role="button"][aria-label="${label}"]`)[index] : Cypress.$(`${preSelector}[role="button"][aria-label="${label}"]`).get(index);
|
|
73
|
+
if (buttonRoleElementByAriaLabel) {
|
|
74
|
+
return buttonRoleElementByAriaLabel;
|
|
75
|
+
}
|
|
76
|
+
const buttonRoleElementByTitle = prevSubjectElement ? prevSubjectElement.querySelectorAll(`${preSelector}[role="button"][title="${label}"]`)[index] : Cypress.$(`${preSelector}[role="button"][title="${label}"]`).get(index);
|
|
77
|
+
if (buttonRoleElementByTitle) {
|
|
78
|
+
return buttonRoleElementByTitle;
|
|
79
|
+
}
|
|
80
|
+
const menuItemRoleElement = findElementByText(`${preSelector}[role="menuitem"]`, label, {
|
|
81
|
+
index,
|
|
82
|
+
inElement: prevSubjectElement
|
|
83
|
+
});
|
|
84
|
+
if (menuItemRoleElement) {
|
|
85
|
+
return menuItemRoleElement;
|
|
71
86
|
}
|
|
72
87
|
return undefined;
|
|
73
88
|
}
|
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.
|
|
4
|
+
"version": "24.6.0",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@tanstack/react-table": "8.20.5",
|
|
13
13
|
"@tanstack/react-virtual": "beta",
|
|
14
14
|
"prop-types": "15.8.1",
|
|
15
|
-
"tslib": "2.8.
|
|
15
|
+
"tslib": "2.8.1"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"@sentry/react": "^7.0.0 || ^8.0.0",
|