@careevolution/mydatahelps-ui 1.3.7 → 1.4.1

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.
Files changed (31) hide show
  1. package/README.md +12 -11
  2. package/dist/cjs/index.js +10 -27
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/components/presentational/ActivityMeter/ActivityMeter.d.ts +12 -0
  5. package/dist/cjs/types/components/presentational/ActivityMeter/ActivityMeter.stories.d.ts +6 -0
  6. package/dist/cjs/types/components/presentational/ActivityMeter/index.d.ts +1 -0
  7. package/dist/cjs/types/components/presentational/OnVisibleTrigger/OnVisibleTrigger.d.ts +6 -0
  8. package/dist/cjs/types/components/presentational/OnVisibleTrigger/index.d.ts +1 -0
  9. package/dist/cjs/types/components/presentational/SparkBarChart/SparkBarChart.d.ts +11 -0
  10. package/dist/cjs/types/components/presentational/SparkBarChart/SparkBarChart.stories.d.ts +5 -0
  11. package/dist/cjs/types/components/presentational/SparkBarChart/index.d.ts +1 -0
  12. package/dist/cjs/types/components/presentational/WeekCalendar/WeekCalendar.d.ts +12 -0
  13. package/dist/cjs/types/components/presentational/WeekCalendar/WeekCalendar.stories.d.ts +7 -0
  14. package/dist/cjs/types/components/presentational/WeekCalendar/index.d.ts +1 -0
  15. package/dist/cjs/types/components/presentational/index.d.ts +3 -0
  16. package/dist/esm/index.js +10 -26
  17. package/dist/esm/index.js.map +1 -1
  18. package/dist/esm/types/components/presentational/ActivityMeter/ActivityMeter.d.ts +12 -0
  19. package/dist/esm/types/components/presentational/ActivityMeter/ActivityMeter.stories.d.ts +6 -0
  20. package/dist/esm/types/components/presentational/ActivityMeter/index.d.ts +1 -0
  21. package/dist/esm/types/components/presentational/OnVisibleTrigger/OnVisibleTrigger.d.ts +6 -0
  22. package/dist/esm/types/components/presentational/OnVisibleTrigger/index.d.ts +1 -0
  23. package/dist/esm/types/components/presentational/SparkBarChart/SparkBarChart.d.ts +11 -0
  24. package/dist/esm/types/components/presentational/SparkBarChart/SparkBarChart.stories.d.ts +5 -0
  25. package/dist/esm/types/components/presentational/SparkBarChart/index.d.ts +1 -0
  26. package/dist/esm/types/components/presentational/WeekCalendar/WeekCalendar.d.ts +12 -0
  27. package/dist/esm/types/components/presentational/WeekCalendar/WeekCalendar.stories.d.ts +7 -0
  28. package/dist/esm/types/components/presentational/WeekCalendar/index.d.ts +1 -0
  29. package/dist/esm/types/components/presentational/index.d.ts +3 -0
  30. package/dist/index.d.ts +54 -22
  31. package/package.json +2 -2
