@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.
- package/components/accounts/AccountMenu.js +1 -1
- package/components/accounts/AccountProfile.js +1 -1
- package/components/charts/TrendChart.d.ts +27 -6
- package/components/charts/TrendChart.js +580 -170
- package/components/groups/GroupUpdate.d.ts +4 -8
- package/components/groups/GroupUpdate.js +1 -31
- package/components/groups/GroupsDevices.d.ts +13 -10
- package/components/groups/GroupsDevices.js +88 -75
- package/components/groups/Map.d.ts +3 -8
- package/components/settings/DynamicMenu.d.ts +1 -0
- package/components/settings/DynamicMenu.js +2 -1
- package/components/users/UsersDataGrid.d.ts +5 -2
- package/components/users/UsersDataGrid.js +49 -32
- package/package.json +6 -3
- package/server-actions/annotations.d.ts +4 -0
- package/server-actions/annotations.js +12 -0
- package/server-actions/groups.d.ts +12 -16
- package/server-actions/groups.js +71 -72
- package/server-actions/index.d.ts +1 -0
- package/server-actions/index.js +1 -0
- package/server-actions/influx.d.ts +17 -13
- package/server-actions/influx.js +207 -98
- package/server-actions/trackle.d.ts +10 -4
- package/server-actions/trackle.js +29 -24
- package/server-actions/types.d.ts +16 -0
- package/server-actions/types.js +6 -0
- package/types/device.d.ts +19 -0
- package/types/device.js +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.js +1 -0
- package/types/user.d.ts +1 -0
|
@@ -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
|
|
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, {
|
|
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: ({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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,
|
|
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
|
-
|
|
35
|
+
initialTimeStart?: number;
|
|
36
|
+
initialTimeEnd?: number;
|
|
37
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
17
38
|
export default TrendChart;
|