@mtes-mct/monitor-ui 13.7.0 → 13.7.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 CHANGED
@@ -1,3 +1,18 @@
1
+ ## [13.7.1](https://github.com/MTES-MCT/monitor-ui/compare/v13.7.0...v13.7.1) (2024-03-15)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **tables:** stop click event propagation in RowCheckbox ([7e218ec](https://github.com/MTES-MCT/monitor-ui/commit/7e218eccc1d84c51e5c342c5eb4bfef20744e9f0))
7
+ * **utils:** remove conditional types from getFilteredCollection() ([472e11f](https://github.com/MTES-MCT/monitor-ui/commit/472e11fe02b65ae4295a8b0a2322ff14af370365))
8
+
9
+ ## [13.7.0](https://github.com/MTES-MCT/monitor-ui/compare/v13.6.0...v13.7.0) (2024-03-15)
10
+
11
+
12
+ ### Features
13
+
14
+ * **utils:** add getFilteredCollection() ([47eb5ff](https://github.com/MTES-MCT/monitor-ui/commit/47eb5ff8dc75a0b5c3dfc8ea081a21a0aa16840f))
15
+
1
16
  ## [13.6.0](https://github.com/MTES-MCT/monitor-ui/compare/v13.5.0...v13.6.0) (2024-03-14)
2
17
 
3
18
 
@@ -1 +1 @@
1
- {"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Action.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yGA0BlB,CAAA"}
1
+ {"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Action.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yGAclB,CAAA"}
@@ -1,2 +1,4 @@
1
- export declare const Body: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
1
+ export declare const Body: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
2
+ $color?: string;
3
+ }, never>;
2
4
  //# sourceMappingURL=Body.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Body.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Body.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,yGAiBhB,CAAA"}
1
+ {"version":3,"file":"Body.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Body.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI;aAAyB,MAAM;SAiB/C,CAAA"}
@@ -11,7 +11,9 @@ export declare const Box: import("styled-components").StyledComponent<"div", imp
11
11
  }, never>;
12
12
  export declare const Dialog: typeof RawDialog & {
13
13
  Action: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
14
- Body: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
14
+ Body: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
15
+ $color?: string;
16
+ }, never>;
15
17
  Title: import("styled-components").StyledComponent<"h4", import("styled-components").DefaultTheme, {}, never>;
16
18
  };
17
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACzD,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CACjC,CAAA;AACD,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAkB,EAAE,GAAG,WAAW,EAAE,EAAE,WAAW,2CAUjG;yBAVe,SAAS;;;AAYzB,eAAO,MAAM,GAAG;iBACD,OAAO;SAYrB,CAAA;AAiCD,eAAO,MAAM,MAAM;;;;CAIjB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACzD,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CACjC,CAAA;AACD,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAkB,EAAE,GAAG,WAAW,EAAE,EAAE,WAAW,2CAUjG;yBAVe,SAAS;;;AAYzB,eAAO,MAAM,GAAG;iBACD,OAAO;SAYrB,CAAA;AAiCD,eAAO,MAAM,MAAM;;;;;;CAIjB,CAAA"}
package/index.js CHANGED
@@ -17599,24 +17599,12 @@ const Action = styled.div`
17599
17599
  display: flex;
17600
17600
  flex-direction: column-reverse;
17601
17601
  padding: 8px 8px 8px 8px;
17602
+ gap: 8px;
17602
17603
  @media (min-width: 740px) {
17603
17604
  align-items: center;
17604
17605
  flex-direction: row;
17605
17606
  justify-content: center;
17606
- padding: 32px 8px 32px 8px;
17607
- }
17608
-
17609
- > button {
17610
- margin-bottom: 2px;
17611
- }
17612
- @media (min-width: 740px) {
17613
- > button {
17614
- margin-bottom: 0;
17615
-
17616
- &:first-child {
17617
- margin-right: 8px;
17618
- }
17619
- }
17607
+ padding: 32px 48px 48px 48px;
17620
17608
  }
17621
17609
  `;
17622
17610
 
@@ -17629,12 +17617,12 @@ const Body$1 = styled.div`
17629
17617
  padding: 8px 8px 8px 8px;
17630
17618
  text-align: center;
17631
17619
  @media (min-width: 740px) {
17632
- padding: 48px 8px 8px 8px;
17620
+ padding: 48px 48px 0px 48px;
17633
17621
  text-align: center;
17634
17622
  }
17635
17623
 
17636
17624
  > p {
17637
- color: ${(p)=>p.theme.color.slateGray};
17625
+ color: ${(p)=>p.$color ? p.$color : p.theme.color.slateGray};
17638
17626
  padding-top: 2px;
17639
17627
  }
17640
17628
  `;
@@ -75896,7 +75884,8 @@ function RowCheckbox({ className = '', disabled = false, isChecked = false, isIn
75896
75884
  disabled: disabled,
75897
75885
  indeterminate: isIndeterminate,
75898
75886
  // eslint-disable-next-line @typescript-eslint/naming-convention
75899
- onChange: (_, __, event)=>onChange(event)
75887
+ onChange: (_, __, event)=>onChange(event),
75888
+ onClick: stopMouseEventPropagation
75900
75889
  });
75901
75890
  }
