@foodpilot/foods 0.6.8 → 0.6.9
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/dist/components/Chart/EvolutionChart/useEvolutionChart.d.ts +14 -0
- package/dist/components/Chart/TrajectoryChart/useChartOptions.d.ts +6 -0
- package/dist/components/Chart/WaterfallChart/useWaterfallChart.d.ts +11 -0
- package/dist/components/Chart/scatterPlotAdditions.d.ts +41 -0
- package/dist/components/Grid/MRTGrid.d.ts +3 -1
- package/dist/components/Navigation/FoodsNavBar/FoodsNavbar.d.ts +14 -12
- package/dist/components/Navigation/FoodsNavBar/Sections/UserButtons/Button/LinkAction.d.ts +1 -0
- package/dist/components/Navigation/FoodsNavBar/Sections/UserButtons/Button/TopLinkAction.d.ts +2 -0
- package/dist/components/Navigation/FoodsNavBar/Sections/UserButtons/UserButtons.d.ts +1 -0
- package/dist/main.js +1581 -1548
- package/dist/main.umd.cjs +28 -28
- package/package.json +1 -1
|
@@ -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,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:
|
|
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
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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 {};
|
package/dist/components/Navigation/FoodsNavBar/Sections/UserButtons/Button/TopLinkAction.d.ts
CHANGED
|
@@ -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 {};
|