@hhgtech/hhg-components
Version:
Hello Health Group common components
137 lines (136 loc) • 3.27 kB
TypeScript
/// <reference types="react" />
import { ContentSponsor, ReviewedUserApi } from "../../together/interfaces/types";
export type Option = {
label: string | JSX.Element;
value: string | Date | number;
icon?: JSX.Element;
disabled?: boolean;
};
export declare enum Gender {
Boy = "boy",
Girl = "girl"
}
export declare enum BabyGrowthChartType {
Height = 0,
Weight = 1,
Head = 2,
BMI = 3
}
export declare enum BabyGrowthChartDuration {
Weekly = 0,
Monthly = 1,
Yearly = 2
}
export type BabyGrowthContentApi = {
information: Array<{
title: string;
description: string;
}>;
reviewed_by: ReviewedUserApi;
reviewed_date: string;
meta_tag: string;
title: string;
description: string;
disclaimer: string;
is_sponsored: boolean;
sponsor: ContentSponsor;
featured_image: string;
};
export type BabyGrowthContent = {
information: Array<{
title: string;
description: string;
}>;
reviewBy: {
reviewer: string;
date: string;
link: string;
};
metaTag: string;
title: string;
description: string;
disclaimer: string;
is_sponsored: boolean;
sponsor: ContentSponsor;
featuredImage: string;
};
export type ResultApi = {
condition_risk_suggestion: string;
faqs: Array<{
title: string;
description: string;
}>;
seemore_link: string;
};
export type Result = {
conditionRiskSuggestion: string;
faqs: Array<{
title: string;
description: string;
}>;
seeMoreLink: string;
};
export type ResultChartTypeApi = 'girl_height' | 'girl_weight' | 'girl_head' | 'boy_height' | 'boy_weight' | 'boy_head';
export type ResultType = '3rd' | '15th' | '50th' | '85th' | '97th';
export type BabyGrowthResultApi = {
[key in ResultChartTypeApi]: {
[key in ResultType]: ResultApi;
};
};
export type BabyGrowthResult = {
[key in string]: {
[key in string]?: Result;
};
};
export declare enum BabyGrowthResultTab {
Height = 0,
Weight = 1,
Head = 2,
BMI = 3,
Record = 4
}
export type DefaultPercentileType = Array<{
name: number;
'1st': number;
'3rd': number;
'5th': number;
'15th': number;
'25th': number;
'50th': number;
'75th': number;
'85th': number;
'95th': number;
'97th': number;
'99th': number;
}>;
export type DefaultZScoreType = Array<{
name: number;
'-3SD': number;
'-2SD': number;
'-1SD': number;
'0Median': number;
'1SD': number;
'2SD': number;
'3SD': number;
}>;
export type ChartResultType = {
data: DefaultPercentileType | DefaultZScoreType;
status: 'full' | 'first-half' | 'second-half';
};
export type HistoryLineType = Array<{
name: number;
history: number;
risk: string;
toolTipLabel: Array<string>;
}>;
export type BabyGrowthFormField = {
name?: Option | string;
gender?: Gender;
birthday?: Date;
height?: number;
weight?: number;
head?: number;
bmi?: string;
measurementDate?: Date;
checkMesureVal?: boolean;
};