@carto/meridian-ds 1.4.1 → 1.4.2-alpha-forwarding-props.1

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/dist/{Alert-Cn0nq6aq.js → Alert-1b84B18a.js} +1 -1
  3. package/dist/{Alert-B2JgFj6Y.cjs → Alert-BbMbtaix.cjs} +1 -1
  4. package/dist/{MenuItem-vbfSlKyV.js → MenuItem-Cd34y6F3.js} +41 -15
  5. package/dist/MenuItem-Dbss-WG1.cjs +1 -0
  6. package/dist/{TablePaginationActions-EC4ynZRa.js → TablePaginationActions-EDxBCxpG.js} +1 -0
  7. package/dist/TablePaginationActions-V8ultBUz.cjs +9 -0
  8. package/dist/components/index.cjs +1 -1
  9. package/dist/components/index.js +1113 -1005
  10. package/dist/theme/index.cjs +1 -1
  11. package/dist/theme/index.js +42 -36
  12. package/dist/types/components/atoms/Button.d.ts.map +1 -1
  13. package/dist/types/components/atoms/IconButton.d.ts.map +1 -1
  14. package/dist/types/components/atoms/Typography.d.ts.map +1 -1
  15. package/dist/types/components/molecules/Autocomplete/Autocomplete.d.ts.map +1 -1
  16. package/dist/types/components/molecules/Autocomplete/CreatableAutocomplete.d.ts +1 -1
  17. package/dist/types/components/molecules/Autocomplete/CreatableAutocomplete.d.ts.map +1 -1
  18. package/dist/types/components/molecules/Autocomplete/ListBoxWithFilter.d.ts +2 -0
  19. package/dist/types/components/molecules/Autocomplete/ListBoxWithFilter.d.ts.map +1 -1
  20. package/dist/types/components/molecules/Autocomplete/MultipleAutocomplete.d.ts +1 -1
  21. package/dist/types/components/molecules/Autocomplete/MultipleAutocomplete.d.ts.map +1 -1
  22. package/dist/types/components/molecules/Autocomplete/useAutocompleteRenderOption.d.ts.map +1 -1
  23. package/dist/types/components/molecules/Autocomplete/useMultipleAutocomplete.d.ts +2 -2
  24. package/dist/types/components/molecules/Autocomplete/useMultipleAutocomplete.d.ts.map +1 -1
  25. package/dist/types/components/molecules/Autocomplete/utils.d.ts +1 -0
  26. package/dist/types/components/molecules/Autocomplete/utils.d.ts.map +1 -1
  27. package/dist/types/components/molecules/Menu/Menu.d.ts +2 -1
  28. package/dist/types/components/molecules/Menu/Menu.d.ts.map +1 -1
  29. package/dist/types/components/molecules/Menu/MenuItem.d.ts +2 -1
  30. package/dist/types/components/molecules/Menu/MenuItem.d.ts.map +1 -1
  31. package/dist/types/components/molecules/Menu/MenuItemFilter.d.ts +9 -0
  32. package/dist/types/components/molecules/Menu/MenuItemFilter.d.ts.map +1 -0
  33. package/dist/types/components/molecules/Menu/MenuList.d.ts +2 -1
  34. package/dist/types/components/molecules/Menu/MenuList.d.ts.map +1 -1
  35. package/dist/types/components/molecules/Menu/index.d.ts +2 -2
  36. package/dist/types/components/molecules/Menu/index.d.ts.map +1 -1
  37. package/dist/types/components/organisms/DatePickers/DatePicker.d.ts +1 -1
  38. package/dist/types/components/organisms/DatePickers/DatePicker.d.ts.map +1 -1
  39. package/dist/types/components/organisms/DatePickers/DateRangePicker.d.ts +1 -1
  40. package/dist/types/components/organisms/DatePickers/DateRangePicker.d.ts.map +1 -1
  41. package/dist/types/components/organisms/DatePickers/DateTimePicker.d.ts +1 -1
  42. package/dist/types/components/organisms/DatePickers/DateTimePicker.d.ts.map +1 -1
  43. package/dist/types/components/organisms/DatePickers/PickersDay.d.ts.map +1 -1
  44. package/dist/types/components/organisms/DatePickers/TimePicker.d.ts +1 -1
  45. package/dist/types/components/organisms/DatePickers/TimePicker.d.ts.map +1 -1
  46. package/dist/types/components/organisms/DatePickers/types.d.ts +2 -0
  47. package/dist/types/components/organisms/DatePickers/types.d.ts.map +1 -1
  48. package/dist/types/components/organisms/Dialog/Dialog.d.ts +1 -1
  49. package/dist/types/components/organisms/Dialog/Dialog.d.ts.map +1 -1
  50. package/dist/types/components/organisms/Dialog/DialogConfirmation.d.ts.map +1 -1
  51. package/dist/types/components/organisms/Dialog/DialogContent.d.ts.map +1 -1
  52. package/dist/types/components/organisms/Dialog/DialogFooter.d.ts.map +1 -1
  53. package/dist/types/components/organisms/Dialog/DialogHeader.d.ts.map +1 -1
  54. package/dist/types/theme/sections/components/data-display.d.ts.map +1 -1
  55. package/dist/types/theme/sections/components/forms.d.ts.map +1 -1
  56. package/dist/widgets/index.cjs +2 -2
  57. package/dist/widgets/index.js +3 -3
  58. package/package.json +1 -1
  59. package/dist/MenuItem-CuEx97RN.cjs +0 -1
  60. package/dist/TablePaginationActions-7wkkiCXh.cjs +0 -9
  61. package/dist/types/components/molecules/Menu/MenuFilter.d.ts +0 -8
  62. package/dist/types/components/molecules/Menu/MenuFilter.d.ts.map +0 -1
@@ -4,12 +4,14 @@ export type ListboxWithFilterProps = HTMLAttributes<HTMLElement> & {
4
4
  allSelected?: boolean;
5
5
  someSelected?: boolean;
6
6
  handleSelectAll?: () => void;
7
+ multiple?: boolean;
7
8
  };
8
9
  declare const ListboxWithFilter: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
9
10
  showFilters?: boolean;
10
11
  allSelected?: boolean;
11
12
  someSelected?: boolean;
12
13
  handleSelectAll?: () => void;
14
+ multiple?: boolean;
13
15
  } & import('react').RefAttributes<HTMLUListElement>>;
14
16
  export default ListboxWithFilter;
15
17
  //# sourceMappingURL=ListBoxWithFilter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListBoxWithFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/ListBoxWithFilter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,cAAc,EAAE,MAAM,OAAO,CAAA;AAGhE,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACjE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;CAC7B,CAAA;AA6BD,QAAA,MAAM,iBAAiB;kBAjCP,OAAO;kBACP,OAAO;mBACN,OAAO;sBACJ,MAAM,IAAI;oDA8B0B,CAAA;AACxD,eAAe,iBAAiB,CAAA"}
1
+ {"version":3,"file":"ListBoxWithFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/ListBoxWithFilter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,cAAc,EAAE,MAAM,OAAO,CAAA;AAGhE,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACjE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAmCD,QAAA,MAAM,iBAAiB;kBAxCP,OAAO;kBACP,OAAO;mBACN,OAAO;sBACJ,MAAM,IAAI;eACjB,OAAO;oDAoCoC,CAAA;AACxD,eAAe,iBAAiB,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { ForwardedRef } from 'react';
2
2
  import { ChipTypeMap } from '@mui/material';
3
3
  import { MultipleAutocompleteProps } from './types';
4
- declare function _MultipleAutocomplete<Value, Multiple extends boolean | undefined = true, DisableClearable extends boolean | undefined = undefined, FreeSolo extends boolean | undefined = undefined, ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent']>({ renderOption, disableCloseOnSelect, disabled, loading, showFilters, options, value, onChange, getOptionLabel, ...props }: MultipleAutocompleteProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>, ref: ForwardedRef<HTMLElement>): import("react/jsx-runtime").JSX.Element;
4
+ declare function _MultipleAutocomplete<Value, Multiple extends boolean | undefined = true, DisableClearable extends boolean | undefined = undefined, FreeSolo extends boolean | undefined = undefined, ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent']>({ renderOption, disableCloseOnSelect, disabled, loading, showFilters, options, value, onChange, getOptionLabel, getLimitTagsText, ...props }: MultipleAutocompleteProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>, ref: ForwardedRef<HTMLElement>): import("react/jsx-runtime").JSX.Element;
5
5
  declare const MultipleAutocomplete: <Value, Multiple extends boolean | undefined = true, DisableClearable extends boolean | undefined = undefined, FreeSolo extends boolean | undefined = undefined, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"]>(props: MultipleAutocompleteProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent> & {
6
6
  ref?: ForwardedRef<HTMLElement>;
7
7
  }) => ReturnType<typeof _MultipleAutocomplete>;
@@ -1 +1 @@
1
- {"version":3,"file":"MultipleAutocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/MultipleAutocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAc,MAAM,OAAO,CAAA;AAChD,OAAO,EACL,WAAW,EAGZ,MAAM,eAAe,CAAA;AAKtB,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAGnD,iBAAS,qBAAqB,CAC5B,KAAK,EACL,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,IAAI,EAC3C,gBAAgB,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EACxD,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,aAAa,SAAS,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC,kBAAkB,CAAC,EAEzE,EACE,YAAY,EACZ,oBAA2B,EAC3B,QAAQ,EACR,OAAO,EACP,WAAW,EACX,OAAO,EACP,KAAK,EACL,QAAQ,EACR,cAAc,EACd,GAAG,KAAK,EACT,EAAE,yBAAyB,CAC1B,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,aAAa,CACd,EACD,GAAG,EAAE,YAAY,CAAC,WAAW,CAAC,2CA0C/B;AAID,QAAA,MAAM,oBAAoB,EAAwC,CAChE,KAAK,EACL,QAA2C,SAA1B,OAAO,GAAG,SAAS,GAAG,IAAI,EAC3C,gBAAwD,SAA/B,OAAO,GAAG,SAAS,GAAG,SAAS,EACxD,QAAgD,SAA/B,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,aAAyE,SAAnD,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC,kBAAkB,CAAC,EAEzE,KAAK,EAAE,yBAAyB,CAC9B,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,aAAa,CACd,GAAG;IAAE,GAAG,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAA;CAAE,KACpC,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAE7C,eAAe,oBAAoB,CAAA"}
1
+ {"version":3,"file":"MultipleAutocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/MultipleAutocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAc,MAAM,OAAO,CAAA;AAChD,OAAO,EACL,WAAW,EAGZ,MAAM,eAAe,CAAA;AAMtB,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAGnD,iBAAS,qBAAqB,CAC5B,KAAK,EACL,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,IAAI,EAC3C,gBAAgB,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EACxD,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,aAAa,SAAS,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC,kBAAkB,CAAC,EAEzE,EACE,YAAY,EACZ,oBAA2B,EAC3B,QAAQ,EACR,OAAO,EACP,WAAW,EACX,OAAO,EACP,KAAK,EACL,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,GAAG,KAAK,EACT,EAAE,yBAAyB,CAC1B,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,aAAa,CACd,EACD,GAAG,EAAE,YAAY,CAAC,WAAW,CAAC,2CA6C/B;AAID,QAAA,MAAM,oBAAoB,EAAwC,CAChE,KAAK,EACL,QAA2C,SAA1B,OAAO,GAAG,SAAS,GAAG,IAAI,EAC3C,gBAAwD,SAA/B,OAAO,GAAG,SAAS,GAAG,SAAS,EACxD,QAAgD,SAA/B,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,aAAyE,SAAnD,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC,kBAAkB,CAAC,EAEzE,KAAK,EAAE,yBAAyB,CAC9B,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,aAAa,CACd,GAAG;IAAE,GAAG,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAA;CAAE,KACpC,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAE7C,eAAe,oBAAoB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useAutocompleteRenderOption.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/useAutocompleteRenderOption.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQhE,MAAM,CAAC,OAAO,UAAU,2BAA2B,CAAC,KAAK;0BAE9C,cAAc,CAAC,aAAa,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,UAC5C,KAAK,SACN;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,mBACX,CAAC,MAAM,EAAE,KAAK,KAAK,MAAM,eAC7B,SAAS;EAiGzB"}
1
+ {"version":3,"file":"useAutocompleteRenderOption.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/useAutocompleteRenderOption.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQhE,MAAM,CAAC,OAAO,UAAU,2BAA2B,CAAC,KAAK;0BAE9C,cAAc,CAAC,aAAa,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,UAC5C,KAAK,SACN;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,mBACX,CAAC,MAAM,EAAE,KAAK,KAAK,MAAM,eAC7B,SAAS;EAmGzB"}
@@ -10,8 +10,8 @@ export default function useMultipleAutocomplete<Value, Multiple extends boolean
10
10
  multipleValue: AutocompleteValue<Value, Multiple, DisableClearable, FreeSolo>;
11
11
  allSelected: boolean;
12
12
  someSelected: boolean;
13
- handleSelectAll: () => void;
14
- handleChange: (event: SyntheticEvent, newValue: AutocompleteValue<Value, Multiple, DisableClearable, FreeSolo>) => void;
13
+ handleSelectAll: (event: SyntheticEvent) => void;
14
+ handleChange: (event: SyntheticEvent, newValue: AutocompleteValue<Value, Multiple, DisableClearable, FreeSolo>, reason: AutocompleteChangeReason) => void;
15
15
  multipleRenderOption: (props: React.HTMLAttributes<HTMLLIElement>, option: Value, state: {
16
16
  selected: boolean;
17
17
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"useMultipleAutocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/useMultipleAutocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAA;AAC3D,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,eAAe,CAAA;AAKtB,KAAK,4BAA4B,CAC/B,KAAK,EACL,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,gBAAgB,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EACxD,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,IAC9C;IACF,OAAO,EAAE,SAAS,KAAK,EAAE,CAAA;IACzB,KAAK,CAAC,EAAE,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,CAAC,CAAA;IACtE,QAAQ,CAAC,EAAE,CACT,KAAK,EAAE,cAAc,EACrB,KAAK,EAAE,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,CAAC,EACrE,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,yBAAyB,CAAC,KAAK,CAAC,KACvC,IAAI,CAAA;IACT,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,KAAK,MAAM,CAAA;CAC3C,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAC7C,KAAK,EACL,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,gBAAgB,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EACxD,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,EACA,OAAO,EACP,KAAK,EACL,QAAQ,EACR,cAAc,GACf,EAAE,4BAA4B,CAAC,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,CAAC;mBAwDxC,iBAAiB,CAC/C,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,QAAQ,CACT;;;;0BA9BM,cAAc,YACX,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,CAAC;kCASjE,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,UAClC,KAAK,SACN;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE;EAyB/B"}
1
+ {"version":3,"file":"useMultipleAutocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/useMultipleAutocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAA;AAC3D,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,eAAe,CAAA;AAKtB,KAAK,4BAA4B,CAC/B,KAAK,EACL,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,gBAAgB,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EACxD,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,IAC9C;IACF,OAAO,EAAE,SAAS,KAAK,EAAE,CAAA;IACzB,KAAK,CAAC,EAAE,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,CAAC,CAAA;IACtE,QAAQ,CAAC,EAAE,CACT,KAAK,EAAE,cAAc,EACrB,KAAK,EAAE,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,CAAC,EACrE,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,yBAAyB,CAAC,KAAK,CAAC,KACvC,IAAI,CAAA;IACT,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,KAAK,MAAM,CAAA;CAC3C,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAC7C,KAAK,EACL,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,gBAAgB,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EACxD,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,EACA,OAAO,EACP,KAAK,EACL,QAAQ,EACR,cAAc,GACf,EAAE,4BAA4B,CAAC,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,CAAC;mBAkExC,iBAAiB,CAC/C,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,QAAQ,CACT;;;6BAjD6B,cAAc;0BAkBrC,cAAc,YACX,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,CAAC,UAChE,wBAAwB;kCASzB,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,UAClC,KAAK,SACN;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE;EAyB/B"}
@@ -1,3 +1,4 @@
1
1
  export declare const getDefaultOptionLabel: <Value>(option: Value) => string;
2
2
  export declare const createOptionWithMultiple: <Value>(option: Value, multiple: boolean) => Record<string, unknown>;
3
+ export declare const getDefaultLimitTagsText: (more: number) => import("react/jsx-runtime").JSX.Element;
3
4
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/utils.tsx"],"names":[],"mappings":"AACA,eAAO,MAAM,qBAAqB,GAAI,KAAK,UAAW,KAAK,KAAG,MAI7D,CAAA;AAGD,eAAO,MAAM,wBAAwB,GAAI,KAAK,UACpC,KAAK,YACH,OAAO,KAChB,MAAM,CAAC,MAAM,EAAE,OAAO,CAIxB,CAAA"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/utils.tsx"],"names":[],"mappings":"AACA,eAAO,MAAM,qBAAqB,GAAI,KAAK,UAAW,KAAK,KAAG,MAI7D,CAAA;AAGD,eAAO,MAAM,wBAAwB,GAAI,KAAK,UACpC,KAAK,YACH,OAAO,KAChB,MAAM,CAAC,MAAM,EAAE,OAAO,CAIxB,CAAA;AAGD,eAAO,MAAM,uBAAuB,SAAU,MAAM,4CAEnD,CAAA"}
@@ -4,5 +4,6 @@ export type MenuProps = MUIMenuProps & {
4
4
  width?: number | string;
5
5
  height?: number | string;
6
6
  };
7
- export default function Menu(props: MenuProps): import("react/jsx-runtime").JSX.Element;
7
+ declare const Menu: import('react').ForwardRefExoticComponent<Omit<MenuProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
8
+ export default Menu;
8
9
  //# sourceMappingURL=Menu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,IAAI,YAAY,EAE1B,MAAM,eAAe,CAAA;AAEtB,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACzB,CAAA;AA2BD,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,SAAS,2CAE5C"}