75902
75891
 
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": "13.7.0",
4
+ "version": "13.7.2",
5
5
  "license": "AGPL-3.0",
6
6
  "type": "module",
7
7
  "engines": {
@@ -1 +1 @@
1
- {"version":3,"file":"RowCheckbox.d.ts","sourceRoot":"","sources":["../../../src/tables/TableWithSelectableRows/RowCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;CAChE,CAAA;AAED,wBAAgB,WAAW,CAAC,EAC1B,SAAc,EACd,QAAgB,EAChB,SAAiB,EACjB,eAAuB,EACvB,QAA0B,EAC3B,EAAE,gBAAgB,GAAG,SAAS,CAAC,gBAAgB,CAAC,2CAWhD"}
1
+ {"version":3,"file":"RowCheckbox.d.ts","sourceRoot":"","sources":["../../../src/tables/TableWithSelectableRows/RowCheckbox.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;CAChE,CAAA;AACD,wBAAgB,WAAW,CAAC,EAC1B,SAAc,EACd,QAAgB,EAChB,SAAiB,EACjB,eAAuB,EACvB,QAA0B,EAC3B,EAAE,gBAAgB,GAAG,SAAS,CAAC,gBAAgB,CAAC,2CAYhD"}
@@ -1,4 +1,3 @@
1
1
  import type { Filter } from '../types/definitions';
2
- export declare function getFilteredCollection<T>(collection: undefined, filters: Array<Filter<T>>): undefined;
3
- export declare function getFilteredCollection<T>(collection: T[], filters: Array<Filter<T>>): T[];
2
+ export declare function getFilteredCollection<T>(collection: T[] | undefined, filters: Array<Filter<T>>): T[] | undefined;
4
3
  //# sourceMappingURL=getFilteredCollection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getFilteredCollection.d.ts","sourceRoot":"","sources":["../../src/utils/getFilteredCollection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;AACrG,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAA"}
1
+ {"version":3,"file":"getFilteredCollection.d.ts","sourceRoot":"","sources":["../../src/utils/getFilteredCollection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,SAAS,CAMhH"}
@@ -1,3 +1,3 @@
1
1
  import type { MouseEvent } from 'react';
2
- export declare function stopMouseEventPropagation(event: MouseEvent<HTMLElement>): void;
2
+ export declare function stopMouseEventPropagation(event: MouseEvent<HTMLElement> | React.SyntheticEvent<Element, Event>): void;
3
3
  //# sourceMappingURL=stopMouseEventPropagation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stopMouseEventPropagation.d.ts","sourceRoot":"","sources":["../../src/utils/stopMouseEventPropagation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEvC,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,QAEvE"}
1
+ {"version":3,"file":"stopMouseEventPropagation.d.ts","sourceRoot":"","sources":["../../src/utils/stopMouseEventPropagation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEvC,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,QAE9G"}