@mtes-mct/monitor-ui 23.2.0 → 23.3.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,21 @@
1
+ ## [23.2.0](https://github.com/MTES-MCT/monitor-ui/compare/v23.1.3...v23.2.0) (2024-09-27)
2
+
3
+
4
+ ### Features
5
+
6
+ * **elements:** make size prop optional in LinkButton ([e99e710](https://github.com/MTES-MCT/monitor-ui/commit/e99e71049096165c0b2a83c1003f93b55101b8d6))
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **elements:** add missing default className to LinkButton ([8c7d259](https://github.com/MTES-MCT/monitor-ui/commit/8c7d25981f93d01bb0887cc6850cf27248c2db9f))
12
+ * **elements:** prefix styled component props in LinkButton ([03f02ff](https://github.com/MTES-MCT/monitor-ui/commit/03f02ff83b20ffa7823ba06f0f6e136b869f92e8))
13
+
14
+
15
+ ### Buid System & Dependencies
16
+
17
+ * **tsconfig:** add [@theme](https://github.com/theme) path ([7b8fc7a](https://github.com/MTES-MCT/monitor-ui/commit/7b8fc7af2e22c98ac42b6d2197ebada0d444d141))
18
+
1
19
  ## [23.1.3](https://github.com/MTES-MCT/monitor-ui/compare/v23.1.2...v23.1.3) (2024-09-27)
2
20
 
3
21
 
@@ -13,6 +13,7 @@ declare namespace Cypress {
13
13
  options?: Partial<{
14
14
  index: number
15
15
  withinSelector: string
16
+ withoutScroll: boolean
16
17
  }>
17
18
  ): Chainable<JQuery<HTMLButtonElement>>
18
19
 
package/cypress/index.js CHANGED
@@ -71,7 +71,7 @@ function findButton(label, preSelector, { index, prevSubjectElement }) {
71
71
  }
72
72
  return undefined;
73
73
  }
74
- function clickButton(prevSubjectElements, label, { index = 0, withinSelector } = {}, leftRetries = RETRIES) {
74
+ function clickButton(prevSubjectElements, label, { index = 0, withinSelector, withoutScroll = false } = {}, leftRetries = RETRIES) {
75
75
  const prevSubjectElement = prevSubjectElements ? prevSubjectElements[0] : undefined;
76
76
  if (prevSubjectElements && !prevSubjectElements[0]) {
77
77
  throw new Error('`prevSubjectElements[0]` is undefined.');
@@ -82,7 +82,7 @@ function clickButton(prevSubjectElements, label, { index = 0, withinSelector } =
82
82
  prevSubjectElement
83
83
  });
84
84
  if (maybeButton) {
85
- return cy.wrap(maybeButton).scrollIntoView().forceClick().wait(250);
85
+ return (withoutScroll ? cy.wrap(maybeButton).forceClick() : cy.wrap(maybeButton).scrollIntoView().forceClick()).wait(250);
86
86
  }
87
87
  if (leftRetries > 0) {
88
88
  return cy.wait(250).then(()=>{
package/index.js CHANGED
@@ -55453,7 +55453,7 @@ function CheckPicker({ className, customSearch, customSearchMinQueryLength = 1,
55453
55453
  });
55454
55454
  }
55455
55455
 
55456
- function c(u,e,c){var i=this,a=useRef(null),o=useRef(0),f=useRef(null),l=useRef([]),m=useRef(),v=useRef(),d=useRef(u),p=useRef(!0);useEffect(function(){d.current=u;},[u]);var g=!e&&0!==e&&"undefined"!=typeof window;if("function"!=typeof u)throw new TypeError("Expected a function");e=+e||0;var w=!!(c=c||{}).leading,s=!("trailing"in c)||!!c.trailing,x="maxWait"in c,y=x?Math.max(+c.maxWait||0,e):null;useEffect(function(){return p.current=!0,function(){p.current=!1;}},[]);var h=useMemo(function(){var r=function(r){var n=l.current,t=m.current;return l.current=m.current=null,o.current=r,v.current=d.current.apply(t,n)},n=function(r,n){g&&cancelAnimationFrame(f.current),f.current=g?requestAnimationFrame(r):setTimeout(r,n);},t=function(r){if(!p.current)return !1;var n=r-a.current;return !a.current||n>=e||n<0||x&&r-o.current>=y},u=function(n){return f.current=null,s&&l.current?r(n):(l.current=m.current=null,v.current)},c=function r(){var c=Date.now();if(t(c))return u(c);if(p.current){var i=e-(c-a.current),f=x?Math.min(i,y-(c-o.current)):i;n(r,f);}},h=function(){var u=Date.now(),d=t(u);if(l.current=[].slice.call(arguments),m.current=i,a.current=u,d){if(!f.current&&p.current)return o.current=a.current,n(c,e),w?r(a.current):v.current;if(x)return n(c,e),r(a.current)}return f.current||n(c,e),v.current};return h.cancel=function(){f.current&&(g?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=m.current=f.current=null;},h.isPending=function(){return !!f.current},h.flush=function(){return f.current?u(Date.now()):v.current},h},[w,x,e,y,s,g]);return h}
55456
+ function c(e,u,c){var i=this,a=useRef(null),o=useRef(0),f=useRef(null),l=useRef([]),v=useRef(),m=useRef(),d=useRef(e),g=useRef(!0);d.current=e;var p="undefined"!=typeof window,w=!u&&0!==u&&p;if("function"!=typeof e)throw new TypeError("Expected a function");u=+u||0;var s=!!(c=c||{}).leading,x=!("trailing"in c)||!!c.trailing,h="maxWait"in c,y="debounceOnServer"in c&&!!c.debounceOnServer,F=h?Math.max(+c.maxWait||0,u):null;useEffect(function(){return g.current=!0,function(){g.current=!1;}},[]);var A=useMemo(function(){var r=function(r){var n=l.current,t=v.current;return l.current=v.current=null,o.current=r,m.current=d.current.apply(t,n)},n=function(r,n){w&&cancelAnimationFrame(f.current),f.current=w?requestAnimationFrame(r):setTimeout(r,n);},t=function(r){if(!g.current)return !1;var n=r-a.current;return !a.current||n>=u||n<0||h&&r-o.current>=F},e=function(n){return f.current=null,x&&l.current?r(n):(l.current=v.current=null,m.current)},c=function r(){var c=Date.now();if(t(c))return e(c);if(g.current){var i=u-(c-a.current),f=h?Math.min(i,F-(c-o.current)):i;n(r,f);}},A=function(){if(p||y){var e=Date.now(),d=t(e);if(l.current=[].slice.call(arguments),v.current=i,a.current=e,d){if(!f.current&&g.current)return o.current=a.current,n(c,u),s?r(a.current):m.current;if(h)return n(c,u),r(a.current)}return f.current||n(c,u),m.current}};return A.cancel=function(){f.current&&(w?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=v.current=f.current=null;},A.isPending=function(){return !!f.current},A.flush=function(){return f.current?e(Date.now()):m.current},A},[s,h,u,F,x,w,p,y]);return A}
55457
55457
 
55458
55458
  function isNumeric(val) {
55459
55459
  // parseFloat NaNs numeric-cast false positives (null|true|false|"")
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.2.0",
4
+ "version": "23.3.0",
5
5
  "license": "AGPL-3.0",
6
6
  "type": "module",
7
7
  "engines": {