1
+ {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Menu/Menu.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,SAAS,IAAI,YAAY,EAE1B,MAAM,eAAe,CAAA;AAEtB,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACzB,CAAA;AAqDD,QAAA,MAAM,IAAI,mHAAoB,CAAA;AAC9B,eAAe,IAAI,CAAA"}
@@ -6,5 +6,6 @@ export type MenuItemProps = MUIMenuItemProps & {
6
6
  fixed?: boolean;
7
7
  iconColor?: 'primary' | 'default';
8
8
  };
9
- export default function MenuItem(props: MenuItemProps): import("react/jsx-runtime").JSX.Element;
9
+ declare const MenuItem: import('react').ForwardRefExoticComponent<Omit<MenuItemProps, "ref"> & import('react').RefAttributes<HTMLLIElement>>;
10
+ export default MenuItem;
10
11
  //# sourceMappingURL=MenuItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Menu/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,IAAI,gBAAgB,EAElC,MAAM,eAAe,CAAA;AAEtB,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;CAClC,CAAA;AAkJD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAEpD"}
1
+ {"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Menu/MenuItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,aAAa,IAAI,gBAAgB,EAElC,MAAM,eAAe,CAAA;AAEtB,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;CAClC,CAAA;AAkLD,QAAA,MAAM,QAAQ,sHAAwB,CAAA;AACtC,eAAe,QAAQ,CAAA"}
@@ -0,0 +1,9 @@
1
+ export type MenuItemFiltersProps = {
2
+ areAllSelected: boolean;
3
+ areAnySelected: boolean;
4
+ selectAll: () => void;
5
+ selectAllDisabled?: boolean;
6
+ };
7
+ declare const MenuItemFilter: import('react').ForwardRefExoticComponent<MenuItemFiltersProps & import('react').RefAttributes<HTMLLIElement>>;
8
+ export default MenuItemFilter;
9
+ //# sourceMappingURL=MenuItemFilter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuItemFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Menu/MenuItemFilter.tsx"],"names":[],"mappings":"AAOA,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,EAAE,OAAO,CAAA;IACvB,cAAc,EAAE,OAAO,CAAA;IACvB,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B,CAAA;AA0DD,QAAA,MAAM,cAAc,gHAA8B,CAAA;AAClD,eAAe,cAAc,CAAA"}
@@ -4,5 +4,6 @@ export type MenuListProps = MUIMenuListProps & {
4
4
  width?: number | string;
5
5
  height?: number | string;
6
6
  };
7
- export default function MenuList(props: MenuListProps): import("react/jsx-runtime").JSX.Element;
7
+ declare const MenuList: import('react').ForwardRefExoticComponent<Omit<MenuListProps, "ref"> & import('react').RefAttributes<HTMLUListElement>>;
8
+ export default MenuList;
8
9
  //# sourceMappingURL=MenuList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MenuList.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Menu/MenuList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,IAAI,gBAAgB,EAElC,MAAM,eAAe,CAAA;AAEtB,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACzB,CAAA;AAsBD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAEpD"}
1
+ {"version":3,"file":"MenuList.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Menu/MenuList.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,aAAa,IAAI,gBAAgB,EAElC,MAAM,eAAe,CAAA;AAEtB,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACzB,CAAA;AA2CD,QAAA,MAAM,QAAQ,yHAAwB,CAAA;AACtC,eAAe,QAAQ,CAAA"}
@@ -1,9 +1,9 @@
1
1
  export { default as Menu } from './Menu';
2
2
  export { default as MenuItem } from './MenuItem';
3
3
  export { default as MenuList } from './MenuList';
4
- export { default as MenuFilter } from './MenuFilter';
4
+ export { default as MenuItemFilter } from './MenuItemFilter';
5
5
  export type * from './Menu';
6
6
  export type * from './MenuItem';
7
7
  export type * from './MenuList';
8
- export type * from './MenuFilter';
8
+ export type * from './MenuItemFilter';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA;AAEpD,mBAAmB,QAAQ,CAAA;AAC3B,mBAAmB,YAAY,CAAA;AAC/B,mBAAmB,YAAY,CAAA;AAC/B,mBAAmB,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAE5D,mBAAmB,QAAQ,CAAA;AAC3B,mBAAmB,YAAY,CAAA;AAC/B,mBAAmB,YAAY,CAAA;AAC/B,mBAAmB,kBAAkB,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import { DatePickerProps } from '..';
2
- declare function DatePicker<TDate extends Date>({ handleClear, variant, size, label, labelHelpTooltip, type, helperText, placeholder, slotProps, slots, error, showCalendar, readOnly, ...props }: DatePickerProps<TDate>): import("react/jsx-runtime").JSX.Element;
2
+ declare function DatePicker<TDate extends Date>({ handleClear, variant, size, label, labelHelpTooltip, type, helperText, placeholder, slotProps, slots, error, showCalendar, readOnly, 'aria-label': ariaLabel, 'data-testid': dataTestId, ...props }: DatePickerProps<TDate>): import("react/jsx-runtime").JSX.Element;
3
3
  export default DatePicker;
4
4
  //# sourceMappingURL=DatePicker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/DatePickers/DatePicker.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAKxD,iBAAS,UAAU,CAAC,KAAK,SAAS,IAAI,EAAE,EACtC,WAAW,EACX,OAAoB,EACpB,IAAc,EACd,KAAK,EACL,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,WAAW,EACX,SAAS,EACT,KAAK,EACL,KAAK,EACL,YAAmB,EACnB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,KAAK,CAAC,2CAgExB;AAED,eAAe,UAAU,CAAA"}
1
+ {"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/DatePickers/DatePicker.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAKxD,iBAAS,UAAU,CAAC,KAAK,SAAS,IAAI,EAAE,EACtC,WAAW,EACX,OAAoB,EACpB,IAAc,EACd,KAAK,EACL,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,WAAW,EACX,SAAS,EACT,KAAK,EACL,KAAK,EACL,YAAmB,EACnB,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,aAAa,EAAE,UAAU,EACzB,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,KAAK,CAAC,2CAuExB;AAED,eAAe,UAAU,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import { DateRangePickerProps } from './types';
2
- declare function DateRangePicker<TDate extends Date>({ globalHelperText, error, variant, startProps, endProps, ...props }: DateRangePickerProps<TDate>): import("react/jsx-runtime").JSX.Element;
2
+ declare function DateRangePicker<TDate extends Date>({ globalHelperText, error, variant, startProps, endProps, 'aria-label': ariaLabel, 'data-testid': dataTestId, ...props }: DateRangePickerProps<TDate>): import("react/jsx-runtime").JSX.Element;
3
3
  export default DateRangePicker;
4
4
  //# sourceMappingURL=DateRangePicker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/DatePickers/DateRangePicker.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAA;AA6D/E,iBAAS,eAAe,CAAC,KAAK,SAAS,IAAI,EAAE,EAC3C,gBAAgB,EAChB,KAAK,EACL,OAAoB,EACpB,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,KAAK,CAAC,2CA4J7B;AAED,eAAe,eAAe,CAAA"}
1
+ {"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/DatePickers/DateRangePicker.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAA;AA6D/E,iBAAS,eAAe,CAAC,KAAK,SAAS,IAAI,EAAE,EAC3C,gBAAgB,EAChB,KAAK,EACL,OAAoB,EACpB,UAAU,EACV,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,aAAa,EAAE,UAAU,EACzB,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,KAAK,CAAC,2CAqK7B;AAED,eAAe,eAAe,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import { DateTimePickerProps } from './types';
2
- declare function DateTimePicker<TDate extends Date>({ handleClear, variant, size, label, labelHelpTooltip, type, helperText, placeholder, error, showCalendar, readOnly, slotProps, slots, ampm, views, format, ...props }: DateTimePickerProps<TDate>): import("react/jsx-runtime").JSX.Element;
2
+ declare function DateTimePicker<TDate extends Date>({ handleClear, variant, size, label, labelHelpTooltip, type, helperText, placeholder, error, showCalendar, readOnly, slotProps, slots, ampm, views, format, 'data-testid': dataTestId, 'aria-label': ariaLabel, ...props }: DateTimePickerProps<TDate>): import("react/jsx-runtime").JSX.Element;
3
3
  export default DateTimePicker;
4
4
  //# sourceMappingURL=DateTimePicker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DateTimePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/DatePickers/DateTimePicker.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAA;AAM9E,iBAAS,cAAc,CAAC,KAAK,SAAS,IAAI,EAAE,EAC1C,WAAW,EACX,OAAoB,EACpB,IAAc,EACd,KAAK,EACL,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,WAAW,EACX,KAAK,EACL,YAAmB,EACnB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,IAAW,EACX,KAA4B,EAC5B,MAAM,EACN,GAAG,KAAK,EACT,EAAE,mBAAmB,CAAC,KAAK,CAAC,2CAmE5B;AAED,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"DateTimePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/DatePickers/DateTimePicker.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAA;AAM9E,iBAAS,cAAc,CAAC,KAAK,SAAS,IAAI,EAAE,EAC1C,WAAW,EACX,OAAoB,EACpB,IAAc,EACd,KAAK,EACL,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,WAAW,EACX,KAAK,EACL,YAAmB,EACnB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,IAAW,EACX,KAA4B,EAC5B,MAAM,EACN,aAAa,EAAE,UAAU,EACzB,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACT,EAAE,mBAAmB,CAAC,KAAK,CAAC,2CAqE5B;AAED,eAAe,cAAc,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"PickersDay.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/DatePickers/PickersDay.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAA;AA+I1E,iBAAS,UAAU,CAAC,KAAK,SAAS,IAAI,EAAE,EACtC,GAAG,EACH,SAAS,EACT,OAAO,EACP,aAAa,EACb,GAAG,UAAU,EACd,EAAE,eAAe,CAAC,KAAK,CAAC,2CAkCxB;AAED,eAAe,UAAU,CAAA"}
1
+ {"version":3,"file":"PickersDay.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/DatePickers/PickersDay.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAA;AAwJ1E,iBAAS,UAAU,CAAC,KAAK,SAAS,IAAI,EAAE,EACtC,GAAG,EACH,SAAS,EACT,OAAO,EACP,aAAa,EACb,GAAG,UAAU,EACd,EAAE,eAAe,CAAC,KAAK,CAAC,2CAoCxB;AAED,eAAe,UAAU,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import { TimePickerProps } from './types';
2
- declare function TimePicker<TDate extends Date>({ handleClear, variant, size, label, labelHelpTooltip, type, helperText, placeholder, error, showClock, readOnly, slotProps, slots, ampm, views, format, ...props }: TimePickerProps<TDate>): import("react/jsx-runtime").JSX.Element;
2
+ declare function TimePicker<TDate extends Date>({ handleClear, variant, size, label, labelHelpTooltip, type, helperText, placeholder, error, showClock, readOnly, slotProps, slots, ampm, views, format, 'data-testid': dataTestId, 'aria-label': ariaLabel, ...props }: TimePickerProps<TDate>): import("react/jsx-runtime").JSX.Element;
3
3
  export default TimePicker;
4
4
  //# sourceMappingURL=TimePicker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/DatePickers/TimePicker.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAA;AAM1E,iBAAS,UAAU,CAAC,KAAK,SAAS,IAAI,EAAE,EACtC,WAAW,EACX,OAAoB,EACpB,IAAc,EACd,KAAK,EACL,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,WAAW,EACX,KAAK,EACL,SAAgB,EAChB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,IAAW,EACX,KAA4B,EAC5B,MAAM,EACN,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,KAAK,CAAC,2CAgGxB;AAED,eAAe,UAAU,CAAA"}
1
+ {"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/DatePickers/TimePicker.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAA;AAM1E,iBAAS,UAAU,CAAC,KAAK,SAAS,IAAI,EAAE,EACtC,WAAW,EACX,OAAoB,EACpB,IAAc,EACd,KAAK,EACL,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,WAAW,EACX,KAAK,EACL,SAAgB,EAChB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,IAAW,EACX,KAA4B,EAC5B,MAAM,EACN,aAAa,EAAE,UAAU,EACzB,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,KAAK,CAAC,2CAkGxB;AAED,eAAe,UAAU,CAAA"}
@@ -10,6 +10,8 @@ type DatePickersBaseProps = {
10
10
  placeholder?: string;
11
11
  type?: 'optional' | 'required';
12
12
  error?: boolean;
13
+ 'aria-label'?: string;
14
+ 'data-testid'?: string;
13
15
  };
14
16
  export type DatePickerProps<TDate extends Date> = MuiDatePickerProps<TDate> & DatePickersBaseProps & {
15
17
  showCalendar?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/DatePickers/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EACL,eAAe,IAAI,kBAAkB,EACrC,eAAe,IAAI,kBAAkB,EACrC,eAAe,IAAI,kBAAkB,EACrC,mBAAmB,IAAI,sBAAsB,EAC9C,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9C,KAAK,oBAAoB,GAAG;IAC1B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;IACnC,IAAI,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;IAC7B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,UAAU,GAAG,UAAU,CAAA;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,KAAK,SAAS,IAAI,IAAI,kBAAkB,CAAC,KAAK,CAAC,GACzE,oBAAoB,GAAG;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA;AAEH,MAAM,MAAM,oBAAoB,CAAC,KAAK,SAAS,IAAI,IACjD,eAAe,CAAC,KAAK,CAAC,GAAG;IACvB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,UAAU,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,CAAA;IACnC,QAAQ,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,CAAA;CAClC,CAAA;AAEH,MAAM,MAAM,eAAe,CAAC,KAAK,SAAS,IAAI,IAAI,kBAAkB,CAAC,KAAK,CAAC,GAAG;IAC5E,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,SAAS,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;IACxB,OAAO,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;IACtB,aAAa,CAAC,EAAE,IAAI,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,KAAK,SAAS,IAAI,IAAI,kBAAkB,CAAC,KAAK,CAAC,GACzE,oBAAoB,GAAG;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAEH,MAAM,MAAM,mBAAmB,CAAC,KAAK,SAAS,IAAI,IAChD,sBAAsB,CAAC,KAAK,CAAC,GAC3B,oBAAoB,GAAG;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/DatePickers/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EACL,eAAe,IAAI,kBAAkB,EACrC,eAAe,IAAI,kBAAkB,EACrC,eAAe,IAAI,kBAAkB,EACrC,mBAAmB,IAAI,sBAAsB,EAC9C,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9C,KAAK,oBAAoB,GAAG;IAC1B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;IACnC,IAAI,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;IAC7B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,UAAU,GAAG,UAAU,CAAA;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,KAAK,SAAS,IAAI,IAAI,kBAAkB,CAAC,KAAK,CAAC,GACzE,oBAAoB,GAAG;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA;AAEH,MAAM,MAAM,oBAAoB,CAAC,KAAK,SAAS,IAAI,IACjD,eAAe,CAAC,KAAK,CAAC,GAAG;IACvB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,UAAU,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,CAAA;IACnC,QAAQ,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,CAAA;CAClC,CAAA;AAEH,MAAM,MAAM,eAAe,CAAC,KAAK,SAAS,IAAI,IAAI,kBAAkB,CAAC,KAAK,CAAC,GAAG;IAC5E,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,SAAS,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;IACxB,OAAO,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;IACtB,aAAa,CAAC,EAAE,IAAI,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,KAAK,SAAS,IAAI,IAAI,kBAAkB,CAAC,KAAK,CAAC,GACzE,oBAAoB,GAAG;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAEH,MAAM,MAAM,mBAAmB,CAAC,KAAK,SAAS,IAAI,IAChD,sBAAsB,CAAC,KAAK,CAAC,GAC3B,oBAAoB,GAAG;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import { DialogProps } from './types';
2
- declare function Dialog({ nonModal, children, size, PaperProps, fullScreen, height, width, hasForm, 'aria-label': ariaLabel, 'data-testid': dataTestId, ...props }: DialogProps): import("react/jsx-runtime").JSX.Element;
2
+ declare const Dialog: import('react').ForwardRefExoticComponent<Omit<DialogProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
3
3
  export default Dialog;
4
4
  //# sourceMappingURL=Dialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Dialog/Dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAErC,iBAAS,MAAM,CAAC,EACd,QAAQ,EACR,QAAQ,EACR,IAAc,EACd,UAAU,EACV,UAAU,EACV,MAAM,EACN,KAAK,EACL,OAAO,EACP,YAAY,EAAE,SAAS,EACvB,aAAa,EAAE,UAAU,EACzB,GAAG,KAAK,EACT,EAAE,WAAW,2CA0Cb;AAED,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Dialog/Dialog.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAmErC,QAAA,MAAM,MAAM,qHAAsB,CAAA;AAClC,eAAe,MAAM,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogConfirmation.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Dialog/DialogConfirmation.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAiCjD,iBAAS,kBAAkB,CAAC,EAC1B,QAAQ,EACR,WAAW,EACX,OAAO,EACP,QAAoB,EACpB,MAAM,EACN,aAAa,EAAE,UAAU,EACzB,YAAY,EAAE,SAAS,EACvB,GAAG,UAAU,EACd,EAAE,uBAAuB,2CAuCzB;AAED,eAAe,kBAAkB,CAAA"}
1
+ {"version":3,"file":"DialogConfirmation.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Dialog/DialogConfirmation.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAiCjD,iBAAS,kBAAkB,CAAC,EAC1B,QAAQ,EACR,WAAW,EACX,OAAO,EACP,QAAoB,EACpB,MAAM,EACN,aAAa,EAAE,UAAU,EACzB,YAAY,EAAE,SAAS,EACvB,GAAG,UAAU,EACd,EAAE,uBAAuB,2CAwCzB;AAED,eAAe,kBAAkB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Dialog/DialogContent.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AA2H5C,QAAA,MAAM,aAAa,mIAA6B,CAAA;AAEhD,eAAO,MAAM,mBAAmB;gBAGlB,OAAO;UAOlB,CAAA;AAEH,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"DialogContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Dialog/DialogContent.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AA4H5C,QAAA,MAAM,aAAa,mIAA6B,CAAA;AAEhD,eAAO,MAAM,mBAAmB;gBAGlB,OAAO;UAOlB,CAAA;AAEH,eAAe,aAAa,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogFooter.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Dialog/DialogFooter.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAoD3C,eAAO,MAAM,aAAa;eAGb,OAAO;UAUjB,CAAA;AAOH,iBAAS,YAAY,CAAC,EACpB,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,IAAI,EACJ,UAAU,EACV,GAAG,UAAU,EACd,EAAE,iBAAiB,2CA2BnB;AAED,eAAe,YAAY,CAAA"}
1
+ {"version":3,"file":"DialogFooter.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Dialog/DialogFooter.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAoD3C,eAAO,MAAM,aAAa;eAGb,OAAO;UAUjB,CAAA;AAOH,iBAAS,YAAY,CAAC,EACpB,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,IAAI,EACJ,UAAU,EACV,GAAG,UAAU,EACd,EAAE,iBAAiB,2CA4BnB;AAED,eAAe,YAAY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Dialog/DialogHeader.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAgC3C,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,SAAS,EACT,SAAS,EACT,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,GAAG,UAAU,EACd,EAAE,iBAAiB,2CA6CnB;AAED,eAAe,YAAY,CAAA"}
1
+ {"version":3,"file":"DialogHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Dialog/DialogHeader.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAgC3C,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,SAAS,EACT,SAAS,EACT,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,GAAG,UAAU,EACd,EAAE,iBAAiB,2CA8CnB;AAED,eAAe,YAAY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"data-display.d.ts","sourceRoot":"","sources":["../../../../../src/theme/sections/components/data-display.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAkBxD,eAAO,MAAM,oBAAoB,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAuiB3D,CAAA"}
1
+ {"version":3,"file":"data-display.d.ts","sourceRoot":"","sources":["../../../../../src/theme/sections/components/data-display.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAkBxD,eAAO,MAAM,oBAAoB,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CA0iB3D,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["../../../../../src/theme/sections/components/forms.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAuB,KAAK,EAAW,MAAM,eAAe,CAAA;AAwF/E,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CA65BrD,CAAA"}
1
+ {"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["../../../../../src/theme/sections/components/forms.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAuB,KAAK,EAAW,MAAM,eAAe,CAAA;AAwF/E,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAg6BrD,CAAA"}
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("react"),o=require("@mui/material"),Z=require("react-intl"),j=require("../TablePaginationActions-7wkkiCXh.cjs"),jn=require("echarts-for-react"),wn=require("react-window"),Te=require("../SwatchSquare-C-QxZLYN.cjs"),ee=require("@mui/icons-material"),bn=require("../Alert-B2JgFj6Y.cjs"),Me=require("../paletteUtils-DLQVT9qo.cjs");function Bt(){let e=!1;return window.PointerEvent&&"maxTouchPoints"in navigator?navigator.maxTouchPoints>0&&(e=!0):(window.matchMedia&&window.matchMedia("(any-pointer:coarse)").matches||window.TouchEvent||"ontouchstart"in window)&&(e=!0),e}function te(e){return!e||typeof e!="object"?e:`${e.prefix??""}${e.value}${e.suffix??""}`}const Sn=[],In={},lt=e=>e;function kn(e,n){if(!e||Array.isArray(e)&&e.length===0)return null;const i=Array.isArray(e)?e:[e];let r="";return r+=String(i[0].axisValueLabel),r+=i.map(({seriesName:s,value:l,data:a,marker:p})=>{const c=s?s+": ":"",g=te(n(Number(l))),h=a,d=`<div style="margin-left: 8px; display: inline">
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("react"),o=require("@mui/material"),Z=require("react-intl"),j=require("../TablePaginationActions-V8ultBUz.cjs"),jn=require("echarts-for-react"),wn=require("react-window"),Te=require("../SwatchSquare-C-QxZLYN.cjs"),ee=require("@mui/icons-material"),bn=require("../Alert-BbMbtaix.cjs"),Me=require("../paletteUtils-DLQVT9qo.cjs");function Bt(){let e=!1;return window.PointerEvent&&"maxTouchPoints"in navigator?navigator.maxTouchPoints>0&&(e=!0):(window.matchMedia&&window.matchMedia("(any-pointer:coarse)").matches||window.TouchEvent||"ontouchstart"in window)&&(e=!0),e}function te(e){return!e||typeof e!="object"?e:`${e.prefix??""}${e.value}${e.suffix??""}`}const Sn=[],In={},lt=e=>e;function kn(e,n){if(!e||Array.isArray(e)&&e.length===0)return null;const i=Array.isArray(e)?e:[e];let r="";return r+=String(i[0].axisValueLabel),r+=i.map(({seriesName:s,value:l,data:a,marker:p})=>{const c=s?s+": ":"",g=te(n(Number(l))),h=a,d=`<div style="margin-left: 8px; display: inline">
2
2
  ${c}${g}${String((h==null?void 0:h.unit)||"")}
3
3
  </div>`;return`<div style="margin-top: 4px">${String(p)}${d}</div>`}).join(" "),r}function Tn({height:e,labels:n=In,yAxisData:i,selectedBars:r=Sn,series:s,colors:l,tooltip:a=!0,tooltipFormatter:p=kn,xAxisFormatter:c=lt,yAxisFormatter:g=lt,onSelectedBarsChange:h,animation:d=!0,filterable:y=!0,stacked:f=!0,...m}){const v=o.useTheme(),x=u.useMemo(()=>(s??[]).map(I=>n[I]??I),[s,n]),b=u.useMemo(()=>Array.isArray(i[0])?i:[i],[i]),S=u.useMemo(()=>typeof l=="string"?[l]:Array.isArray(l)&&l.length?l:b.length<=1||x.length===1?[v.palette.secondary.main]:b.length===2||x.length===2?[v.palette.secondary.light,v.palette.secondary.dark]:Object.values(v.palette.qualitative.bold||{}),[l,v,b,x]);return{...m,tooltip:a,tooltipFormatter:p,xAxisFormatter:c,yAxisFormatter:g,onSelectedBarsChange:h,animation:d,filterable:y,stacked:f,labels:n,height:e??parseInt(v.spacing(22)),selectedBars:Mn(r),yAxisData:b,colors:S,series:x}}function Mn(e){return(e??[]).length?e.map(n=>Array.isArray(n)&&n.length===2?n:Array.isArray(n)?[...Array(2)].map((r,s)=>n[s]??0):[n,0]):[]}var Cn=function e(n,i){if(n===i)return!0;if(n&&i&&typeof n=="object"&&typeof i=="object"){if(n.constructor!==i.constructor)return!1;var r,s,l;if(Array.isArray(n)){if(r=n.length,r!=i.length)return!1;for(s=r;s--!==0;)if(!e(n[s],i[s]))return!1;return!0}if(n.constructor===RegExp)return n.source===i.source&&n.flags===i.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===i.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===i.toString();if(l=Object.keys(n),r=l.length,r!==Object.keys(i).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(i,l[s]))return!1;for(s=r;s--!==0;){var a=l[s];if(!e(n[a],i[a]))return!1}return!0}return n!==n&&i!==i};const xe=j.getDefaultExportFromCjs(Cn);class ye extends jn{componentDidUpdate(n){const{shouldSetOption:i}=this.props;if(typeof i=="function"&&!i(n,this.props))return;if(!xe(n.theme,this.props.theme)||!xe(n.opts,this.props.opts)){this.dispose(),this.renderNewEcharts();return}const r=this.getEchartsInstance();xe(n.onEvents,this.props.onEvents)||(this.offEvents(r,n.onEvents),this.bindEvents(r,this.props.onEvents));const s=["option","notMerge","lazyUpdate","showLoading","loadingOption"];xe(at(this.props,s),at(n,s))||this.updateEChartsOption(),(!xe(n.style,this.props.style)||!xe(n.className,this.props.className))&&this.resize()}updateEChartsOption(){const n=this.props.option,i=this.props.loadingOption||null,{lazyUpdate:r,showLoading:s}=this.props,l=this.getEchartsInstance();return l.setOption(n,{replaceMerge:["series"],lazyUpdate:r}),s?l.showLoading(i):l.hideLoading(),l}offEvents(n,i){if(i)for(const r in i)typeof r=="string"&&n.off(r)}}function at(e,n){const i={};return n.forEach(r=>{i[r]=e[r]}),i}const _e=240,Pt=o.styled(o.Box)(({theme:e})=>({display:"flex",alignItems:"flex-end",justifyContent:"space-between",position:"relative",padding:e.spacing(0,2),"&::before":{content:'""',position:"absolute",top:0,right:0,left:0,bottom:0,backgroundSize:e.spacing(4,4),backgroundImage:`linear-gradient(to bottom, ${e.palette.grey[50]} 1px, transparent 1px)`,transform:"scaleY(-1)"}})),Lt=o.styled(o.Box)(({theme:e})=>({display:"flex",alignItems:"flex-end",justifyContent:"space-between",backgroundImage:`linear-gradient(${e.palette.grey[50]} 0.5px, transparent 0.5px, transparent calc(100% - 0.5px), ${e.palette.grey[50]} calc(100% - 0.5px)), linear-gradient(90deg, ${e.palette.grey[50]} 0.5px, transparent 0.5px, transparent calc(100% - 0.5px), ${e.palette.grey[50]} calc(100% - 0.5px))`,backgroundSize:"8.33% 20%",border:`0.5px solid ${e.palette.grey[50]}`})),je=o.styled(o.Skeleton)(({theme:e})=>({flex:1,maxWidth:e.spacing(12),"& + &":{marginLeft:e.spacing(1)}})),ne=o.styled(o.Skeleton)(({theme:e})=>({flex:1,maxWidth:e.spacing(8),"& + &":{marginLeft:"1px"}})),An=o.styled(o.Skeleton)(({theme:e})=>({backgroundColor:e.palette.common.white})),ct=o.styled(o.Skeleton)(({theme:e})=>({backgroundColor:e.palette.grey[100]}));function En({height:e}){return t.jsxs(t.Fragment,{children:[t.jsx(o.Box,{mb:2,children:t.jsx(o.Skeleton,{width:48,height:8})}),t.jsxs(Pt,{style:{height:e||_e},children:[t.jsx(je,{variant:"rectangular",height:"20%"}),t.jsx(je,{variant:"rectangular",height:"40%"}),t.jsx(je,{variant:"rectangular",height:"60%"}),t.jsx(je,{variant:"rectangular",height:"20%"}),t.jsx(je,{variant:"rectangular",height:"80%"})]})]})}function de(e){const[n,i]=u.useState(!1),[r,s]=u.useState(!1);return u.useEffect(()=>{e&&!r&&(i(!0),s(!0)),e||i(!1)},[e,r]),{showSkeleton:n}}const Bn=Bt(),Pn=o.styled(o.Grid)(({theme:e})=>({marginBottom:e.spacing(2),flexDirection:"row",justifyContent:"space-between",alignItems:"center","& .MuiTypography-caption":{color:e.palette.text.secondary}})),Ln=o.styled(o.Link)(({theme:e})=>({...e.typography.caption,cursor:"pointer"}));function Dn(e){const{yAxisData:n,xAxisData:i,series:r,selectedBars:s,onSelectedBarsChange:l,tooltip:a,tooltipFormatter:p,labels:c,colors:g,xAxisFormatter:h,yAxisFormatter:d,stacked:y,height:f,filterable:m,animation:v,isLoading:x}=Tn(e),b=r.length>1,S=o.useTheme(),I=Z.useIntl(),T=j.useImperativeIntl(I),{showSkeleton:w}=de(!!x),C=u.useMemo(()=>({show:a,trigger:"axis",padding:[parseInt(S.spacing(.5)),parseInt(S.spacing(1))],borderWidth:0,textStyle:{...S.typography.caption,fontSize:11,color:S.palette.common.white},backgroundColor:S.palette.black[90],position:function(k,O,G,R,H){const q={top:0};return H.contentSize[0]<H.viewSize[0]-k[0]?q.left=k[0]:q.right=H.viewSize[0]-k[0],q},formatter:k=>p(k,d)}),[S,a,p,d]),M=u.useMemo(()=>i.map(k=>te(h(c[k]??String(k)))),[i,c,h]),D=u.useMemo(()=>({type:"category",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{...S.typography.overlineDelicate,padding:[parseInt(S.spacing(.5)),0,0,0]},data:M}),[S,M]),E=u.useMemo(()=>{let k=[];return y?k=n.reduce((O,G)=>(G.forEach((R,H)=>O[H]=(O[H]??0)+(R??Number.MIN_SAFE_INTEGER)),O),[]):k=n.flat().map(O=>O??Number.MIN_SAFE_INTEGER),Math.max(...k)},[n,y]),L=u.useMemo(()=>({type:"value",axisLabel:{margin:0,verticalAlign:"bottom",padding:[0,0,parseInt(S.spacing(1.25)),0],show:!0,showMaxLabel:!0,showMinLabel:!1,inside:!0,color:k=>k>=E?S.palette.black[60]:"transparent",...S.typography.overlineDelicate,formatter:k=>te(d(k))},axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!0,onZero:!1,lineStyle:{color:S.palette.black[4]}}}),[S,E,d]),P=u.useMemo(()=>n.map((k,O)=>({type:"bar",name:r[O]??"",animation:v,barMaxWidth:100,data:k.map((G,R)=>{const H=s.some(([F,Y=0])=>F===R&&Y===O),q=!!s.length&&!H;return{value:G,...q&&{itemStyle:{color:S.palette.black[25]},disabled:!0}}}),...y&&{stack:"total"},...!Bn&&{emphasis:{focus:"series",itemStyle:{color:o.darken(g[O]??"#000",.25)}}}})),[v,g,r,n,s,y,S]),N=u.useMemo(()=>({grid:{left:M.length>=4?dt(String(M[0]),M.length):0,top:parseInt(S.spacing(2)),right:M.length>=4?dt(String(M[M.length-1]),M.length):0,bottom:0,containLabel:!0},axisPointer:{lineStyle:{color:S.palette.black[40]}},color:g,tooltip:C,xAxis:D,yAxis:L,series:P}),[M,S,g,C,D,L,P]),V=()=>{l&&l([],[])},_=k=>{k.key==="Enter"&&V()},B=u.useCallback(k=>{if(l){const O=[...s],{dataIndex:G,componentIndex:R}=k,H=O.findIndex(([F,Y=0])=>G===F&&R===Y);H===-1?O.push([G,R]):O.splice(H,1);const q=O.map(([F,Y=0])=>({xAxis:i[F],serie:r[Y],yAxis:n[Y][F]}));l(b?O:O.map(F=>F[0]),q)}},[n,l,s,i,r,b]),$=u.useMemo(()=>m?{click:B}:{},[m,B]);return w?t.jsx(En,{height:f}):t.jsxs("div",{children:[l&&t.jsxs(Pn,{container:!0,children:[t.jsx(j.Typography,{variant:"caption",children:s.length>0?T.formatMessage({id:"c4r.widgets.bar.selectedItems"},{items:s.length}):T.formatMessage({id:"c4r.widgets.bar.all"})}),s&&s.length>0&&t.jsx(Ln,{onClick:()=>V(),onKeyDown:_,underline:"hover",tabIndex:0,children:T.formatMessage({id:"c4r.widgets.bar.clear"})})]}),!!N&&t.jsx(ye,{option:N,lazyUpdate:!0,notMerge:!0,onEvents:$,style:{height:f}})]})}function dt(e="",n=0){return n<=15&&e.length<=8?0:e.length*8.5/6}const ue="__rest__",me="Others";var pe=(e=>(e.RANKING="ranking",e.FIXED="fixed",e))(pe||{});const Dt=o.styled(o.Grid)(({theme:e})=>({maxHeight:e.spacing(40),overflow:"auto",padding:0})),Nt=o.styled(o.Grid,{shouldForwardProp:e=>e!=="selectable"&&e!=="name"&&e!=="unselected"})(({theme:e,selectable:n,name:i,unselected:r})=>({flexDirection:"row",maxWidth:"100%",padding:e.spacing(.5,.25),margin:0,"> .MuiGrid-item":{paddingTop:0,paddingLeft:0},"&:focus-visible":{outline:"none !important",boxShadow:`inset 0 0 0 2px ${e.palette.primary.main} !important`},...r&&{color:e.palette.text.disabled,".progressbar div":{backgroundColor:e.palette.text.disabled}},...i!==ue&&n&&{cursor:"pointer",flexWrap:"nowrap","&:hover .progressbar div":{backgroundColor:e.palette.secondary.dark}},...i===ue&&{cursor:"default",".progressbar div":{backgroundColor:e.palette.text.disabled}}})),ut=o.styled(o.Grid)(({theme:{spacing:e,palette:n}})=>({flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:e(1.5),paddingRight:e(1),"& .MuiTypography-caption":{color:n.text.secondary}})),Nn=o.styled(o.Grid)(({theme:e})=>({height:e.spacing(.5),width:"100%",margin:e.spacing(.5,0,.25,0),borderRadius:e.spacing(.5),backgroundColor:e.palette.action.disabledBackground,"& div":{width:0,height:"100%",borderRadius:e.spacing(.5),backgroundColor:e.palette.secondary.main,transition:`background-color ${e.transitions.easing.sharp} ${e.transitions.duration.shortest}ms,
4
4
  width ${e.transitions.easing.sharp} ${e.transitions.duration.complex}ms`}})),On=o.styled(o.Grid,{shouldForwardProp:e=>e!=="isSelectable"})(({theme:e,isSelectable:n})=>({...n&&{width:`calc(100% - ${e.spacing(4)})`}})),$n=o.styled(j.Typography)(({theme:e})=>({fontWeight:e.typography.fontWeightBold,marginRight:e.spacing(2)})),Ae=o.styled(o.Link)(({theme:e})=>({...e.typography.caption,cursor:"pointer","& + hr":{margin:e.spacing(0,1)}})),Rn=o.styled(o.Box)(({theme:e})=>({...e.typography.body2})),pt=o.styled(o.Button)(({theme:e})=>({position:"absolute",left:"-999px",top:"-1px",width:"1px",height:"1px",display:"inline-flex","&:focus-visible":{position:"static",width:"auto",height:"auto",marginTop:e.spacing(2)}})),Fn=o.styled(o.Skeleton)(({theme:e})=>({marginTop:e.spacing(1.25),marginBottom:e.spacing(1.75)})),Wn=e=>e%2===1,Ot=()=>t.jsxs(t.Fragment,{children:[t.jsx(o.Skeleton,{width:48,height:8}),t.jsx(Dt,{container:!0,mt:3,children:[...Array(6)].map((e,n)=>t.jsxs(Nt,{container:!0,spacing:1,children:[t.jsxs(o.Grid,{container:!0,item:!0,direction:"row",justifyContent:"space-between",children:[t.jsx(o.Skeleton,{width:Wn(n)?72:48,height:8}),t.jsx(o.Skeleton,{width:48,height:8})]}),t.jsx(Fn,{height:4,width:"100%"})]},n))})]});function $t(e){const n=u.useRef();return u.useEffect(()=>{n.current=e}),n.current}function Xe({start:e,end:n,duration:i,drawFrame:r,requestRef:s}){if(e===n&&!(e===0&&n===0))return;const a=n-e;let p=e;const c=a/(i/1e3*60),g=()=>{p+=c,r(Math.floor(p)),c>0&&p<n||c<0&&p>n?s.current=requestAnimationFrame(g):r(n)};s.current=requestAnimationFrame(g)}function _n({start:e,end:n,duration:i,drawFrame:r,requestRef:s}){if(e.length===n.length&&e.every((f,m)=>f.value===n[m].value))return;let a=n.map((f,m)=>e[m]&&e[m].name===f.name?{...f,value:e[m].value}:f),p=0;const c=a.map((f,m)=>n[m].value-f.value);if(c.every(f=>f===0)){r(n);return}const h=i/1e3*60,d=c.map(f=>f/h),y=()=>{p<h?(a=a.map((f,m)=>{const v=Math.floor(f.value+d[m]),x=m>0&&Math.floor(f.value+d[m-1]);return{...f,value:v===x?n[m].value:v}}),r(a),p++,s.current=requestAnimationFrame(y)):r(n)};s.current=requestAnimationFrame(y)}const Gn=[],Hn={},zn=e=>e,Ve=()=>{},Yn=e=>e.reduce((n,i)=>n+(i.value??0),0);function Vn({data:e,formatter:n=zn,labels:i=Hn,maxItems:r=5,order:s=pe.RANKING,selectedCategories:l=Gn,onSelectedCategoriesChange:a=Ve,onMaxItemsOverflow:p=Yn,animation:c=!0,filterable:g=!0,searchable:h=!0,isLoading:d}){const y=o.useTheme(),[f,m]=u.useState([]),[v,x]=u.useState(1),[b,S]=u.useState(!1),[I,T]=u.useState(""),[w,C]=u.useState([]),[M,D]=u.useState([]),[E,L]=u.useState([]),P=u.useRef(null),N=u.useRef(),V=$t(E),_=u.useRef([]),{showSkeleton:B}=de(!!d),$=Z.useIntl(),k=j.useImperativeIntl($);function O(A){return f.reduce((z,U)=>(A.includes(U.name)&&z.push(U.name),z),[])}function G(A){if(A!==ue){let z;l.includes(A)?z=l.filter(U=>U!==A):z=[...l,A],a&&a(z)}}const R=()=>a([]),H=A=>{A.key==="Enter"&&R()},q=()=>{a([]),C([])},F=A=>{A.key==="Enter"&&q()},Y=()=>{C(O(l))},J=A=>{A.key==="Enter"&&Y()},ie=()=>{const A=O(M);a([...A]),C([...A]),D([]),S(!1),T("")},re=A=>{A.key==="Enter"&&ie()},W=()=>{T(""),S(!1)},X=A=>{if(A!==ue){let z;M.includes(A)?z=M.filter(U=>U!==A):z=[...M,A],D(z)}},K=A=>{A.currentTarget.scrollIntoView()},Q=A=>{T(A.currentTarget.value)},ge=()=>{S(!0),D([...l])},ve=u.useCallback(A=>{if(b)return I?A.filter(z=>{var se;if(!z.name)return!1;const U=String(z.name);return!!(U.toLowerCase().includes(I.toLowerCase())||(se=i[U])!=null&&se.toLowerCase().includes(I.toLowerCase()))}):A;if(w.length)return w.reduce((U,se)=>{const Ce=A.find(le=>le.name===se);return U.push({name:se,value:Ce?Ce.value:null}),U},[]);{const z=A.slice(0,r);if(z.length<A.length){const U={name:ue,value:p(A.slice(r))};return[...z,U]}else return z}},[w,i,r,I,b,p]),he=u.useCallback(()=>{const A=w.length;return A?e.length-A:e.length-r},[e,r,w]),it=u.useCallback(A=>A===ue?`Others ${h?"":`(${he()})`}`:i[String(A)]??String(A),[he,i,h]),hn=u.useCallback(A=>A>=v?A!=null?"100%":0:`${(A||0)*100/v}%`,[v]);u.useEffect(()=>{l.length===0&&C([])},[l]),u.useEffect(()=>{if(e){if(s===pe.RANKING){const A=[...e].sort((U,se)=>(se.value??0)-(U.value??0)),z=ve(A);z.length>0?x(z[0].value??0):x(1),m(z)}else if(s===pe.FIXED){x(Math.max(...e.map(z=>z.value??0)));const A=ve(e);m(A)}}},[w,ve,e,i,r,s,I,b]),u.useEffect(()=>{V&&(_.current=V)},[V]),u.useEffect(()=>{if(c)return _n({start:(_.current||[]).map(A=>({...A,value:A.value??0})),end:f.map(A=>({...A,value:A.value??0})),duration:500,drawFrame:A=>L(A),requestRef:P}),()=>{P.current&&cancelAnimationFrame(P.current)};L(f)},[c,f]),u.useEffect(()=>{b&&N.current&&N.current.focus()},[b,N]);function fn({data:A,onCategoryClick:z}){const U=n(A.value??0),[se,Ce]=u.useState(!1),le=u.useRef(null),ze=()=>{var rt,st;const Ye=(((rt=le==null?void 0:le.current)==null?void 0:rt.scrollWidth)??0)>(((st=le==null?void 0:le.current)==null?void 0:st.clientWidth)??0);Ce(Ye)};u.useEffect(()=>(ze(),window.addEventListener("resize",ze),()=>{window.removeEventListener("resize",ze)}),[]);const yn=Ye=>{Ye.key==="Enter"&&z()},vn=!b&&l.length>0&&!l.includes(A.name);return t.jsxs(Nt,{container:!0,direction:"row",spacing:1,onClick:g?z:Ve,onKeyDown:g?yn:Ve,selectable:g,unselected:vn,name:A.name===ue?ue:"",tabIndex:g?0:-1,children:[g&&b&&t.jsx(o.Grid,{item:!0,mr:1,children:t.jsx(o.Checkbox,{checked:M.includes(A.name),tabIndex:-1})}),t.jsxs(On,{container:!0,item:!0,xs:!0,isSelectable:b,children:[t.jsxs(o.Grid,{container:!0,item:!0,direction:"row",justifyContent:"space-between",wrap:"nowrap",children:[t.jsx(o.Tooltip,{title:it(A.name),disableHoverListener:!se,children:t.jsx($n,{variant:"body2",noWrap:!0,ref:le,children:it(A.name)})}),typeof U=="object"&&U!==null?t.jsxs("span",{children:[U.prefix,U.value,U.suffix]}):t.jsx("span",{children:U})]}),t.jsx(Nn,{className:"progressbar",item:!0,children:t.jsx("div",{style:{width:hn(A.value??0)}})})]})]})}if((e==null?void 0:e.length)===0||B)return t.jsx(Ot,{});const xn=({index:A,style:z})=>{const U=E[A];return U?t.jsx("div",{style:z,children:t.jsx(fn,{data:U,onCategoryClick:()=>b?X(U.name):G(U.name)})}):null},mn=()=>b?320:E.length<=r?E.length*38:w.length>0?w.length*38:(r+1)*38;return t.jsxs(Rn,{children:[g&&f.length>0&&t.jsxs(ut,{container:!0,children:[t.jsx(j.Typography,{variant:"caption",children:l.length>0?k.formatMessage({id:"c4r.widgets.category.selectedItems"},{items:l.length}):k.formatMessage({id:"c4r.widgets.category.all"})}),b?t.jsx(Ae,{onClick:ie,onKeyDown:re,underline:"hover",tabIndex:0,"data-testid":"primaryApplyButton",children:k.formatMessage({id:"c4r.widgets.category.apply"})}):w.length>0?t.jsx(Ae,{onClick:q,onKeyDown:F,underline:"hover",tabIndex:0,children:k.formatMessage({id:"c4r.widgets.category.unlock"})}):l.length>0&&t.jsxs(o.Grid,{container:!0,direction:"row",justifyContent:"flex-end",item:!0,xs:!0,children:[t.jsx(Ae,{onClick:Y,onKeyDown:J,underline:"hover",tabIndex:0,children:k.formatMessage({id:"c4r.widgets.category.lock"})}),t.jsx(o.Divider,{orientation:"vertical",flexItem:!0}),t.jsx(Ae,{onClick:R,onKeyDown:H,underline:"hover",tabIndex:0,children:k.formatMessage({id:"c4r.widgets.category.clear"})})]})]}),e.length>r&&b&&t.jsxs(ut,{container:!0,children:[t.jsx(o.TextField,{size:"small",sx:{mt:-.5},placeholder:k.formatMessage({id:"c4r.widgets.category.search"}),onChange:Q,onFocus:K,InputProps:{startAdornment:t.jsx(o.InputAdornment,{position:"start",children:t.jsx(Te.Search,{})})},inputProps:{tabIndex:0,ref:N}}),t.jsx(pt,{size:"small",onClick:W,children:k.formatMessage({id:"c4r.widgets.category.cancel"})})]}),t.jsx(Dt,{container:!0,item:!0,children:E.length?t.jsx(wn.FixedSizeList,{outerElementType:u.forwardRef((A,z)=>t.jsx("div",{ref:z,"data-testid":"category-widget-list",...A})),height:mn(),width:"100%",itemCount:E.length,itemSize:y.spacingValue*4.5,children:xn}):t.jsxs(o.Box,{children:[t.jsx(j.Typography,{variant:"body2",children:k.formatMessage({id:"c4r.widgets.category.noResults"})}),t.jsx(j.Typography,{component:"p",variant:"caption",mb:2,children:k.formatMessage({id:"c4r.widgets.category.noResultsMessage"},{searchValue:I})})]})}),b&&t.jsx(pt,{size:"small",onClick:ie,children:k.formatMessage({id:"c4r.widgets.category.apply"})}),e.length>r&&h?b?t.jsx(o.Box,{mt:1.5,children:t.jsx(o.Button,{size:"small",color:"primary",onClick:W,"data-testid":"primaryCancelButton",children:k.formatMessage({id:"c4r.widgets.category.cancel"})})}):t.jsx(o.Box,{mt:1.5,children:t.jsx(o.Button,{"data-testid":"show-all-categories-button",size:"small",color:"primary",startIcon:t.jsx(Te.Search,{}),onClick:ge,children:k.formatMessage({id:"c4r.widgets.category.searchInfo"},{elements:he()})})}):null]})}const Rt=()=>t.jsx(o.Box,{pt:.5,children:t.jsx(o.Skeleton,{height:24,width:120})}),Un=o.styled("span")(()=>({marginRight:"2px"})),qn=o.styled("span")(()=>({marginLeft:"2px"})),Ee="-",Xn=e=>e;function Kn({data:e=Ee,formatter:n=Xn,animation:i=!0,isLoading:r=!1}){const[s,l]=u.useState(Ee),a=u.useRef(null),p=$t(s),c=u.useRef(p),{showSkeleton:g}=de(!!r);u.useEffect(()=>(typeof e=="number"&&i?Xe({start:c.current||0,end:e,duration:500,drawFrame:f=>l(f),requestRef:a}):typeof e=="object"&&i&&e&&c.current&&e.value!==null&&e.value!==void 0?Xe({start:Number(c.current.value),end:Number(e.value),duration:1e3,drawFrame:f=>l({value:f,prefix:e.prefix,suffix:e.suffix}),requestRef:a}):l(e??Ee),()=>{a.current&&cancelAnimationFrame(a.current)}),[i,e,l]);const h=n(s),d=typeof h=="object"&&h!==null,y=h===Ee;return g?t.jsx(Rt,{}):d?t.jsxs(j.Typography,{variant:"h5",component:"div",weight:"medium",children:[t.jsx(Un,{children:h.prefix}),h.value,t.jsx(qn,{children:h.suffix})]}):t.jsx(j.Typography,{variant:"h5",component:"div",weight:"medium",color:y?"text.disabled":"default",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",children:h})}const gt={};let we=null;function Zn({data:e,filterable:n,selectedBars:i,onSelectedBarsChange:r,echartsInstance:s}){const l=o.useTheme(),[a,p]=u.useState([]),c=u.useMemo(()=>s==null?void 0:s.getZr(),[s]);u.useEffect(()=>{function h(y){if(s){const[f]=s.convertFromPixel({seriesIndex:0},[y.offsetX,y.offsetY]);we=f??null}}function d(y){if(s&&we!==null){const[f]=s.convertFromPixel({seriesIndex:0},[y.offsetX,y.offsetY]);p(we===f?[]:[we,f].sort((m,v)=>m-v))}}if(s&&n){const y=Ue(c,"mousedown",h),f=Ue(c,"mousemove",d);return()=>{y==null||y(),f==null||f()}}},[c,s,n]),u.useEffect(()=>{function h(){if(a.length===2&&r){const d=e.reduce((y,f,m)=>((a[0]>=f[0]&&a[0]<=f[1]||a[1]>=f[0]&&a[1]<=f[1]||a[0]<=f[0]&&a[1]>=f[1])&&y.push(m),y),[]);r(e.length===d.length?[]:d)}p([]),we=null}if(s&&n)return Ue(c,"mouseup",h)},[c,s,a,e,r,n]);const g=u.useCallback(h=>{if(r){const d=new Set(i);d.has(h.dataIndex)?d.delete(h.dataIndex):d.add(h.dataIndex),r(d.size===e.length?[]:Array.from(d))}},[r,i,e.length]);return{markAreaOptions:a.length===2&&{data:[[{coord:[a[0]]},{coord:[a[1]]}]],itemStyle:{color:l.palette.primary.main,opacity:.2}},onEvents:n?{click:g}:{}}}function Ue(e,n,i){if(e!=null&&e.handler)return gt[n]=i,e.on(n,i),()=>{gt[n]&&(e!=null&&e.handler)&&e.off(n,i)}}function Jn({height:e}){return t.jsxs(t.Fragment,{children:[t.jsx(o.Box,{mb:2,children:t.jsx(o.Skeleton,{width:48,height:8})}),t.jsxs(Lt,{style:{height:e??_e},children:[t.jsx(ne,{variant:"rectangular",height:"20%"}),t.jsx(ne,{variant:"rectangular",height:"40%"}),t.jsx(ne,{variant:"rectangular",height:"60%"}),t.jsx(ne,{variant:"rectangular",height:"20%"}),t.jsx(ne,{variant:"rectangular",height:"80%"}),t.jsx(ne,{variant:"rectangular",height:"50%"}),t.jsx(ne,{variant:"rectangular",height:"20%"}),t.jsx(ne,{variant:"rectangular",height:"40%"}),t.jsx(ne,{variant:"rectangular",height:"60%"}),t.jsx(ne,{variant:"rectangular",height:"20%"}),t.jsx(ne,{variant:"rectangular",height:"80%"}),t.jsx(ne,{variant:"rectangular",height:"50%"})]})]})}const Qn=Bt(),eo=o.styled(o.Grid)(({theme:e})=>({marginBottom:e.spacing(2),flexDirection:"row",justifyContent:"space-between",alignItems:"center","& .MuiTypography-caption":{color:e.palette.text.secondary}})),to=o.styled(o.Link)(({theme:e})=>({...e.typography.caption,cursor:"pointer"})),no=[],oo=()=>{},Oe=e=>e;function io(e,n=Oe,i=Oe){if(!e)return null;if(Array.isArray(e)&&e.length===0)return;const r=Array.isArray(e)?e[0].marker:e.marker,s=Array.isArray(e)?e[0].data:e.data;if((s==null?void 0:s.value)===void 0)return;const[l,a,p]=s.value,c=te(n(l)),g=te(n(a)),h=te(i(p)),d=`${c} <span style="vertical-align: 1px;">—</span> ${g}`,y=`<div style="margin-left: 8px; display: inline">${h}</div>`;return`${d} <div style="margin-top: 4px">${String(r)}${y}</div>`}function ro({data:e,ticks:n,min:i,max:r,xAxisFormatter:s=Oe,yAxisFormatter:l=Oe,yAxisType:a="dense",selectedBars:p=no,onSelectedBarsChange:c=oo,tooltip:g=!0,tooltipFormatter:h=io,animation:d=!0,filterable:y=!0,height:f=200,isLoading:m}){const v=Z.useIntl(),x=o.useTheme(),b=j.useImperativeIntl(v),{showSkeleton:S}=de(!!m),I=!!y&&!!c,[T,w]=u.useState(),C=k=>w(k),M=u.useMemo(()=>ao(e,n,i,r),[e,n,i,r]),{onEvents:D,markAreaOptions:E}=Zn({data:M,filterable:I,selectedBars:p,onSelectedBarsChange:c,echartsInstance:T}),L=u.useMemo(()=>({show:g,trigger:"item",padding:[j.SPACING*.5,j.SPACING],borderWidth:0,textStyle:{...x.typography.caption,fontSize:11,color:x.palette.common.white},backgroundColor:x.palette.black[90],confine:!0,position:"top",formatter(k){return h(k,s,l)}}),[x,g,h,s,l]),P=u.useMemo(()=>({min:i,max:r,interval:(r-i)/M.length,axisLine:{show:!1},splitLine:{show:!0,lineStyle:{color:x.palette.black[4]}},axisTick:{show:!1},axisLabel:{showMinLabel:!0,showMaxLabel:!0,...x.typography.overlineDelicate,hideOverlap:!0,padding:[j.SPACING*.5,j.SPACING*.5,0,j.SPACING*.5],formatter:k=>{const O=te(s(k));return k===i?so(O):k===r?lo(O):O},color:x.palette.black[60]}}),[i,r,M.length,x,s]),N=u.useMemo(()=>{const k={margin:0,verticalAlign:"bottom",padding:[0,0,j.SPACING*1.25,0],inside:!0,color:R=>{const H=Math.max(...e.map(F=>F??Number.MIN_SAFE_INTEGER))||1;let q="transparent";return R>=H&&(q=x.palette.black[60]),q},...x.typography.overlineDelicate,formatter:R=>te(l(R))},O={verticalAlign:"middle",padding:[0,0,0,j.SPACING*.5],color:x.palette.black[60]},G=a==="dense"?k:O;return{type:"value",axisLine:{show:!1},splitLine:{show:!0,lineStyle:{color:x.palette.black[4]}},axisTick:{show:!1},axisLabel:{show:!0,showMaxLabel:!0,showMinLabel:!1,...G,...x.typography.overlineDelicate,formatter:R=>te(l(R))}}},[x.palette.black,x.typography.overlineDelicate,e,l,a]),V=u.useMemo(()=>{const k=i===r&&M.filter(R=>R[2]!==0).length===1,G=(k?[M[0],M[M.length-1]]:M).map((R,H)=>{const F=p.length&&!p.includes(H)?x.palette.black[25]:x.palette.secondary.main;return{value:R,itemStyle:{color:F}}});return{type:"custom",cursor:"pointer",markArea:E,renderItem:function(R,H){const q=R.dataIndex===M.length-1,F=R.dataIndex===0,Y=G[R.dataIndex].itemStyle.color,J=H.value(0),ie=H.value(1),re=H.value(2),[W,X]=H.coord([J,re]),[K,Q]=H.size([ie-J,re]);return{type:"rect",shape:{x:k?W/10:W+(F?0:1),y:X,width:k?W-W/10:K-(q?0:1),height:Q},style:{fill:Y},...!Qn&&{emphasis:{style:{fill:o.darken(Y,.25)}}}}},encode:{x:[0,1],y:2,tooltip:[0,1,2]},data:G,animation:d}},[i,r,M,E,x.palette.black,x.palette.secondary.main,p,d]),_=u.useMemo(()=>({grid:{left:j.SPACING*.1,right:j.SPACING*.1,top:j.SPACING*2,bottom:j.SPACING*.5,containLabel:!0},tooltip:L,xAxis:P,yAxis:N,series:[V]}),[L,P,N,V]),B=p.reduce((k,O)=>k+=e[O]??0,0),$=k=>{k.key==="Enter"&&c([])};return S?t.jsx(Jn,{height:f}):t.jsxs("div",{children:[I&&t.jsxs(eo,{container:!0,children:[t.jsx(j.Typography,{variant:"caption",weight:"strong",children:p.length>0?b.formatMessage({id:"c4r.widgets.histogram.selectedItems"},{items:te(l(B))}):b.formatMessage({id:"c4r.widgets.histogram.all"})}),p.length>0&&t.jsx(to,{onClick:()=>c([]),onKeyDown:$,underline:"hover",tabIndex:0,children:b.formatMessage({id:"c4r.widgets.histogram.clear"})})]}),t.jsx(ye,{option:_,onEvents:D,lazyUpdate:!0,onChartReady:C,style:{maxHeight:f}})]})}function so(e){return`${Array(String(e).length).fill(" ").join("")}${e}`}function lo(e){const n=Array(String(e).length).fill(" ").join("");return`${e}${n}`}function ao(e,n,i,r){return e.map((s,l)=>[l===0?i:n[l-1],l===e.length-1?r:n[l],s])}function co(e,n,i,r){const s=o.useTheme(),l=u.useMemo(()=>n===pe.RANKING?e.slice().sort((c,g)=>(g.value??0)-(c.value??0)):e,[e,n]),a=u.useMemo(()=>{const c=[];let g=0;for(const h of l)c.length<i?c.push({...h}):g+=h.value??0;return g>0&&c.push({name:me,value:g,emphasis:{scale:!1}}),c},[i,l]);return u.useMemo(()=>{const c=s.palette.common.white;return a.map((g,h)=>{let d=c;if(r.length){const f=r[h%r.length];f&&(d=f)}else{const m=s.palette.qualitative.bold[h];m&&(d=m)}const y=g;return y.color=d,y})},[a,r,s])}const uo=o.styled(o.Box)(({theme:e})=>({zIndex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",paddingBottom:e.spacing(1)})),po=o.styled(o.Box)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),maxWidth:"140px",textTransform:"uppercase"})),go=o.styled(o.Box)(({theme:e})=>({display:"inline-block",borderRadius:e.spacing(.5),width:e.spacing(1),minWidth:e.spacing(1),height:e.spacing(1)}));function ho({data:e,selectedCategories:n,formatter:i}){const[r,s]=u.useState(),l=u.useMemo(()=>{if(!e||e.length===0)return null;let g;n.length>0?g=e.filter(m=>n.includes(m.name)):g=e;const h=fo(g),d=g.find(m=>m===h);if(!d)return null;let y=0;for(const m of e)y+=m.value??0;const f=xo(d.value??0,y,i);return{...d,percentage:f}},[e,n,i]);u.useEffect(()=>{l&&s(l)},[l,s]);const{name:a,percentage:p,color:c}=r??{};return r?t.jsxs(uo,{children:[t.jsx(j.Typography,{variant:"h5",children:p}),t.jsxs(po,{children:[t.jsx(go,{bgcolor:c,component:"span"}),t.jsx(j.Typography,{component:"span",variant:"body2",noWrap:!0,children:a})]})]}):null}function fo(e){const n=e.filter(i=>i.name!==me);return n.length===0?e[0]:n.reduce((i,r)=>(r.value??0)>(i.value??0)?r:i)}function xo(e,n,i){let r=0;return n!==0&&(r=e/n*100),i?i(r):`${r}%`}const ht=32,mo=o.styled(o.Box)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",marginTop:e.spacing(.5)})),yo=o.styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",position:"relative"})),vo=o.styled(An)(()=>({position:"absolute",zIndex:1})),jo=o.styled("div")(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",gap:e.spacing(1),position:"absolute",zIndex:2})),wo=o.styled(o.Box)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(2),height:e.spacing(5)})),bo=o.styled("div")(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1.5)}));function Ft({height:e}){const n=parseInt(String(e),10)||_e,i=n-ht,r=i-ht;return t.jsxs(o.Box,{mt:.5,children:[t.jsx(o.Skeleton,{height:8,width:64}),t.jsx(mo,{height:n,children:t.jsxs(yo,{children:[t.jsx(o.Skeleton,{variant:"circular",width:i,height:i}),t.jsx(vo,{variant:"circular",width:r,height:r}),t.jsxs(jo,{children:[t.jsx(o.Skeleton,{height:24,width:72}),t.jsx(o.Skeleton,{height:8,width:48})]})]})}),t.jsx(wo,{children:[...Array(2)].map((s,l)=>t.jsxs(bo,{children:[t.jsx(o.Skeleton,{variant:"circular",width:8,height:8}),t.jsx(o.Skeleton,{width:48,height:8})]},l))})]})}const So=o.styled(o.Box)(({theme:e})=>({position:"relative",padding:e.spacing(1.25,1,0,1),width:"100%"})),Io=o.styled(o.Box)(({theme:e})=>({position:"relative",display:"flex",flexDirection:"row",overflowX:"hidden",gap:e.spacing(2),padding:e.spacing(.5),margin:e.spacing(-.5)})),ko=o.styled(o.Box)(({theme:e})=>({display:"flex",flexDirection:"row",gap:e.spacing(1),alignItems:"center",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"pointer"})),To=o.styled(o.Box)(({theme:e})=>({display:"inline-block",position:"absolute",left:e.spacing(-2),top:e.spacing(1),bottom:e.spacing(1),zIndex:1,width:e.spacing(2.5),background:`linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, ${e.palette.background.paper} 100%)`})),Mo=o.styled(o.Box)(({theme:e})=>({position:"absolute",padding:e.spacing(.25,1),top:e.spacing(0),right:0,background:e.palette.background.paper})),Co=o.styled(o.Box,{shouldForwardProp:e=>e!=="color"})(({theme:e,color:n})=>{const i=e.spacing(1);return{backgroundColor:n,borderRadius:"50%",width:i,height:i}});function Wt({series:e,selectedCategories:n,onCategoryClick:i}){var I,T;const r=o.useTheme(),[s,l]=u.useState(!1),[a,p]=u.useState(0),[c,g]=u.useState(void 0),h=u.useRef(null),d=u.useRef(null),y=u.useRef(null),f=Z.useIntl(),m=j.useImperativeIntl(f);function v(){p(a+1)}function x(){p(Math.max(a-1))}function b(w,C){w.key==="Enter"&&(i==null||i(C))}const S=u.useCallback(()=>{var C,M,D;const w=!!d.current&&d.current.scrollWidth>d.current.clientWidth;l(w),g(w&&d.current?(((C=h.current)==null?void 0:C.clientWidth)??0)-(((M=y.current)==null?void 0:M.clientWidth)??70):(((D=h.current)==null?void 0:D.clientWidth)??0)-12||500)},[h,d,y]);return u.useEffect(()=>{S()},[d,(I=d.current)==null?void 0:I.scrollWidth,(T=d.current)==null?void 0:T.clientWidth,S,a]),u.useEffect(()=>{if(typeof ResizeObserver>"u")return;let w;return h.current&&(w=new ResizeObserver(()=>{S()}),w.observe(h.current)),()=>{w==null||w.disconnect()}},[h,S]),t.jsxs(So,{ref:h,children:[t.jsx(Io,{ref:d,style:{maxWidth:`${c}px`},children:e.map((w,C)=>{if(C<a)return null;const M=n.length===0||n.includes(w.name);return t.jsxs(ko,{tabIndex:0,onClick:i?()=>i(w.name):void 0,onKeyDown:i?D=>b(D,w.name):void 0,style:{pointerEvents:!i||w.name==="Others"?"none":void 0},children:[t.jsx(Co,{color:M?w.color:r.palette.text.disabled}),t.jsx(j.Typography,{variant:"overline",color:M?void 0:"text.disabled",children:w.name})]},C)})}),(s||a>0)&&t.jsxs(Mo,{ref:y,children:[t.jsx(To,{}),t.jsx(o.Tooltip,{title:m.formatMessage({id:"c4r.widgets.chartLegend.next"}),children:t.jsx(o.IconButton,{size:"small",disabled:a===0,onClick:x,children:t.jsx(ee.ChevronLeft,{})})}),t.jsx(o.Tooltip,{title:m.formatMessage({id:"c4r.widgets.chartLegend.prev"}),children:t.jsx(o.IconButton,{size:"small",disabled:!s,onClick:v,children:t.jsx(ee.ChevronRight,{})})})]})]})}const Ke="232px",Ao=o.styled(o.Grid)(({theme:e})=>({flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:e.spacing(.5)})),Eo=o.styled(o.Box,{shouldForwardProp:e=>e!=="height"&&e!=="width"})(({height:e,width:n})=>({position:"relative",margin:"0 auto",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:n||"100%",height:e||"100%"})),Bo=o.styled(ye)(()=>({position:"absolute",top:0,right:0,left:0,bottom:0})),ft=[],Po={},Lo=e=>e;function Do({name:e,data:n,formatter:i=Lo,tooltipFormatter:r=No,percentFormatter:s,height:l=Ke,width:a=Ke,labels:p=Po,colors:c=ft,animation:g=!0,filterable:h=!0,selectedCategories:d=ft,onSelectedCategoriesChange:y,isLoading:f,maxItems:m=11,order:v=pe.RANKING}){const x=o.useTheme(),b=co(n,v,m,c),{showSkeleton:S}=de(!!f),I=Z.useIntl(),T=j.useImperativeIntl(I),w=u.useMemo(()=>s||(_=>`${I.formatNumber(_,{maximumFractionDigits:2,minimumFractionDigits:2})}%`),[I,s]),C=u.useMemo(()=>{let _;return r&&(_=B=>r(B,i,w)),{padding:[j.SPACING*.5,j.SPACING],backgroundColor:x.palette.black[90],borderColor:"transparent",textStyle:{color:x.palette.common.white},confine:!0,formatter:_}},[x.palette.black,x.palette.common.white,r,i,w]),M=u.useMemo(()=>[{type:"pie",name:e,animation:g,data:b.map(_=>{const B={..._},$=(d==null?void 0:d.length)&&!d.includes(B.name);return p!=null&&p[B.name]&&(B.name=p[B.name]),$?{...B,disabled:!0,itemStyle:{color:x.palette.black[25]}}:{...B,itemStyle:{color:B.color}}}),radius:["74%","90%"],selectedOffset:0,bottom:j.SPACING*1.5,label:{show:!1},emphasis:{focus:"series",scaleSize:5},itemStyle:{borderColor:x.palette.background.paper,borderWidth:1}}],[e,g,b,p,d,x]),D=u.useMemo(()=>({grid:{left:0,top:0,right:0,bottom:0},tooltip:C,legend:{show:!1},series:M}),[C,M]),E=u.useCallback(_=>{if(y){const B=[...d],{name:$}=b[_.dataIndex];if($===me)return;const k=B.indexOf($);k===-1?B.push($):B.splice(k,1),y(B)}},[b,y,d]),L=u.useCallback(_=>{if(y){const B=[...d],$=B.indexOf(_);$===-1?B.push(_):B.splice($,1),y(B)}},[y,d]),P={...h&&{click:E}},N=()=>{y==null||y([])},V=_=>{_.key==="Enter"&&N()};return S?t.jsx(Ft,{height:l}):t.jsxs(t.Fragment,{children:[h&&t.jsxs(Ao,{container:!0,children:[t.jsx(j.Typography,{variant:"caption",color:"textSecondary",children:d.length?T.formatMessage({id:"c4r.widgets.pie.selectedItems"},{items:d.length}):T.formatMessage({id:"c4r.widgets.pie.allSelected"})}),d.length>0&&t.jsx(o.Link,{variant:"caption",onClick:N,onKeyDown:V,tabIndex:0,children:T.formatMessage({id:"c4r.widgets.pie.clear"})})]}),t.jsxs(Eo,{height:l,width:a,children:[t.jsx(ho,{data:b,selectedCategories:d,formatter:w}),t.jsx(Bo,{option:D,onEvents:P,lazyUpdate:!0,style:{height:l,width:a}})]}),b.length>0&&t.jsx(Wt,{series:b,selectedCategories:d,onCategoryClick:y&&L})]})}function No(e,n,i){var c;const r=Array.isArray(e)?e[0]:e;if(!r)return null;const s=te(n(r.value)),l=i(r.percent)||`${r.percent}%`,p=`display:inline-block;border-radius:4px;width:8px;height:8px;background-color:${((c=r.data)==null?void 0:c.color)||r.textStyle.color}`;return`
@@ -16,7 +16,7 @@
16
16
  <p style='line-height: 1; justify-self: flex-end;'>${i(h.data[1])}</p>
17
17
  </div>`;g.push(d)}return g},[]).join("")}
18
18
  </div>`}var Ge=(e=>(e.LINE="line",e.BAR="bar",e))(Ge||{});function yt(e){if(typeof e=="object"&&typeof(e==null?void 0:e.getTime)=="function")return e.getTime();const n=new Date(e).getTime();if(isFinite(n))return n}function Gt(e){return typeof e=="object"&&typeof(e==null?void 0:e.getTime)=="function"?e:new Date(e)}function Re(e,n){var i,r;for(let s=0;s<n.length;s++){const l=n[s].name,a=s<n.length?(i=n[s+1])==null?void 0:i.name:l,p=s>0?(r=n[s-1])==null?void 0:r.name:l,c=Math.abs(l-a),g=Math.abs(l-p),h=l-g*.5,d=l+c*.5;if(isFinite(h)&&isFinite(d)){if(e>=h&&e<=d)return s}else if(isFinite(h)){if(e>=h)return s}else if(isFinite(d)&&e<=d)return s}}function gi(e){let n,i=0;for(const{name:r}of e)r!==n&&(n=r,i++);return i}function hi(e){const n=new Date(e),i=n.getDay(),r=n.getDate()-i+(i?1:-6);return n.setDate(r),n.setHours(0,0,0,0),n.getTime()}var ae=(e=>(e.YEARS="year",e.MONTHS="month",e.WEEKS="week",e.DAYS="day",e.HOURS="hour",e.MINUTES="minute",e.SECONDS="second",e))(ae||{});const et={year:fe,month:fe,week:fe,day:fe,hour:yi,minute:vt,second:vt},fi={year:Ti,month:ki,week:Ii,day:Si,hour:bi,minute:wi,second:ji};function xi({date:e,stepSize:n}){const i=et[n];if(!i)throw new Error("formatTime: invalid stepSize");return i(e)}function Fe({start:e,end:n,stepSize:i}){if(e>n)return Fe({start:n,end:e,stepSize:i});const r=et[i];if(!r)throw new Error("formatTimeRange: missing formatter or invalid stepSize");const s=r(e),l=r(n);return`${s} - ${l}`}function Ht({date:e,stepSize:n,stepMultiplier:i}){if(!et[n])throw new Error("formatBucketRange: missing formatter or invalid stepSize");const{start:s,end:l}=vi({date:e,stepSize:n,stepMultiplier:i});if(i===1){if(n==="day")return xi({date:s,stepSize:n});if(n==="second")return`${fe(s)} ${Ze(s)} - ${Ze(l)}`}return Fe({start:s,end:l,stepSize:n})}const tt=e=>1e3*e,nt=e=>tt(60*e),mi=e=>nt(60*e);function fe(e){return e.toLocaleDateString()}function yi(e){return fe(e)+" "+e.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit",hour12:!0})}function Ze(e){return e.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!0,second:"2-digit"})}function vt(e){return fe(e)+" "+Ze(e)}function vi({date:e,stepSize:n,stepMultiplier:i=1}){const r=fi[n];if(!r)throw new Error("getBucketInterval: invalid bucket size");return r({date:e,stepMultiplier:i})}function ji({date:e,stepMultiplier:n=1}){const i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),0),r=new Date(i.getTime()+tt(n-1)+999);return{start:i,end:r}}function wi({date:e,stepMultiplier:n=1}){const i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),0,0),r=new Date(i.getTime()+nt(n-1)+tt(59));return{start:i,end:r}}function bi({date:e,stepMultiplier:n=1}){const i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),0,0,0),r=new Date(i.getTime()+mi(n-1)+nt(59));return{start:i,end:r}}function Si({date:e,stepMultiplier:n=1}){const i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0),r=new Date(e.getFullYear(),e.getMonth(),e.getDate()+n-1);return{start:i,end:r}}function Ii({date:e,stepMultiplier:n=1}){const i=new Date(hi(e)),r=new Date(i.getFullYear(),i.getMonth(),i.getDate()+6+7*(n-1));return{start:i,end:r}}function ki({date:e,stepMultiplier:n=1}){const i=new Date(e.getFullYear(),e.getMonth(),1),r=new Date(e.getFullYear(),e.getMonth()+n,0);return{start:i,end:r}}function Ti({date:e,stepMultiplier:n=1}){const i=new Date(e.getFullYear(),0,1),r=new Date(e.getFullYear()+(n-1),11,31);return{start:i,end:r}}const oe=()=>{},zt=u.createContext({isPlaying:!1,setIsPlaying:oe,isPaused:!1,setIsPaused:oe,timeWindow:[],setTimeWindow:oe,onTimeWindowUpdate:oe,togglePlay:oe,stop:oe,intl:{}});function He(){return u.useContext(zt)}function Yt({children:e,isPlaying:n,isPaused:i,onPlay:r=oe,onPause:s=oe,onStop:l=oe,timeWindow:a,onTimeWindowUpdate:p=oe,intl:c}){const[g,h]=u.useState(n),[d,y]=u.useState(i),[f,m]=u.useState([]),v=j.useImperativeIntl(c);u.useEffect(()=>{const I=f.sort((T,w)=>T<w?-1:1).map(Gt);p==null||p(I)},[f,p]);const x=u.useCallback(()=>{g&&(s&&s(),y(!0)),g||(r&&r(),y(!1)),h(I=>!I)},[g,s,r]),b=u.useCallback(()=>{h(!1),y(!1),m([])},[]),S=u.useCallback(()=>{b(),setTimeout(l)},[l,b]);return u.useEffect(()=>{n!==g&&h(n)},[n]),u.useEffect(()=>{i!==d&&y(i)},[i]),u.useEffect(()=>{if(!a)return;const I=a.map(yt),T=f.map(yt);(I[0]!==T[0]||I[1]!==T[1])&&m(I)},a),t.jsx(zt.Provider,{value:{isPlaying:!!g,setIsPlaying:h,isPaused:!!d,setIsPaused:y,timeWindow:f,setTimeWindow:m,onTimeWindowUpdate:p,togglePlay:x,stop:S,intl:v},children:e})}const jt={};let Pe=null;const Se={seriesId:"0"};function Vt({echartsInstance:e,data:n,canSelectLines:i,filterable:r}){const s=o.useTheme(),{isPlaying:l,isPaused:a,setIsPaused:p,timeWindow:c,setTimeWindow:g,stop:h}=He(),[d,y]=u.useState(!1),[f,m]=u.useState(!1),[v,x]=u.useState(!1),[b,S]=u.useState(0),I=u.useMemo(()=>e==null?void 0:e.getZr(),[e]),T=u.useCallback(D=>I==null?void 0:I.setCursorStyle(D),[I]),w=u.useCallback(D=>{if(e){const[E]=e.convertFromPixel(Se,[D.offsetX,D.offsetY]),L=Re(E,n);g(L!==void 0?[n[L].name]:[])}},[n,e,g]);u.useEffect(()=>{function D(E){r&&(i&&E.target||(c.length||(w(E),!a&&!l&&p(!0)),c.length===2&&(g([]),h())))}return Le(I,"click",D)},[I,a,l,p,g,h,c.length,w,i,r]),u.useEffect(()=>{function D(E){var L;if(r){if(((L=E.target)==null?void 0:L.type)==="ec-line"){y(!0),T("grabbing");return}if(c.length===2){const[P]=e.convertFromPixel(Se,[E.offsetX,E.offsetY]);if(P>=c[0]&&P<=c[1]){x(!0);const N=P-c[0];S(N);return}}if(e){m(!0);const[P]=e.convertFromPixel(Se,[E.offsetX,E.offsetY]);Pe=P;return}}}return Le(I,"mousedown",D)},[I,e,c,T,r]),u.useEffect(()=>{function D(E){var L;if(((L=E==null?void 0:E.target)==null?void 0:L.type)==="polygon"&&T("move"),d&&e&&(w(E),T("grabbing")),f&&e){const[P]=e.convertFromPixel(Se,[E.offsetX,E.offsetY]);g(Pe===P?[]:[Pe,P])}}return Le(I,"mousemove",D)},[I,e,f,d,g,T,w]),u.useEffect(()=>{function D(E){if(d&&(y(!1),T("default")),f&&(m(!1),Pe=null,c.length===1&&g([])),v&&e){const[L]=e.convertFromPixel(Se,[E.offsetX,E.offsetY]),P=L-c[0];if(b){const N=P-b;g([c[0]+N,c[1]+N])}x(!1)}}return Le(I,"mouseup",D)},[I,e,v,f,d,b,g,c,T]),u.useEffect(()=>{!r&&c.length&&g([])},[r,g,c.length]);const C=u.useMemo(()=>{var P;if(c.length!==1)return;const D=c[0],E=Re(D,n);if(E===void 0)return;const L=(P=n[E])==null?void 0:P.name;return L!==void 0&&{symbol:["none","none"],animationDuration:100,animationDurationUpdate:150,animationEasingUpdate:"linear",data:a||l?[{label:{show:!1},emphasis:{label:{show:!1}},xAxis:L,lineStyle:{type:"solid",color:s.palette.primary.main,width:1.5,shadowColor:s.palette.primary.light,shadowBlur:3}}]:[]}},[n,a,l,s,c]),M=u.useMemo(()=>c.length===2&&{data:[[{coord:[c[0]]},{coord:[c[1]]}]],itemStyle:{color:s.palette.primary.main,opacity:.2}},[s,c]);return{timelineOptions:C,timeWindowOptions:M}}function Le(e,n,i){if(e!=null&&e.handler)return jt[n]=i,e.on(n,i),()=>{jt[n]&&(e!=null&&e.handler)&&e.off(n,i)}}const Ut=j.SPACING*22,qt="100%",Mi=5,Ci=3,Ai=j.SPACING*20;function Ei({chartType:e,formatter:n,timeAxisSplitNumber:i,tooltip:r,tooltipFormatter:s,data:l,series:a,categories:p,height:c,fitHeight:g,animation:h,filterable:d,selectedCategories:y,onCategoryClick:f,yAxisType:m}){const v=o.useTheme(),[x,b]=u.useState(),S=B=>b(B),[I,T]=u.useState(),w=u.useMemo(()=>a.reduce((B,{data:$})=>$.reduce((k,O)=>O[1]>k?O[1]:k,B),Number.MIN_VALUE),[a]),C=u.useMemo(()=>({show:r,trigger:"axis",appendToBody:!0,padding:[j.SPACING*.5,j.SPACING],textStyle:{...v.typography.caption,fontSize:11,color:v.palette.common.white},borderWidth:0,backgroundColor:v.palette.black[90],position:(B,$,k,O,G)=>{const R={top:0};return G.contentSize[0]<G.viewSize[0]-B[0]?R.left=B[0]+j.SPACING*1.5:R.right=G.viewSize[0]-B[0]+j.SPACING*1.5,R},...s?{formatter:s}:{}}),[v,r,s]),M=u.useMemo(()=>{const B={margin:0,verticalAlign:"bottom",padding:[0,0,j.SPACING*1.25,0],inside:!0,color:O=>{let G="transparent";return O>=w&&(G=v.palette.black[60]),G}},$={margin:0,verticalAlign:"middle",padding:[0,j.SPACING*.75,0,0],color:v.palette.black[60]},k=m==="dense"?B:$;return{axisPointer:{lineStyle:{color:v.palette.black[40]}},xAxis:{type:"time",axisLine:{show:!0,lineStyle:{color:v.palette.grey[900],opacity:.2}},axisLabel:{fontWeight:v.typography.fontWeightRegular,fontSize:v.typography.caption.fontSize,fontFamily:v.typography.caption.fontFamily,lineHeight:v.typography.caption.lineHeight*8,letterSpacing:v.typography.caption.letterSpacing,formatter:{year:"{yearStyle|{yyyy}}"},rich:{yearStyle:{fontWeight:v.typography.fontWeightMedium,fontSize:v.typography.caption.fontSize,fontFamily:v.typography.caption.fontFamily,letterSpacing:v.typography.caption.letterSpacing,lineHeight:v.typography.caption.lineHeight*8}}},axisTick:{show:!1},splitNumber:i??(I!==void 0?Math.min(Ci,Math.ceil(I/Ai)):Mi)},yAxis:{type:"value",axisLabel:{show:!0,showMaxLabel:!0,showMinLabel:!1,...k,...n?{formatter:O=>n(O)}:{},fontWeight:v.typography.fontWeightRegular,fontSize:v.typography.overlineDelicate.fontSize,fontFamily:v.typography.overlineDelicate.fontFamily,lineHeight:v.typography.overlineDelicate.lineHeight*8,letterSpacing:v.typography.overlineDelicate.letterSpacing},axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!0,onZero:!1,lineStyle:{color:v.palette.black[4]}},max:w}}},[v,w,n,I,i,m]),{timelineOptions:D,timeWindowOptions:E}=Vt({echartsInstance:x,data:l,canSelectLines:!!f,filterable:d}),L=u.useMemo(()=>a.map(({data:B,color:$,name:k},O)=>{const G=y&&y.length>0,R=G&&y.includes(k),H=!G||R?$:v.palette.action.disabledBackground;return{id:String(O),name:k,markLine:O===0?D:void 0,markArea:O===0?E:void 0,animation:h,data:B,type:e,smooth:!0,color:H,z:G&&R?10:0,lineStyle:{width:2},showSymbol:!1,emphasis:{scale:2,lineStyle:{width:2,color:H}}}}),[a,D,E,h,e,y,v]),P=u.useMemo(()=>({grid:{left:j.SPACING*(m==="dense"?2:3.5),top:j.SPACING*4,right:j.SPACING*2,bottom:j.SPACING*3},color:[v.palette.secondary.main],tooltip:C,...M,series:L}),[M,L,m,v.palette.secondary.main,C]),V={click:u.useCallback(B=>{if(p&&f&&B.componentType==="series"){const $=p[B.seriesIndex];f($)}},[p,f])};u.useEffect(()=>{var k;if(typeof ResizeObserver>"u"||!x)return;const B=(k=x==null?void 0:x.getDom())==null?void 0:k.parentElement;if(!B)return;const $=new ResizeObserver(()=>{T(B.clientWidth),x.resize()});return $.observe(B),()=>{$.disconnect()}},[x]);const _=g?qt:c??Ut;return u.useLayoutEffect(()=>{var $;const B=($=x==null?void 0:x.getDom())==null?void 0:$.parentElement;B&&T(B.clientWidth),x==null||x.resize()},[_,g,x]),t.jsx(ye,{option:P,onEvents:V,onChartReady:S,style:{height:_}})}const Bi={[ae.YEARS]:60*60*24*7,[ae.MONTHS]:60*60*24,[ae.WEEKS]:60*60*24,[ae.DAYS]:60*60*12,[ae.HOURS]:60*60,[ae.MINUTES]:60*15,[ae.SECONDS]:1},Pi=[.5,1,2,3];function Li({data:e,stepSize:n}){const[i,r]=u.useState(null),[s,l]=u.useState(1),a=u.useRef({animationFrameId:null,timeoutId:null}),{isPlaying:p,isPaused:c,timeWindow:g,setTimeWindow:h,stop:d,togglePlay:y,intl:f}=He();Ri(()=>(p||c)&&d(),[e]);const m=()=>{const{animationFrameId:T,timeoutId:w}=a.current;T&&window.cancelAnimationFrame(T),w&&clearTimeout(w)},v=u.useCallback(()=>{m(),d()},[d]),x=()=>{m(),y()};u.useEffect(()=>{if(p&&g.length===2&&e.length){const w=Bi[n]*1e3;return Fi({data:e,timeWindow:g,msTimeWindowStep:w*s,drawFrame:C=>{h(C)},onEnd:()=>{setTimeout(v,250)},animationRef:a}),()=>m()}},[e,p,n,h,v,s]),u.useEffect(()=>{if(p&&g.length===1&&e.length)return _i({speed:s,timelinePosition:g[0],data:e,drawFrame:T=>{h([T])},onEnd:()=>{setTimeout(v,250)},animationRef:a}),()=>m();p&&g.length===0&&h([e[0].name])},[e,p,s,g.length,v]);const b=T=>{T!=null&&T.currentTarget&&r(T.currentTarget)},S=()=>{r(null)},I=T=>{l(T),S()};return t.jsxs(t.Fragment,{children:[t.jsx(o.IconButton,{size:"small",color:"default",onClick:b,"data-testid":"clock",children:t.jsx(Di,{})}),t.jsxs(o.Menu,{anchorEl:i,keepMounted:!0,open:!!i,onClose:S,children:[t.jsx(o.MenuItem,{disabled:!0,children:t.jsx(j.Typography,{variant:"caption",color:"textSecondary",children:f.formatMessage({id:"c4r.widgets.timeSeries.speed"})})}),Pi.map(T=>t.jsxs(o.MenuItem,{selected:T===s,onClick:()=>I(T),children:[T,"x"]},T))]}),t.jsx(o.Box,{mt:2,children:t.jsx(o.IconButton,{size:"small",color:"primary",disabled:!(c||p),onClick:v,"data-testid":"stop",children:t.jsx(Oi,{})})}),t.jsx(o.Box,{mt:.75,children:t.jsx(o.IconButton,{"data-testid":"play-pause",size:"small",color:"primary",onClick:x,children:p?t.jsx($i,{}):t.jsx(Ni,{})})})]})}function Di(){return t.jsx(o.SvgIcon,{viewBox:"0 0 20 20",children:t.jsx("path",{d:"M12.5 1.254h-5v1.667h5V1.254zM9.167 12.088h1.666v-5H9.167v5zm6.691-5.517 1.184-1.183a9.207 9.207 0 0 0-1.175-1.175l-1.184 1.183A7.468 7.468 0 0 0 10 3.746a7.5 7.5 0 0 0-7.5 7.5c0 4.141 3.35 7.5 7.5 7.5s7.5-3.358 7.5-7.5a7.504 7.504 0 0 0-1.642-4.675zM10 17.088a5.83 5.83 0 0 1-5.833-5.834A5.83 5.83 0 0 1 10 5.421a5.83 5.83 0 0 1 5.833 5.833A5.83 5.83 0 0 1 10 17.087z",id:"-↳Color",fill:"inherit"})})}function Ni(){return t.jsx(o.SvgIcon,{"data-testid":"play-icon",children:t.jsx("path",{d:"M10 16.5l6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z",id:"-↳Color",fill:"inherit"})})}function Oi(){return t.jsx(o.SvgIcon,{children:t.jsx("path",{d:"M12 2c5.52 0 10 4.48 10 10s-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2zm0 2c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8zm4 4v8H8V8h8zm-2 2h-4v4h4v-4z",id:"-↳Color",fill:"inherit"})})}function $i(){return t.jsx(o.SvgIcon,{"data-testid":"pause-icon",children:t.jsx("path",{d:"M9,16 L11,16 L11,8 L9,8 L9,16 Z M12,2 C6.48,2 2,6.48 2,12 C2,17.52 6.48,22 12,22 C17.52,22 22,17.52 22,12 C22,6.48 17.52,2 12,2 Z M12,20 C7.59,20 4,16.41 4,12 C4,7.59 7.59,4 12,4 C16.41,4 20,7.59 20,12 C20,16.41 16.41,20 12,20 Z M13,16 L15,16 L15,8 L13,8 L13,16 Z",id:"-↳Color",fill:"inherit"})})}function Ri(e,n=[]){const i=u.useRef(!1);u.useEffect(()=>{i.current?e():i.current=!0},n)}function Fi({msTimeWindowStep:e,timeWindow:n,data:i,drawFrame:r,onEnd:s,animationRef:l}){let a=n;const p=()=>{l.current.animationFrameId=window.requestAnimationFrame(c)},c=()=>{a=[a[0]+e,a[1]+e],a[1]>i[i.length-1].name?s():(r(a),p())};p()}const Wi=2;function _i({speed:e,timelinePosition:n,data:i,drawFrame:r,onEnd:s,animationRef:l}){let a=Re(n,i)??0,p=i[a].name;const c=gi(i),g=Math.max(Math.round(Math.sqrt(c)/2),Wi)*e,h=()=>{l.current.timeoutId=setTimeout(()=>{l.current.animationFrameId=window.requestAnimationFrame(d)},1e3/g)},d=()=>{for(;a<i.length;a++){const y=i[a].name;if(y!==p){p=y;break}}a===i.length?s():(r(p),h())};h()}const Gi=o.styled(o.Box)(()=>({containerType:"inline-size",display:"flex",flexDirection:"column"})),Hi=o.styled(o.Box)(()=>({display:"flex",flexDirection:"column"})),Xt=o.styled(o.Box)(()=>({display:"flex",flexDirection:"row"})),zi=o.styled(Xt)(()=>({alignItems:"center",justifyContent:"space-between"})),Yi=o.styled(o.Box)(({theme:e})=>({flexShrink:0,marginLeft:0,paddingLeft:e.spacing(1),[`@container (max-width: ${j.BREAKPOINTS.XS}px)`]:{paddingLeft:0},paddingBottom:e.spacing(1.5),alignSelf:"flex-end"})),Vi=o.styled(o.Box)(({theme:e})=>({alignSelf:"normal",minWidth:0,paddingLeft:e.spacing(5),paddingBottom:e.spacing(1.5),[`@container (max-width: ${j.BREAKPOINTS.XS}px)`]:{paddingLeft:e.spacing(1)}}));function Kt({fitHeight:e,header:n,controls:i,chart:r,legend:s}){const l=s&&t.jsx(o.Box,{flex:0,mt:2,children:s});return t.jsxs(Gi,{style:{flex:e?"1":void 0},children:[t.jsx(zi,{flex:0,children:n}),i?t.jsxs(Hi,{flex:1,children:[t.jsxs(Xt,{flex:1,children:[t.jsx(Yi,{flex:0,children:i}),t.jsx(Vi,{flex:1,children:r})]}),l]}):t.jsxs(t.Fragment,{children:[t.jsx(o.Box,{pb:1.5,flex:1,children:r}),l]})]})}const Ui=e=>t.jsx(o.SvgIcon,{width:"720",height:"124",viewBox:"0 0 720 124",...e,children:t.jsx("path",{d:"M0.74707 123C11.8168 119.656 26.7934 118.37 53.4909 102.164C73.1959 90.2031 92.5604 81.3284 108.188 76.6983C122.841 72.357 136.188 74.3832 144.653 75.1549C150.496 75.6876 195.443 82.8718 207.164 83.6435C218.885 84.4152 241.676 87.502 274.234 80.5567C306.791 73.6115 305.869 75.4585 330.233 67.438C388.837 48.1456 433.461 2.6348 458.511 1.07229C495.627 -1.24279 512.557 52.7758 539.255 58.1776C565.952 63.5795 583.534 64.3512 601.766 55.0909C619.999 45.8305 625.859 40.4287 646.045 38.1136C666.231 35.7985 683.812 41.972 718.975 70.5247",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})}),qi=o.styled(o.Box)(()=>({display:"flex",flexDirection:"column",justifyContent:"flex-end"})),Xi=o.styled(o.Box)(()=>({position:"relative",height:"100%",alignSelf:"normal",display:"flex",flexDirection:"column",justifyContent:"flex-end"})),Ki=o.styled(o.Box)(({theme:e})=>({padding:e.spacing(2.25,0,.5,2)})),Zi=o.styled(Pt)(({theme:e})=>({flexDirection:"column",flex:1,height:"100%",overflow:"hidden",svg:{height:"100%",width:"100%",fontSize:"initial",fill:"none",path:{stroke:e.palette.black[8]}}})),Ji=o.styled(o.Box)(({theme:e})=>({display:"flex",flexDirection:"row",justifyContent:"space-between",padding:e.spacing(1.25,.5,.75,.5)})),Qi=o.styled(o.Box)(({theme:e})=>({display:"flex",flexDirection:"row",gap:e.spacing(2),margin:0,padding:e.spacing(1.5,1,.25,1)})),wt=o.styled(o.Box)(({theme:e})=>({display:"flex",flexDirection:"row",gap:e.spacing(1)})),er=({fitHeight:e,height:n,showControls:i,showLegend:r})=>{const s=t.jsx(o.Box,{pt:1.25,pb:.75,children:t.jsx(o.Skeleton,{width:48,height:8})}),l=i&&t.jsxs(qi,{children:[t.jsx(o.Box,{p:.5,children:t.jsx(o.Skeleton,{width:16,height:16})}),t.jsx(o.Box,{mt:2,p:.5,children:t.jsx(o.Skeleton,{width:16,height:16})}),t.jsx(o.Box,{mt:1,p:.5,children:t.jsx(o.Skeleton,{width:16,height:16})})]}),a=e?qt:n??Ut,p=t.jsxs(Xi,{style:{height:a},children:[t.jsx(Ki,{flex:0,children:t.jsx(o.Skeleton,{width:24,height:8})}),t.jsx(Zi,{flex:1,children:t.jsx(Ui,{preserveAspectRatio:"none"})}),t.jsxs(Ji,{flex:0,children:[t.jsx(o.Skeleton,{width:32,height:8}),t.jsx(o.Skeleton,{width:32,height:8})]})]}),c=r&&t.jsxs(Qi,{children:[t.jsxs(wt,{children:[t.jsx(o.Skeleton,{width:8,height:8}),t.jsx(o.Skeleton,{width:48,height:8})]}),t.jsxs(wt,{children:[t.jsx(o.Skeleton,{width:8,height:8}),t.jsx(o.Skeleton,{width:48,height:8})]})]});return t.jsx(Kt,{fitHeight:!!e,header:s,controls:l,chart:p,legend:r&&c})},Zt=e=>e,Jt=[];function tr({data:e=Jt,categories:n,stepSize:i,stepMultiplier:r=1,chartType:s=Ge.LINE,timeAxisSplitNumber:l,tooltip:a=!0,tooltipFormatter:p=_t,formatter:c=Zt,height:g,fitHeight:h,showControls:d=!0,animation:y=!0,filterable:f=!0,onTimelineUpdate:m,timeWindow:v,timelinePosition:x,onTimeWindowUpdate:b,selectedCategories:S,onSelectedCategoriesChange:I,isPlaying:T=!1,onPlay:w,isPaused:C=!1,onPause:M,onStop:D,isLoading:E=!1,palette:L=Object.values(Me.commonPalette.qualitative.bold),showLegend:P,yAxisType:N="dense"}){const V=u.useRef([]),_=Z.useIntl(),{showSkeleton:B}=de(!!E),$=u.useCallback(k=>{var O,G;if(k.length===2){((O=V.current)==null?void 0:O.length)===1&&(m==null||m(void 0));const R=k.sort((H,q)=>H<q?-1:1).map(Gt);b==null||b(R)}if(k.length===1){((G=V.current)==null?void 0:G.length)===2&&(b==null||b([]));const R=Re(Number(k[0]),e);m==null||m(R)}V.current=k},[b,m,e]);return B?t.jsx(er,{fitHeight:h,height:g,showControls:d,showLegend:P}):t.jsx(Yt,{isPlaying:T,onPlay:w,isPaused:C,onPause:M,onStop:D,timeWindow:v,onTimeWindowUpdate:$,intl:_,children:t.jsx(nr,{data:e,categories:n,stepSize:i,stepMultiplier:r,chartType:s,timeAxisSplitNumber:l,tooltip:a,tooltipFormatter:p,formatter:c,height:g,fitHeight:h,showControls:d,animation:y,filterable:f,palette:L,showLegend:P,selectedCategories:S,timelinePosition:x,onSelectedCategoriesChange:I,yAxisType:N})})}function nr({data:e=Jt,categories:n,stepSize:i,stepMultiplier:r=1,chartType:s=Ge.LINE,timeAxisSplitNumber:l,tooltip:a=!0,tooltipFormatter:p=_t,formatter:c=Zt,height:g,fitHeight:h=!1,showControls:d=!0,animation:y=!0,filterable:f=!0,palette:m=Object.values(Me.commonPalette.qualitative.bold),selectedCategories:v=[],onSelectedCategoriesChange:x,showLegend:b,timelinePosition:S,yAxisType:I="dense"}){const T=o.useTheme(),w=T.palette.secondary.main,{isPlaying:C,isPaused:M,timeWindow:D,stop:E,setTimeWindow:L,intl:P}=He();u.useEffect(()=>{if(S!==void 0){if(S<0||S>=e.length)return;const F=e[S].name;L([F])}},[S,e]),u.useEffect(()=>{if(!e.length)return;const F=e[0].name,Y=e[e.length-1].name;(D[0]<F||D[1]>Y||D[1]<F||D[1]>Y)&&L([])},[e]);const N=u.useMemo(()=>{const F={},Y=n?n.map(J=>({name:J,data:[],color:Me.getColorByCategory(J,{palette:m,fallbackColor:w,colorMapping:F})})):[{name:"",data:[],color:T.palette.secondary.main}];for(const{name:J,value:ie,category:re,categoryIndex:W}of e){const X=W??(n&&re?n.indexOf(re):0);X===-1||n&&X>=n.length||!Number.isFinite(X)||Y[X].data.push([J,ie])}return Y},[n,e,m,w,T.palette.secondary.main]),V=u.useMemo(()=>{if(!e.length)return"";if(D.length===2){const[F,Y]=D.map(J=>new Date(J));return Fe({start:F,end:Y,stepSize:i})}if(!C&&!M){const F=new Date(e[0].name),Y=new Date(e[e.length-1].name);return Fe({start:F,end:Y,stepSize:i})}if(D.length===1){const F=new Date(D[0]);return Ht({date:F,stepSize:i,stepMultiplier:r})}},[e,D,C,M,i,r]),_=u.useMemo(()=>C||M||D.length>0||(v==null?void 0:v.length)>0,[M,C,v==null?void 0:v.length,D.length]),B=()=>{E(),L([]),x==null||x([])},$=F=>{F.key==="Enter"&&B()},k=u.useCallback(F=>{if(x){const Y=[...v],J=Y.indexOf(F);J===-1?Y.push(F):Y.splice(J,1),x(Y)}},[x,v]),O=!!(b??N.length>1),G=t.jsxs(t.Fragment,{children:[t.jsx(o.Box,{children:t.jsx(j.Typography,{color:"textSecondary",variant:"caption",children:V??"-"})}),f&&_&&t.jsx(o.Link,{variant:"caption",style:{cursor:"pointer"},onClick:B,onKeyDown:$,tabIndex:0,underline:"hover",children:P.formatMessage({id:"c4r.widgets.timeSeries.clear"})})]}),R=f&&d&&t.jsx(Li,{data:e,stepSize:i}),H=t.jsx(Ei,{chartType:s,timeAxisSplitNumber:l,data:e,series:N,categories:n,tooltip:a,formatter:c,tooltipFormatter:F=>p(F,i,c,r,O),height:g,fitHeight:h,animation:y,filterable:f,selectedCategories:v,onCategoryClick:x&&k,yAxisType:I}),q=O&&t.jsx(Wt,{series:N,selectedCategories:v,onCategoryClick:x&&k});return t.jsx(Kt,{fitHeight:h,header:G,controls:R,chart:H,legend:q})}const or=o.styled("div")(({theme:e})=>({padding:e.spacing(2,0),...e.typography.body2})),ir=o.styled(o.Box)(({theme:e})=>({overflow:"auto",maxHeight:e.spacing(40),paddingRight:e.spacing(1),margin:e.spacing(.5,0)})),rr=o.styled(o.Box)(({theme:e})=>({display:"flex",alignItems:"center",flexWrap:"wrap",gap:e.spacing(1.5),padding:e.spacing(2,0)})),Qt=o.styled(o.Box)(({theme:e,alignItems:n="center"})=>({display:"flex",alignItems:n,gap:e.spacing(.75)})),en=o.styled("div",{shouldForwardProp:e=>e!=="color"})(({theme:e,color:n})=>({flexShrink:0,width:e.spacing(1),height:e.spacing(1),borderRadius:e.spacing(1),backgroundColor:n})),sr=o.styled(o.Box)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(2)})),lr=o.styled("div")(({theme:e})=>({height:e.spacing(.5),width:"100%",borderRadius:e.spacing(.5),backgroundColor:e.palette.action.disabledBackground,"& div":{width:0,height:"100%",borderRadius:e.spacing(.5),transition:`background-color ${e.transitions.easing.sharp} ${e.transitions.duration.shortest}ms,
19
- width ${e.transitions.easing.sharp} ${e.transitions.duration.complex}ms`}})),bt=o.styled(o.Box,{shouldForwardProp:e=>e!=="center"})(({theme:e,center:n=!1})=>({marginBottom:e.spacing(2),paddingRight:e.spacing(1),...n&&{display:"flex",justifyContent:"space-between",alignItems:"center"},"& .MuiTypography-caption":{color:e.palette.text.secondary},"& .MuiButton-label":{...e.typography.caption},"& a":{cursor:"pointer"}})),ar=o.styled(o.Tooltip)(({theme:e})=>({".MuiTooltip-tooltip":{color:e.palette.common.white,maxWidth:260,marginBottom:0,overflow:"hidden"}})),cr=o.styled(o.TextField)(({theme:e})=>({marginTop:e.spacing(-.5)}));o.styled(o.Box)(()=>({display:"flex",flexWrap:"nowrap",justifyContent:"space-between"}));const dr=o.styled("div",{shouldForwardProp:e=>e!=="filterable"})(({filterable:e})=>({"& .progressbar div":{backgroundColor:"var(--color)"},...e&&{cursor:"pointer","& .MuiBox-root:hover .progressbar div":{backgroundColor:"var(--hover-color)"}}})),ur=o.styled(o.Box)(({theme:e})=>({display:"flex",alignItems:"center",flexWrap:"nowrap",overflow:"hidden",gap:e.spacing(1)})),pr=o.styled(o.Box)(({theme:e})=>({padding:e.spacing(.5,0),flexGrow:"1",maxWidth:"100%",minWidth:0})),gr=o.styled(o.Box,{shouldForwardProp:e=>e!=="backgroundColor"})(({theme:e,backgroundColor:n})=>({marginLeft:e.spacing(1),padding:e.spacing(0,1),backgroundColor:n,color:"white",borderRadius:e.spacing(2)}));function hr(e,n,i,r,s){const a=(e[0]??[]).map((p,c)=>{const g=String(p.name),h=r.length>0&&!r.includes(g),d=i[c]??g,y=e.map((f,m)=>{var v;return{color:h?o.lighten(n[m],.8):n[m],value:((v=f[c])==null?void 0:v.value)??0}});return{label:d,key:g,data:y}});return s===pe.RANKING&&a.sort((p,c)=>{const g=Math.max(...p.data.map(d=>d.value));return Math.max(...c.data.map(d=>d.value))-g}),a}const fr=500;function xr(e,n={}){const{disabled:i,duration:r,animateOnMount:s,initialValue:l=0}=n,a=u.useRef(null),[p,c]=u.useState(()=>s?l:e);return u.useEffect(()=>(i?c(e):Xe({start:p,end:e,duration:r??fr,drawFrame:g=>c(g),requestRef:a}),()=>{a.current&&cancelAnimationFrame(a.current)}),[e,i,r]),p}const mr={};function tn({enabled:e=!0,value:n=0,options:i=mr,formatter:r}){const l=xr(n||0,{...{animateOnMount:!0,disabled:e===!1||n===null||n===void 0},...i});return t.jsx("span",{children:r?r(l):l})}const Je=e=>e,yr=()=>{},vr=[];function jr({item:e,index:n=0,names:i=vr,formatter:r=Je}){const s=o.useTheme(),l=e.data[0],a=e.data[n],p=i[n],c=(a.value-l.value)/(l.value||1)*100,g=Math.sign(c)===-1?"-":"+",h=Math.sign(c)===-1?s.palette.error.main:s.palette.success.main,d=e.key===me?s.palette.text.disabled:h;return t.jsxs("div",{children:[t.jsx(o.Typography,{color:"inherit",variant:"caption",noWrap:!0,children:e.label}),t.jsx(o.Box,{pt:1,pb:.5,children:t.jsxs(Qt,{alignItems:"baseline",children:[t.jsx(en,{color:e.key===me?s.palette.background.default:a.color}),t.jsx(o.Typography,{color:"inherit",variant:"caption",children:p}),t.jsx(o.Box,{style:{flexGrow:1}}),t.jsx(gr,{backgroundColor:d,children:t.jsxs(o.Typography,{color:"inherit",variant:"caption",children:[g,r(Math.abs(c))]})})]})})]})}function wr({item:e,animation:n=!0,animationOptions:i,maxValue:r,showCheckbox:s,checkboxChecked:l,formatter:a=Je,tooltipFormatter:p=Je,onClick:c=yr,names:g,tooltip:h}){function d(f){return`${Math.min(100,(f||0)/r*100)}%`}const y=f=>t.jsx(jr,{item:e,names:g,formatter:p,index:f});return t.jsxs(ur,{onClick:()=>c(e.key),children:[s?t.jsx(o.Checkbox,{checked:l}):null,t.jsxs(pr,{children:[t.jsx(o.Typography,{variant:"body2",noWrap:!0,children:e.label}),e.data.map((f,m)=>t.jsx(ar,{title:y(m),placement:"top-start",arrow:!1,disableHoverListener:!h,children:t.jsxs(sr,{children:[t.jsx(lr,{className:"progressbar",children:t.jsx("div",{style:{"--hover-color":o.darken(f.color,.2),"--color":f.color,width:d(f.value)}})}),t.jsx(o.Typography,{variant:m===0?"body2":"caption",color:m===0?"textPrimary":"textSecondary",children:t.jsx(tn,{value:f.value,enabled:n,options:i,formatter:a})})]})},`${e.key}_${m}`))]})]})}const St=e=>e,br=()=>{},Ie=[];function Sr({names:e=Ie,data:n=Ie,labels:i=Ie,colors:r=Ie,maxItems:s=5,order:l=pe.FIXED,animation:a=!0,animationOptions:p,searchable:c=!0,filterable:g=!0,selectedCategories:h=Ie,onSelectedCategoriesChange:d=br,formatter:y=St,tooltipFormatter:f=St,tooltip:m=!0,isLoading:v=!1}){const x=o.useTheme(),[b,S]=u.useState(!1),[I,T]=u.useState(!1),[w,C]=u.useState(h),[M,D]=u.useState(""),E=Z.useIntl(),L=j.useImperativeIntl(E),P=u.useMemo(()=>{const W=r.length?r:[x.palette.secondary.main,x.palette.primary.main,x.palette.info.main];return hr(n,W,i,h,l)},[n,r,i,x,h,l]),N=u.useMemo(()=>Math.max(...n.map(W=>W.map(X=>X.value??0)).flat()),[n]),V=u.useMemo(()=>{if(s>=P.length)return P;const W=P.slice(0,s),X=P.slice(s),K=[];for(const ge of X)ge.data.forEach((ve,he)=>{K[he]=K[he]??0,K[he]+=ve.value});const Q={key:me,label:c?"Others":`Others (${P.length-s})`,data:K.map(ge=>({value:ge,color:x.palette.divider}))};return[...W,Q]},[P,c,s,x.palette.divider]),_=u.useMemo(()=>P.filter(W=>h.includes(W.key)),[P,h]),B=u.useMemo(()=>M?P.filter(W=>{const X=(W.key||"").toLowerCase(),K=(W.label||"").toLowerCase(),Q=X==null?void 0:X.includes(M.toLowerCase()),ge=K==null?void 0:K.includes(M.toLowerCase());return Q||ge}):P,[P,M]),$=P.length-V.length+1,k=c&&!b&&s<P.length;if(P.length===0||v)return t.jsx(Ot,{});const O=b?B:I?_:V;function G(){T(!0),d([...w]),Y()}function R(){T(!1)}function H(){d([])}function q(){T(!0)}function F(){S(!0),C([...h])}function Y(){S(!1),C([])}function J(W){const X=h.includes(W),K=new Set(h);X?K.delete(W):K.add(W);let Q=Array.from(K);Q.length===P.length&&(Q=[]),d(Q)}function ie(W){const X=w.includes(W),K=new Set(w);X?K.delete(W):K.add(W);let Q=Array.from(K);Q.length===P.length&&(Q=[]),C(Q)}const re=g?b?ie:J:void 0;return t.jsxs(or,{children:[g?t.jsxs(bt,{center:!0,children:[t.jsx(j.Typography,{variant:"caption",children:h.length>0?L.formatMessage({id:"c4r.widgets.category.selectedItems"},{items:h.length}):L.formatMessage({id:"c4r.widgets.category.all"})}),t.jsx(j.Typography,{variant:"caption",children:b?t.jsx(o.Link,{onClick:G,children:L.formatMessage({id:"c4r.widgets.category.apply"})}):I?t.jsx(o.Link,{onClick:R,children:L.formatMessage({id:"c4r.widgets.category.unlock"})}):h.length?t.jsxs(o.Box,{style:{display:"flex",justifyContent:"flex-end",gap:x.spacing(1)},children:[t.jsx(o.Link,{onClick:q,children:L.formatMessage({id:"c4r.widgets.category.lock"})}),t.jsx(o.Divider,{orientation:"vertical",flexItem:!0}),t.jsx(o.Link,{onClick:H,children:L.formatMessage({id:"c4r.widgets.category.clear"})})]}):null})]}):null,b?t.jsx(bt,{children:t.jsx(cr,{size:"small",placeholder:L.formatMessage({id:"c4r.widgets.category.search"}),onChange:W=>D(W.currentTarget.value),onFocus:W=>W.currentTarget.scrollIntoView(),InputProps:{startAdornment:t.jsx(o.InputAdornment,{position:"start",children:t.jsx(Te.Search,{})})}})}):null,t.jsxs(ir,{children:[O.length===0?t.jsxs(t.Fragment,{children:[t.jsx(j.Typography,{variant:"body2",children:L.formatMessage({id:"c4r.widgets.category.noResults"})}),t.jsx(j.Typography,{variant:"caption",children:L.formatMessage({id:"c4r.widgets.category.noResultsMessage"},{searchValue:M})})]}):null,O.map(W=>t.jsx(dr,{children:t.jsx(wr,{item:W,animation:a,animationOptions:p,maxValue:N,showCheckbox:g&&b,checkboxChecked:w.includes(W.key),formatter:y,tooltipFormatter:f,tooltip:m,onClick:re,names:e})},W.key))]}),k?t.jsx(o.Button,{size:"small",color:"primary",startIcon:t.jsx(Te.Search,{}),onClick:F,children:L.formatMessage({id:"c4r.widgets.category.searchInfo"},{elements:$})}):null,b?t.jsx(o.Button,{size:"small",color:"primary",onClick:Y,children:L.formatMessage({id:"c4r.widgets.category.cancel"})}):null,t.jsx(rr,{children:e.map((W,X)=>t.jsxs(Qt,{children:[t.jsx(en,{color:(r==null?void 0:r[X])??x.palette.background.default}),t.jsx(j.Typography,{variant:"overline",children:W})]},e[X]))})]})}const Ir=o.styled(j.Typography)(({theme:e})=>({display:"inline-block",marginTop:e.spacing(.5)}));function kr({row:e}){const n=o.useTheme();return e.label?t.jsx(o.Box,{color:e.color??n.palette.text.secondary,children:t.jsx(Ir,{color:"inherit",variant:"caption",children:e.label})}):null}const Tr=o.styled("div")(({theme:e})=>({margin:0,...e.typography.h5,fontWeight:Number(e.typography.fontWeightMedium),color:e.palette.text.primary,display:"flex"})),Mr=o.styled(j.Typography)(({theme:e})=>({marginRight:e.spacing(.5)})),Cr=o.styled(j.Typography)(({theme:e})=>({marginLeft:e.spacing(.5)}));function Ar({row:e,animated:n,animationOptions:i,formatter:r}){const s=o.useTheme(),{prefix:l,value:a,suffix:p,shouldBeHighlighted:c}=e;return t.jsxs(Tr,{children:[l?t.jsx(o.Box,{color:s.palette.text.secondary,children:t.jsx(Mr,{color:"inherit",component:"span",variant:"subtitle2",children:l})}):null,t.jsx(o.Box,{fontWeight:c?"bold":"",children:t.jsx(tn,{value:a,enabled:n,options:i,formatter:r})}),p?t.jsx(o.Box,{color:s.palette.text.secondary,children:t.jsx(Cr,{color:"inherit",component:"span",variant:"subtitle2",children:p})}):null]})}const Er=e=>e,It=[],Br=o.styled("div")(({theme:e})=>({"&:nth-of-type(n+2)":{marginTop:e.spacing(2)}}));function Pr({data:e=It,colors:n=It,animated:i=!0,animationOptions:r,formatter:s=Er,isLoading:l=!1}){const a=Lr(e,n);return l?t.jsx(Rt,{}):t.jsx("div",{children:a.map((p,c)=>t.jsxs(Br,{children:[t.jsx(Ar,{row:p,animated:i,animationOptions:r,formatter:s}),t.jsx(kr,{row:p})]},c))})}function Lr(e,n){const i=e.map((s,l)=>({...s,color:n[l],shouldBeHighlighted:!1})).filter(s=>s.value!==void 0);return i&&i.length>1&&(i[0].shouldBeHighlighted=!0),i}function Dr(e,n=[],i=[],r,s=[]){return e.map((l,a)=>{const p=s.length>0&&!s.includes(l.name),g=(n!=null&&n.length?n:r.palette.qualitative.bold)[a];return{...l,key:l.name,color:p?o.lighten(g,.8):g,name:i[a]??l.name}})}function Nr(e,n,i){const r=`
19
+ width ${e.transitions.easing.sharp} ${e.transitions.duration.complex}ms`}})),bt=o.styled(o.Box,{shouldForwardProp:e=>e!=="center"})(({theme:e,center:n=!1})=>({marginBottom:e.spacing(2),paddingRight:e.spacing(1),...n&&{display:"flex",justifyContent:"space-between",alignItems:"center"},"& .MuiTypography-caption":{color:e.palette.text.secondary},"& .MuiButton-label":{...e.typography.caption},"& a":{cursor:"pointer"}})),ar=o.styled(o.Tooltip)(({theme:e})=>({".MuiTooltip-tooltip":{color:e.palette.common.white,maxWidth:260,marginBottom:0,overflow:"hidden"}})),cr=o.styled(o.TextField)(({theme:e})=>({marginTop:e.spacing(-.5)}));o.styled(o.Box)(()=>({display:"flex",flexWrap:"nowrap",justifyContent:"space-between"}));const dr=o.styled("div",{shouldForwardProp:e=>e!=="filterable"})(({filterable:e})=>({"& .progressbar div":{backgroundColor:"var(--color)"},...e&&{cursor:"pointer","& .MuiBox-root:hover .progressbar div":{backgroundColor:"var(--hover-color)"}}})),ur=o.styled(o.Box)(({theme:e})=>({display:"flex",alignItems:"center",flexWrap:"nowrap",overflow:"hidden",gap:e.spacing(1)})),pr=o.styled(o.Box)(({theme:e})=>({padding:e.spacing(.5,0),flexGrow:"1",maxWidth:"100%",minWidth:0})),gr=o.styled(o.Box,{shouldForwardProp:e=>e!=="backgroundColor"})(({theme:e,backgroundColor:n})=>({marginLeft:e.spacing(1),padding:e.spacing(0,1),backgroundColor:n,color:"white",borderRadius:e.spacing(2)}));function hr(e,n,i,r,s){const a=(e[0]??[]).map((p,c)=>{const g=String(p.name),h=r.length>0&&!r.includes(g),d=i[c]??g,y=e.map((f,m)=>{var v;return{color:h?o.lighten(n[m],.8):n[m],value:((v=f[c])==null?void 0:v.value)??0}});return{label:d,key:g,data:y}});return s===pe.RANKING&&a.sort((p,c)=>{const g=Math.max(...p.data.map(d=>d.value));return Math.max(...c.data.map(d=>d.value))-g}),a}const fr=500;function xr(e,n={}){const{disabled:i,duration:r,animateOnMount:s,initialValue:l=0}=n,a=u.useRef(null),[p,c]=u.useState(()=>s?l:e);return u.useEffect(()=>(i?c(e):Xe({start:p,end:e,duration:r??fr,drawFrame:g=>c(g),requestRef:a}),()=>{a.current&&cancelAnimationFrame(a.current)}),[e,i,r]),p}const mr={};function tn({enabled:e=!0,value:n=0,options:i=mr,formatter:r}){const l=xr(n||0,{...{animateOnMount:!0,disabled:e===!1||n===null||n===void 0},...i});return t.jsx("span",{children:r?r(l):l})}const Je=e=>e,yr=()=>{},vr=[];function jr({item:e,index:n=0,names:i=vr,formatter:r=Je}){const s=o.useTheme(),l=e.data[0],a=e.data[n],p=i[n],c=(a.value-l.value)/(l.value||1)*100,g=Math.sign(c)===-1?"-":"+",h=Math.sign(c)===-1?s.palette.error.main:s.palette.success.main,d=e.key===me?s.palette.text.disabled:h;return t.jsxs("div",{children:[t.jsx(o.Typography,{color:"inherit",variant:"caption",noWrap:!0,children:e.label}),t.jsx(o.Box,{pt:1,pb:.5,children:t.jsxs(Qt,{alignItems:"baseline",children:[t.jsx(en,{color:e.key===me?s.palette.background.default:a.color}),t.jsx(o.Typography,{color:"inherit",variant:"caption",children:p}),t.jsx(o.Box,{style:{flexGrow:1}}),t.jsx(gr,{backgroundColor:d,children:t.jsxs(o.Typography,{color:"inherit",variant:"caption",children:[g,r(Math.abs(c))]})})]})})]})}function wr({item:e,animation:n=!0,animationOptions:i,maxValue:r,showCheckbox:s,checkboxChecked:l,formatter:a=Je,tooltipFormatter:p=Je,onClick:c=yr,names:g,tooltip:h}){function d(f){return`${Math.min(100,(f||0)/r*100)}%`}const y=f=>t.jsx(jr,{item:e,names:g,formatter:p,index:f});return t.jsxs(ur,{onClick:()=>c(e.key),children:[s?t.jsx(o.Checkbox,{checked:l}):null,t.jsxs(pr,{children:[t.jsx(o.Typography,{variant:"body2",noWrap:!0,children:e.label}),e.data.map((f,m)=>t.jsx(ar,{title:y(m),placement:"top-start",arrow:!1,disableHoverListener:!h,children:t.jsxs(sr,{children:[t.jsx(lr,{className:"progressbar",children:t.jsx("div",{style:{"--hover-color":o.darken(f.color,.2),"--color":f.color,width:d(f.value)}})}),t.jsx(o.Typography,{variant:m===0?"body2":"caption",color:m===0?"textPrimary":"textSecondary",children:t.jsx(tn,{value:f.value,enabled:n,options:i,formatter:a})})]})},`${e.key}_${m}`))]})]})}const St=e=>e,br=()=>{},Ie=[];function Sr({names:e=Ie,data:n=Ie,labels:i=Ie,colors:r=Ie,maxItems:s=5,order:l=pe.FIXED,animation:a=!0,animationOptions:p,searchable:c=!0,filterable:g=!0,selectedCategories:h=Ie,onSelectedCategoriesChange:d=br,formatter:y=St,tooltipFormatter:f=St,tooltip:m=!0,isLoading:v=!1}){const x=o.useTheme(),[b,S]=u.useState(!1),[I,T]=u.useState(!1),[w,C]=u.useState(h),[M,D]=u.useState(""),E=Z.useIntl(),L=j.useImperativeIntl(E),P=u.useMemo(()=>{const W=r.length?r:[x.palette.secondary.main,x.palette.primary.main,x.palette.info.main];return hr(n,W,i,h,l)},[n,r,i,x,h,l]),N=u.useMemo(()=>Math.max(...n.map(W=>W.map(X=>X.value??0)).flat()),[n]),V=u.useMemo(()=>{if(s>=P.length)return P;const W=P.slice(0,s),X=P.slice(s),K=[];for(const ge of X)ge.data.forEach((ve,he)=>{K[he]=K[he]??0,K[he]+=ve.value});const Q={key:me,label:c?"Others":`Others (${P.length-s})`,data:K.map(ge=>({value:ge,color:x.palette.divider}))};return[...W,Q]},[P,c,s,x.palette.divider]),_=u.useMemo(()=>P.filter(W=>h.includes(W.key)),[P,h]),B=u.useMemo(()=>M?P.filter(W=>{const X=(W.key||"").toLowerCase(),K=(W.label||"").toLowerCase(),Q=X==null?void 0:X.includes(M.toLowerCase()),ge=K==null?void 0:K.includes(M.toLowerCase());return Q||ge}):P,[P,M]),$=P.length-V.length+1,k=c&&!b&&s<P.length;if(P.length===0||v)return t.jsx(Ot,{});const O=b?B:I?_:V;function G(){T(!0),d([...w]),Y()}function R(){T(!1)}function H(){d([])}function q(){T(!0)}function F(){S(!0),C([...h])}function Y(){S(!1),C([])}function J(W){const X=h.includes(W),K=new Set(h);X?K.delete(W):K.add(W);let Q=Array.from(K);Q.length===P.length&&(Q=[]),d(Q)}function ie(W){const X=w.includes(W),K=new Set(w);X?K.delete(W):K.add(W);let Q=Array.from(K);Q.length===P.length&&(Q=[]),C(Q)}const re=g?b?ie:J:void 0;return t.jsxs(or,{children:[g?t.jsxs(bt,{center:!0,children:[t.jsx(j.Typography,{variant:"caption",children:h.length>0?L.formatMessage({id:"c4r.widgets.category.selectedItems"},{items:h.length}):L.formatMessage({id:"c4r.widgets.category.all"})}),t.jsx(j.Typography,{variant:"caption",component:"div",children:b?t.jsx(o.Link,{onClick:G,children:L.formatMessage({id:"c4r.widgets.category.apply"})}):I?t.jsx(o.Link,{onClick:R,children:L.formatMessage({id:"c4r.widgets.category.unlock"})}):h.length?t.jsxs(o.Box,{style:{display:"flex",justifyContent:"flex-end",gap:x.spacing(1)},children:[t.jsx(o.Link,{onClick:q,children:L.formatMessage({id:"c4r.widgets.category.lock"})}),t.jsx(o.Divider,{orientation:"vertical",flexItem:!0}),t.jsx(o.Link,{onClick:H,children:L.formatMessage({id:"c4r.widgets.category.clear"})})]}):null})]}):null,b?t.jsx(bt,{children:t.jsx(cr,{size:"small",placeholder:L.formatMessage({id:"c4r.widgets.category.search"}),onChange:W=>D(W.currentTarget.value),onFocus:W=>W.currentTarget.scrollIntoView(),InputProps:{startAdornment:t.jsx(o.InputAdornment,{position:"start",children:t.jsx(Te.Search,{})})}})}):null,t.jsxs(ir,{children:[O.length===0?t.jsxs(t.Fragment,{children:[t.jsx(j.Typography,{variant:"body2",children:L.formatMessage({id:"c4r.widgets.category.noResults"})}),t.jsx(j.Typography,{variant:"caption",children:L.formatMessage({id:"c4r.widgets.category.noResultsMessage"},{searchValue:M})})]}):null,O.map(W=>t.jsx(dr,{children:t.jsx(wr,{item:W,animation:a,animationOptions:p,maxValue:N,showCheckbox:g&&b,checkboxChecked:w.includes(W.key),formatter:y,tooltipFormatter:f,tooltip:m,onClick:re,names:e})},W.key))]}),k?t.jsx(o.Button,{size:"small",color:"primary",startIcon:t.jsx(Te.Search,{}),onClick:F,children:L.formatMessage({id:"c4r.widgets.category.searchInfo"},{elements:$})}):null,b?t.jsx(o.Button,{size:"small",color:"primary",onClick:Y,children:L.formatMessage({id:"c4r.widgets.category.cancel"})}):null,t.jsx(rr,{children:e.map((W,X)=>t.jsxs(Qt,{children:[t.jsx(en,{color:(r==null?void 0:r[X])??x.palette.background.default}),t.jsx(j.Typography,{variant:"overline",children:W})]},e[X]))})]})}const Ir=o.styled(j.Typography)(({theme:e})=>({display:"inline-block",marginTop:e.spacing(.5)}));function kr({row:e}){const n=o.useTheme();return e.label?t.jsx(o.Box,{color:e.color??n.palette.text.secondary,children:t.jsx(Ir,{color:"inherit",variant:"caption",children:e.label})}):null}const Tr=o.styled("div")(({theme:e})=>({margin:0,...e.typography.h5,fontWeight:Number(e.typography.fontWeightMedium),color:e.palette.text.primary,display:"flex"})),Mr=o.styled(j.Typography)(({theme:e})=>({marginRight:e.spacing(.5)})),Cr=o.styled(j.Typography)(({theme:e})=>({marginLeft:e.spacing(.5)}));function Ar({row:e,animated:n,animationOptions:i,formatter:r}){const s=o.useTheme(),{prefix:l,value:a,suffix:p,shouldBeHighlighted:c}=e;return t.jsxs(Tr,{children:[l?t.jsx(o.Box,{color:s.palette.text.secondary,children:t.jsx(Mr,{color:"inherit",component:"span",variant:"subtitle2",children:l})}):null,t.jsx(o.Box,{fontWeight:c?"bold":"",children:t.jsx(tn,{value:a,enabled:n,options:i,formatter:r})}),p?t.jsx(o.Box,{color:s.palette.text.secondary,children:t.jsx(Cr,{color:"inherit",component:"span",variant:"subtitle2",children:p})}):null]})}const Er=e=>e,It=[],Br=o.styled("div")(({theme:e})=>({"&:nth-of-type(n+2)":{marginTop:e.spacing(2)}}));function Pr({data:e=It,colors:n=It,animated:i=!0,animationOptions:r,formatter:s=Er,isLoading:l=!1}){const a=Lr(e,n);return l?t.jsx(Rt,{}):t.jsx("div",{children:a.map((p,c)=>t.jsxs(Br,{children:[t.jsx(Ar,{row:p,animated:i,animationOptions:r,formatter:s}),t.jsx(kr,{row:p})]},c))})}function Lr(e,n){const i=e.map((s,l)=>({...s,color:n[l],shouldBeHighlighted:!1})).filter(s=>s.value!==void 0);return i&&i.length>1&&(i[0].shouldBeHighlighted=!0),i}function Dr(e,n=[],i=[],r,s=[]){return e.map((l,a)=>{const p=s.length>0&&!s.includes(l.name),g=(n!=null&&n.length?n:r.palette.qualitative.bold)[a];return{...l,key:l.name,color:p?o.lighten(g,.8):g,name:i[a]??l.name}})}function Nr(e,n,i){const r=`
20
20
  font-size: 12px;
21
21
  line-height: 1.33;
22
22
  font-weight: 600;
@@ -2,12 +2,12 @@ import { jsxs as v, Fragment as ie, jsx as n } from "react/jsx-runtime";
2
2
  import Qn, { useMemo as F, useState as _, useEffect as U, useCallback as oe, useRef as re, forwardRef as ei, createContext as ti, useContext as ni, useLayoutEffect as an, createRef as ii } from "react";
3
3
  import { useTheme as le, styled as m, Box as S, Skeleton as z, Grid as ae, Link as ye, darken as yt, Button as $e, Divider as wt, TextField as ot, InputAdornment as vt, Checkbox as ln, Tooltip as ue, IconButton as fe, debounce as ri, Slider as xt, TableCell as bt, Table as sn, TableHead as cn, TableRow as Je, TableBody as dn, TableContainer as un, TableSortLabel as oi, TablePagination as ai, Menu as kt, MenuItem as Pe, SvgIcon as je, lighten as pn, Typography as De, ClickAwayListener as li, ToggleButton as si, capitalize as gn, ListItem as ci, Chip as di, List as ui, Paper as hn, Popover as pi, Select as gi, ListItemText as hi, Collapse as St, Drawer as fi, Icon as mi, LinearProgress as yi } from "@mui/material";
4
4
  import { useIntl as se } from "react-intl";
5
- import { d as wi, u as ce, T as H, S as B, B as Mt, a as vi, b as pt } from "../TablePaginationActions-EC4ynZRa.js";
5
+ import { d as wi, u as ce, T as H, S as B, B as Mt, a as vi, b as pt } from "../TablePaginationActions-EDxBCxpG.js";
6
6
  import xi from "echarts-for-react";
7
7
  import { FixedSizeList as bi } from "react-window";
8
8
  import { S as Qe, a as ki } from "../SwatchSquare-DAne_6Gi.js";
9
9
  import { ChevronLeft as Si, ChevronRight as Mi, KeyboardArrowDown as Ii, ErrorOutline as Ti, Cancel as Ci, VisibilityOutlined as Ai, VisibilityOffOutlined as Ei, ExpandLess as fn, ExpandMore as mn, Close as Li, LayersOutlined as Di, MoreVert as $i } from "@mui/icons-material";
10
- import { A as Pi } from "../Alert-Cn0nq6aq.js";
10
+ import { A as Pi } from "../Alert-1b84B18a.js";
11
11
  import { c as yn, a as Oi, b as wn } from "../paletteUtils-BEwZhrLg.js";
12
12
  function vn() {
13
13
  let e = !1;
@@ -4156,7 +4156,7 @@ function ps({
4156
4156
  { id: "c4r.widgets.category.selectedItems" },
4157
4157
  { items: p.length }
4158
4158
  ) : P.formatMessage({ id: "c4r.widgets.category.all" }) }),
4159
- /* @__PURE__ */ n(H, { variant: "caption", children: b ? /* @__PURE__ */ n(ye, { onClick: X, children: P.formatMessage({ id: "c4r.widgets.category.apply" }) }) : M ? /* @__PURE__ */ n(ye, { onClick: j, children: P.formatMessage({
4159
+ /* @__PURE__ */ n(H, { variant: "caption", component: "div", children: b ? /* @__PURE__ */ n(ye, { onClick: X, children: P.formatMessage({ id: "c4r.widgets.category.apply" }) }) : M ? /* @__PURE__ */ n(ye, { onClick: j, children: P.formatMessage({
4160
4160
  id: "c4r.widgets.category.unlock"
4161
4161
  }) }) : p.length ? /* @__PURE__ */ v(
4162
4162
  S,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carto/meridian-ds",
3
- "version": "1.4.1",
3
+ "version": "1.4.2-alpha-forwarding-props.1",
4
4
  "description": "CARTO Meridian Design System",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1 +0,0 @@
1
- "use strict";const l=require("react/jsx-runtime"),i=require("@mui/material"),s=i.styled(i.MenuItem,{shouldForwardProp:o=>!["subtitle","destructive","extended","fixed","iconColor"].includes(o)})(({theme:o,dense:r,subtitle:a,destructive:n,extended:p,fixed:t,iconColor:e="primary"})=>({...a&&{pointerEvents:"none",columnGap:0,...o.typography.caption,fontWeight:500,color:o.palette.text.secondary,".MuiListItemText-root .MuiTypography-root":{...o.typography.caption,fontWeight:500,color:o.palette.text.secondary},"&.MuiMenuItem-root":{minHeight:o.spacing(3),paddingTop:0,paddingBottom:0,marginTop:o.spacing(1),"&:not(:first-of-type)":{marginTop:o.spacing(2),"&::before":{content:'""',position:"absolute",top:o.spacing(-1),left:0,right:0,height:1,backgroundColor:o.palette.divider}}}},...e==="primary"&&{".MuiListItemIcon-root svg path":{fill:o.palette.text.primary},"&.Mui-selected .MuiListItemIcon-root svg path":{fill:o.palette.primary.main},'.MuiAutocomplete-listbox &[aria-selected="true"] svg path':{fill:o.palette.primary.main}},...n&&{color:o.palette.error.main,".MuiTypography-root":{color:o.palette.error.main},"svg, & .MuiSvgIcon-root":{color:o.palette.error.main},".MuiListItemIcon-root svg path":{fill:o.palette.error.main},"&.Mui-selected .MuiListItemIcon-root svg path":{fill:o.palette.error.main},"&:hover":{backgroundColor:o.palette.error.relatedLight},"&.Mui-selected":{color:o.palette.error.main,".MuiTypography-root":{color:o.palette.error.main},"svg, & .MuiSvgIcon-root":{color:o.palette.error.main}},"&.Mui-disabled":{color:o.palette.text.disabled,".MuiTypography-root":{color:o.palette.text.disabled},svg:{color:o.palette.text.disabled}}},...p&&{"&.MuiButtonBase-root.MuiMenuItem-root":{minHeight:o.spacing(6)}},...t&&{"&.MuiMenuItem-root":{position:"sticky",top:0,left:0,bottom:0,right:0,zIndex:2,minHeight:o.spacing(6),marginBottom:o.spacing(1),padding:o.spacing(.5,1.5),backgroundColor:`${o.palette.background.paper} !important`,borderBottom:`1px solid ${o.palette.divider}`},".MuiAutocomplete-listbox &.MuiAutocomplete-option:first-of-type":{minHeight:o.spacing(6),marginTop:0,"&:hover":{backgroundColor:o.palette.background.paper}}},...!t&&{".MuiList-root &:first-of-type":{marginTop:o.spacing(1)}},...r&&{"&.MuiButtonBase-root.MuiMenuItem-root":{minHeight:o.spacing(3),padding:o.spacing(.25,1.5)}}}));function c(o){return l.jsx(s,{...o})}exports.MenuItem=c;