@zydon/common 2.8.80 → 2.8.82

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.
@@ -12,6 +12,7 @@ declare const useSnackbar: () => {
12
12
  custom: (jsx: (id: string | number) => react.ReactElement<any, string | react.JSXElementConstructor<any>>, data?: ExternalToast | undefined) => string | number;
13
13
  message: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | (() => ReactNode) | null | undefined, data?: ExternalToast | undefined) => string | number;
14
14
  promise: <ToastData>(promise: Promise<ToastData> | (() => Promise<ToastData>), data?: ({
15
+ cancel?: ReactNode | sonner.Action;
15
16
  className?: string | undefined;
16
17
  style?: react.CSSProperties | undefined;
17
18
  position?: ("top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right") | undefined;
@@ -20,7 +21,6 @@ declare const useSnackbar: () => {
20
21
  icon?: ReactNode;
21
22
  duration?: number | undefined;
22
23
  onDismiss?: ((toast: sonner.ToastT) => void) | undefined;
23
- cancel?: ReactNode | sonner.Action;
24
24
  richColors?: boolean | undefined;
25
25
  invert?: boolean | undefined;
26
26
  closeButton?: boolean | undefined;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CustomShadows } from './index-5a5e5dc8.js';
2
- export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from './index-5a5e5dc8.js';
1
+ import { C as CustomShadows } from './index-c8f1e6e7.js';
2
+ export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from './index-c8f1e6e7.js';
3
3
  export { S as SettingsContextValue, _ as SettingsProvider, T as ThemeProviderProps, u as useSettingsContext } from './settings-provider-38d09283.js';
4
4
  export { THEME_CONFIG, default as ThemeProvider } from './theme/theme-provider.js';
5
5
  import { S as SettingsState } from './settings-583c107c.js';
@@ -1,4 +1,4 @@
1
- export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from '../../index-5a5e5dc8.js';
1
+ export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from '../../index-c8f1e6e7.js';
2
2
  import '@mui/lab/TimelineConnector';
3
3
  import '@mui/system';
4
4
  import '@mui/lab/TimelineDot';
@@ -173,7 +173,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
173
173
  float?: csstype.Property.Float | readonly NonNullable<csstype.Property.Float | undefined>[] | readonly csstype.Property.Float[] | undefined;
174
174
  floodColor?: readonly string[] | csstype.Property.FloodColor | readonly csstype.Property.FloodColor[] | undefined;
175
175
  floodOpacity?: readonly ((string & {}) | csstype.Globals)[] | csstype.Property.FloodOpacity | readonly NonNullable<csstype.Property.FloodOpacity | undefined>[] | undefined;
176
- fontFamily?: csstype.Property.FontFamily | readonly string[] | readonly csstype.Property.FontFamily[] | undefined;
176
+ fontFamily?: readonly string[] | csstype.Property.FontFamily | readonly csstype.Property.FontFamily[] | undefined;
177
177
  fontFeatureSettings?: readonly string[] | csstype.Property.FontFeatureSettings | readonly csstype.Property.FontFeatureSettings[] | undefined;
178
178
  fontKerning?: csstype.Property.FontKerning | readonly NonNullable<csstype.Property.FontKerning | undefined>[] | readonly csstype.Property.FontKerning[] | undefined;
179
179
  fontLanguageOverride?: readonly string[] | csstype.Property.FontLanguageOverride | readonly csstype.Property.FontLanguageOverride[] | undefined;
@@ -197,7 +197,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
197
197
  fontVariantNumeric?: readonly string[] | csstype.Property.FontVariantNumeric | readonly csstype.Property.FontVariantNumeric[] | undefined;
198
198
  fontVariantPosition?: csstype.Property.FontVariantPosition | readonly NonNullable<csstype.Property.FontVariantPosition | undefined>[] | readonly csstype.Property.FontVariantPosition[] | undefined;
199
199
  fontVariationSettings?: readonly string[] | csstype.Property.FontVariationSettings | readonly csstype.Property.FontVariationSettings[] | undefined;
200
- fontWeight?: csstype.Property.FontWeight | readonly NonNullable<csstype.Property.FontWeight | undefined>[] | readonly ((string & {}) | csstype.Globals | "bold" | "normal" | "bolder" | "lighter")[] | undefined;
200
+ fontWeight?: csstype.Property.FontWeight | readonly NonNullable<csstype.Property.FontWeight | undefined>[] | readonly ("bold" | (string & {}) | csstype.Globals | "normal" | "bolder" | "lighter")[] | undefined;
201
201
  fontWidth?: readonly string[] | csstype.Property.FontWidth | readonly csstype.Property.FontWidth[] | undefined;
202
202
  forcedColorAdjust?: csstype.Property.ForcedColorAdjust | readonly NonNullable<csstype.Property.ForcedColorAdjust | undefined>[] | readonly csstype.Property.ForcedColorAdjust[] | undefined;
203
203
  gridAutoColumns?: readonly (string | (string & {}))[] | csstype.Property.GridAutoColumns<string | number> | readonly NonNullable<csstype.Property.GridAutoColumns<string | number> | undefined>[] | undefined;
@@ -460,9 +460,9 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
460
460
  x?: readonly (string | (string & {}))[] | csstype.Property.X<string | number> | readonly NonNullable<csstype.Property.X<string | number> | undefined>[] | undefined;
461
461
  y?: readonly (string | (string & {}))[] | csstype.Property.Y<string | number> | readonly NonNullable<csstype.Property.Y<string | number> | undefined>[] | undefined;
462
462
  zIndex?: readonly ((string & {}) | csstype.Globals | "auto")[] | csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | undefined;
463
- zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reset")[] | undefined;
463
+ zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ("reset" | (string & {}) | csstype.Globals | "normal")[] | undefined;
464
464
  all?: csstype.Globals | readonly NonNullable<csstype.Globals | undefined>[] | readonly csstype.Globals[] | undefined;
465
- animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
465
+ animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
466
466
  animationRange?: readonly (string | (string & {}))[] | csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | undefined;
467
467
  background?: readonly (string | (string & {}))[] | csstype.Property.Background<string | number> | readonly NonNullable<csstype.Property.Background<string | number> | undefined>[] | undefined;
468
468
  border?: readonly (string | (string & {}))[] | csstype.Property.Border<string | number> | readonly NonNullable<csstype.Property.Border<string | number> | undefined>[] | undefined;
@@ -474,7 +474,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
474
474
  borderBlockWidth?: readonly (string | (string & {}))[] | csstype.Property.BorderBlockWidth<string | number> | readonly NonNullable<csstype.Property.BorderBlockWidth<string | number> | undefined>[] | undefined;
475
475
  borderBottom?: readonly (string | (string & {}))[] | csstype.Property.BorderBottom<string | number> | readonly NonNullable<csstype.Property.BorderBottom<string | number> | undefined>[] | undefined;
476
476
  borderColor?: readonly string[] | csstype.Property.BorderColor | readonly csstype.Property.BorderColor[] | undefined;
477
- borderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
477
+ borderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
478
478
  borderInline?: readonly (string | (string & {}))[] | csstype.Property.BorderInline<string | number> | readonly NonNullable<csstype.Property.BorderInline<string | number> | undefined>[] | undefined;
479
479
  borderInlineColor?: readonly string[] | csstype.Property.BorderInlineColor | readonly csstype.Property.BorderInlineColor[] | undefined;
480
480
  borderInlineEnd?: readonly (string | (string & {}))[] | csstype.Property.BorderInlineEnd<string | number> | readonly NonNullable<csstype.Property.BorderInlineEnd<string | number> | undefined>[] | undefined;
@@ -509,7 +509,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
509
509
  marginBlock?: readonly (string | (string & {}))[] | csstype.Property.MarginBlock<string | number> | readonly NonNullable<csstype.Property.MarginBlock<string | number> | undefined>[] | undefined;
510
510
  marginInline?: readonly (string | (string & {}))[] | csstype.Property.MarginInline<string | number> | readonly NonNullable<csstype.Property.MarginInline<string | number> | undefined>[] | undefined;
511
511
  mask?: readonly (string | (string & {}))[] | csstype.Property.Mask<string | number> | readonly NonNullable<csstype.Property.Mask<string | number> | undefined>[] | undefined;
512
- maskBorder?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
512
+ maskBorder?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
513
513
  motion?: readonly (string | (string & {}))[] | csstype.Property.Offset<string | number> | readonly NonNullable<csstype.Property.Offset<string | number> | undefined>[] | undefined;
514
514
  offset?: readonly (string | (string & {}))[] | csstype.Property.Offset<string | number> | readonly NonNullable<csstype.Property.Offset<string | number> | undefined>[] | undefined;
515
515
  outline?: readonly (string | (string & {}))[] | csstype.Property.Outline<string | number> | readonly NonNullable<csstype.Property.Outline<string | number> | undefined>[] | undefined;
@@ -758,8 +758,8 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
758
758
  WebkitUserModify?: csstype.Property.WebkitUserModify | readonly NonNullable<csstype.Property.WebkitUserModify | undefined>[] | readonly csstype.Property.WebkitUserModify[] | undefined;
759
759
  WebkitUserSelect?: csstype.Property.WebkitUserSelect | readonly NonNullable<csstype.Property.WebkitUserSelect | undefined>[] | readonly csstype.Property.WebkitUserSelect[] | undefined;
760
760
  WebkitWritingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
761
- MozAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
762
- MozBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
761
+ MozAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
762
+ MozBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
763
763
  MozColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
764
764
  MozColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
765
765
  MozOutlineRadius?: readonly (string | (string & {}))[] | csstype.Property.MozOutlineRadius<string | number> | readonly NonNullable<csstype.Property.MozOutlineRadius<string | number> | undefined>[] | undefined;
@@ -771,16 +771,16 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
771
771
  msScrollSnapX?: readonly string[] | csstype.Property.MsScrollSnapX | readonly csstype.Property.MsScrollSnapX[] | undefined;
772
772
  msScrollSnapY?: readonly string[] | csstype.Property.MsScrollSnapY | readonly csstype.Property.MsScrollSnapY[] | undefined;
773
773
  msTransition?: readonly string[] | csstype.Property.Transition<string & {}> | readonly csstype.Property.Transition<string & {}>[] | undefined;
774
- WebkitAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
774
+ WebkitAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
775
775
  WebkitBorderBefore?: readonly (string | (string & {}))[] | csstype.Property.WebkitBorderBefore<string | number> | readonly NonNullable<csstype.Property.WebkitBorderBefore<string | number> | undefined>[] | undefined;
776
- WebkitBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
776
+ WebkitBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
777
777
  WebkitBorderRadius?: readonly (string | (string & {}))[] | csstype.Property.BorderRadius<string | number> | readonly NonNullable<csstype.Property.BorderRadius<string | number> | undefined>[] | undefined;
778
778
  WebkitColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
779
779
  WebkitColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
780
780
  WebkitFlex?: readonly (string | (string & {}))[] | csstype.Property.Flex<string | number> | readonly NonNullable<csstype.Property.Flex<string | number> | undefined>[] | undefined;
781
781
  WebkitFlexFlow?: readonly string[] | csstype.Property.FlexFlow | readonly csstype.Property.FlexFlow[] | undefined;
782
782
  WebkitMask?: readonly (string | (string & {}))[] | csstype.Property.WebkitMask<string | number> | readonly NonNullable<csstype.Property.WebkitMask<string | number> | undefined>[] | undefined;
783
- WebkitMaskBoxImage?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
783
+ WebkitMaskBoxImage?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
784
784
  WebkitTextEmphasis?: readonly string[] | csstype.Property.TextEmphasis | readonly csstype.Property.TextEmphasis[] | undefined;
785
785
  WebkitTextStroke?: readonly (string | (string & {}))[] | csstype.Property.WebkitTextStroke<string | number> | readonly NonNullable<csstype.Property.WebkitTextStroke<string | number> | undefined>[] | undefined;
786
786
  WebkitTransition?: readonly string[] | csstype.Property.Transition<string & {}> | readonly csstype.Property.Transition<string & {}>[] | undefined;
@@ -861,7 +861,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
861
861
  MozUserFocus?: csstype.Property.MozUserFocus | readonly NonNullable<csstype.Property.MozUserFocus | undefined>[] | readonly csstype.Property.MozUserFocus[] | undefined;
862
862
  MozUserInput?: csstype.Property.MozUserInput | readonly NonNullable<csstype.Property.MozUserInput | undefined>[] | readonly csstype.Property.MozUserInput[] | undefined;
863
863
  msImeMode?: csstype.Property.ImeMode | readonly NonNullable<csstype.Property.ImeMode | undefined>[] | readonly csstype.Property.ImeMode[] | undefined;
864
- OAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
864
+ OAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
865
865
  OAnimationDelay?: readonly string[] | csstype.Property.AnimationDelay<string & {}> | readonly csstype.Property.AnimationDelay<string & {}>[] | undefined;
866
866
  OAnimationDirection?: readonly string[] | csstype.Property.AnimationDirection | readonly csstype.Property.AnimationDirection[] | undefined;
867
867
  OAnimationDuration?: readonly string[] | csstype.Property.AnimationDuration<string & {}> | readonly csstype.Property.AnimationDuration<string & {}>[] | undefined;
@@ -871,7 +871,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
871
871
  OAnimationPlayState?: readonly string[] | csstype.Property.AnimationPlayState | readonly csstype.Property.AnimationPlayState[] | undefined;
872
872
  OAnimationTimingFunction?: readonly string[] | csstype.Property.AnimationTimingFunction | readonly csstype.Property.AnimationTimingFunction[] | undefined;
873
873
  OBackgroundSize?: readonly (string | (string & {}))[] | csstype.Property.BackgroundSize<string | number> | readonly NonNullable<csstype.Property.BackgroundSize<string | number> | undefined>[] | undefined;
874
- OBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
874
+ OBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
875
875
  OObjectFit?: csstype.Property.ObjectFit | readonly NonNullable<csstype.Property.ObjectFit | undefined>[] | readonly csstype.Property.ObjectFit[] | undefined;
876
876
  OObjectPosition?: readonly (string | (string & {}))[] | csstype.Property.ObjectPosition<string | number> | readonly NonNullable<csstype.Property.ObjectPosition<string | number> | undefined>[] | undefined;
877
877
  OTabSize?: readonly (string | (string & {}))[] | csstype.Property.TabSize<string | number> | readonly NonNullable<csstype.Property.TabSize<string | number> | undefined>[] | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.8.80",
3
+ "version": "2.8.82",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
@@ -1,27 +0,0 @@
1
- import { a as a$9 } from './chunk-R2BCPHRH.js';
2
- import { a as a$6 } from './chunk-4F2NKGF6.js';
3
- import { a as a$3 } from './chunk-NMGWHSNZ.js';
4
- import { a as a$7 } from './chunk-6U5LS7MP.js';
5
- import { a as a$5 } from './chunk-PRWQQJDL.js';
6
- import { i, r, k, n, l, a as a$2, p, j, m, b as b$1, c, d, q, h, f, e, o, g } from './chunk-XUDTPZHF.js';
7
- import { a as a$8 } from './chunk-F65ZXAGV.js';
8
- import { a as a$4 } from './chunk-I4PPSW36.js';
9
- import { a } from './chunk-2GTD4JW2.js';
10
- import { a as a$1 } from './chunk-LQRRMVFN.js';
11
- import { b } from './chunk-2ZJUGM2S.js';
12
- import { memo, forwardRef, useState, useRef, useEffect, useMemo, Children, isValidElement, cloneElement, useCallback, Fragment as Fragment$1 } from 'react';
13
- import ot from 'react-fast-compare';
14
- import et from '@mui/material/IconButton';
15
- import tt from '@mui/material/LinearProgress';
16
- import to from '@mui/material/Stack';
17
- import ee from '@mui/material/Tooltip';
18
- import Ce from '@mui/lab/LoadingButton';
19
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
20
- import _o from '@mui/material/Button';
21
- import Xo from '@mui/material/Typography';
22
- import { GridToolbarColumnsButton } from '@mui/x-data-grid-premium';
23
-
24
- var Fo=(o,e)=>typeof o=="function"?o(e):!!o,Ae=(o,e)=>{if(o)return o===!0?{}:typeof o=="function"?o(e):o},ke=({actions:o,context:e})=>{let[t,r]=useState(null),[a$1,i]=useState(null),l=useMemo(()=>o.filter(n=>!Fo(n.hidden,e)),[o,e]),s=useCallback(async n=>{i(n.actionId);try{await n.handler(e);}finally{i(null);}},[e]),d=useCallback(n=>{if(n.confirmation){r(n);return}s(n).catch(()=>{});},[s]),m$1=useCallback(async()=>{t&&(await s(t),r(null));},[t,s]),u=useCallback(()=>{a$1||r(null);},[a$1]),c=Ae(t?.confirmation,e);return jsxs(Fragment,{children:[jsx(m,{children:l.map(n=>{let h=!!a$1||Fo(n.disabled,e),k=a$1===n.actionId;return jsx(Ce,{size:"small",variant:"text",onClick:()=>d(n),loading:k,disabled:h,sx:{color:"text.primary"},startIcon:typeof n.icon=="string"?jsx(a,{icon:n.icon}):n.icon,children:n.label},n.actionId)})}),t&&jsx(a$5,{open:!0,onClose:u,onConfirm:()=>{m$1().catch(()=>{});},confirming:a$1===t.actionId,modalTitle:c?.title??`${t.action??"Excluir"} ${e.selectedCount} ${t.entityName??"registro"}${e.selectedCount!==1?"s":""}?`,message:c?.message??"Esta a\xE7\xE3o n\xE3o poder\xE1 ser desfeita.",cancelButtonText:c?.cancelButtonText??"Cancelar",confirmButtonText:c?.confirmButtonText??"Sim, excluir"})]})},zo=ke;var Re=({title:o,breakpoint:e,actions:t,showActions:r,showAdd:a$1,showHeaderMoreActions:i,showActionsContainer:l,onAdd:s,onOpenMoreActions:d$1})=>jsxs(b$1,{breakpoint:e,children:[jsx(Xo,{variant:"overline",color:"text.secondary",noWrap:!0,children:o}),l&&jsxs(c,{breakpoint:e,children:[r&&t,a$1&&jsxs(Fragment,{children:[r&&jsx(d,{orientation:"vertical",flexItem:!0}),jsx(_o,{startIcon:jsx(a,{icon:"SIMPLE_ADD"}),variant:"contained",onClick:s,children:"Adicionar"})]}),i&&jsxs(Fragment,{children:[(r||a$1)&&jsx(d,{orientation:"vertical",flexItem:!0}),jsx(_o,{color:"inherit",startIcon:jsx(a,{icon:"MORE_BOLD"}),size:"small",onClick:d$1,children:"Mais"})]})]})]}),$o=Re;var De=({fetching:o,loading:e,rows:t,mobileSlots:r$1,mobileSlotsProps:a,slots:i,scrollableNodeRef:l,mobileRender:s,hideFooter:d,onPaginationChange:m,rowCount:u,paginationModel:c})=>jsxs(a$6,{isFetching:o,fetching:jsx(a$7,{}),isLoading:e,loading:jsx(q,{}),isEmpty:t.length===0,empty:jsxs(to,{flex:1,direction:"column",...a,children:[r$1&&r$1,jsx(to,{flex:1,alignItems:"center",justifyContent:"center",children:i?.noRowsOverlay?jsx(i.noRowsOverlay,{}):jsx(Xo,{variant:"body2",color:"text.secondary",children:"Nenhum registro encontrado"})})]}),children:[jsxs(to,{direction:"column",flex:1,minHeight:0,...a,children:[r$1&&r$1,jsx(a$8,{fillContent:!0,ref:l,children:t.map(n=>jsx(Fragment$1,{children:s(n)},n.id))})]}),!d&&m&&jsx(h,{children:jsx(r,{count:u,page:c.page,rowsPerPage:c.pageSize,onPageChange:n=>m?.(n,c.pageSize),onRowsPerPageChange:n=>m?.(0,n)})})]}),qo=De;var z="datagrid-actions";var Ko=(o,e)=>Children.map(o,t=>{if(!isValidElement(t))return t;let r=t.props.onClick,a={};a.onClick=(...l)=>{e(),r&&r(...l);};let i=t.props;return i?.children&&(a.children=Ko(i.children,e)),cloneElement(t,a)}),ve=({children:o,onClose:e})=>o?Ko(o,e):null,ro=memo(ve);var Ve=({breakpoint:o$1,isMobile:e$1,showSearch:t,showMoreActions:r,showTopbarMoreActions:a$1,showHeaderMoreActions:i,filterButton:l,searchValue:s,onSearch:d,onSearchChange:m,moreActions:u,popover:c})=>jsxs(f,{breakpoint:o$1,children:[jsxs(to,{flex:1,direction:"row",alignItems:"center",id:z,gap:.5,children:[r&&jsxs(Fragment,{children:[a$1&&jsxs(Fragment,{children:[jsx(_o,{color:"inherit",startIcon:jsx(a,{icon:"MORE_BOLD"}),size:"small",onClick:c.onOpen,children:"Mais"}),!e$1&&jsx(e,{orientation:"vertical",flexItem:!0})]}),(a$1||i)&&jsx(o,{open:c.open,anchorEl:c.open,onClose:c.onClose,disabledArrow:!0,children:jsx(ro,{onClose:c.onClose,children:u})})]}),!e$1&&l&&jsxs(Fragment,{children:[l,a$1&&jsx(e,{orientation:"vertical",flexItem:!0})]})]}),t&&jsxs(g,{breakpoint:o$1,children:[jsx(a$9,{value:s,placeholder:"Buscar",onSearch:n=>d(n??""),onChange:n=>m?.(n.target.value),size:"small",fullWidth:!0,iconPosition:"start"}),e$1&&l&&jsx(to,{ml:1,children:l})]})]}),Jo=Ve;var Oe=({rowCount:o,page:e,rowsPerPage:t,onPaginationChange:r$1})=>jsxs(i,{children:[jsxs(to,{direction:"row",alignItems:"center",gap:.5,children:[jsx(Xo,{variant:"body2",color:"text.disabled",children:"Total de itens:"}),jsx(Xo,{variant:"body2",children:o})]}),jsx(r,{count:o,page:e,rowsPerPage:t,onPageChange:a=>r$1(a,t),onRowsPerPageChange:a=>r$1(0,a)})]}),lo=memo(Oe);var ze=forwardRef(({children:o,...e},t)=>jsx(_o,{...e,ref:t,color:"inherit",startIcon:jsx(a,{icon:"COLUMNS"}),children:o??"Colunas"}));ze.displayName="ColumnsButton";var _e=({setFilterButtonEl:o})=>{let e=useCallback(t=>{o(t);},[o]);return jsx(a$4,{container:z,children:jsx(GridToolbarColumnsButton,{ref:e,slotProps:{button:{color:"inherit",startIcon:jsx(a,{icon:"COLUMNS"}),children:"Colunas"}}})})},so=_e;var qe=({slots:o,showColumnButton:e,rowCount:t,paginationModel:r,onPaginationChange:a})=>{let i=useCallback(()=>a?jsx(lo,{rowCount:t,page:r.page,rowsPerPage:r.pageSize,onPaginationChange:a}):null,[t,r,a]);return {dataGridSlots:useMemo(()=>({...o,footer:i,...e&&!o?.toolbar&&{toolbar:so}}),[o,i,e])}},Zo=qe;var Qe=({rows:o,rowSelectionModel:e,onRowSelectionModelChange:t,getRowId:r,bulkActions:a})=>{let i=useMemo(()=>Array.isArray(e)?e:[],[e]),l=i.length,s=useMemo(()=>o.map(S=>r(S)),[o,r]),d=useMemo(()=>new Set(s),[s]),m=useMemo(()=>i.reduce((S,C)=>S+(d.has(C)?1:0),0),[i,d]),u=s.length>0&&m===s.length,c=m>0&&!u,n=useCallback(S=>{t&&t(S);},[t]),h=useCallback(()=>{n([]);},[n]),k=useMemo(()=>new Set(i),[i]),I=useMemo(()=>o.filter(S=>k.has(r(S))),[o,k,r]),_=useMemo(()=>({selectedIds:i,selectedRowsInPage:I,selectedCount:l,clearSelection:h}),[i,I,l,h]),W=!!a?.length,v=useCallback((S,C)=>{if(!t)return;if(C){let M=new Set(i),V=[...i];s.forEach(x=>{M.has(x)||V.push(x);}),n(V);return}let G=i.filter(M=>!d.has(M));n(G);},[t,i,s,d,n]);return {selectionModel:i,numSelected:l,allSelected:u,someSelected:c,hasBulkActions:W,bulkActionContext:_,clearSelection:h,handleSelectAllToggle:v}},jo=Qe;var nt=({title:o,header:e,headerProps:t,breakpoint:r="md",columns:a$4,rows:i=[],mobileSlots:l$1,mobileSlotsProps:s,mobileRender:d,rowCount:m=0,paginationModel:u={page:0,pageSize:25},onPaginationChange:c,actions:n$1,moreActions:h,onAdd:k$1,onSearch:I,searchValue:_,onSearchChange:W,slots:v,slotProps:S,loading:C,fetching:G,fetchingNextPage:M,containerProps:V={height:562,maxHeight:562},hideFooter:x,showColumnButton:mo=!1,filterButton:po,activeFilters:uo,bulkActions:fo,onRowsScrollEnd:E,scrollEndThreshold:$=200,...R})=>{let So=a$1(),T=b("down",r),[te,ne]=useState(null),go=useRef(null);useEffect(()=>{let P=go.current;if(!P||!T||!E)return;let wo=()=>{let{scrollTop:fe,scrollHeight:Se,clientHeight:ge}=P;Se-fe-ge<=$&&E();};return P.addEventListener("scroll",wo,{passive:!0}),()=>{P.removeEventListener("scroll",wo);}},[T,E,$,i.length]);let re=useMemo(()=>R.getRowId??(P=>P.id),[R.getRowId]),{numSelected:q,allSelected:ie,someSelected:ae,hasBulkActions:le,bulkActionContext:se,clearSelection:ce,handleSelectAllToggle:de}=jo({rows:i,rowSelectionModel:Array.isArray(R.rowSelectionModel)?R.rowSelectionModel:void 0,onRowSelectionModelChange:R.onRowSelectionModelChange,getRowId:re,bulkActions:fo}),{dataGridSlots:me}=Zo({slots:v,showColumnButton:mo,rowCount:m,paginationModel:u,onPaginationChange:c}),ho=!!I,Co=!!k$1,Ao=!!n$1,K=!!h,Q=T&&K,ko=!T&&K,pe=Ao||Co||Q,To=ko||ho||mo||!!po||!T,ue=le&&q>0&&jsxs(k,{children:[jsxs(to,{flexDirection:"row",alignItems:"center",gap:1,flex:1,children:[jsx(ee,{title:"Selecione todos nessa pagina",children:jsx(n,{size:"small",checked:ie,indeterminate:ae,onChange:de})}),jsxs(l,{variant:"body2",children:[q," selecionado",q>1?"s":""]}),jsx(ee,{title:"Desselecionar tudo",children:jsx(et,{size:"small",onClick:ce,"aria-label":"Desselecionar tudo",sx:{color:"primary.main"},children:jsx(a,{icon:"CLOSE_MARK_BUTTON",width:18,height:18})})})]}),jsx(zo,{actions:fo??[],context:se})]});return jsxs(a$2,{breakpoint:r,...V,flex:C?1:void 0,minHeight:C||i.length===0?562:void 0,children:[e?jsx(to,{p:3,...t,children:e}):jsxs(Fragment,{children:[jsx($o,{title:o,breakpoint:r,actions:n$1,showActions:Ao,showAdd:Co,showHeaderMoreActions:Q,showActionsContainer:pe,onAdd:k$1,onOpenMoreActions:So.onOpen}),To&&jsx(Jo,{breakpoint:r,isMobile:T,showSearch:ho,showMoreActions:K,showTopbarMoreActions:ko,showHeaderMoreActions:Q,filterButton:po,searchValue:_,onSearch:I,onSearchChange:W,moreActions:h,popover:So}),uo&&uo,!To&&jsx(p,{})]}),T?jsx(qo,{fetching:G,loading:C,rows:i,mobileSlots:l$1,mobileSlotsProps:s,slots:v,scrollableNodeRef:go,mobileRender:d,hideFooter:x,onPaginationChange:c,rowCount:m,paginationModel:u}):jsxs(j,{children:[ue,jsx(a$3,{columns:a$4,rows:i,rowCount:m,slots:me,slotProps:{panel:{anchorEl:te},toolbar:{setFilterButtonEl:ne,showQuickFilter:!0},...S},columnHeaderHeight:48,getRowHeight:()=>68,loading:C,fetching:G,hideFooter:x,paginationModel:u,onRowsScrollEnd:E,scrollEndThreshold:$,...R})]}),M&&jsx(tt,{})]})},yn=memo(nt,ot);
25
-
26
- export { ro as a, lo as b, so as c, yn as d };
27
- //# sourceMappingURL=chunk-UQJKTFVZ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/DataView/index.tsx","../src/components/DataView/BulkActionsBar.tsx","../src/components/DataView/DataViewHeader.tsx","../src/components/DataView/DataViewMobileContent.tsx","../src/components/DataView/DataViewTopbar.tsx","../src/components/DataView/contants.ts","../src/components/DataView/EnhancedMoreActions.ts","../src/components/DataView/use-data-grid-slots.tsx","../src/components/DataView/DesktopFooter.tsx","../src/components/DataView/Toolbar.tsx","../src/components/DataView/use-selection-state.ts"],"names":["memo","useEffect","useMemo","useRef","useState","isEqual","IconButton","LinearProgress","Stack","Tooltip","useCallback","LoadingButton","Fragment","jsx","jsxs","resolveDynamicBoolean","value","context","resolveConfirmation","confirmation","BulkActionsBar","actions","confirmAction","setConfirmAction","runningActionId","setRunningActionId","visibleActions","action","executeAction","handleActionClick","handleConfirm","handleCloseConfirm","confirmationConfig","SelectionActions","disabled","loading","Icon_default","Confirm_default","BulkActionsBar_default","Button","Typography","DataViewHeader","title","breakpoint","showActions","showAdd","showHeaderMoreActions","showActionsContainer","onAdd","onOpenMoreActions","Header","ActionsContainer","ActionsDivider","DataViewHeader_default","DataViewMobileContent","fetching","rows","mobileSlots","mobileSlotsProps","slots","scrollableNodeRef","mobileRender","hideFooter","onPaginationChange","rowCount","paginationModel","Result_default","FixedProgressBar_default","LoadingProgress","Scrollbar_default","row","MobilePaginationContainer","Pagination_default","newPage","newRowsPerPage","DataViewMobileContent_default","DATAGRID_ACTIONS","Children","cloneElement","isValidElement","createEnhanceMoreActions","children","onClose","child","originalOnClick","enhancedProps","args","childProps","EnhancedMoreActions","EnhancedMoreActions_default","DataViewTopbar","isMobile","showSearch","showMoreActions","showTopbarMoreActions","filterButton","searchValue","onSearch","onSearchChange","moreActions","popover","Topbar","ToolbarActionsDivider","MoreActionsPopover","SearchContainer","SearchInput_default","v","e","DataViewTopbar_default","DesktopFooter","page","rowsPerPage","DesktopPaginationContainer","DesktopFooter_default","forwardRef","GridToolbarColumnsButton","ColumnsButton","props","ref","Toolbar","setFilterButtonEl","handleColumnsButtonRef","button","Portal_default","Toolbar_default","useDataGridSlots","showColumnButton","FooterComponent","use_data_grid_slots_default","useSelectionState","rowSelectionModel","onRowSelectionModelChange","getRowId","bulkActions","selectionModel","numSelected","pageRowIds","pageRowIdSet","selectedOnPageCount","count","id","allSelected","someSelected","emitRowSelectionChange","nextSelection","clearSelection","selectedIdSet","selectedRowsInPage","bulkActionContext","hasBulkActions","handleSelectAllToggle","_event","checked","selectedIds","use_selection_state_default","DataViewComponent","header","headerProps","columns","slotProps","fetchingNextPage","containerProps","activeFilters","onRowsScrollEnd","scrollEndThreshold","others","usePopover_default","useResponsive_default","filterButtonEl","node","handleScroll","scrollTop","scrollHeight","clientHeight","dataGridSlots","showTopbar","selectionOverlay","SelectionOverlay","SelectionCheckbox","SelectionCount","Container","TopbarDivider","DataGridWrapper","DataGrid_default","DataView_default"],"mappings":"kkBAAA,OAAS,QAAAA,GAAM,aAAAC,GAAW,WAAAC,GAAS,UAAAC,GAAQ,YAAAC,OAAgB,QAC3D,OAAOC,OAAa,qBACpB,OAAOC,OAAgB,2BACvB,OAAOC,OAAoB,+BAC3B,OAAOC,OAAW,sBAClB,OAAOC,OAAa,wBCLpB,OAAS,eAAAC,EAAa,WAAAR,GAAS,YAAAE,OAAgB,QAC/C,OAAOO,OAAmB,yBAuFtB,mBAAAC,GAmBc,OAAAC,EAnBd,QAAAC,OAAA,oBAxEJ,IAAMC,GAAwB,CAC5BC,EACAC,IACI,OAAOD,GAAU,WAAaA,EAAMC,CAAO,EAAI,CAAC,CAACD,EAEjDE,GAAsB,CAC1BC,EACAF,IACuC,CACvC,GAAKE,EACL,OAAIA,IAAiB,GAAa,CAAC,EAC/B,OAAOA,GAAiB,WAAmBA,EAAaF,CAAO,EAE5DE,CACT,EAEMC,GAAiB,CAA8B,CACnD,QAAAC,EACA,QAAAJ,CACF,IAA8B,CAC5B,GAAM,CAACK,EAAeC,CAAgB,EAAInB,GACxC,IACF,EACM,CAACoB,EAAiBC,CAAkB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B,sBAAuBhD,EACvB,aAAciD,GACd,YAAaC,EACb,SAAUC,EACV,eAAgBC,EAChB,YAAaC,EACb,QAASC,GACX,EAGD8D,IAAiBA,GAEjB,CAACa,IAAclK,EAACwK,GAAA,EAAc,GACjC,EAGD1F,EACC9E,EAAC8D,GAAA,CACC,SAAUpB,EACV,QAASpB,EACT,KAAMqB,EACN,YAAaC,EACb,iBAAkBC,EAClB,MAAOC,EACP,kBAAmBC,GACnB,aAAcC,EACd,WAAYC,EACZ,mBAAoBC,EACpB,SAAUC,EACV,gBAAiBC,EACnB,EAEAnD,EAACwK,GAAA,CACE,UAAAN,GACDnK,EAAC0K,GAAA,CACC,QAASzB,EACT,KAAMtG,EACN,SAAUQ,EACV,MAAO8G,GACP,UAAW,CACT,MAAO,CAAE,SAAUN,EAAe,EAClC,QAAS,CACP,kBAAAhD,GACA,gBAAiB,EACnB,EACA,GAAGuC,CACL,EACA,mBAAoB,GACpB,aAAc,IAAM,GACpB,QAAS5H,EACT,SAAUoB,EACV,WAAYO,EACZ,gBAAiBG,EACjB,gBAAiBkG,EACjB,mBAAoBC,EACnB,GAAGC,EACN,GACF,EAGDL,GAAoBnJ,EAACN,GAAA,EAAe,GACvC,CAEJ,EAEOiL,GAAQxL,GAAK2J,GAAmBtJ,EAAO","sourcesContent":["import { memo, useEffect, useMemo, useRef, useState } from 'react';\nimport isEqual from 'react-fast-compare';\nimport IconButton from '@mui/material/IconButton';\nimport LinearProgress from '@mui/material/LinearProgress';\nimport Stack from '@mui/material/Stack';\nimport Tooltip from '@mui/material/Tooltip';\nimport {\n GridRowId,\n GridSlotsComponentsProps,\n GridValidRowModel,\n} from '@mui/x-data-grid-premium';\n\nimport DataGrid from 'components/DataGrid';\nimport Icon from 'components/Icon';\nimport usePopover from 'hooks/usePopover';\nimport useResponsive from 'hooks/useResponsive';\n\nimport BulkActionsBar from './BulkActionsBar';\nimport DataViewHeader from './DataViewHeader';\nimport DataViewMobileContent from './DataViewMobileContent';\nimport DataViewTopbar from './DataViewTopbar';\nimport { DataViewProps } from './props';\nimport {\n ActionsContainer,\n ActionsDivider,\n Container,\n DataGridWrapper,\n Header,\n MobilePaginationContainer,\n MoreActionsPopover,\n SearchContainer,\n SelectionActions,\n SelectionCheckbox,\n SelectionCount,\n SelectionOverlay,\n ToolbarActionsDivider,\n Topbar,\n TopbarDivider,\n} from './styles';\nimport useDataGridSlots from './use-data-grid-slots';\nimport useSelectionState from './use-selection-state';\n\nconst DataViewComponent = <T extends GridValidRowModel = GridValidRowModel>({\n title,\n header,\n headerProps,\n breakpoint = 'md',\n columns,\n rows = [],\n mobileSlots,\n mobileSlotsProps,\n mobileRender,\n rowCount = 0,\n paginationModel = { page: 0, pageSize: 25 },\n onPaginationChange,\n actions,\n moreActions,\n onAdd,\n onSearch,\n searchValue,\n onSearchChange,\n slots,\n slotProps,\n loading,\n fetching,\n fetchingNextPage,\n containerProps = { height: 562, maxHeight: 562 },\n hideFooter,\n showColumnButton = false,\n filterButton,\n activeFilters,\n bulkActions,\n onRowsScrollEnd,\n scrollEndThreshold = 200,\n ...others\n}: DataViewProps<T>) => {\n const popover = usePopover();\n const isMobile = useResponsive('down', breakpoint);\n const [filterButtonEl, setFilterButtonEl] =\n useState<HTMLButtonElement | null>(null);\n const scrollableNodeRef = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n const node = scrollableNodeRef.current;\n if (!node || !isMobile || !onRowsScrollEnd) return;\n\n const handleScroll = () => {\n const { scrollTop, scrollHeight, clientHeight } = node;\n const distanceToBottom = scrollHeight - scrollTop - clientHeight;\n if (distanceToBottom <= scrollEndThreshold) {\n (onRowsScrollEnd as () => void)();\n }\n };\n\n node.addEventListener('scroll', handleScroll, { passive: true });\n return () => {\n node.removeEventListener('scroll', handleScroll);\n };\n }, [isMobile, onRowsScrollEnd, scrollEndThreshold, rows.length]);\n\n const getRowId = useMemo(\n () =>\n (others.getRowId ?? ((row: GridValidRowModel) => row.id)) as (\n row: GridValidRowModel,\n ) => GridRowId,\n [others.getRowId],\n );\n\n const {\n numSelected,\n allSelected,\n someSelected,\n hasBulkActions,\n bulkActionContext,\n clearSelection,\n handleSelectAllToggle,\n } = useSelectionState<T>({\n rows,\n rowSelectionModel: Array.isArray(others.rowSelectionModel)\n ? others.rowSelectionModel\n : undefined,\n onRowSelectionModelChange: others.onRowSelectionModelChange as\n | ((model: GridRowId[], details?: unknown) => void)\n | undefined,\n getRowId,\n bulkActions,\n });\n\n const { dataGridSlots } = useDataGridSlots({\n slots,\n showColumnButton,\n rowCount,\n paginationModel,\n onPaginationChange,\n });\n\n const showSearch = !!onSearch;\n const showAdd = !!onAdd;\n const showActions = !!actions;\n const showMoreActions = !!moreActions;\n const showHeaderMoreActions = isMobile && showMoreActions;\n const showTopbarMoreActions = !isMobile && showMoreActions;\n const showActionsContainer = showActions || showAdd || showHeaderMoreActions;\n const showTopbar =\n showTopbarMoreActions ||\n showSearch ||\n showColumnButton ||\n !!filterButton ||\n !isMobile;\n\n const selectionOverlay = hasBulkActions && numSelected > 0 && (\n <SelectionOverlay>\n <Stack flexDirection=\"row\" alignItems=\"center\" gap={1} flex={1}>\n <Tooltip title=\"Selecione todos nessa pagina\">\n <SelectionCheckbox\n size=\"small\"\n checked={allSelected}\n indeterminate={someSelected}\n onChange={handleSelectAllToggle}\n />\n </Tooltip>\n\n <SelectionCount variant=\"body2\">\n {numSelected} selecionado{numSelected > 1 ? 's' : ''}\n </SelectionCount>\n\n <Tooltip title=\"Desselecionar tudo\">\n <IconButton\n size=\"small\"\n onClick={clearSelection}\n aria-label=\"Desselecionar tudo\"\n sx={{ color: 'primary.main' }}\n >\n <Icon icon=\"CLOSE_MARK_BUTTON\" width={18} height={18} />\n </IconButton>\n </Tooltip>\n </Stack>\n\n <BulkActionsBar actions={bulkActions ?? []} context={bulkActionContext} />\n </SelectionOverlay>\n );\n\n return (\n <Container\n breakpoint={breakpoint}\n {...containerProps}\n flex={loading ? 1 : undefined}\n minHeight={loading || rows.length === 0 ? 562 : undefined}\n >\n {header ? (\n <Stack p={3} {...headerProps}>\n {header}\n </Stack>\n ) : (\n <>\n <DataViewHeader\n title={title}\n breakpoint={breakpoint}\n actions={actions}\n showActions={showActions}\n showAdd={showAdd}\n showHeaderMoreActions={showHeaderMoreActions}\n showActionsContainer={showActionsContainer}\n onAdd={onAdd}\n onOpenMoreActions={popover.onOpen}\n />\n\n {showTopbar && (\n <DataViewTopbar\n breakpoint={breakpoint}\n isMobile={isMobile}\n showSearch={showSearch}\n showMoreActions={showMoreActions}\n showTopbarMoreActions={showTopbarMoreActions}\n showHeaderMoreActions={showHeaderMoreActions}\n filterButton={filterButton}\n searchValue={searchValue}\n onSearch={onSearch}\n onSearchChange={onSearchChange}\n moreActions={moreActions}\n popover={popover}\n />\n )}\n\n {activeFilters && activeFilters}\n\n {!showTopbar && <TopbarDivider />}\n </>\n )}\n\n {isMobile ? (\n <DataViewMobileContent<T>\n fetching={fetching}\n loading={loading}\n rows={rows}\n mobileSlots={mobileSlots}\n mobileSlotsProps={mobileSlotsProps}\n slots={slots}\n scrollableNodeRef={scrollableNodeRef}\n mobileRender={mobileRender}\n hideFooter={hideFooter}\n onPaginationChange={onPaginationChange}\n rowCount={rowCount}\n paginationModel={paginationModel}\n />\n ) : (\n <DataGridWrapper>\n {selectionOverlay}\n <DataGrid\n columns={columns}\n rows={rows}\n rowCount={rowCount}\n slots={dataGridSlots}\n slotProps={{\n panel: { anchorEl: filterButtonEl },\n toolbar: {\n setFilterButtonEl,\n showQuickFilter: true,\n } as unknown as GridSlotsComponentsProps['toolbar'],\n ...slotProps,\n }}\n columnHeaderHeight={48}\n getRowHeight={() => 68}\n loading={loading}\n fetching={fetching}\n hideFooter={hideFooter}\n paginationModel={paginationModel}\n onRowsScrollEnd={onRowsScrollEnd}\n scrollEndThreshold={scrollEndThreshold}\n {...others}\n />\n </DataGridWrapper>\n )}\n\n {fetchingNextPage && <LinearProgress />}\n </Container>\n );\n};\n\nexport default memo(DataViewComponent, isEqual) as typeof DataViewComponent;\nexport {\n ActionsContainer,\n ActionsDivider,\n Container,\n DataGridWrapper,\n Header,\n MobilePaginationContainer,\n MoreActionsPopover,\n SearchContainer,\n SelectionActions,\n SelectionCount,\n SelectionOverlay,\n ToolbarActionsDivider,\n Topbar,\n};\nexport type {\n BulkAction,\n BulkActionConfirmation,\n BulkActionContext,\n} from './bulkActions';\nexport { default as DesktopFooter } from './DesktopFooter';\nexport { default as EnhancedMoreActions } from './EnhancedMoreActions';\nexport { default as Toolbar } from './Toolbar';\n","import { useCallback, useMemo, useState } from 'react';\nimport LoadingButton from '@mui/lab/LoadingButton';\nimport { GridValidRowModel } from '@mui/x-data-grid-premium';\n\nimport Confirm from 'components/Confirm';\nimport Icon from 'components/Icon';\nimport { IconName } from 'types/icon';\n\nimport type {\n BulkAction,\n BulkActionConfirmation,\n BulkActionContext,\n} from './bulkActions';\nimport type { BulkActionsBarProps } from './props';\nimport { SelectionActions } from './styles';\n\nconst resolveDynamicBoolean = <T extends GridValidRowModel>(\n value: boolean | ((context: BulkActionContext<T>) => boolean) | undefined,\n context: BulkActionContext<T>,\n) => (typeof value === 'function' ? value(context) : !!value);\n\nconst resolveConfirmation = <T extends GridValidRowModel>(\n confirmation: BulkAction<T>['confirmation'],\n context: BulkActionContext<T>,\n): BulkActionConfirmation | undefined => {\n if (!confirmation) return undefined;\n if (confirmation === true) return {};\n if (typeof confirmation === 'function') return confirmation(context);\n\n return confirmation;\n};\n\nconst BulkActionsBar = <T extends GridValidRowModel>({\n actions,\n context,\n}: BulkActionsBarProps<T>) => {\n const [confirmAction, setConfirmAction] = useState<BulkAction<T> | null>(\n null,\n );\n const [runningActionId, setRunningActionId] = useState<string | null>(null);\n\n const visibleActions = useMemo(\n () =>\n actions.filter(action => !resolveDynamicBoolean(action.hidden, context)),\n [actions, context],\n );\n\n const executeAction = useCallback(\n async (action: BulkAction<T>) => {\n setRunningActionId(action.actionId);\n try {\n await action.handler(context);\n } finally {\n setRunningActionId(null);\n }\n },\n [context],\n );\n\n const handleActionClick = useCallback(\n (action: BulkAction<T>) => {\n if (action.confirmation) {\n setConfirmAction(action);\n return;\n }\n\n void executeAction(action).catch(() => undefined);\n },\n [executeAction],\n );\n\n const handleConfirm = useCallback(async () => {\n if (!confirmAction) return;\n await executeAction(confirmAction);\n setConfirmAction(null);\n }, [confirmAction, executeAction]);\n\n const handleCloseConfirm = useCallback(() => {\n if (runningActionId) return;\n setConfirmAction(null);\n }, [runningActionId]);\n\n const confirmationConfig = resolveConfirmation(\n confirmAction?.confirmation,\n context,\n );\n\n return (\n <>\n <SelectionActions>\n {visibleActions.map(action => {\n const disabled =\n !!runningActionId ||\n resolveDynamicBoolean(action.disabled, context);\n const loading = runningActionId === action.actionId;\n\n return (\n <LoadingButton\n key={action.actionId}\n size=\"small\"\n variant=\"text\"\n onClick={() => handleActionClick(action)}\n loading={loading}\n disabled={disabled}\n sx={{ color: 'text.primary' }}\n startIcon={\n typeof action.icon === 'string' ? (\n <Icon icon={action.icon as IconName} />\n ) : (\n action.icon\n )\n }\n >\n {action.label}\n </LoadingButton>\n );\n })}\n </SelectionActions>\n\n {confirmAction && (\n <Confirm\n open\n onClose={handleCloseConfirm}\n onConfirm={() => {\n void handleConfirm().catch(() => undefined);\n }}\n confirming={runningActionId === confirmAction.actionId}\n modalTitle={\n confirmationConfig?.title ??\n `${confirmAction.action ?? 'Excluir'} ${context.selectedCount} ${confirmAction.entityName ?? 'registro'}${context.selectedCount !== 1 ? 's' : ''}?`\n }\n message={\n confirmationConfig?.message ?? 'Esta ação não poderá ser desfeita.'\n }\n cancelButtonText={confirmationConfig?.cancelButtonText ?? 'Cancelar'}\n confirmButtonText={\n confirmationConfig?.confirmButtonText ?? 'Sim, excluir'\n }\n />\n )}\n </>\n );\n};\n\nexport default BulkActionsBar;\n","import Button from '@mui/material/Button';\nimport Typography from '@mui/material/Typography';\n\nimport Icon from 'components/Icon';\n\nimport { DataViewHeaderProps } from './props';\nimport { ActionsContainer, ActionsDivider, Header } from './styles';\n\nconst DataViewHeader = ({\n title,\n breakpoint,\n actions,\n showActions,\n showAdd,\n showHeaderMoreActions,\n showActionsContainer,\n onAdd,\n onOpenMoreActions,\n}: DataViewHeaderProps) => (\n <Header breakpoint={breakpoint}>\n <Typography variant=\"overline\" color=\"text.secondary\" noWrap>\n {title}\n </Typography>\n\n {showActionsContainer && (\n <ActionsContainer breakpoint={breakpoint}>\n {showActions && actions}\n\n {showAdd && (\n <>\n {showActions && <ActionsDivider orientation=\"vertical\" flexItem />}\n\n <Button\n startIcon={<Icon icon=\"SIMPLE_ADD\" />}\n variant=\"contained\"\n onClick={onAdd}\n >\n Adicionar\n </Button>\n </>\n )}\n\n {showHeaderMoreActions && (\n <>\n {(showActions || showAdd) && (\n <ActionsDivider orientation=\"vertical\" flexItem />\n )}\n\n <Button\n color=\"inherit\"\n startIcon={<Icon icon=\"MORE_BOLD\" />}\n size=\"small\"\n onClick={onOpenMoreActions}\n >\n Mais\n </Button>\n </>\n )}\n </ActionsContainer>\n )}\n </Header>\n);\n\nexport default DataViewHeader;\n","import { Fragment } from 'react';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\nimport { GridValidRowModel } from '@mui/x-data-grid-premium';\n\nimport FixedProgressBar from 'components/FixedProgressBar';\nimport Result from 'components/Result';\nimport Scrollbar from 'components/Scrollbar';\n\nimport Pagination from './Pagination';\nimport { DataViewMobileContentProps } from './props';\nimport { LoadingProgress, MobilePaginationContainer } from './styles';\n\nconst DataViewMobileContent = <T extends GridValidRowModel>({\n fetching,\n loading,\n rows,\n mobileSlots,\n mobileSlotsProps,\n slots,\n scrollableNodeRef,\n mobileRender,\n hideFooter,\n onPaginationChange,\n rowCount,\n paginationModel,\n}: DataViewMobileContentProps<T>) => (\n <Result\n isFetching={fetching}\n fetching={<FixedProgressBar />}\n isLoading={loading}\n loading={<LoadingProgress />}\n isEmpty={rows.length === 0}\n empty={\n <Stack flex={1} direction=\"column\" {...mobileSlotsProps}>\n {mobileSlots && mobileSlots}\n\n <Stack flex={1} alignItems=\"center\" justifyContent=\"center\">\n {slots?.noRowsOverlay ? (\n <slots.noRowsOverlay />\n ) : (\n <Typography variant=\"body2\" color=\"text.secondary\">\n Nenhum registro encontrado\n </Typography>\n )}\n </Stack>\n </Stack>\n }\n >\n <Stack direction=\"column\" flex={1} minHeight={0} {...mobileSlotsProps}>\n {mobileSlots && mobileSlots}\n\n <Scrollbar fillContent ref={scrollableNodeRef}>\n {rows.map(row => (\n <Fragment key={(row as unknown as { id: string }).id}>\n {mobileRender(row)}\n </Fragment>\n ))}\n </Scrollbar>\n </Stack>\n\n {!hideFooter && onPaginationChange && (\n <MobilePaginationContainer>\n <Pagination\n count={rowCount}\n page={paginationModel.page}\n rowsPerPage={paginationModel.pageSize}\n onPageChange={newPage =>\n onPaginationChange?.(newPage, paginationModel.pageSize)\n }\n onRowsPerPageChange={newRowsPerPage =>\n onPaginationChange?.(0, newRowsPerPage)\n }\n />\n </MobilePaginationContainer>\n )}\n </Result>\n);\n\nexport default DataViewMobileContent;\n","import Button from '@mui/material/Button';\nimport Stack from '@mui/material/Stack';\n\nimport Icon from 'components/Icon';\nimport SearchInput from 'components/SearchInput';\n\nimport { DATAGRID_ACTIONS } from './contants';\nimport EnhancedMoreActions from './EnhancedMoreActions';\nimport { DataViewTopbarProps } from './props';\nimport {\n MoreActionsPopover,\n SearchContainer,\n ToolbarActionsDivider,\n Topbar,\n} from './styles';\n\nconst DataViewTopbar = ({\n breakpoint,\n isMobile,\n showSearch,\n showMoreActions,\n showTopbarMoreActions,\n showHeaderMoreActions,\n filterButton,\n searchValue,\n onSearch,\n onSearchChange,\n moreActions,\n popover,\n}: DataViewTopbarProps) => (\n <Topbar breakpoint={breakpoint}>\n <Stack\n flex={1}\n direction=\"row\"\n alignItems=\"center\"\n id={DATAGRID_ACTIONS}\n gap={0.5}\n >\n {showMoreActions && (\n <>\n {showTopbarMoreActions && (\n <>\n <Button\n color=\"inherit\"\n startIcon={<Icon icon=\"MORE_BOLD\" />}\n size=\"small\"\n onClick={popover.onOpen}\n >\n Mais\n </Button>\n\n {!isMobile && (\n <ToolbarActionsDivider orientation=\"vertical\" flexItem />\n )}\n </>\n )}\n\n {(showTopbarMoreActions || showHeaderMoreActions) && (\n <MoreActionsPopover\n open={popover.open}\n anchorEl={popover.open}\n onClose={popover.onClose}\n disabledArrow={true}\n >\n <EnhancedMoreActions onClose={popover.onClose}>\n {moreActions}\n </EnhancedMoreActions>\n </MoreActionsPopover>\n )}\n </>\n )}\n\n {!isMobile && filterButton && (\n <>\n {filterButton}\n\n {showTopbarMoreActions && (\n <ToolbarActionsDivider orientation=\"vertical\" flexItem />\n )}\n </>\n )}\n </Stack>\n\n {showSearch && (\n <SearchContainer breakpoint={breakpoint}>\n <SearchInput\n value={searchValue}\n placeholder=\"Buscar\"\n onSearch={v => onSearch!(v ?? '')}\n onChange={e => onSearchChange?.(e.target.value)}\n size=\"small\"\n fullWidth\n iconPosition=\"start\"\n />\n {isMobile && filterButton && <Stack ml={1}>{filterButton}</Stack>}\n </SearchContainer>\n )}\n </Topbar>\n);\n\nexport default DataViewTopbar;\n","export const DATAGRID_ACTIONS = 'datagrid-actions';\n","import {\n Children,\n cloneElement,\n isValidElement,\n memo,\n ReactElement,\n ReactNode,\n} from 'react';\n\nimport { EnhancedMoreActionsProps } from './props';\n\nconst createEnhanceMoreActions = (\n children: ReactNode,\n onClose: () => void,\n): ReactNode => {\n return Children.map(children, child => {\n if (!isValidElement(child)) {\n return child;\n }\n\n const originalOnClick = (\n child.props as { onClick?: (...args: unknown[]) => void }\n ).onClick;\n\n const enhancedProps: {\n onClick?: (...args: unknown[]) => void;\n children?: ReactNode;\n } = {};\n\n enhancedProps.onClick = (...args: unknown[]) => {\n onClose();\n if (originalOnClick) {\n originalOnClick(...args);\n }\n };\n\n const childProps = child.props as { children?: ReactNode };\n if (childProps?.children) {\n enhancedProps.children = createEnhanceMoreActions(\n childProps.children,\n onClose,\n );\n }\n\n return cloneElement(child as ReactElement, enhancedProps);\n });\n};\n\nconst EnhancedMoreActions = ({\n children,\n onClose,\n}: EnhancedMoreActionsProps) => {\n if (!children) return null;\n return createEnhanceMoreActions(children, onClose);\n};\n\nexport default memo(EnhancedMoreActions);\n","import { useCallback, useMemo } from 'react';\n\nimport DesktopFooter from './DesktopFooter';\nimport { DataGridSlotsProps } from './props';\nimport { UseDataGridSlotsProps, UseDataGridSlotsReturn } from './props';\nimport Toolbar from './Toolbar';\n\nconst useDataGridSlots = ({\n slots,\n showColumnButton,\n rowCount,\n paginationModel,\n onPaginationChange,\n}: UseDataGridSlotsProps): UseDataGridSlotsReturn => {\n const FooterComponent = useCallback(() => {\n if (onPaginationChange) {\n return (\n <DesktopFooter\n rowCount={rowCount}\n page={paginationModel.page}\n rowsPerPage={paginationModel.pageSize}\n onPaginationChange={onPaginationChange}\n />\n );\n }\n return null;\n }, [rowCount, paginationModel, onPaginationChange]);\n\n const dataGridSlots: DataGridSlotsProps = useMemo(\n () => ({\n ...slots,\n footer: FooterComponent as unknown as DataGridSlotsProps['footer'],\n ...(showColumnButton &&\n !slots?.toolbar && {\n toolbar: Toolbar as unknown as DataGridSlotsProps['toolbar'],\n }),\n }),\n [slots, FooterComponent, showColumnButton],\n );\n\n return { dataGridSlots };\n};\n\nexport default useDataGridSlots;\n","import { memo } from 'react';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\n\nimport Pagination from './Pagination';\nimport { DesktopFooterProps } from './props';\nimport { DesktopPaginationContainer } from './styles';\n\nconst DesktopFooter = ({\n rowCount,\n page,\n rowsPerPage,\n onPaginationChange,\n}: DesktopFooterProps) => {\n return (\n <DesktopPaginationContainer>\n <Stack direction=\"row\" alignItems=\"center\" gap={0.5}>\n <Typography variant=\"body2\" color=\"text.disabled\">\n Total de itens:\n </Typography>\n <Typography variant=\"body2\">{rowCount}</Typography>\n </Stack>\n\n <Pagination\n count={rowCount}\n page={page}\n rowsPerPage={rowsPerPage}\n onPageChange={newPage => onPaginationChange(newPage, rowsPerPage)}\n onRowsPerPageChange={newRowsPerPage =>\n onPaginationChange(0, newRowsPerPage)\n }\n />\n </DesktopPaginationContainer>\n );\n};\n\nexport default memo(DesktopFooter);\n","import { forwardRef, useCallback } from 'react';\nimport Button, { ButtonProps } from '@mui/material/Button';\nimport { GridToolbarColumnsButton } from '@mui/x-data-grid-premium';\n\nimport Icon from 'components/Icon';\nimport Portal from 'components/Portal';\n\nimport { DATAGRID_ACTIONS } from './contants';\nimport { ToolbarProps } from './props';\n\nconst ColumnsButton = forwardRef<HTMLButtonElement, ButtonProps>(\n ({ children, ...props }, ref) => (\n <Button\n {...props}\n ref={ref}\n color=\"inherit\"\n startIcon={<Icon icon=\"COLUMNS\" />}\n >\n {children ?? 'Colunas'}\n </Button>\n ),\n);\n\nColumnsButton.displayName = 'ColumnsButton';\n\nconst Toolbar = ({ setFilterButtonEl }: ToolbarProps) => {\n const handleColumnsButtonRef = useCallback(\n (button: HTMLButtonElement | null) => {\n setFilterButtonEl(button);\n },\n [setFilterButtonEl],\n );\n\n return (\n <Portal container={DATAGRID_ACTIONS}>\n <GridToolbarColumnsButton\n ref={handleColumnsButtonRef}\n slotProps={{\n button: {\n color: 'inherit',\n startIcon: <Icon icon=\"COLUMNS\" />,\n children: 'Colunas',\n },\n }}\n />\n </Portal>\n );\n};\n\nexport default Toolbar;\n","import { ChangeEvent, useCallback, useMemo } from 'react';\nimport { GridRowId, GridValidRowModel } from '@mui/x-data-grid-premium';\n\nimport type { BulkAction, BulkActionContext } from './bulkActions';\n\ninterface UseSelectionStateProps<T extends GridValidRowModel> {\n rows: readonly T[];\n rowSelectionModel: GridRowId[] | undefined;\n onRowSelectionModelChange:\n | ((model: GridRowId[], details?: unknown) => void)\n | undefined;\n getRowId: (row: GridValidRowModel) => GridRowId;\n bulkActions: BulkAction<T>[] | undefined;\n}\n\ninterface UseSelectionStateReturn<T extends GridValidRowModel> {\n selectionModel: GridRowId[];\n numSelected: number;\n allSelected: boolean;\n someSelected: boolean;\n hasBulkActions: boolean;\n bulkActionContext: BulkActionContext<T>;\n clearSelection: () => void;\n handleSelectAllToggle: (\n event: ChangeEvent<HTMLInputElement>,\n checked: boolean,\n ) => void;\n}\n\nconst useSelectionState = <T extends GridValidRowModel>({\n rows,\n rowSelectionModel,\n onRowSelectionModelChange,\n getRowId,\n bulkActions,\n}: UseSelectionStateProps<T>): UseSelectionStateReturn<T> => {\n const selectionModel = useMemo(() => {\n if (Array.isArray(rowSelectionModel)) return rowSelectionModel;\n return [];\n }, [rowSelectionModel]);\n\n const numSelected = selectionModel.length;\n\n const pageRowIds = useMemo(\n () => rows.map(row => getRowId(row)),\n [rows, getRowId],\n );\n\n const pageRowIdSet = useMemo(() => new Set(pageRowIds), [pageRowIds]);\n\n const selectedOnPageCount = useMemo(\n () =>\n selectionModel.reduce<number>(\n (count, id) => count + (pageRowIdSet.has(id) ? 1 : 0),\n 0,\n ),\n [selectionModel, pageRowIdSet],\n );\n\n const allSelected =\n pageRowIds.length > 0 && selectedOnPageCount === pageRowIds.length;\n const someSelected = selectedOnPageCount > 0 && !allSelected;\n\n const emitRowSelectionChange = useCallback(\n (nextSelection: GridRowId[]) => {\n if (!onRowSelectionModelChange) return;\n onRowSelectionModelChange(nextSelection);\n },\n [onRowSelectionModelChange],\n );\n\n const clearSelection = useCallback(() => {\n emitRowSelectionChange([]);\n }, [emitRowSelectionChange]);\n\n const selectedIdSet = useMemo(\n () => new Set(selectionModel),\n [selectionModel],\n );\n\n const selectedRowsInPage = useMemo(\n () => rows.filter(row => selectedIdSet.has(getRowId(row))) as T[],\n [rows, selectedIdSet, getRowId],\n );\n\n const bulkActionContext: BulkActionContext<T> = useMemo(\n () => ({\n selectedIds: selectionModel,\n selectedRowsInPage: selectedRowsInPage as T[],\n selectedCount: numSelected,\n clearSelection,\n }),\n [selectionModel, selectedRowsInPage, numSelected, clearSelection],\n );\n\n const hasBulkActions = !!bulkActions?.length;\n\n const handleSelectAllToggle = useCallback(\n (_event: ChangeEvent<HTMLInputElement>, checked: boolean) => {\n if (!onRowSelectionModelChange) return;\n\n if (checked) {\n const selectedIds = new Set(selectionModel);\n const nextSelection = [...selectionModel];\n pageRowIds.forEach(id => {\n if (!selectedIds.has(id)) nextSelection.push(id);\n });\n emitRowSelectionChange(nextSelection);\n return;\n }\n\n const nextSelection = selectionModel.filter(id => !pageRowIdSet.has(id));\n emitRowSelectionChange(nextSelection);\n },\n [\n onRowSelectionModelChange,\n selectionModel,\n pageRowIds,\n pageRowIdSet,\n emitRowSelectionChange,\n ],\n );\n\n return {\n selectionModel,\n numSelected,\n allSelected,\n someSelected,\n hasBulkActions,\n bulkActionContext,\n clearSelection,\n handleSelectAllToggle,\n };\n};\n\nexport type { UseSelectionStateProps, UseSelectionStateReturn };\nexport default useSelectionState;\n"]}
@@ -286,10 +286,13 @@ declare const components: {
286
286
  MuiTimelineDot: {
287
287
  defaultProps?: Partial<_mui_lab_TimelineDot.TimelineDotProps> | undefined;
288
288
  styleOverrides?: Partial<_mui_material_styles_overrides.OverridesStyleRules<keyof _mui_lab_TimelineDot.TimelineDotClasses, "MuiTimelineDot", {
289
- transitions: _mui_material.Transitions;
289
+ cssVarPrefix: string;
290
+ zIndex: _mui_material.ZIndex;
291
+ direction: _mui_system.Direction;
292
+ opacity: _mui_material.Opacity;
293
+ typography: _mui_material.TypographyVariants;
290
294
  palette: _mui_material.Palette;
291
295
  colorSchemes: Record<_mui_material.SupportedColorScheme, _mui_material.ColorSystem>;
292
- cssVarPrefix: string;
293
296
  vars: _mui_material.ThemeVars;
294
297
  getCssVar: (field: _mui_material.ThemeCssVar, ...vars: _mui_material.ThemeCssVar[]) => string;
295
298
  getColorSchemeSelector: (colorScheme: _mui_material.SupportedColorScheme) => string;
@@ -300,16 +303,13 @@ declare const components: {
300
303
  spacing: _mui_system.Spacing;
301
304
  breakpoints: _mui_system.Breakpoints;
302
305
  shape: _mui_system.Shape;
303
- typography: _mui_material.TypographyVariants;
306
+ transitions: _mui_material.Transitions;
304
307
  shadows: _mui_material.Shadows;
305
308
  mixins: _mui_material.Mixins;
306
- zIndex: _mui_material.ZIndex;
307
- direction: _mui_system.Direction;
308
309
  shouldSkipGeneratingVar: (keys: string[], value: string | number) => boolean;
309
310
  unstable_sxConfig: _mui_system.SxConfig;
310
311
  unstable_sx: (props: _mui_system.SxProps<_mui_material.Theme>) => _mui_styled_engine.CSSObject;
311
312
  applyStyles: _mui_system.ApplyStyles<"light" | "dark">;
312
- opacity: _mui_material.Opacity;
313
313
  overlays: _mui_material.Overlays;
314
314
  customShadows: CustomShadows;
315
315
  unstable_strictMode?: boolean | undefined;
@@ -326,10 +326,13 @@ declare const components: {
326
326
  MuiTimelineConnector: {
327
327
  defaultProps?: Partial<_mui_lab_TimelineConnector.TimelineConnectorProps> | undefined;
328
328
  styleOverrides?: Partial<_mui_material_styles_overrides.OverridesStyleRules<"root", "MuiTimelineConnector", {
329
- transitions: _mui_material.Transitions;
329
+ cssVarPrefix: string;
330
+ zIndex: _mui_material.ZIndex;
331
+ direction: _mui_system.Direction;
332
+ opacity: _mui_material.Opacity;
333
+ typography: _mui_material.TypographyVariants;
330
334
  palette: _mui_material.Palette;
331
335
  colorSchemes: Record<_mui_material.SupportedColorScheme, _mui_material.ColorSystem>;
332
- cssVarPrefix: string;
333
336
  vars: _mui_material.ThemeVars;
334
337
  getCssVar: (field: _mui_material.ThemeCssVar, ...vars: _mui_material.ThemeCssVar[]) => string;
335
338
  getColorSchemeSelector: (colorScheme: _mui_material.SupportedColorScheme) => string;
@@ -340,16 +343,13 @@ declare const components: {
340
343
  spacing: _mui_system.Spacing;
341
344
  breakpoints: _mui_system.Breakpoints;
342
345
  shape: _mui_system.Shape;
343
- typography: _mui_material.TypographyVariants;
346
+ transitions: _mui_material.Transitions;
344
347
  shadows: _mui_material.Shadows;
345
348
  mixins: _mui_material.Mixins;
346
- zIndex: _mui_material.ZIndex;
347
- direction: _mui_system.Direction;
348
349
  shouldSkipGeneratingVar: (keys: string[], value: string | number) => boolean;
349
350
  unstable_sxConfig: _mui_system.SxConfig;
350
351
  unstable_sx: (props: _mui_system.SxProps<_mui_material.Theme>) => _mui_styled_engine.CSSObject;
351
352
  applyStyles: _mui_system.ApplyStyles<"light" | "dark">;
352
- opacity: _mui_material.Opacity;
353
353
  overlays: _mui_material.Overlays;
354
354
  customShadows: CustomShadows;
355
355
  unstable_strictMode?: boolean | undefined;