@metaboliccode-dev/widget 0.2.2-rc.0 → 0.2.4
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/README.md +22 -12
- package/dist/MetabolicDashboard/MetabolicDashboard.d.ts +1 -1
- package/dist/MetabolicDashboard/api/downloadReportPdf.d.ts +6 -0
- package/dist/MetabolicDashboard/api/index.d.ts +2 -0
- package/dist/MetabolicDashboard/api/mappers/shared.d.ts +3 -4
- package/dist/MetabolicDashboard/api/metabolicDashboardApiKey.d.ts +1 -1
- package/dist/MetabolicDashboard/api/reportPageTypes.d.ts +30 -18
- package/dist/MetabolicDashboard/dashboardActionsContext.d.ts +5 -0
- package/dist/MetabolicDashboard/index.d.ts +2 -2
- package/dist/MetabolicDashboard/metabolicDashboard/useMetabolicDashboardResolvedContentSources.d.ts +3 -2
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/DashboardTab/AlertLabSummarySection.d.ts +4 -0
- package/dist/components/DashboardTab/CategoryTableRow.d.ts +4 -0
- package/dist/components/DashboardTab/TotalPredictiveTrendsSection.d.ts +4 -0
- package/dist/components/DashboardTab/index.d.ts +2 -2
- package/dist/components/LabResultsTab/index.d.ts +2 -2
- package/dist/components/SuggestedProductsTab/index.d.ts +1 -1
- package/dist/components/SupplementScheduleTab/index.d.ts +1 -1
- package/dist/components/dashboard/components/composite/GradientRangeBar.d.ts +14 -0
- package/dist/components/dashboard/components/composite/index.d.ts +2 -0
- package/dist/components/dashboard/constants.d.ts +1 -0
- package/dist/components/dashboard/data/contentTypes.d.ts +8 -15
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1934 -1884
- package/dist/layout/types.d.ts +10 -0
- package/package.json +2 -1
- package/dist/components/SuggestedProductsTab/fallbackData.d.ts +0 -2
- package/dist/components/SupplementScheduleTab/fallbackData.d.ts +0 -2
package/README.md
CHANGED
|
@@ -54,30 +54,38 @@ Runs the iframe embed entry locally (see `vite.config.iframe.ts`).
|
|
|
54
54
|
|
|
55
55
|
## Quick install
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
# 1. Add .npmrc to your project
|
|
59
|
-
echo ‘@metaboliccode-dev:registry=https://npm.pkg.github.com
|
|
60
|
-
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}’ > .npmrc
|
|
61
|
-
|
|
62
|
-
# 2. Set your GitHub token
|
|
63
|
-
export GITHUB_TOKEN=ghp_your_token_here
|
|
57
|
+
Published as a **public package on npmjs.org** — no authentication needed.
|
|
64
58
|
|
|
65
|
-
|
|
59
|
+
```bash
|
|
66
60
|
npm install @metaboliccode-dev/widget
|
|
67
61
|
```
|
|
68
62
|
|
|
69
|
-
See [Installation](./docs/installation.md) for
|
|
63
|
+
See [Installation](./docs/installation.md) for framework-specific notes and troubleshooting.
|
|
70
64
|
|
|
71
65
|
## Quick usage
|
|
72
66
|
|
|
73
67
|
```tsx
|
|
74
|
-
import {
|
|
68
|
+
import {
|
|
69
|
+
MetabolicDashboard,
|
|
70
|
+
METABOLIC_DASHBOARD_STUB_API_KEY,
|
|
71
|
+
createHttpDashboardContentFetchers,
|
|
72
|
+
mergeReportPagesApiWithBuiltIn,
|
|
73
|
+
} from "@metaboliccode-dev/widget";
|
|
74
|
+
import "@metaboliccode-dev/widget/styles.css";
|
|
75
|
+
|
|
76
|
+
const fetchers = createHttpDashboardContentFetchers(
|
|
77
|
+
mergeReportPagesApiWithBuiltIn({
|
|
78
|
+
apiKey: "mc-prod",
|
|
79
|
+
userId: "prod-full-user",
|
|
80
|
+
}),
|
|
81
|
+
);
|
|
75
82
|
|
|
76
83
|
export function App() {
|
|
77
84
|
return (
|
|
78
85
|
<div className="h-screen">
|
|
79
86
|
<MetabolicDashboard
|
|
80
87
|
apiKey={METABOLIC_DASHBOARD_STUB_API_KEY}
|
|
88
|
+
dashboardContentFetchers={fetchers}
|
|
81
89
|
sideMenuUserProfile={{ displayName: "User", email: "user@example.com" }}
|
|
82
90
|
/>
|
|
83
91
|
</div>
|
|
@@ -85,6 +93,8 @@ export function App() {
|
|
|
85
93
|
}
|
|
86
94
|
```
|
|
87
95
|
|
|
88
|
-
|
|
96
|
+
See [Quick Start](./docs/quick-start.md) for the dual-key pattern (why `apiKey` and the custom fetchers both carry credentials).
|
|
97
|
+
|
|
98
|
+
## AG Charts enterprise license
|
|
89
99
|
|
|
90
|
-
Charts use **AG Charts** (`ag-charts-community` + `ag-charts-enterprise`).
|
|
100
|
+
Charts use **AG Charts** (`ag-charts-community` + `ag-charts-enterprise`). The enterprise license key is **baked into the published bundle** by the **manually-triggered** GitHub Actions release workflow (the `AG_CHARTS_LICENSE_KEY` repo secret is passed to the build step). Consumers do not need to do anything — installing the package gives you an unlocked build. See [Development → Releasing a new version](./docs/development.md#releasing-a-new-version) for the full publishing procedure.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { MetabolicDashboardProps } from "../layout";
|
|
2
|
-
export declare function MetabolicDashboard({ config: configPartial, apiKey: apiKeyProp, viewerRole, sideMenuTitle, sideMenuLogo, sideMenuUserProfile, content, dashboardContentFetchers, onDashboardTabContentLoadError, renderMainContent, activeNavItemId: activeNavItemIdProp, defaultActiveNavItemId, onActiveNavItemChange, shellClassName, sideMenuClassName, mainClassName, sidebarWidthClassName, dashboardTabContentCacheTtlMs, }: MetabolicDashboardProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function MetabolicDashboard({ config: configPartial, apiKey: apiKeyProp, viewerRole, sideMenuTitle, sideMenuLogo, sideMenuUserProfile, content, reportHttpConfig, dashboardContentFetchers, onDashboardTabContentLoadError, onExportReports, renderMainContent, activeNavItemId: activeNavItemIdProp, defaultActiveNavItemId, onActiveNavItemChange, shellClassName, sideMenuClassName, mainClassName, sidebarWidthClassName, dashboardTabContentCacheTtlMs, }: MetabolicDashboardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HttpDashboardContentFetchersConfig } from "./createHttpDashboardContentFetchers";
|
|
2
|
+
export type DownloadReportPdfOptions = {
|
|
3
|
+
reportId?: string;
|
|
4
|
+
signal?: AbortSignal;
|
|
5
|
+
};
|
|
6
|
+
export declare function createReportPdfDownloader(config: Pick<HttpDashboardContentFetchersConfig, "baseUrl" | "apiKey" | "userId" | "reportId" | "headers" | "fetchImpl">): (options?: DownloadReportPdfOptions) => Promise<void>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { getBuiltInReportPagesApiBaseUrl, getBuiltInReportPagesApiDefaults, mergeReportPagesApiWithBuiltIn, } from "./builtInReportPagesApi";
|
|
2
2
|
export type { HttpDashboardContentFetchersConfig } from "./createHttpDashboardContentFetchers";
|
|
3
3
|
export { createHttpDashboardContentFetchers } from "./createHttpDashboardContentFetchers";
|
|
4
|
+
export type { DownloadReportPdfOptions } from "./downloadReportPdf";
|
|
5
|
+
export { createReportPdfDownloader } from "./downloadReportPdf";
|
|
4
6
|
export type { FetchReportPageOptions } from "./fetchReportPage";
|
|
5
7
|
export { buildReportPageUrl, fetchReportPage } from "./fetchReportPage";
|
|
6
8
|
export { mapAlertLabSummaryDtoToTabContent, mapDashboardPageDtoToTabContent, mapLabAnalysisDtoToTabContent, mapLabResultsDtoToTabContent, mapQuestionnaireAnalysisDtoToTabContent, mapSuggestedProductsDtoToTabContent, mapSupplementScheduleDtoToTabContent, mapTotalPredictiveIndexDtoToTabContent, mapWellnessIndicatorsDtoToTabContent, } from "./mapReportPages";
|
|
@@ -7,14 +7,13 @@ export declare const TRIAD_RADAR_STYLES: readonly [{
|
|
|
7
7
|
readonly fill: "rgb(134 205 149 / 0.35)";
|
|
8
8
|
readonly stroke: "#5BA86C";
|
|
9
9
|
}];
|
|
10
|
-
export declare const
|
|
11
|
-
export declare
|
|
12
|
-
export declare const LAB_ANALYSIS_COPY: Record<number, readonly [string, string]>;
|
|
10
|
+
export declare const TRIAD_INTRO_PARAGRAPHS: Record<number, readonly string[]>;
|
|
11
|
+
export declare function triadIntroParagraphs(triadNumber: number): readonly string[];
|
|
13
12
|
export declare const SCHEDULE_LABELS: readonly [keyof SupplementDto["schedule"], string][];
|
|
14
13
|
export declare function patientInitials(name: string): string;
|
|
15
14
|
export declare function formatGender(g?: string | null): string;
|
|
16
15
|
export declare function formatRange(r: NumericRangeDto | null, unit: string): string;
|
|
17
|
-
export declare function formatMetricValue(value: number, unit: string): string;
|
|
16
|
+
export declare function formatMetricValue(value: number | null | undefined, unit: string): string;
|
|
18
17
|
export declare function mapTrendZone(z?: string | null): QuestionnaireTrendZone;
|
|
19
18
|
export declare function directionToArrows(direction: string): string;
|
|
20
19
|
export declare function interpretationStatusLabel(interpretation: string): string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const METABOLIC_REPORT_PAGES_API_BASE_URL
|
|
1
|
+
export declare const METABOLIC_REPORT_PAGES_API_BASE_URL: string;
|
|
2
2
|
export declare const METABOLIC_DASHBOARD_STUB_API_KEY: string | undefined;
|
|
3
3
|
export declare function isMetabolicDashboardApiKeyAccepted(apiKey: string | undefined): boolean;
|
|
@@ -14,26 +14,37 @@ export type DashboardPageDto = {
|
|
|
14
14
|
metaflammation: {
|
|
15
15
|
value: number;
|
|
16
16
|
max: number;
|
|
17
|
-
};
|
|
17
|
+
} | null;
|
|
18
18
|
labs_last_date?: string | null;
|
|
19
|
+
questionnaire_last_date?: string | null;
|
|
20
|
+
wearable_last_activity?: string | null;
|
|
19
21
|
triads: readonly DashboardTriadDto[];
|
|
20
22
|
lab_metrics: readonly DashboardLabMetricDto[];
|
|
21
23
|
};
|
|
22
24
|
export type DashboardTriadDto = {
|
|
23
25
|
number: number;
|
|
24
26
|
name: string;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
total_score?: number | null;
|
|
28
|
+
lab_score?: number | null;
|
|
29
|
+
survey_score?: number | null;
|
|
30
|
+
interpretation?: string | null;
|
|
31
|
+
organs: readonly DashboardOrganDto[];
|
|
32
|
+
};
|
|
33
|
+
export type DashboardOrganDto = {
|
|
34
|
+
name: string;
|
|
35
|
+
total_score?: number | null;
|
|
36
|
+
lab_score?: number | null;
|
|
37
|
+
survey_score?: number | null;
|
|
38
|
+
interpretation?: string | null;
|
|
29
39
|
};
|
|
30
40
|
export type DashboardLabMetricDto = {
|
|
31
41
|
name: string;
|
|
32
|
-
value
|
|
33
|
-
unit
|
|
42
|
+
value?: number | null;
|
|
43
|
+
unit?: string | null;
|
|
44
|
+
interpretation?: string | null;
|
|
34
45
|
normal_range: NumericRangeDto | null;
|
|
35
46
|
treatment_range: NumericRangeDto | null;
|
|
36
|
-
indicator_percent
|
|
47
|
+
indicator_percent?: number | null;
|
|
37
48
|
};
|
|
38
49
|
export type TotalPredictiveIndexPageDto = {
|
|
39
50
|
triads: readonly TotalPredictiveTriadDto[];
|
|
@@ -60,6 +71,7 @@ export type WellnessIndicatorsPageDto = {
|
|
|
60
71
|
export type WellnessIndicatorDto = {
|
|
61
72
|
name: string;
|
|
62
73
|
score: number;
|
|
74
|
+
interpretation?: string | null;
|
|
63
75
|
zones: {
|
|
64
76
|
low: {
|
|
65
77
|
min: number;
|
|
@@ -117,17 +129,17 @@ export type LabResultsGroupDto = {
|
|
|
117
129
|
};
|
|
118
130
|
export type LabResultsMetricDto = {
|
|
119
131
|
name: string;
|
|
120
|
-
value
|
|
121
|
-
unit
|
|
132
|
+
value?: number | null;
|
|
133
|
+
unit?: string | null;
|
|
122
134
|
normal_range: NumericRangeDto | null;
|
|
123
135
|
treatment_range: NumericRangeDto | null;
|
|
124
136
|
previous_value?: number | null;
|
|
125
|
-
indicator_percent
|
|
137
|
+
indicator_percent?: number | null;
|
|
126
138
|
interpretation?: string | null;
|
|
127
139
|
};
|
|
128
140
|
export type SuggestedProductsPageDto = {
|
|
129
|
-
triad_number
|
|
130
|
-
triad_name
|
|
141
|
+
triad_number?: number | null;
|
|
142
|
+
triad_name?: string | null;
|
|
131
143
|
organ_metrics: readonly {
|
|
132
144
|
name: string;
|
|
133
145
|
score: number;
|
|
@@ -164,11 +176,11 @@ export type AlertLabSummaryPageDto = {
|
|
|
164
176
|
};
|
|
165
177
|
export type AlertLabMetricDto = {
|
|
166
178
|
name: string;
|
|
167
|
-
value
|
|
168
|
-
unit
|
|
169
|
-
interpretation
|
|
170
|
-
normal_range: NumericRangeDto;
|
|
171
|
-
indicator_percent
|
|
179
|
+
value?: number | null;
|
|
180
|
+
unit?: string | null;
|
|
181
|
+
interpretation?: string | null;
|
|
182
|
+
normal_range: NumericRangeDto | null;
|
|
183
|
+
indicator_percent?: number | null;
|
|
172
184
|
};
|
|
173
185
|
export type ReportPageDtoByNavId = {
|
|
174
186
|
dashboard: DashboardPageDto;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { MetabolicDashboardProps } from "../layout";
|
|
2
|
-
export type { AlertLabMetricDto, AlertLabSummaryPageDto, DashboardPageDto, FetchReportPageOptions, HttpDashboardContentFetchersConfig, LabAnalysisPageDto, LabResultsPageDto, QuestionnaireAnalysisPageDto, ReportPageDtoByNavId, ReportPageDtoFor, ReportPageNavKey, SuggestedProductsPageDto, SupplementSchedulePageDto, TotalPredictiveIndexPageDto, WellnessIndicatorsPageDto, } from "./api";
|
|
3
|
-
export { buildReportPageUrl, createHttpDashboardContentFetchers, fetchReportPage, getBuiltInReportPagesApiBaseUrl, getBuiltInReportPagesApiDefaults, isMetabolicDashboardApiKeyAccepted, METABOLIC_DASHBOARD_STUB_API_KEY, METABOLIC_REPORT_PAGES_API_BASE_URL, mapAlertLabSummaryDtoToTabContent, mapDashboardPageDtoToTabContent, mapLabAnalysisDtoToTabContent, mapLabResultsDtoToTabContent, mapQuestionnaireAnalysisDtoToTabContent, mapSuggestedProductsDtoToTabContent, mapSupplementScheduleDtoToTabContent, mapTotalPredictiveIndexDtoToTabContent, mapWellnessIndicatorsDtoToTabContent, mergeReportPagesApiWithBuiltIn, } from "./api";
|
|
2
|
+
export type { AlertLabMetricDto, AlertLabSummaryPageDto, DashboardPageDto, DownloadReportPdfOptions, FetchReportPageOptions, HttpDashboardContentFetchersConfig, LabAnalysisPageDto, LabResultsPageDto, QuestionnaireAnalysisPageDto, ReportPageDtoByNavId, ReportPageDtoFor, ReportPageNavKey, SuggestedProductsPageDto, SupplementSchedulePageDto, TotalPredictiveIndexPageDto, WellnessIndicatorsPageDto, } from "./api";
|
|
3
|
+
export { buildReportPageUrl, createHttpDashboardContentFetchers, createReportPdfDownloader, fetchReportPage, getBuiltInReportPagesApiBaseUrl, getBuiltInReportPagesApiDefaults, isMetabolicDashboardApiKeyAccepted, METABOLIC_DASHBOARD_STUB_API_KEY, METABOLIC_REPORT_PAGES_API_BASE_URL, mapAlertLabSummaryDtoToTabContent, mapDashboardPageDtoToTabContent, mapLabAnalysisDtoToTabContent, mapLabResultsDtoToTabContent, mapQuestionnaireAnalysisDtoToTabContent, mapSuggestedProductsDtoToTabContent, mapSupplementScheduleDtoToTabContent, mapTotalPredictiveIndexDtoToTabContent, mapWellnessIndicatorsDtoToTabContent, mergeReportPagesApiWithBuiltIn, } from "./api";
|
|
4
4
|
export { mergeDashboardContentFetchers } from "./dashboardContentFetchers";
|
|
5
5
|
export type { DashboardTabContentCacheContextValue } from "./dashboardTab/DashboardTabContentCacheContext";
|
|
6
6
|
export { DashboardTabContentCacheProvider, DEFAULT_DASHBOARD_TAB_CONTENT_CACHE_TTL_MS, useInvalidateDashboardTabContentCache, } from "./dashboardTab/DashboardTabContentCacheContext";
|
package/dist/MetabolicDashboard/metabolicDashboard/useMetabolicDashboardResolvedContentSources.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { MetabolicDashboardProps } from "../../layout";
|
|
2
2
|
import type { DashboardContentFetchers } from "../dashboardTab/dashboardTabModel";
|
|
3
|
-
type UseMetabolicDashboardResolvedContentSourcesArgs = Pick<MetabolicDashboardProps, "config" | "apiKey" | "dashboardContentFetchers" | "content" | "renderMainContent" | "dashboardTabContentCacheTtlMs"> & {
|
|
3
|
+
type UseMetabolicDashboardResolvedContentSourcesArgs = Pick<MetabolicDashboardProps, "config" | "apiKey" | "reportHttpConfig" | "dashboardContentFetchers" | "onExportReports" | "content" | "renderMainContent" | "dashboardTabContentCacheTtlMs"> & {
|
|
4
4
|
simulationReportId: string | undefined;
|
|
5
5
|
};
|
|
6
|
-
export declare function useMetabolicDashboardResolvedContentSources({ config: configPartial, apiKey: apiKeyProp, dashboardContentFetchers, content, renderMainContent, dashboardTabContentCacheTtlMs, simulationReportId, }: UseMetabolicDashboardResolvedContentSourcesArgs): {
|
|
6
|
+
export declare function useMetabolicDashboardResolvedContentSources({ config: configPartial, apiKey: apiKeyProp, reportHttpConfig, dashboardContentFetchers, onExportReports, content, renderMainContent, dashboardTabContentCacheTtlMs, simulationReportId, }: UseMetabolicDashboardResolvedContentSourcesArgs): {
|
|
7
7
|
apiKeyAccepted: boolean;
|
|
8
8
|
useDefaultTabData: boolean;
|
|
9
9
|
resolvedDashboardContentFetchers: DashboardContentFetchers;
|
|
10
|
+
resolvedExportReports: (() => void | Promise<void>) | ((options?: import("..").DownloadReportPdfOptions) => Promise<void>);
|
|
10
11
|
resolvedCacheTtlMs: number;
|
|
11
12
|
};
|
|
12
13
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
-
export type ButtonVariant = "default" | "soft" | "sideMenu" | "sideMenuFooter" | "trendRowStatusOptimal" | "trendRowStatusHigh" | "trendRowStatusLow";
|
|
2
|
+
export type ButtonVariant = "default" | "soft" | "sideMenu" | "sideMenuFooter" | "trendRowStatusOptimal" | "trendRowStatusTrending" | "trendRowStatusHigh" | "trendRowStatusLow";
|
|
3
3
|
export type ButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "className"> & {
|
|
4
4
|
className?: string;
|
|
5
5
|
children?: ReactNode;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DashboardAlertLabTableRowContent, DashboardTriadTrendCategoryRowContent } from "../dashboard/data";
|
|
2
|
+
export declare function CategoryTableRow({ row, }: {
|
|
3
|
+
row: DashboardTriadTrendCategoryRowContent | DashboardAlertLabTableRowContent;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { DashboardTabContent } from "../dashboard/data";
|
|
2
2
|
export declare function DashboardTab({ content }: {
|
|
3
|
-
content
|
|
4
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
content?: DashboardTabContent;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LabResultsTabContent } from "../dashboard/data";
|
|
2
2
|
export type { LabResultsTabContent } from "../dashboard/data";
|
|
3
3
|
export declare function LabResultsTab({ content }: {
|
|
4
|
-
content
|
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
content?: LabResultsTabContent;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -2,4 +2,4 @@ import type { SuggestedProductsTabContent } from "../dashboard/data";
|
|
|
2
2
|
export type { SuggestedProductItemContent, SuggestedProductsTabContent, } from "../dashboard/data";
|
|
3
3
|
export declare function SuggestedProductsTab({ content }: {
|
|
4
4
|
content?: SuggestedProductsTabContent;
|
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -2,4 +2,4 @@ import type { SupplementScheduleTabContent } from "../dashboard/data";
|
|
|
2
2
|
export type { PractitionerNotesContent, SupplementScheduleCardContent, SupplementScheduleRowContent, SupplementScheduleTabContent, } from "../dashboard/data";
|
|
3
3
|
export declare function SupplementScheduleTab({ content }: {
|
|
4
4
|
content?: SupplementScheduleTabContent;
|
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type GradientRangeBarStop = {
|
|
2
|
+
color: string;
|
|
3
|
+
position: number;
|
|
4
|
+
};
|
|
5
|
+
export type GradientRangeBarProps = {
|
|
6
|
+
stops: readonly GradientRangeBarStop[];
|
|
7
|
+
indicatorPercent: number;
|
|
8
|
+
showIndicator?: boolean;
|
|
9
|
+
labels?: readonly string[];
|
|
10
|
+
barHeight?: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const OVERALL_SCORE_GRADIENT_STOPS: readonly GradientRangeBarStop[];
|
|
13
|
+
export declare const OVERALL_SCORE_LABELS: readonly ["0", "20", "40", "60", "80", "100"];
|
|
14
|
+
export declare function GradientRangeBar({ stops, indicatorPercent, showIndicator, labels, barHeight, }: GradientRangeBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export type { DashboardCardSectionHeaderProps } from "./DashboardCardSectionHeader";
|
|
2
2
|
export { DashboardCardSectionHeader } from "./DashboardCardSectionHeader";
|
|
3
|
+
export type { GradientRangeBarProps, GradientRangeBarStop } from "./GradientRangeBar";
|
|
4
|
+
export { GradientRangeBar, OVERALL_SCORE_GRADIENT_STOPS, OVERALL_SCORE_LABELS, } from "./GradientRangeBar";
|
|
3
5
|
export { MetabolicScoreBar } from "./MetabolicScoreBar";
|
|
4
6
|
export { MetaflammationGauge } from "./MetaflammationGauge";
|
|
5
7
|
export { PractitionerNoteRow } from "./PractitionerNoteRow";
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export declare const dashboardIconButtonClass = "rounded-full p-0.5 text-[color:var(--mb-color-text-muted)] transition hover:text-[color:var(--mb-color-text)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--mb-color-focus-ring)]";
|
|
2
2
|
export declare const dashboardCardInlineButtonClass = "whitespace-nowrap !border-[color:var(--mb-color-card-inline-button-border)] !bg-[color:var(--mb-color-card-inline-button-bg)] !px-3 !py-2 !text-sm !font-medium !text-[color:var(--mb-color-card-inline-button-text)] [&_svg]:!text-[color:var(--mb-color-card-inline-button-text)] !shadow-none hover:!bg-[color:var(--mb-color-card-inline-button-hover)]";
|
|
3
|
+
export declare const dashboardOutlineButtonClass = "whitespace-nowrap !border-[color:var(--mb-color-card-border)] !bg-transparent !px-3 !py-2 !text-sm !font-medium !text-[color:var(--mb-color-text)] [&_svg]:!text-[color:var(--mb-color-text)] !shadow-none transition-[background-color,border-color] duration-150 ease-out hover:!border-[color:var(--mb-color-button-border)] hover:!bg-[color:var(--mb-color-card-inline-button-hover)] disabled:hover:!border-[color:var(--mb-color-card-border)] disabled:hover:!bg-transparent";
|
|
@@ -52,7 +52,7 @@ export type LabMetricRangeCardContent = {
|
|
|
52
52
|
infoTooltip?: string;
|
|
53
53
|
downloadAriaLabel: string;
|
|
54
54
|
};
|
|
55
|
-
export type DashboardTrendStatus = "optimal" | "high" | "low";
|
|
55
|
+
export type DashboardTrendStatus = "optimal" | "trending" | "high" | "low";
|
|
56
56
|
export type DashboardTriadTrendChipContent = {
|
|
57
57
|
triadNumber: number;
|
|
58
58
|
name: string;
|
|
@@ -100,16 +100,9 @@ export type DashboardTabContent = {
|
|
|
100
100
|
title: string;
|
|
101
101
|
subtitle: string;
|
|
102
102
|
};
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
};
|
|
107
|
-
welcome: DashboardWelcomeContent;
|
|
108
|
-
overallScore: DashboardOverallScoreContent;
|
|
109
|
-
metaflammation: DashboardMetaflammationContent;
|
|
110
|
-
metabolicTriadIntroParagraphs: readonly string[];
|
|
111
|
-
triadReports: readonly TriadRadarReportContent[];
|
|
112
|
-
labMetrics: readonly LabMetricRangeCardContent[];
|
|
103
|
+
welcome?: DashboardWelcomeContent;
|
|
104
|
+
overallScore?: DashboardOverallScoreContent;
|
|
105
|
+
metaflammation?: DashboardMetaflammationContent;
|
|
113
106
|
totalPredictiveTrends?: DashboardTotalPredictiveTrendsContent;
|
|
114
107
|
alertLabSummaryTable?: DashboardAlertLabSummaryTableContent;
|
|
115
108
|
};
|
|
@@ -234,7 +227,7 @@ export type LabResultsTabContent = {
|
|
|
234
227
|
title: string;
|
|
235
228
|
subtitle: string;
|
|
236
229
|
};
|
|
237
|
-
intro
|
|
230
|
+
intro?: LabResultsIntroContent;
|
|
238
231
|
groups: readonly LabResultsGroupContent[];
|
|
239
232
|
};
|
|
240
233
|
export type SuggestedProductItemContent = {
|
|
@@ -248,7 +241,7 @@ export type SuggestedProductsTabContent = {
|
|
|
248
241
|
title: string;
|
|
249
242
|
subtitle: string;
|
|
250
243
|
};
|
|
251
|
-
intro
|
|
244
|
+
intro?: LabResultsIntroContent;
|
|
252
245
|
labSectionTitle: string;
|
|
253
246
|
labMetrics: readonly LabResultsMetricContent[];
|
|
254
247
|
symptomsSectionTitle: string;
|
|
@@ -267,8 +260,8 @@ export type LabAnalysisSectionContent = {
|
|
|
267
260
|
systemsBanner: string;
|
|
268
261
|
markers: readonly LabAnalysisMarkerRowContent[];
|
|
269
262
|
trendZone: QuestionnaireTrendZone;
|
|
270
|
-
descriptionPrimary
|
|
271
|
-
descriptionSecondary
|
|
263
|
+
descriptionPrimary?: string;
|
|
264
|
+
descriptionSecondary?: string;
|
|
272
265
|
};
|
|
273
266
|
export type LabAnalysisTabContent = {
|
|
274
267
|
pageHeader: {
|