@careevolution/mydatahelps-ui 2.2.1-VB3.4 → 2.2.1-VB3.6

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.
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import { DailyDataProvider } from '../../../helpers/query-daily-data';
3
+ import "./DailyDataChart.css";
4
+ import { WeekStartsOn } from '../../../helpers/get-interval-start';
5
+ export interface DailyDataChartProps {
6
+ title: string;
7
+ intervalType?: "Week" | "Month";
8
+ weekStartsOn?: WeekStartsOn;
9
+ dailyDataType: string;
10
+ valueConverter?(value: number): number;
11
+ valueFormatter?(value: number): string;
12
+ chartType: "Line" | "Bar" | "Area";
13
+ options?: LineChartOptions | BarChartOptions | AreaChartOptions;
14
+ previewDataProvider?: DailyDataProvider;
15
+ }
16
+ export interface LineChartOptions {
17
+ lineColor?: string;
18
+ domainMin?: number | "Auto";
19
+ }
20
+ export interface BarChartOptions {
21
+ barColor?: string;
22
+ }
23
+ export interface AreaChartOptions {
24
+ lineColor?: string;
25
+ areaColor?: string;
26
+ }
27
+ export default function DailyDataChart(props: DailyDataChartProps): React.JSX.Element;
@@ -0,0 +1,64 @@
1
+ import React from "react";
2
+ import { DailyDataQueryResult, DailyDataType } from "../../../helpers/query-daily-data";
3
+ import DailyDataChart, { DailyDataChartProps } from "./DailyDataChart";
4
+ declare const _default: {
5
+ title: string;
6
+ component: typeof DailyDataChart;
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ };
11
+ export default _default;
12
+ export declare const stepsLineChart: {
13
+ args: {
14
+ title: string;
15
+ options: {
16
+ domainMin: number;
17
+ lineColor: string;
18
+ };
19
+ intervalType: string;
20
+ weekStartsOn: string;
21
+ dailyDataType: DailyDataType;
22
+ valueFormatter: (value: number) => string;
23
+ chartType: string;
24
+ previewDataProvider: (start: Date, end: Date) => Promise<DailyDataQueryResult>;
25
+ };
26
+ render: (args: DailyDataChartProps) => React.JSX.Element;
27
+ };
28
+ export declare const stepsBarChart: {
29
+ args: {
30
+ title: string;
31
+ options: {};
32
+ intervalType: string;
33
+ weekStartsOn: string;
34
+ dailyDataType: DailyDataType;
35
+ valueFormatter: (value: number) => string;
36
+ chartType: string;
37
+ previewDataProvider: (start: Date, end: Date) => Promise<DailyDataQueryResult>;
38
+ };
39
+ render: (args: DailyDataChartProps) => React.JSX.Element;
40
+ };
41
+ export declare const stepsAreaChart: {
42
+ args: {
43
+ title: string;
44
+ options: {};
45
+ intervalType: string;
46
+ weekStartsOn: string;
47
+ dailyDataType: DailyDataType;
48
+ valueFormatter: (value: number) => string;
49
+ chartType: string;
50
+ previewDataProvider: (start: Date, end: Date) => Promise<DailyDataQueryResult>;
51
+ };
52
+ render: (args: DailyDataChartProps) => React.JSX.Element;
53
+ };
54
+ export declare const noData: {
55
+ args: {
56
+ title: string;
57
+ intervalType: string;
58
+ dailyDataType: DailyDataType;
59
+ valueFormatter: (value: number) => string;
60
+ chartType: string;
61
+ previewDataProvider: (start: Date, end: Date) => Promise<{}>;
62
+ };
63
+ render: (args: DailyDataChartProps) => React.JSX.Element;
64
+ };
@@ -0,0 +1 @@
1
+ export { default } from "./DailyDataChart";
@@ -2,6 +2,7 @@ export { default as AppDownload } from "./AppDownload";
2
2
  export { default as ConnectEhr } from "./ConnectEhr";
3
3
  export { default as ConnectFitbit } from "./ConnectFitbit";
4
4
  export { default as ConnectGarmin } from "./ConnectGarmin";
5
+ export { default as DailyDataChart } from "./DailyDataChart";
5
6
  export { default as DeviceDataMonthChart, DeviceDataChartLine } from "./DeviceDataMonthChart";
6
7
  export { default as DeviceDataMonthCharts } from "./DeviceDataMonthCharts";
7
8
  export { default as ExternalAccountList } from "./ExternalAccountList";
@@ -1,6 +1,8 @@
1
1
  import React from "react";
2
+ import { WeekStartsOn } from "../../../helpers/get-interval-start";
2
3
  export interface DateRangeCoordinatorProps {
3
4
  intervalType: "Week" | "Month";
5
+ weekStartsOn?: WeekStartsOn;
4
6
  variant?: "default" | "rounded";
5
7
  children: React.ReactNode;
6
8
  }
@@ -8,5 +10,5 @@ export interface DateRangeContext {
8
10
  intervalType: "Week" | "Month";
9
11
  intervalStart: Date;
10
12
  }
11
- export declare const DateRangeContext: React.Context<DateRangeContext>;
13
+ export declare const DateRangeContext: React.Context<DateRangeContext | null>;
12
14
  export default function DateRangeNavigatorContext(props: DateRangeCoordinatorProps): React.JSX.Element;
@@ -8,7 +8,7 @@ declare const _default: {
8
8
  };
9
9
  };
10
10
  export default _default;
11
- export declare const steps: {
11
+ export declare const month: {
12
12
  args: {
13
13
  variant: string;
14
14
  intervalType: string;
@@ -16,3 +16,21 @@ export declare const steps: {
16
16
  };
17
17
  render: (args: DateRangeCoordinatorProps) => React.JSX.Element;
18
18
  };
19
+ export declare const weekStartsSunday: {
20
+ args: {
21
+ variant: string;
22
+ intervalType: string;
23
+ weekStartsOn: string;
24
+ children: React.JSX.Element;
25
+ };
26
+ render: (args: DateRangeCoordinatorProps) => React.JSX.Element;
27
+ };
28
+ export declare const weekStarts6DaysAgo: {
29
+ args: {
30
+ variant: string;
31
+ intervalType: string;
32
+ weekStartsOn: string;
33
+ children: React.JSX.Element;
34
+ };
35
+ render: (args: DateRangeCoordinatorProps) => React.JSX.Element;
36
+ };
@@ -0,0 +1,3 @@
1
+ export declare type WeekStartsOn = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "6DaysAgo" | "7DaysAgo";
2
+ export declare function getWeekStart(weekStartsOn?: WeekStartsOn): Date;
3
+ export declare function getMonthStart(): Date;