@iotready/nextjs-components-library 1.0.0-preview3 → 1.0.0-preview30

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.
@@ -33,5 +33,5 @@ export default function UserMenuAccount({ userInfo, handleClick, handleSignOut,
33
33
  }
34
34
  },
35
35
  }
36
- }, children: [_jsxs(ListItem, { sx: { display: 'flex', alignItems: 'center' }, children: [_jsx(ListItemIcon, { sx: { minWidth: 46 }, children: _jsx(Avatar, {}) }), _jsxs(Box, { children: [_jsx(Typography, { variant: "subtitle2", children: userInfo.name?.replace('/', ' ') }), _jsx(Typography, { variant: "subtitle2", sx: { fontWeight: 'normal' }, children: userInfo.email })] })] }), _jsxs(MenuItem, { onClick: () => { router.push(accountRoute); handleClick(); handleClose(); }, sx: { py: 1 }, children: [_jsx(ListItemIcon, { sx: { mr: 1 }, children: _jsx(Person, { fontSize: "small" }) }), " Manage account"] }), _jsxs(MenuItem, { onClick: async () => await handleSignOut(), sx: { py: 1 }, children: [_jsx(ListItemIcon, { sx: { mr: 1 }, children: _jsx(Logout, { fontSize: "small" }) }), " Sign Out"] })] }), _jsx(Tooltip, { title: "Open menu", children: _jsx(IconButton, { onClick: handleAccountClick, children: _jsx(Avatar, { sx: { bgcolor: 'secondary.main', color: 'secondary.contrastText' }, alt: userInfo.name || userInfo.email, src: userInfo.picture, children: userInfo.picture ? '' : userInfo.name?.charAt(0).toUpperCase() || userInfo.email?.charAt(0).toUpperCase() }) }) })] }) }));
36
+ }, children: [_jsxs(ListItem, { sx: { display: 'flex', alignItems: 'center' }, children: [_jsx(ListItemIcon, { sx: { minWidth: 46 }, children: _jsx(Avatar, {}) }), _jsxs(Box, { children: [_jsx(Typography, { variant: "subtitle2", children: userInfo.name?.replace('/', ' ') }), _jsx(Typography, { variant: "subtitle2", sx: { fontWeight: 'normal' }, children: userInfo.email })] })] }), _jsxs(MenuItem, { onClick: () => { router.push(accountRoute); handleClick(); handleClose(); }, sx: { py: 1 }, children: [_jsx(ListItemIcon, { sx: { mr: 1 }, children: _jsx(Person, { fontSize: "small" }) }), " Manage account"] }), _jsxs(MenuItem, { onClick: async () => await handleSignOut(), sx: { py: 1 }, children: [_jsx(ListItemIcon, { sx: { mr: 1 }, children: _jsx(Logout, { fontSize: "small" }) }), " Sign Out"] })] }), _jsx(Tooltip, { title: "Open menu", children: _jsx(IconButton, { onClick: handleAccountClick, children: _jsx(Avatar, { sx: { bgcolor: 'secondary.main', color: 'secondary.contrastText' }, alt: userInfo.name !== " " ? userInfo.name : userInfo.email, src: userInfo.picture, children: userInfo.picture ? '' : userInfo.name !== " " ? userInfo.name?.charAt(0).toUpperCase() : userInfo.email?.charAt(0).toUpperCase() }) }) })] }) }));
37
37
  }
@@ -74,7 +74,7 @@ const AccountProfile = ({ userAccount, handleSignOut, handleUpdateUser, handleUp
74
74
  setLoadingUpdateButton(true);
75
75
  if (userInfo) {
76
76
  try {
77
- await handleUpdateUser(userInfo.id, { name: userInfo.name, firstname: userInfo.firstname, lastname: userInfo.lastname });
77
+ await handleUpdateUser(userInfo.id, { firstname: userInfo.firstname, lastname: userInfo.lastname });
78
78
  if (afterUpdateCallback) {
79
79
  afterUpdateCallback(userInfo);
80
80
  }
@@ -1,17 +1,38 @@
1
1
  import 'chartjs-adapter-moment';
2
2
  import 'moment/locale/it';
3
3
  import { Theme } from "@emotion/react";
4
+ import { FilterTagMode, InfluxFillType } from '../../server-actions/types';
4
5
  type Measure = {
5
6
  name: string;
7
+ description: string;
6
8
  polltime: number;
9
+ dwPolltime?: number;
7
10
  unit: string;
11
+ stepped: boolean;
8
12
  };
9
- declare const TrendChart: ({ deviceId, measures, enableExportData, enableDatePicker, handleGetInfluxData, handleGetFirstTimestamp, theme, ...props }: {
10
- deviceId: string;
11
- measures: Array<Measure>;
12
- enableenableExportData: boolean;
13
+ declare const TrendChart: ({ filter, measures1, annotationsDataFn, measures2, enableDatePicker, handleGetInfluxData, handleGetDwSlotsCB, handleExportDataCB, theme, initialTimeStart, initialTimeEnd }: {
14
+ filter: {
15
+ field: string;
16
+ value: string;
17
+ };
18
+ annotationsDataFn?: () => Promise<any>;
19
+ measures1?: Array<Measure>;
20
+ measures2?: Array<Measure>;
13
21
  enableDatePicker: boolean;
14
- handleGetInfluxData: (measure: string, timeStart: number, timeEnd: number, deviceId: string, timeGroup: string, raw: boolean) => Promise<any>;
22
+ handleGetInfluxData: (measure: string, timeStart: number, timeEnd: number, filter: {
23
+ field: string;
24
+ value: string;
25
+ }, timeGroup: string, raw: boolean, fill?: InfluxFillType, filterTag?: number, includeTag?: FilterTagMode) => Promise<any>;
26
+ handleGetDwSlotsCB?: (timeStart: number, timeEnd: number, filter: {
27
+ field: string;
28
+ value: string;
29
+ }) => Promise<any>;
30
+ handleExportDataCB?: (measure: string, timeStart: number, timeEnd: number, filter: {
31
+ field: string;
32
+ value: string;
33
+ }) => Promise<any>;
15
34
  theme: Theme;
16
- } & any) => import("react/jsx-runtime").JSX.Element;
35
+ initialTimeStart?: number;
36
+ initialTimeEnd?: number;
37
+ }) => import("react/jsx-runtime").JSX.Element;
17
38
  export default TrendChart;