@foodpilot/foods 0.3.46 → 0.3.48
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/Box/index.d.ts +0 -1
- package/dist/components/Button/FoodsIconButton.d.ts +9 -2
- package/dist/components/Button/IconTooltips/FoodsIconButtonTooltip.d.ts +3 -0
- package/dist/components/Cards/ScoreCard/Header/ScoreCardHeader.d.ts +1 -1
- package/dist/components/Cards/ScoreCard/Header/ValueSwitcher/ValueSwitcher.d.ts +6 -3
- package/dist/components/Cards/ScoreCard/ScoreCard.d.ts +3 -8
- package/dist/components/Icons/FoodsIllustrations.d.ts +2 -1
- package/dist/components/Icons/Illustrations/Actions.d.ts +3 -1
- package/dist/components/Icons/Illustrations/Carbon emissions reduction.d.ts +3 -1
- package/dist/components/Icons/Illustrations/Carbon neutrality.d.ts +3 -1
- package/dist/components/Icons/Illustrations/Congratulations.d.ts +3 -0
- package/dist/components/Icons/Illustrations/Data analysis.d.ts +3 -1
- package/dist/components/Icons/Illustrations/Default.d.ts +3 -0
- package/dist/components/Icons/Illustrations/Inputs & chemicals.d.ts +3 -1
- package/dist/components/Icons/Illustrations/Questionnaire.d.ts +3 -1
- package/dist/components/Icons/Illustrations/Scores & indicators.d.ts +3 -1
- package/dist/components/Icons/Illustrations/Select action.d.ts +3 -0
- package/dist/components/Icons/Illustrations/Select starting year.d.ts +3 -0
- package/dist/components/Icons/Illustrations/Trajectory & actions plans.d.ts +3 -0
- package/dist/components/Icons/Illustrations/Under construction.d.ts +3 -1
- package/dist/components/Icons/illustrationProps.d.ts +4 -0
- package/dist/components/Icons/illustrationsConfig.d.ts +13 -8
- package/dist/components/Layout/BlockList/BlockListContainer.d.ts +5 -0
- package/dist/components/Layout/BlockList/Blocks/ActionsBlock/ActionRow.d.ts +21 -0
- package/dist/components/Layout/BlockList/Blocks/ActionsBlock/ActionsBlock.d.ts +6 -0
- package/dist/components/Layout/BlockList/Blocks/ActionsBlock/index.d.ts +1 -0
- package/dist/components/Layout/BlockList/Blocks/Common/LeftComparisonPart.d.ts +15 -0
- package/dist/components/Layout/BlockList/Blocks/Common/ValueDisplay.d.ts +6 -0
- package/dist/components/Layout/BlockList/Blocks/Common/index.d.ts +2 -0
- package/dist/components/Layout/BlockList/Blocks/Container/BlockItemContainer.d.ts +7 -0
- package/dist/components/Layout/BlockList/Blocks/Container/BlockItemInner.d.ts +12 -0
- package/dist/components/Layout/BlockList/Blocks/Container/index.d.ts +2 -0
- package/dist/components/Layout/BlockList/Blocks/InnerInfoBlocks/EmptyForm.d.ts +7 -0
- package/dist/components/Layout/BlockList/Blocks/InnerInfoBlocks/SuggestionBlock.d.ts +5 -0
- package/dist/components/Layout/BlockList/Blocks/InnerInputBlocks/CheckboxBlock.d.ts +8 -0
- package/dist/components/Layout/BlockList/Blocks/InnerInputBlocks/NumericalBlock.d.ts +8 -0
- package/dist/components/Layout/BlockList/Blocks/InnerInputBlocks/RadioBlock.d.ts +8 -0
- package/dist/components/Layout/BlockList/Blocks/InnerInputBlocks/SelectBlock.d.ts +8 -0
- package/dist/components/Layout/BlockList/Blocks/InnerInputBlocks/TextBlock.d.ts +8 -0
- package/dist/components/Layout/BlockList/Blocks/InnerInputBlocks/index.d.ts +5 -0
- package/dist/components/Layout/BlockList/Blocks/index.d.ts +4 -0
- package/dist/components/Layout/BlockList/Headers/EditHeader.d.ts +12 -0
- package/dist/components/Layout/BlockList/Headers/InitHeader.d.ts +9 -0
- package/dist/components/Layout/BlockList/Headers/ListHeader.d.ts +15 -0
- package/dist/components/Layout/BlockList/Headers/index.d.ts +3 -0
- package/dist/components/Layout/BlockList/index.d.ts +4 -0
- package/dist/components/Layout/InfoHeaderWithIllustration.d.ts +12 -0
- package/dist/components/Layout/index.d.ts +2 -0
- package/dist/components/Text/index.d.ts +0 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/innerComponents/FlexibleButton.d.ts +12 -0
- package/dist/innerComponents/FlexibleTypography.d.ts +8 -0
- package/dist/main.js +11354 -10978
- package/dist/main.umd.cjs +110 -110
- package/dist/themes/ThemeExtensions.d.ts +1 -1
- package/dist/themes/common.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/Box/BlockList/BlockItemContainer.d.ts +0 -2
- package/dist/components/Box/BlockList/BlockListContainer.d.ts +0 -4
- package/dist/components/Box/BlockList/BlockListHeader.d.ts +0 -12
- package/dist/components/Box/BlockList/Blocks/CheckboxBlock.d.ts +0 -1
- package/dist/components/Box/BlockList/Blocks/GroupBlock.d.ts +0 -1
- package/dist/components/Box/BlockList/Blocks/NumericalBlock.d.ts +0 -1
- package/dist/components/Box/BlockList/Blocks/RadioBlock.d.ts +0 -1
- package/dist/components/Box/BlockList/Blocks/SelectBlock.d.ts +0 -1
- package/dist/components/Box/BlockList/index.d.ts +0 -1
- package/dist/components/Text/TextBlock.d.ts +0 -14
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { TooltipProps } from '@mui/material';
|
|
2
|
+
import { FoodsBadgeProps } from '../Badge';
|
|
3
|
+
|
|
4
|
+
export type FoodsIconButton = FoodsBadgeProps & {
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
tooltip?: {
|
|
7
|
+
text?: string;
|
|
8
|
+
props?: Omit<TooltipProps, "children" | "title">;
|
|
9
|
+
};
|
|
3
10
|
};
|
|
4
11
|
export declare const FoodsIconButton: (props: FoodsIconButton) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { OptionsPopoverType } from './ValueSwitcher/ValueSwitcher';
|
|
|
2
2
|
|
|
3
3
|
export type ScoreCardHeaderProps = {
|
|
4
4
|
title: string;
|
|
5
|
-
|
|
5
|
+
selectedItemId: number;
|
|
6
6
|
optionsProps: OptionsPopoverType;
|
|
7
7
|
};
|
|
8
8
|
export declare const ScoreCardHeader: (props: ScoreCardHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OptionsPopoverSection } from '../../../../Popover';
|
|
2
2
|
|
|
3
|
-
export type OptionsPopoverType =
|
|
3
|
+
export type OptionsPopoverType = {
|
|
4
|
+
content: OptionsPopoverSection;
|
|
5
|
+
onChange: (optionId: number) => void;
|
|
6
|
+
};
|
|
4
7
|
export type ValueSwitcherProps = {
|
|
5
|
-
|
|
8
|
+
selectedItemId: number;
|
|
6
9
|
optionsProps: OptionsPopoverType;
|
|
7
10
|
};
|
|
8
11
|
export declare const ValueSwitcher: (props: ValueSwitcherProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ScoreCardHeaderProps } from './Header/ScoreCardHeader';
|
|
2
2
|
|
|
3
|
-
type ScoreHeader = {
|
|
4
|
-
title: string;
|
|
5
|
-
selectedItemLabel: string;
|
|
6
|
-
optionsProps: OptionsPopoverType;
|
|
7
|
-
};
|
|
8
3
|
export type ScoreCardProps = {
|
|
9
|
-
header:
|
|
4
|
+
header: ScoreCardHeaderProps;
|
|
10
5
|
moreDetailAction?: () => void;
|
|
11
6
|
soonAvailableText?: string;
|
|
7
|
+
disableFooter?: boolean;
|
|
12
8
|
children?: JSX.Element;
|
|
13
9
|
};
|
|
14
10
|
export declare const ScoreCard: (props: ScoreCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { IllustationProps } from './illustrationProps';
|
|
1
2
|
import { illustationsMapping } from './illustrationsConfig';
|
|
2
3
|
|
|
3
4
|
export type IllustrationMapping = typeof illustationsMapping;
|
|
4
|
-
export type FoodsIllustrationsProps = {
|
|
5
|
+
export type FoodsIllustrationsProps = IllustationProps & {
|
|
5
6
|
illustration: keyof IllustrationMapping;
|
|
6
7
|
};
|
|
7
8
|
export declare const FoodsIllustrations: (props: FoodsIllustrationsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
export declare const illustationsMapping: {
|
|
2
|
-
readonly actions: () => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
readonly carbonEmissions: () => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
readonly carbonNeutrality: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
2
|
+
readonly actions: (props: import('./illustrationProps').IllustationProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
readonly carbonEmissions: (props: import('./illustrationProps').IllustationProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
readonly carbonNeutrality: (props: import('./illustrationProps').IllustationProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
readonly chemicals: (props: import('./illustrationProps').IllustationProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
readonly congratulations: (props: import('./illustrationProps').IllustationProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
readonly dataAnalysis: (props: import('./illustrationProps').IllustationProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
readonly defaultIllustration: (props: import('./illustrationProps').IllustationProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
readonly questionnaire: (props: import('./illustrationProps').IllustationProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
readonly selectAction: (props: import('./illustrationProps').IllustationProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
readonly selectStartingYear: (props: import('./illustrationProps').IllustationProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
readonly scoresIndicators: (props: import('./illustrationProps').IllustationProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
readonly trajectoryActions: (props: import('./illustrationProps').IllustationProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
readonly underConstruction: (props: import('./illustrationProps').IllustationProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
15
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type ActionType = {
|
|
2
|
+
actionTitle: string;
|
|
3
|
+
value: number | null;
|
|
4
|
+
unit: string;
|
|
5
|
+
};
|
|
6
|
+
export type RowActions = {
|
|
7
|
+
addAction?: {
|
|
8
|
+
helperText?: string;
|
|
9
|
+
action: (option: ActionType) => void;
|
|
10
|
+
};
|
|
11
|
+
editAction?: {
|
|
12
|
+
helperText?: string;
|
|
13
|
+
action: (option: ActionType) => void;
|
|
14
|
+
};
|
|
15
|
+
deleteAction?: {
|
|
16
|
+
helperText?: string;
|
|
17
|
+
action: (option: ActionType) => void;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export type ActionRowProps = ActionType & RowActions;
|
|
21
|
+
export declare const ActionRow: (props: ActionRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ActionsBlock';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type BlockItemValue = (number | string)[] | (number | string);
|
|
2
|
+
export type BlockItemComparison = {
|
|
3
|
+
start: {
|
|
4
|
+
year: string | number;
|
|
5
|
+
value: BlockItemValue;
|
|
6
|
+
};
|
|
7
|
+
current?: {
|
|
8
|
+
year: string | number;
|
|
9
|
+
value: BlockItemValue;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type LeftComparisonPartProps = {
|
|
13
|
+
comparison: BlockItemComparison;
|
|
14
|
+
};
|
|
15
|
+
export declare const LeftComparisonPart: (props: LeftComparisonPartProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BlockItemComparison } from '../Common/LeftComparisonPart';
|
|
2
|
+
|
|
3
|
+
export type BlockOptions = {
|
|
4
|
+
rightSubtitle: string;
|
|
5
|
+
title: string;
|
|
6
|
+
comparisonValues: BlockItemComparison;
|
|
7
|
+
};
|
|
8
|
+
export type BlockItemInnerProps = {
|
|
9
|
+
children: JSX.Element;
|
|
10
|
+
blockOptions: BlockOptions;
|
|
11
|
+
};
|
|
12
|
+
export declare const BlockItemInner: (props: BlockItemInnerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FoodsCheckboxProps } from '../../../../Checkbox';
|
|
2
|
+
import { BlockOptions } from '../Container/BlockItemInner';
|
|
3
|
+
|
|
4
|
+
type CheckboxBlockProps<T> = FoodsCheckboxProps<T> & {
|
|
5
|
+
blockOptions: BlockOptions;
|
|
6
|
+
};
|
|
7
|
+
export declare const CheckboxBlock: <T>(props: CheckboxBlockProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BlockOptions } from '../Container/BlockItemInner';
|
|
2
|
+
import { RoundInputProps } from '../../../../Input';
|
|
3
|
+
|
|
4
|
+
type NumericalBlockProps = RoundInputProps & {
|
|
5
|
+
blockOptions: BlockOptions;
|
|
6
|
+
};
|
|
7
|
+
export declare const NumericalBlock: (props: NumericalBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BlockOptions } from '../Container/BlockItemInner';
|
|
2
|
+
import { FoodsRadioListProps } from '../../../../Radio';
|
|
3
|
+
|
|
4
|
+
type RadioBlockProps<T> = FoodsRadioListProps<T> & {
|
|
5
|
+
blockOptions: BlockOptions;
|
|
6
|
+
};
|
|
7
|
+
export declare const RadioBlock: <T>(props: RadioBlockProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BlockOptions } from '../Container/BlockItemInner';
|
|
2
|
+
import { SelectWrapperProps } from '../../../../Select';
|
|
3
|
+
|
|
4
|
+
type SelectBlockProps<T> = SelectWrapperProps<T> & {
|
|
5
|
+
blockOptions: BlockOptions;
|
|
6
|
+
};
|
|
7
|
+
export declare const SelectBlock: <T>(props: SelectBlockProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BlockOptions } from '../Container/BlockItemInner';
|
|
2
|
+
import { RoundInputProps } from '../../../../Input';
|
|
3
|
+
|
|
4
|
+
type TextBlockProps = RoundInputProps & {
|
|
5
|
+
blockOptions: BlockOptions;
|
|
6
|
+
};
|
|
7
|
+
export declare const TextBlock: (props: TextBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type EditHeaderProps = {
|
|
2
|
+
title: string;
|
|
3
|
+
cancel: {
|
|
4
|
+
label: string;
|
|
5
|
+
action: () => void;
|
|
6
|
+
};
|
|
7
|
+
confirm: {
|
|
8
|
+
label: string;
|
|
9
|
+
action: () => void;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const EditHeader: (props: EditHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FlexibleString } from '../../../../innerComponents/FlexibleTypography';
|
|
2
|
+
import { FlexibleButtonType } from '../../../../innerComponents/FlexibleButton';
|
|
3
|
+
|
|
4
|
+
export type InitHeaderProps = {
|
|
5
|
+
title: FlexibleString;
|
|
6
|
+
actionButton: FlexibleButtonType;
|
|
7
|
+
cancelButton?: FlexibleButtonType;
|
|
8
|
+
};
|
|
9
|
+
export declare const InitHeader: (props: InitHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FlexibleString } from '../../../../innerComponents/FlexibleTypography';
|
|
2
|
+
|
|
3
|
+
export type ListHeaderProps = {
|
|
4
|
+
title: FlexibleString;
|
|
5
|
+
cancel: {
|
|
6
|
+
label: string;
|
|
7
|
+
action: () => void;
|
|
8
|
+
};
|
|
9
|
+
confirm: {
|
|
10
|
+
label: string;
|
|
11
|
+
action: () => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare const ListHeader: (props: ListHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IllustrationMapping } from '../Icons';
|
|
2
|
+
|
|
3
|
+
export type InfoHeaderWithIllustrationProps = {
|
|
4
|
+
boldText: string;
|
|
5
|
+
smallInfoText: string;
|
|
6
|
+
illustration: keyof IllustrationMapping;
|
|
7
|
+
buttonAction: {
|
|
8
|
+
action: () => void;
|
|
9
|
+
label: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const InfoHeaderWithIllustration: (props: InfoHeaderWithIllustrationProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ButtonProps } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
export type GenericButton = {
|
|
4
|
+
label: string;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
};
|
|
7
|
+
export type FlexibleButtonType = JSX.Element | GenericButton;
|
|
8
|
+
export type FlexibleButtonProps = {
|
|
9
|
+
buttonOptions: FlexibleButtonType;
|
|
10
|
+
defaultOptions?: Omit<ButtonProps, "onClick">;
|
|
11
|
+
};
|
|
12
|
+
export declare const FlexibleButton: (props: FlexibleButtonProps) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TypographyProps } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
export type FlexibleString = JSX.Element | string;
|
|
4
|
+
export type FlexibleTypographyProps = {
|
|
5
|
+
text: FlexibleString;
|
|
6
|
+
defaultVariant: TypographyProps["variant"];
|
|
7
|
+
};
|
|
8
|
+
export declare const FlexibleTypography: (props: FlexibleTypographyProps) => JSX.Element;
|