@foodpilot/foods 0.6.8 → 0.6.10

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.
@@ -113,6 +113,8 @@ export declare const getDoughnutConfig: (props: Omit<DoughnutChartProps, "legend
113
113
  unselectable?: "on" | "off" | undefined | undefined;
114
114
  inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
115
115
  is?: string | undefined | undefined;
116
+ exportparts?: string | undefined | undefined;
117
+ part?: string | undefined | undefined;
116
118
  "aria-activedescendant"?: string | undefined | undefined;
117
119
  "aria-atomic"?: (boolean | "true" | "false") | undefined;
118
120
  "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
@@ -187,7 +189,7 @@ export declare const getDoughnutConfig: (props: Omit<DoughnutChartProps, "legend
187
189
  onBlurCapture?: import('react').FocusEventHandler<HTMLCanvasElement> | undefined;
188
190
  onChange?: import('react').FormEventHandler<HTMLCanvasElement> | undefined;
189
191
  onChangeCapture?: import('react').FormEventHandler<HTMLCanvasElement> | undefined;
190
- onBeforeInput?: import('react').FormEventHandler<HTMLCanvasElement> | undefined;
192
+ onBeforeInput?: import('react').InputEventHandler<HTMLCanvasElement> | undefined;
191
193
  onBeforeInputCapture?: import('react').FormEventHandler<HTMLCanvasElement> | undefined;
192
194
  onInput?: import('react').FormEventHandler<HTMLCanvasElement> | undefined;
193
195
  onInputCapture?: import('react').FormEventHandler<HTMLCanvasElement> | undefined;
@@ -237,8 +239,6 @@ export declare const getDoughnutConfig: (props: Omit<DoughnutChartProps, "legend
237
239
  onProgressCapture?: import('react').ReactEventHandler<HTMLCanvasElement> | undefined;
238
240
  onRateChange?: import('react').ReactEventHandler<HTMLCanvasElement> | undefined;
239
241
  onRateChangeCapture?: import('react').ReactEventHandler<HTMLCanvasElement> | undefined;
240
- onResize?: import('react').ReactEventHandler<HTMLCanvasElement> | undefined;
241
- onResizeCapture?: import('react').ReactEventHandler<HTMLCanvasElement> | undefined;
242
242
  onSeeked?: import('react').ReactEventHandler<HTMLCanvasElement> | undefined;
243
243
  onSeekedCapture?: import('react').ReactEventHandler<HTMLCanvasElement> | undefined;
244
244
  onSeeking?: import('react').ReactEventHandler<HTMLCanvasElement> | undefined;
@@ -0,0 +1,14 @@
1
+ import { ChartConfiguration, ChartData, Chart as ChartJS, Plugin } from 'chart.js';
2
+ import { EvolutionDataset } from '../EvolutionChart';
3
+ export declare const useEvolutionChart: (labels: string[], values: EvolutionDataset[]) => {
4
+ data: ChartData<"line" | "bar">;
5
+ type: "line";
6
+ ref: React.MutableRefObject<ChartJS<"bar" | "line"> | undefined>;
7
+ options: ChartConfiguration<"bar" | "line">["options"];
8
+ plugins: Plugin<"line">[];
9
+ highlightDataset: (chart: ChartJS<"bar" | "line">, datasetIndexToHighlight: number | undefined) => void;
10
+ chartReady: boolean;
11
+ evolution: number;
12
+ datasetIndex: number | undefined;
13
+ labelIndex: number | undefined;
14
+ };
@@ -0,0 +1,6 @@
1
+ import { ChartConfiguration } from 'chart.js';
2
+ type UseChartOptionsProps = {
3
+ unit?: string;
4
+ };
5
+ export declare const useChartOptions: ({ unit }: UseChartOptionsProps) => ChartConfiguration<"bar" | "line">["options"];
6
+ export {};
@@ -0,0 +1,11 @@
1
+ import { ChartData, Chart as ChartJS, ChartOptions } from 'chart.js';
2
+ import { Colors, Goal, Target, WaterfallData } from '../WaterfallChart';
3
+ import { Improvement } from '../../ComparisonBlock/ComparisonBlock';
4
+ export declare const useWaterfallChart: (forcedPrecision: number, colors?: Colors, unit?: string, reference?: WaterfallData, start?: WaterfallData, values?: WaterfallData[], target?: Target, goal?: Goal, improvement?: Improvement) => {
5
+ chartReady: boolean;
6
+ ref: React.MutableRefObject<ChartJS<"bar"> | undefined>;
7
+ data: ChartData<"bar">;
8
+ type: "bar";
9
+ options: ChartOptions<"bar">;
10
+ actionsTotalValue: number | null;
11
+ };
@@ -0,0 +1,41 @@
1
+ import { Plugin, ChartType, ChartData, ChartOptions } from 'chart.js';
2
+ import { Theme } from '@mui/material';
3
+ import { ScatterPlotProps } from './ScatterPlot.tsx';
4
+ /**
5
+ * @internal
6
+ */
7
+ export declare const getScatterConfig: (props: ScatterPlotProps & {
8
+ theme: Theme;
9
+ updateCurrentSelectedPoint: (index: number | null, x: number | null, y: number | null) => void;
10
+ }) => {
11
+ data: ChartData<"scatter">;
12
+ options: ChartOptions<"scatter">;
13
+ plugins: Plugin<"scatter">[];
14
+ };
15
+ interface CrosshairData {
16
+ x: number;
17
+ y: number;
18
+ draw: boolean;
19
+ xValue: number | null;
20
+ yValue: number | null;
21
+ }
22
+ interface CrosshairPluginOptions {
23
+ width: number;
24
+ color: string;
25
+ dash: number[];
26
+ tooltipBackground: string;
27
+ tooltipTextColor: string;
28
+ tooltipFontSize: number;
29
+ tooltipPadding: number;
30
+ tooltipRadius: number;
31
+ }
32
+ declare module "chart.js" {
33
+ interface PluginOptionsByType<TType extends ChartType> {
34
+ crosshair?: CrosshairPluginOptions;
35
+ }
36
+ interface Chart {
37
+ crosshair?: CrosshairData;
38
+ }
39
+ }
40
+ export declare const crosshairPlugin: Plugin<ChartType, CrosshairPluginOptions>;
41
+ export {};
@@ -1,4 +1,6 @@
1
+ import { StackProps } from '@mui/material';
1
2
  import { MRT_RowData, MRT_TableOptions } from 'material-react-table';
2
3
  export interface IMRTGridProps<T extends MRT_RowData> extends MRT_TableOptions<T> {
4
+ muiPaginationStackProps?: StackProps;
3
5
  }
4
- export declare function MRTGrid<T extends MRT_RowData>(props: MRT_TableOptions<T>): import("react/jsx-runtime").JSX.Element;
6
+ export declare function MRTGrid<T extends MRT_RowData>(props: IMRTGridProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,13 @@
1
- import { SxProps } from '@mui/material';
2
1
  import { NormalCssProperties } from '@mui/material/styles/createMixins';
3
2
  export type SidebarOptions = {
4
3
  isExpanded?: boolean;
5
4
  notExpandedSize?: NormalCssProperties["width"];
6
5
  expandedSize?: NormalCssProperties["width"];
7
6
  };
8
- export type SidebarTexts = {
9
- shortenSidebar: string;
10
- logout: string;
7
+ export type User = {
8
+ firstname: string;
9
+ lastname: string;
10
+ picture?: string;
11
11
  };
12
12
  export type NavbarLinkType = {
13
13
  icon: JSX.Element;
@@ -28,19 +28,19 @@ export type NavbarButtonType = {
28
28
  } & NavbarLinkType | {
29
29
  type: "topLink";
30
30
  } & NavbarLinkType;
31
- export type User = {
32
- firstname: string;
33
- lastname: string;
34
- picture?: string;
31
+ export type SidebarTexts = {
32
+ shortenSidebar: string;
33
+ logout: string;
34
+ };
35
+ export type OrganizationPopover = {
36
+ element: JSX.Element;
35
37
  };
36
38
  export type Organization = {
37
39
  name: string;
38
40
  picture?: string;
39
- popover?: {
40
- element: JSX.Element;
41
- paperSx?: SxProps;
42
- };
41
+ popover?: OrganizationPopover;
43
42
  };
43
+ export type NavigationMode = "mobile" | "tablet" | "desktop";
44
44
  export type FoodsNavbarProps = {
45
45
  buttons: NavbarButtonType[];
46
46
  connectedUser: User;
@@ -50,5 +50,7 @@ export type FoodsNavbarProps = {
50
50
  logoutAction: () => void;
51
51
  sidebarStatusHandler: (isExpanded: boolean) => void;
52
52
  userActions: JSX.Element[];
53
+ navigationMode?: NavigationMode;
54
+ onMobileDrawerClose?: () => void;
53
55
  };
54
56
  export declare const FoodsNavbar: (props: FoodsNavbarProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,6 +2,7 @@ import { NavbarLinkType } from '../../../FoodsNavbar';
2
2
  type LinkActionProps = {
3
3
  button: NavbarLinkType;
4
4
  isExpanded: boolean;
5
+ onMobileDrawerClose?: () => void;
5
6
  };
6
7
  export declare const LinkAction: (props: LinkActionProps) => import("react/jsx-runtime").JSX.Element;
7
8
  export {};
@@ -2,10 +2,12 @@ import { NavbarLinkType } from '../../../FoodsNavbar';
2
2
  type TopLinkActionProps = {
3
3
  button: NavbarLinkType;
4
4
  isExpanded: boolean;
5
+ onMobileDrawerClose?: () => void;
5
6
  };
6
7
  export declare const TopLinkAction: (props: TopLinkActionProps) => import("react/jsx-runtime").JSX.Element;
7
8
  type ExpandedButtonProps = {
8
9
  button: NavbarLinkType;
10
+ onMobileDrawerClose?: () => void;
9
11
  };
10
12
  export declare const ExpandedButton: (props: ExpandedButtonProps) => import("react/jsx-runtime").JSX.Element;
11
13
  export {};
@@ -3,5 +3,6 @@ export type UserButtonsProps = {
3
3
  buttons: NavbarButtonType[];
4
4
  isExpanded: boolean;
5
5
  extendSidebar: () => void;
6
+ onMobileDrawerClose?: () => void;
6
7
  };
7
8
  export declare const UserButtons: (props: UserButtonsProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,4 @@
1
1
  export declare const EditorContainer: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<import('@mui/material').Theme> & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
2
  ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
3
3
  }, keyof import('@mui/system').BoxOwnProps<import('@mui/material').Theme>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
4
- export declare const StyledEditorContent: import('@emotion/styled').StyledComponent<Omit<Omit<import('@tiptap/react').EditorContentProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
5
- ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
6
- } & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
4
+ export declare const StyledEditorContent: import('@emotion/styled').StyledComponent<Omit<import('@tiptap/react').EditorContentProps, "ref"> & import('react').RefAttributes<HTMLDivElement> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;