@@ -0,0 +1,12 @@
1
+ import { ReactElement } from 'react';
2
+ import "./ActivityMeter.css";
3
+ export interface ActivityMeterProps {
4
+ label: string;
5
+ value: string;
6
+ icon: ReactElement;
7
+ fillPercent: number;
8
+ averageFillPercent: number;
9
+ color: string;
10
+ message?: string;
11
+ }
12
+ export default function (props: ActivityMeterProps): JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { ComponentStory, ComponentMeta } from "@storybook/react";
2
+ import ActivityMeter from "./ActivityMeter";
3
+ declare const _default: ComponentMeta<typeof ActivityMeter>;
4
+ export default _default;
5
+ export declare const Sleep: ComponentStory<typeof ActivityMeter>;
6
+ export declare const Steps: ComponentStory<typeof ActivityMeter>;
@@ -0,0 +1 @@
1
+ export { default } from "./ActivityMeter";
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface OnVisibleTriggerProps {
3
+ onTrigger: Function;
4
+ enabled: boolean;
5
+ }
6
+ export default function (props: OnVisibleTriggerProps): JSX.Element;
@@ -0,0 +1 @@
1
+ export { default } from "./OnVisibleTrigger";
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import "./SparkBarChart.css";
3
+ export interface SparkBarChartProps {
4
+ averageFillPercent: number;
5
+ bars: SparkBarChartBar[];
6
+ }
7
+ export interface SparkBarChartBar {
8
+ color: string;
9
+ barFillPercent: number;
10
+ }
11
+ export default function (props: SparkBarChartProps): JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ComponentStory, ComponentMeta } from "@storybook/react";
2
+ import SparkBarChart from "./SparkBarChart";
3
+ declare const _default: ComponentMeta<typeof SparkBarChart>;
4
+ export default _default;
5
+ export declare const Default: ComponentStory<typeof SparkBarChart>;
@@ -0,0 +1 @@
1
+ export { default } from "./SparkBarChart";
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import "./WeekCalendar.css";
3
+ export interface WeekCalendarProps {
4
+ selectedDate?: Date;
5
+ hideDateLabel?: boolean;
6
+ startDate: Date;
7
+ onDateSelected?(date: Date): void;
8
+ loading: boolean;
9
+ onStartDateChange?(startDate: Date): void;
10
+ dayRenderer(year: number, month: number, day: number, selectedWeek: boolean): JSX.Element | null;
11
+ }
12
+ export default function (props: WeekCalendarProps): JSX.Element;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { ComponentMeta } from "@storybook/react";
3
+ import WeekCalendar from "./WeekCalendar";
4
+ declare const _default: ComponentMeta<typeof WeekCalendar>;
5
+ export default _default;
6
+ export declare function Empty(): JSX.Element;
7
+ export declare function WithNavigator(): JSX.Element;
@@ -0,0 +1 @@
1
+ export { default } from "./WeekCalendar";
@@ -1,4 +1,5 @@
1
1
  export { default as Action } from "./Action";
2
+ export { default as ActivityMeter } from "./ActivityMeter";
2
3
  export { default as Button } from "./Button";
3
4
  export { default as Calendar } from "./Calendar";
4
5
  export { default as Card } from "./Card";
@@ -16,7 +17,9 @@ export { default as ShinyOverlay } from "./ShinyOverlay";
16
17
  export { default as SingleExternalAccount } from "./SingleExternalAccount";
17
18
  export { default as SingleNotification } from "./SingleNotification";
18
19
  export { default as SingleSurveyTask } from "./SingleSurveyTask";
20
+ export { default as SparkBarChart } from "./SparkBarChart";
19
21
  export { default as Switch } from "./Switch";
20
22
  export { default as StatusBarBackground } from "./StatusBarBackground";
21
23
  export { default as TextBlock } from "./TextBlock";
22
24
  export { default as TrackerItem } from "./TrackerItem";
25
+ export { default as WeekCalendar } from "./WeekCalendar";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import React, { MouseEventHandler } from 'react';
2
+ import React, { ReactElement, MouseEventHandler } from 'react';
3
3
  import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
4
4
  import { StatusBarStyle, ExternalAccount, Notification, SurveyTask, ExternalAccountStatus, DeviceDataNamespace, NotificationType, SurveyTaskStatus } from '@careevolution/mydatahelps-js';
5
5
  import { IconDefinition as IconDefinition$1 } from '@fortawesome/fontawesome-common-types';
@@ -12,7 +12,18 @@ interface ActionProps {
12
12
  children?: React.ReactNode;
13
13
  className?: string;
14
14
  }
15
- declare function export_default$G(props: ActionProps): JSX.Element;
15
+ declare function export_default$J(props: ActionProps): JSX.Element;
16
+
17
+ interface ActivityMeterProps {
18
+ label: string;
19
+ value: string;
20
+ icon: ReactElement;
21
+ fillPercent: number;
22
+ averageFillPercent: number;
23
+ color: string;
24
+ message?: string;
25
+ }
26
+ declare function export_default$I(props: ActivityMeterProps): JSX.Element;
16
27
 
