@carto/meridian-ds 1.4.1-0 → 1.4.1-alpha-menu-tests.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.
- package/CHANGELOG.md +9 -0
- package/dist/{MenuItem-vbfSlKyV.js → MenuItem-Cd34y6F3.js} +41 -15
- package/dist/MenuItem-Dbss-WG1.cjs +1 -0
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.js +663 -598
- package/dist/theme/index.cjs +1 -1
- package/dist/theme/index.js +41 -35
- package/dist/types/components/molecules/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/CreatableAutocomplete.d.ts +1 -1
- package/dist/types/components/molecules/Autocomplete/CreatableAutocomplete.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/ListBoxWithFilter.d.ts +2 -0
- package/dist/types/components/molecules/Autocomplete/ListBoxWithFilter.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/MultipleAutocomplete.d.ts +1 -1
- package/dist/types/components/molecules/Autocomplete/MultipleAutocomplete.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/useAutocompleteRenderOption.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/useMultipleAutocomplete.d.ts +2 -2
- package/dist/types/components/molecules/Autocomplete/useMultipleAutocomplete.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/utils.d.ts +1 -0
- package/dist/types/components/molecules/Autocomplete/utils.d.ts.map +1 -1
- package/dist/types/components/molecules/Menu/Menu.d.ts +2 -1
- package/dist/types/components/molecules/Menu/Menu.d.ts.map +1 -1
- package/dist/types/components/molecules/Menu/MenuItem.d.ts +2 -1
- package/dist/types/components/molecules/Menu/MenuItem.d.ts.map +1 -1
- package/dist/types/components/molecules/Menu/MenuItemFilter.d.ts +9 -0
- package/dist/types/components/molecules/Menu/MenuItemFilter.d.ts.map +1 -0
- package/dist/types/components/molecules/Menu/MenuList.d.ts +2 -1
- package/dist/types/components/molecules/Menu/MenuList.d.ts.map +1 -1
- package/dist/types/components/molecules/Menu/index.d.ts +2 -2
- package/dist/types/components/molecules/Menu/index.d.ts.map +1 -1
- package/dist/types/components/organisms/DatePickers/DateRangePicker.d.ts.map +1 -1
- package/dist/types/components/organisms/DatePickers/PickersDay.d.ts.map +1 -1
- package/dist/types/theme/sections/components/data-display.d.ts.map +1 -1
- package/dist/types/theme/sections/components/forms.d.ts.map +1 -1
- package/dist/widgets/index.cjs +1 -1
- package/dist/widgets/index.js +1 -1
- package/package.json +17 -19
- package/dist/MenuItem-CuEx97RN.cjs +0 -1
- package/dist/types/components/molecules/Menu/MenuFilter.d.ts +0 -8
- package/dist/types/components/molecules/Menu/MenuFilter.d.ts.map +0 -1
|
@@ -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;
|
|
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;
|
|
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
|
|
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;
|
|
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
|
-
|
|
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":"
|
|
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
|
-
|
|
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":"
|
|
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
|
-
|
|
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":"
|
|
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
|
|
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 './
|
|
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,
|
|
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 +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,
|
|
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,2CAgK7B;AAED,eAAe,eAAe,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;
|
|
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,2CAmCxB;AAED,eAAe,UAAU,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,
|
|
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,
|
|
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"}
|
package/dist/widgets/index.cjs
CHANGED
|
@@ -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;
|
package/dist/widgets/index.js
CHANGED
|
@@ -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.1-alpha-menu-tests.1",
|
|
4
4
|
"description": "CARTO Meridian Design System",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"prepack": "yarn clean:build && yarn build"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@chromatic-com/storybook": "3.2.
|
|
32
|
+
"@chromatic-com/storybook": "3.2.6",
|
|
33
33
|
"@emotion/react": "11.13.0",
|
|
34
34
|
"@emotion/styled": "11.13.0",
|
|
35
35
|
"@etchteam/storybook-addon-status": "^5.0.0",
|
|
@@ -38,18 +38,18 @@
|
|
|
38
38
|
"@mui/material": "5.16.7",
|
|
39
39
|
"@mui/system": "5.16.7",
|
|
40
40
|
"@mui/x-date-pickers": "^7.11.0",
|
|
41
|
-
"@storybook/addon-designs": "8.
|
|
42
|
-
"@storybook/addon-essentials": "8.6.
|
|
43
|
-
"@storybook/addon-interactions": "8.6.
|
|
44
|
-
"@storybook/addon-links": "8.6.
|
|
45
|
-
"@storybook/addon-themes": "8.6.
|
|
46
|
-
"@storybook/addon-viewport": "8.6.
|
|
47
|
-
"@storybook/blocks": "8.6.
|
|
48
|
-
"@storybook/manager-api": "8.6.
|
|
49
|
-
"@storybook/react": "8.6.
|
|
50
|
-
"@storybook/react-vite": "8.6.
|
|
51
|
-
"@storybook/test": "8.6.
|
|
52
|
-
"@storybook/theming": "8.6.
|
|
41
|
+
"@storybook/addon-designs": "8.2.1",
|
|
42
|
+
"@storybook/addon-essentials": "8.6.12",
|
|
43
|
+
"@storybook/addon-interactions": "8.6.12",
|
|
44
|
+
"@storybook/addon-links": "8.6.12",
|
|
45
|
+
"@storybook/addon-themes": "8.6.12",
|
|
46
|
+
"@storybook/addon-viewport": "8.6.12",
|
|
47
|
+
"@storybook/blocks": "8.6.12",
|
|
48
|
+
"@storybook/manager-api": "8.6.12",
|
|
49
|
+
"@storybook/react": "8.6.12",
|
|
50
|
+
"@storybook/react-vite": "8.6.12",
|
|
51
|
+
"@storybook/test": "8.6.12",
|
|
52
|
+
"@storybook/theming": "8.6.12",
|
|
53
53
|
"@testing-library/dom": "^10.4.0",
|
|
54
54
|
"@testing-library/jest-dom": "^6.6.1",
|
|
55
55
|
"@testing-library/react": "^16.0.1",
|
|
@@ -84,10 +84,9 @@
|
|
|
84
84
|
"react-dom": "18.3.1",
|
|
85
85
|
"react-intl": "6.6.8",
|
|
86
86
|
"react-window": "1.8.11",
|
|
87
|
-
"storybook": "8.6.
|
|
88
|
-
"storybook-addon-designs": "^6.3.1",
|
|
87
|
+
"storybook": "8.6.12",
|
|
89
88
|
"typescript": "5.5.4",
|
|
90
|
-
"vite": "5.4.
|
|
89
|
+
"vite": "5.4.18",
|
|
91
90
|
"vite-plugin-dts": "4.4.0",
|
|
92
91
|
"vitest": "^2.1.3"
|
|
93
92
|
},
|
|
@@ -159,6 +158,5 @@
|
|
|
159
158
|
"bugs": {
|
|
160
159
|
"url": "https://github.com/CartoDB/meridian-ds/issues"
|
|
161
160
|
},
|
|
162
|
-
"homepage": "https://github.com/CartoDB/meridian-ds#readme"
|
|
163
|
-
"stableVersion": "1.4.0"
|
|
161
|
+
"homepage": "https://github.com/CartoDB/meridian-ds#readme"
|
|
164
162
|
}
|
|
@@ -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;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type MenuFiltersProps = {
|
|
2
|
-
areAllSelected: boolean;
|
|
3
|
-
areAnySelected: boolean;
|
|
4
|
-
selectAll: () => void;
|
|
5
|
-
selectAllDisabled?: boolean;
|
|
6
|
-
};
|
|
7
|
-
export default function MenuFilter({ areAllSelected, areAnySelected, selectAll, selectAllDisabled, }: MenuFiltersProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
//# sourceMappingURL=MenuFilter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MenuFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Menu/MenuFilter.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,cAAc,EAAE,OAAO,CAAA;IACvB,cAAc,EAAE,OAAO,CAAA;IACvB,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B,CAAA;AAqBD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,cAAc,EACd,cAAc,EACd,SAAS,EACT,iBAAiB,GAClB,EAAE,gBAAgB,2CAwBlB"}
|