@mtes-mct/monitor-ui 10.17.0 → 10.18.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 CHANGED
@@ -1,3 +1,23 @@
1
+ ## [10.17.1](https://github.com/MTES-MCT/monitor-ui/compare/v10.17.0...v10.17.1) (2024-01-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **components:** truncate long titles in MapMenuDialog ([ce25040](https://github.com/MTES-MCT/monitor-ui/commit/ce250400ddd8c955783e1aed5c0253ed14eb3972))
7
+
8
+ ## [10.17.0](https://github.com/MTES-MCT/monitor-ui/compare/v10.16.1...v10.17.0) (2024-01-03)
9
+
10
+
11
+ ### Features
12
+
13
+ * **cypress:** add waitForLastRequest ([2739040](https://github.com/MTES-MCT/monitor-ui/commit/2739040cf1f6f74a6a38d9902dc485be5003b21d))
14
+ * **hooks:** add useDeepCompareEffect ([d74f87a](https://github.com/MTES-MCT/monitor-ui/commit/d74f87ac390b636b50ab44d027aff13618a711bd))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **hooks:** fix import ([bd0449f](https://github.com/MTES-MCT/monitor-ui/commit/bd0449ff7bca816cb1570e2c46aec7bb05a64664))
20
+
1
21
  ## [10.16.1](https://github.com/MTES-MCT/monitor-ui/compare/v10.16.0...v10.16.1) (2023-12-20)
2
22
 
3
23
 
@@ -4,7 +4,9 @@ export declare const MapMenuDialog: {
4
4
  Container: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
5
5
  Footer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
6
6
  Header: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
7
- Title: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
7
+ Title: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
8
+ title: string;
9
+ }, "title">;
8
10
  VisibilityButton: import("styled-components").StyledComponent<any, import("styled-components").DefaultTheme, object, string | number | symbol>;
9
11
  };
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MapMenuDialog/index.tsx"],"names":[],"mappings":"AAqDA,eAAO,MAAM,aAAa;;;;;;;;CAQzB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MapMenuDialog/index.tsx"],"names":[],"mappings":"AA2DA,eAAO,MAAM,aAAa;;;;;;;;;;CAQzB,CAAA"}
@@ -96,13 +96,15 @@ declare namespace Cypress {
96
96
  * body: {
97
97
  * property: 'VALUE',
98
98
  * }
99
- * }, 5)
99
+ * }, 5, response => {
100
+ * console.log('After response', response)
101
+ * })
100
102
  * .its('response.statusCode')
101
103
  * .should('eq', 201)
102
104
  * })
103
105
  * ```
104
106
  */
105
- waitForLastRequest(alias: string, partialRequest, maxRequests: number, level?)
107
+ waitForLastRequest(alias: string, partialRequest, maxRequests: number, level?, callback?: (response) => void)
106
108
  }
107
109
 
108
110
  type DateTuple = [number, number, number]
package/cypress/index.js CHANGED
@@ -1168,7 +1168,7 @@ function getTableRowByText(prevSubjectElements, text) {
1168
1168
  return (prevSubjectElement ? cy.wrap(prevSubjectElement) : cy.get('body')).first().contains(`.Table-SimpleTable tr`, text);
1169
1169
  }
1170
1170
 
1171
- function waitForLastRequest(alias, partialRequest, maxRequests, level = 0) {
1171
+ function waitForLastRequest(alias, partialRequest, maxRequests, level = 0, callback = ()=>{}) {
1172
1172
  if (level === maxRequests) {
1173
1173
  throw new Error(`${maxRequests} requests exceeded`);
1174
1174
  }
@@ -1177,7 +1177,7 @@ function waitForLastRequest(alias, partialRequest, maxRequests, level = 0) {
1177
1177
  // @ts-ignore
1178
1178
  const isMatch = Cypress._.isMatch(interception.request, partialRequest);
1179
1179
  if (isMatch) {
1180
- return interception;
1180
+ return callback(interception.response);
1181
1181
  }
1182
1182
  // eslint-disable-next-line no-console
1183
1183
  cy.log('Intercepted request', JSON.stringify(interception.request));
package/index.js CHANGED
@@ -37962,26 +37962,32 @@ const SecondaryIconButton = styled(PrimaryIconButton)`
37962
37962
  `;
37963
37963
 
37964
37964
  const Container = styled.div`
37965
- width: 320px;
37966
- max-height: 520px;
37967
- margin-right: 6px;
37968
37965
  background-color: ${(p)=>p.theme.color.white};
37969
37966
  box-shadow: 0px 3px 6px ${(p)=>p.theme.color.slateGray};
37970
37967
  display: flex;
37971
37968
  flex-direction: column;
37969
+ margin-right: 6px;
37970
+ max-height: 520px;
37971
+ width: 320px;
37972
37972
  `;
37973
37973
  const Header = styled.div`
37974
- height: 40px;
37974
+ align-items: center;
37975
37975
  background-color: ${(p)=>p.theme.color.charcoal};
37976
37976
  display: flex;
37977
+ height: 40px;
37977
37978
  justify-content: space-between;
37978
37979
  padding: 9px 4px 9px 10px;
37979
- align-items: center;
37980
37980
  `;
37981
- const Title = styled.span`
37981
+ const Title = styled.span.attrs((props)=>({
37982
+ title: String(props.children)
37983
+ }))`
37984
+ color: ${(p)=>p.theme.color.white};
37982
37985
  font-size: 16px;
37983
37986
  line-height: 22px;
37984
- color: ${(p)=>p.theme.color.white};
37987
+ margin-right: 6px;
37988
+ text-overflow: ellipsis;
37989
+ overflow: hidden;
37990
+ white-space: nowrap;
37985
37991
  `;
37986
37992
  const Body = styled.div`
37987
37993
  height: calc(100% - 40px);