17
28
  interface ButtonProps {
18
29
  children?: React.ReactNode;
@@ -23,41 +34,41 @@ interface ButtonProps {
23
34
  disabled?: boolean;
24
35
  onClick: Function;
25
36
  }
26
- declare function export_default$F(props: ButtonProps): JSX.Element;
37
+ declare function export_default$H(props: ButtonProps): JSX.Element;
27
38
 
28
39
  interface CalendarProps {
29
40
  month: number;
30
41
  year: number;
31
42
  dayRenderer(year: number, month: number, day?: number): JSX.Element | null;
32
43
  }
33
- declare function export_default$E(props: CalendarProps): JSX.Element;
44
+ declare function export_default$G(props: CalendarProps): JSX.Element;
34
45
 
35
46
  interface CardProps {
36
47
  className?: string;
37
48
  children?: React.ReactNode;
38
49
  allowOverflow?: boolean;
39
50
  }
40
- declare function export_default$D(props: CardProps): JSX.Element | null;
51
+ declare function export_default$F(props: CardProps): JSX.Element | null;
41
52
 
42
53
  interface CardTitleProps {
43
54
  title: string;
44
55
  onDetailClick?: Function;
45
56
  detailLinkText?: string;
46
57
  }
47
- declare function export_default$C(props: CardTitleProps): JSX.Element;
58
+ declare function export_default$E(props: CardTitleProps): JSX.Element;
48
59
 
49
60
  interface DateRangeNavigatorProps {
50
61
  intervalType: "Week" | "Month";
51
62
  intervalStart: Date;
52
63
  onIntervalChange(newIntervalStart: Date, newIntervalEnd: Date): void;
53
64
  }
54
- declare function export_default$B(props: DateRangeNavigatorProps): JSX.Element;
65
+ declare function export_default$D(props: DateRangeNavigatorProps): JSX.Element;
55
66
 
56
67
  interface DayTrackerSymbolProps {
57
68
  primaryColors: string[];
58
69
  secondaryColors: string[];
59
70
  }
60
- declare function export_default$A(props: DayTrackerSymbolProps): JSX.Element;
71
+ declare function export_default$C(props: DayTrackerSymbolProps): JSX.Element;
61
72
 
62
73
  interface FaceProps {
63
74
  faceValue?: number;
@@ -65,7 +76,7 @@ interface FaceProps {
65
76
  onClick?: MouseEventHandler;
66
77
  className?: string;
67
78
  }
68
- declare function export_default$z(props: FaceProps): JSX.Element;
79
+ declare function export_default$B(props: FaceProps): JSX.Element;
69
80
 
70
81
  interface HistogramProps {
71
82
  entries: {
@@ -74,7 +85,7 @@ interface HistogramProps {
74
85
  value: number;
75
86
  }[];
76
87
  }
77
- declare function export_default$y(props: HistogramProps): JSX.Element;
88
+ declare function export_default$A(props: HistogramProps): JSX.Element;
78
89
 
79
90
  interface LayoutProps {
80
91
  children?: React.ReactNode;
@@ -82,7 +93,7 @@ interface LayoutProps {
82
93
  bodyBackgroundColor?: string;
83
94
  statusBarStyle?: StatusBarStyle;
84
95
  }
85
- declare function export_default$x(props: LayoutProps): JSX.Element;
96
+ declare function export_default$z(props: LayoutProps): JSX.Element;
86
97
 
87
98
  declare function LoadingIndicator(): JSX.Element;
88
99
 
@@ -94,12 +105,12 @@ interface NavigationBarProps {
94
105
  closeButtonText?: string;
95
106
  backButtonText?: string;
96
107
  }
97
- declare function export_default$w(props: NavigationBarProps): JSX.Element;
108
+ declare function export_default$y(props: NavigationBarProps): JSX.Element;
98
109
 
99
110
  interface SectionProps {
100
111
  children?: React.ReactNode;
101
112
  }
102
- declare function export_default$v(props: SectionProps): JSX.Element | null;
113
+ declare function export_default$x(props: SectionProps): JSX.Element | null;
103
114
 
104
115
  interface SegmentedControlProps {
105
116
  segments: {
@@ -109,21 +120,21 @@ interface SegmentedControlProps {
109
120
  selectedSegment: string;
110
121
  onSegmentSelected: Function;
111
122
  }
112
- declare function export_default$u(props: SegmentedControlProps): JSX.Element;
123
+ declare function export_default$w(props: SegmentedControlProps): JSX.Element;
113
124
 
114
- declare function export_default$t(): JSX.Element;
125
+ declare function export_default$v(): JSX.Element;
115
126
 
116
127
  interface SingleExternalAccountProps {
117
128
  externalAccount: ExternalAccount;
118
129
  onAccountRemoved: (account: ExternalAccount) => void;
119
130
  onReconnectAccount: (account: ExternalAccount) => void;
120
131
  }
121
- declare function export_default$s(props: SingleExternalAccountProps): JSX.Element;
132
+ declare function export_default$u(props: SingleExternalAccountProps): JSX.Element;
122
133
 
123
134
  interface SingleNotificationProps {
124
135
  notification: Notification;
125
136
  }
126
- declare function export_default$r(props: SingleNotificationProps): JSX.Element;
137
+ declare function export_default$t(props: SingleNotificationProps): JSX.Element;
127
138
 
128
139
  interface SingleSurveyTaskProps {
129
140
  task: SurveyTask;
@@ -131,14 +142,24 @@ interface SingleSurveyTaskProps {
131
142
  hideDueDate?: boolean;
132
143
  disableClick?: boolean;
133
144
  }
134
- declare function export_default$q(props: SingleSurveyTaskProps): JSX.Element | null;
145
+ declare function export_default$s(props: SingleSurveyTaskProps): JSX.Element | null;
146
+
147
+ interface SparkBarChartProps {
148
+ averageFillPercent: number;
149
+ bars: SparkBarChartBar[];
150
+ }
151
+ interface SparkBarChartBar {
152
+ color: string;
153
+ barFillPercent: number;
154
+ }
155
+ declare function export_default$r(props: SparkBarChartProps): JSX.Element;
135
156
 
136
157
  interface SwitchProps {
137
158
  isOn: Boolean;
138
159
  onBackgroundColor?: string;
139
160
  onValueChanged(value: boolean): void;
140
161
  }
141
- declare function export_default$p(props: SwitchProps): JSX.Element;
162
+ declare function export_default$q(props: SwitchProps): JSX.Element;
142
163
 
143
164
  interface StatusBarBackgroundProps {
144
165
  color?: string;
@@ -148,7 +169,7 @@ declare function StatusBarBackgroundProps(props: StatusBarBackgroundProps): JSX.
148
169
  interface TextBlockProps {
149
170
  children?: React.ReactNode;
150
171
  }
151
- declare function export_default$o(props: TextBlockProps): JSX.Element | null;
172
+ declare function export_default$p(props: TextBlockProps): JSX.Element | null;
152
173
 
153
174
  interface TrackerItemProps {
154
175
  selected: boolean;
@@ -158,7 +179,18 @@ interface TrackerItemProps {
158
179
  badge?: string;
159
180
  onClick?: Function;
160
181
  }
161
- declare function export_default$n(props: TrackerItemProps): JSX.Element;
182
+ declare function export_default$o(props: TrackerItemProps): JSX.Element;
183
+
184
+ interface WeekCalendarProps {
185
+ selectedDate?: Date;
186
+ hideDateLabel?: boolean;
187
+ startDate: Date;
188
+ onDateSelected?(date: Date): void;
189
+ loading: boolean;
190
+ onStartDateChange?(startDate: Date): void;
191
+ dayRenderer(year: number, month: number, day: number, selectedWeek: boolean): JSX.Element | null;
192
+ }
193
+ declare function export_default$n(props: WeekCalendarProps): JSX.Element;
162
194
 
163
195
  interface ConnectEhrProps {
164
196
  applicationUrl: ConnectEhrApplicationUrl;
@@ -356,4 +388,4 @@ declare function export_default$1(props: SurveyTasksViewProps): JSX.Element;
356
388
 
357
389
  declare function export_default(callback: Function, delay: number | null): void;
358
390
 
359
- export { export_default$G as Action, export_default$F as Button, export_default$E as Calendar, export_default$D as Card, export_default$C as CardTitle, export_default$m as ConnectEhr, export_default$7 as ConnectEhrView, export_default$l as ConnectFitbit, export_default$B as DateRangeNavigator, export_default$A as DayTrackerSymbol, export_default$k as DeviceDataMonthChart, export_default$j as DeviceDataMonthCharts, export_default$6 as DeviceDataView, export_default$i as ExternalAccountList, export_default$h as ExternalAccountsPreview, export_default$5 as ExternalAccountsView, export_default$z as Face, export_default$g as FitbitDevices, export_default$f as FitbitMonthCharts, export_default$4 as FitbitView, export_default$y as Histogram, export_default$3 as HomeView, export_default$x as Layout, LoadingIndicator, export_default$e as MostRecentNotification, export_default$w as NavigationBar, export_default$d as NotificationList, export_default$2 as NotificationsView, export_default$c as PlatformSpecificContent, export_default$b as ProjectHeader, export_default$a as ProjectSupport, export_default$9 as ProviderSearch, export_default$9 as RestingHeartRateCalendar, export_default$v as Section, export_default$u as SegmentedControl, export_default$t as ShinyOverlay, export_default$s as SingleExternalAccount, export_default$r as SingleNotification, export_default$q as SingleSurveyTask, StatusBarBackgroundProps as StatusBarBackground, export_default$8 as SurveyTaskList, export_default$1 as SurveyTasksView, export_default$p as Switch, export_default$o as TextBlock, export_default$n as TrackerItem, export_default as useInterval };
391
+ export { export_default$J as Action, export_default$I as ActivityMeter, export_default$H as Button, export_default$G as Calendar, export_default$F as Card, export_default$E as CardTitle, export_default$m as ConnectEhr, export_default$7 as ConnectEhrView, export_default$l as ConnectFitbit, export_default$D as DateRangeNavigator, export_default$C as DayTrackerSymbol, export_default$k as DeviceDataMonthChart, export_default$j as DeviceDataMonthCharts, export_default$6 as DeviceDataView, export_default$i as ExternalAccountList, export_default$h as ExternalAccountsPreview, export_default$5 as ExternalAccountsView, export_default$B as Face, export_default$g as FitbitDevices, export_default$f as FitbitMonthCharts, export_default$4 as FitbitView, export_default$A as Histogram, export_default$3 as HomeView, export_default$z as Layout, LoadingIndicator, export_default$e as MostRecentNotification, export_default$y as NavigationBar, export_default$d as NotificationList, export_default$2 as NotificationsView, export_default$c as PlatformSpecificContent, export_default$b as ProjectHeader, export_default$a as ProjectSupport, export_default$9 as ProviderSearch, export_default$9 as RestingHeartRateCalendar, export_default$x as Section, export_default$w as SegmentedControl, export_default$v as ShinyOverlay, export_default$u as SingleExternalAccount, export_default$t as SingleNotification, export_default$s as SingleSurveyTask, export_default$r as SparkBarChart, StatusBarBackgroundProps as StatusBarBackground, export_default$8 as SurveyTaskList, export_default$1 as SurveyTasksView, export_default$q as Switch, export_default$p as TextBlock, export_default$o as TrackerItem, export_default$n as WeekCalendar, export_default as useInterval };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@careevolution/mydatahelps-ui",
3
- "version": "1.3.7",
3
+ "version": "1.4.1",
4
4
  "description": "MyDataHelps UI Library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -27,7 +27,6 @@
27
27
  "@rollup/plugin-commonjs": "^21.0.2",
28
28
  "@rollup/plugin-image": "^2.1.1",
29
29
  "@rollup/plugin-node-resolve": "^13.1.3",
30
- "@rollup/plugin-typescript": "^8.3.1",
31
30
  "@storybook/addon-actions": "^6.4.19",
32
31
  "@storybook/addon-essentials": "^6.4.19",
33
32
  "@storybook/addon-interactions": "^6.4.19",
@@ -49,6 +48,7 @@
49
48
  "@fortawesome/free-regular-svg-icons": "^6.0.0",
50
49
  "@fortawesome/free-solid-svg-icons": "^6.0.0",
51
50
  "@fortawesome/react-fontawesome": "^0.1.17",
51
+ "@rollup/plugin-typescript": "^8.3.3",
52
52
  "date-fns": "^2.28.0",
53
53
  "react-feather": "^2.0.9",
54
54
  "recharts": "^2.1.9"