serene-core-client 0.1.4 → 0.1.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.
Files changed (43) hide show
  1. package/dist/src/components/account/profile.d.ts +1 -1
  2. package/dist/src/components/account/profile.js +2 -2
  3. package/dist/src/components/basics/copy-text-icon.d.ts +1 -1
  4. package/dist/src/components/basics/copy-text-icon.js +1 -1
  5. package/dist/src/components/basics/editable-string-list.d.ts +1 -1
  6. package/dist/src/components/basics/editable-string-list.js +1 -1
  7. package/dist/src/components/basics/text-area-field.d.ts +1 -1
  8. package/dist/src/components/basics/text-area-field.js +1 -1
  9. package/dist/src/components/basics/view-link-field.d.ts +1 -1
  10. package/dist/src/components/basics/view-link-field.js +1 -1
  11. package/dist/src/components/basics/view-markdown-field.d.ts +1 -1
  12. package/dist/src/components/basics/view-markdown-field.js +1 -1
  13. package/dist/src/components/basics/view-text-field.d.ts +1 -1
  14. package/dist/src/components/basics/view-text-field.js +1 -1
  15. package/dist/src/components/buttons/labeled-icon-button.d.ts +1 -1
  16. package/dist/src/components/buttons/labeled-icon-button.js +1 -1
  17. package/dist/src/components/mailing-lists/sign-up.d.ts +1 -1
  18. package/dist/src/components/mailing-lists/sign-up.js +1 -1
  19. package/dist/src/components/notifications/action.d.ts +1 -1
  20. package/dist/src/components/notifications/action.js +1 -1
  21. package/dist/src/components/tech/load-techs.d.ts +1 -1
  22. package/dist/src/components/tech/load-techs.js +1 -1
  23. package/dist/src/components/tech/tech-autocomplete.d.ts +1 -1
  24. package/dist/src/components/tech/tech-autocomplete.js +1 -1
  25. package/dist/src/components/tips/load-tips.d.ts +1 -1
  26. package/dist/src/components/tips/load-tips.js +1 -1
  27. package/dist/src/components/tips/tip.d.ts +1 -1
  28. package/dist/src/components/tips/tip.js +1 -1
  29. package/package.json +1 -1
  30. package/src/components/account/profile.tsx +51 -50
  31. package/src/components/basics/copy-text-icon.tsx +5 -5
  32. package/src/components/basics/editable-string-list.tsx +7 -7
  33. package/src/components/basics/text-area-field.tsx +10 -10
  34. package/src/components/basics/view-link-field.tsx +6 -6
  35. package/src/components/basics/view-markdown-field.tsx +5 -5
  36. package/src/components/basics/view-text-field.tsx +5 -5
  37. package/src/components/buttons/labeled-icon-button.tsx +10 -10
  38. package/src/components/mailing-lists/sign-up.tsx +4 -4
  39. package/src/components/notifications/action.tsx +5 -5
  40. package/src/components/tech/load-techs.tsx +9 -9
  41. package/src/components/tech/tech-autocomplete.tsx +10 -10
  42. package/src/components/tips/load-tips.tsx +10 -10
  43. package/src/components/tips/tip.tsx +14 -14
@@ -4,5 +4,5 @@ interface Props {
4
4
  serverUrl: string;
5
5
  session: any;
6
6
  }
7
- export default function Profile({ userProfile, clientUrl, serverUrl, session }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export declare function Profile({ userProfile, clientUrl, serverUrl, session }: Props): import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -5,13 +5,13 @@ import Button from '@mui/material/Button';
5
5
  import TextField from '@mui/material/TextField';
6
6
  import Select from '@mui/material/Select';
7
7
  import { useEffect, useState } from 'react';
8
- import ActionNotification from '../notifications/action';
8
+ import { ActionNotification } from '../notifications/action';
9
9
  import { RestApiService } from '../../services/rest-api/service';
10
10
  import { FormControl, InputLabel, Typography } from '@mui/material';
11
11
  import { countries } from '../../services/locale/countries';
12
12
  import { getUserPreferencesQuery } from '../../apollo/user-preferences';
13
13
  import { ProfileService } from '../../services/users/profile-service';
14
- export default function Profile({ userProfile, clientUrl, serverUrl, session }) {
14
+ export function Profile({ userProfile, clientUrl, serverUrl, session }) {
15
15
  // Consts
16
16
  const personalDetails = 'personal details';
17
17
  // State
@@ -3,5 +3,5 @@ interface Props {
3
3
  title?: string;
4
4
  style?: any;
5
5
  }
6
- export default function CopyTextIcon({ text, title, style }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export declare function CopyTextIcon({ text, title, style }: Props): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import ContentCopyIcon from '@mui/icons-material/ContentCopy';
3
3
  import { IconButton, Tooltip } from '@mui/material';
4
- export default function CopyTextIcon({ text, title = 'Copy', style = {} }) {
4
+ export function CopyTextIcon({ text, title = 'Copy', style = {} }) {
5
5
  const handleCopy = async () => {
6
6
  try {
7
7
  await navigator.clipboard.writeText(text);
@@ -4,4 +4,4 @@ export interface Props {
4
4
  setValues?: any;
5
5
  onChange?: any;
6
6
  }
7
- export default function EditableStringList({ label, values, setValues, onChange }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export declare function EditableStringList({ label, values, setValues, onChange }: Props): import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { useState } from 'react';
3
3
  import { TextField, List, ListItem, ListItemText, IconButton, Stack } from '@mui/material';
4
4
  import { Add, Check, Delete, Edit } from '@mui/icons-material';
5
- export default function EditableStringList({ label, values, setValues, onChange }) {
5
+ export function EditableStringList({ label, values, setValues, onChange }) {
6
6
  const [input, setInput] = useState('');
7
7
  const [editIndex, setEditIndex] = useState(null);
8
8
  const updateItems = (newItems) => {
@@ -8,5 +8,5 @@ interface Props {
8
8
  value: string;
9
9
  style?: any;
10
10
  }
11
- export default function TextAreaField({ disabled, id, label, minRows, onChange, required, value, style }: Props): import("react/jsx-runtime").JSX.Element;
11
+ export declare function TextAreaField({ disabled, id, label, minRows, onChange, required, value, style }: Props): import("react/jsx-runtime").JSX.Element;
12
12
  export {};
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { FormControl, InputLabel, TextareaAutosize } from '@mui/material';
3
- export default function TextAreaField({ disabled, id, label, minRows = 5, onChange = {}, required = false, value, style = {} }) {
3
+ export function TextAreaField({ disabled, id, label, minRows = 5, onChange = {}, required = false, value, style = {} }) {
4
4
  // Render
5
5
  return (_jsx("div", { style: style, children: _jsxs(FormControl, { fullWidth: true, children: [_jsx(InputLabel, { htmlFor: id, required: required, style: {
6
6
  position: 'absolute',
@@ -4,5 +4,5 @@ interface Props {
4
4
  value: string;
5
5
  style?: any;
6
6
  }
7
- export default function ViewLinkField({ label, href, value, style }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export declare function ViewLinkField({ label, href, value, style }: Props): import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Link, Typography } from '@mui/material';
3
- export default function ViewLinkField({ label, href, value, style = {} }) {
3
+ export function ViewLinkField({ label, href, value, style = {} }) {
4
4
  // Render
5
5
  return (_jsxs("div", { style: style, children: [_jsx(Typography, { variant: 'caption', children: label }), _jsx(Typography, { variant: 'body1', children: _jsx(Link, { href: href, children: value }) })] }));
6
6
  }
@@ -3,5 +3,5 @@ interface Props {
3
3
  value: string;
4
4
  style?: any;
5
5
  }
6
- export default function ViewMarkdownField({ label, value, style }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export declare function ViewMarkdownField({ label, value, style }: Props): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import ReactMarkdown from 'react-markdown';
3
3
  import { Typography } from '@mui/material';
4
- export default function ViewMarkdownField({ label, value, style = {} }) {
4
+ export function ViewMarkdownField({ label, value, style = {} }) {
5
5
  // Render
6
6
  return (_jsxs("div", { style: style, children: [_jsx(Typography, { variant: 'caption', children: label }), _jsx("div", { style: { marginTop: '-1em' }, children: _jsx(ReactMarkdown, { children: value }) })] }));
7
7
  }
@@ -3,5 +3,5 @@ interface Props {
3
3
  value: string;
4
4
  style?: any;
5
5
  }
6
- export default function ViewTextField({ label, value, style }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export declare function ViewTextField({ label, value, style }: Props): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Typography } from '@mui/material';
3
- export default function ViewTextField({ label, value, style = {} }) {
3
+ export function ViewTextField({ label, value, style = {} }) {
4
4
  // Render
5
5
  return (_jsxs("div", { style: style, children: [_jsx(Typography, { variant: 'caption', children: label }), _jsx(Typography, { variant: 'body1', children: value })] }));
6
6
  }
@@ -8,5 +8,5 @@ interface Props {
8
8
  backgroundColor?: string;
9
9
  style?: any;
10
10
  }
11
- export default function LabeledIconButton({ disabled, icon, label, onClick, color, textColor, backgroundColor, style }: Props): import("react/jsx-runtime").JSX.Element;
11
+ export declare function LabeledIconButton({ disabled, icon, label, onClick, color, textColor, backgroundColor, style }: Props): import("react/jsx-runtime").JSX.Element;
12
12
  export {};
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Box, Button, styled } from '@mui/material';
3
3
  import { grey } from '@mui/material/colors';
4
- export default function LabeledIconButton({ disabled, icon, label, onClick, color = grey[700], textColor = grey[500], backgroundColor = grey[100], style = {} }) {
4
+ export function LabeledIconButton({ disabled, icon, label, onClick, color = grey[700], textColor = grey[500], backgroundColor = grey[100], style = {} }) {
5
5
  // Consts
6
6
  const Icon = icon;
7
7
  const ColorButton = styled(Button)(({ theme }) => ({
@@ -1,5 +1,5 @@
1
1
  interface Props {
2
2
  mailingListName: string;
3
3
  }
4
- export default function MailingListSignUp({ mailingListName }: Props): import("react/jsx-runtime").JSX.Element;
4
+ export declare function MailingListSignUp({ mailingListName }: Props): import("react/jsx-runtime").JSX.Element;
5
5
  export {};
@@ -3,7 +3,7 @@ import { useState } from 'react';
3
3
  import { useMutation } from '@apollo/client/react';
4
4
  import { mailingListSignupMutation } from '../../apollo/mailing-lists';
5
5
  import { Alert, Button, TextField } from '@mui/material';
6
- export default function MailingListSignUp({ mailingListName }) {
6
+ export function MailingListSignUp({ mailingListName }) {
7
7
  // State
8
8
  const [alertSeverity, setAlertSeverity] = useState(undefined);
9
9
  const [message, setMessage] = useState(undefined);
@@ -4,5 +4,5 @@ interface Props {
4
4
  notificationOpened: boolean;
5
5
  setNotificationOpened: any;
6
6
  }
7
- export default function ActionNotification({ message, autoHideDuration, notificationOpened, setNotificationOpened }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export declare function ActionNotification({ message, autoHideDuration, notificationOpened, setNotificationOpened }: Props): import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -2,7 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import CloseIcon from '@mui/icons-material/Close';
3
3
  import IconButton from '@mui/material/IconButton';
4
4
  import Snackbar from '@mui/material/Snackbar';
5
- export default function ActionNotification({ message, autoHideDuration, notificationOpened, setNotificationOpened }) {
5
+ export function ActionNotification({ message, autoHideDuration, notificationOpened, setNotificationOpened }) {
6
6
  const handleNotificationClose = (event, reason) => {
7
7
  if (reason === 'clickaway') {
8
8
  return;
@@ -3,5 +3,5 @@ interface Props {
3
3
  resource: string;
4
4
  setTechs: any;
5
5
  }
6
- export default function LoadTechByFilter({ userProfileId, resource, setTechs }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export declare function LoadTechByFilter({ userProfileId, resource, setTechs }: Props): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -2,7 +2,7 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useEffect } from 'react';
3
3
  import { useQuery } from '@apollo/client/react';
4
4
  import { getTechsQuery } from '../../apollo/techs';
5
- export default function LoadTechByFilter({ userProfileId, resource, setTechs }) {
5
+ export function LoadTechByFilter({ userProfileId, resource, setTechs }) {
6
6
  // GraphQL
7
7
  const { refetch: fetchTechsQuery } = useQuery(getTechsQuery, {
8
8
  fetchPolicy: 'no-cache'
@@ -13,5 +13,5 @@ interface Props {
13
13
  values: Tech[];
14
14
  variant?: TextFieldVariants | undefined;
15
15
  }
16
- export default function TechAutocomplete({ disabled, label, onChange, setValue, style, value, values, variant }: Props): import("react/jsx-runtime").JSX.Element;
16
+ export declare function TechAutocomplete({ disabled, label, onChange, setValue, style, value, values, variant }: Props): import("react/jsx-runtime").JSX.Element;
17
17
  export {};
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import Autocomplete from '@mui/material/Autocomplete';
3
3
  import FormControl from '@mui/material/FormControl';
4
4
  import TextField from '@mui/material/TextField';
5
- export default function TechAutocomplete({ disabled = false, label, onChange = () => { }, setValue, style = {}, value, values, variant = 'standard' }) {
5
+ export function TechAutocomplete({ disabled = false, label, onChange = () => { }, setValue, style = {}, value, values, variant = 'standard' }) {
6
6
  const selectedTech = values.find((tech) => tech.id === value) || null;
7
7
  return (_jsx(FormControl, { fullWidth: true, children: _jsx(Autocomplete, { disabled: disabled, value: selectedTech, onChange: (event, newValue) => {
8
8
  // console.log(`newValue: ` + JSON.stringify(newValue))
@@ -3,5 +3,5 @@ interface Props {
3
3
  tipTags: string[];
4
4
  setTips: any;
5
5
  }
6
- export default function LoadTips({ userProfileId, tipTags, setTips }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export declare function LoadTips({ userProfileId, tipTags, setTips }: Props): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -2,7 +2,7 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useEffect } from 'react';
3
3
  import { useQuery } from '@apollo/client/react';
4
4
  import { getTipsByUserProfileIdAndTagsQuery } from '../../apollo/tips';
5
- export default function LoadTips({ userProfileId, tipTags, setTips }) {
5
+ export function LoadTips({ userProfileId, tipTags, setTips }) {
6
6
  // GraphQL
7
7
  const { refetch: fetchGetTipsByUserProfileIdAndTagsQuery } = useQuery(getTipsByUserProfileIdAndTagsQuery, {
8
8
  fetchPolicy: 'no-cache'
@@ -7,5 +7,5 @@ interface Props {
7
7
  style: any;
8
8
  userProfileId: string;
9
9
  }
10
- export default function Tip({ name, label, text, setFocusRef, setTipVisible, style, userProfileId }: Props): import("react/jsx-runtime").JSX.Element;
10
+ export declare function Tip({ name, label, text, setFocusRef, setTipVisible, style, userProfileId }: Props): import("react/jsx-runtime").JSX.Element;
11
11
  export {};
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useMutation } from '@apollo/client/react';
3
3
  import { upsertTipGotItMutation } from '../../apollo/tips';
4
4
  import { Button, Card, CardActions, CardContent, Typography } from '@mui/material';
5
- export default function Tip({ name, label, text, setFocusRef = undefined, setTipVisible, style = {}, userProfileId }) {
5
+ export function Tip({ name, label, text, setFocusRef = undefined, setTipVisible, style = {}, userProfileId }) {
6
6
  // GraphQL
7
7
  const [sendUpsertTipGotItMutation] = useMutation(upsertTipGotItMutation, {
8
8
  fetchPolicy: 'no-cache',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "serene-core-client",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "main": "./dist/src/index.js",
5
5
  "types": "./dist/src/index.d.ts",
6
6
  "exports": {
@@ -4,7 +4,7 @@ import Button from '@mui/material/Button'
4
4
  import TextField from '@mui/material/TextField'
5
5
  import Select from '@mui/material/Select'
6
6
  import { useEffect, useState } from 'react'
7
- import ActionNotification from '../notifications/action'
7
+ import { ActionNotification } from '../notifications/action'
8
8
  import { RestApiService } from '../../services/rest-api/service'
9
9
  import { FormControl, InputLabel, Typography } from '@mui/material'
10
10
  import { countries } from '../../services/locale/countries'
@@ -19,12 +19,12 @@ interface Props {
19
19
  session: any
20
20
  }
21
21
 
22
- export default function Profile({
23
- userProfile,
24
- clientUrl,
25
- serverUrl,
26
- session
27
- }: Props) {
22
+ export function Profile({
23
+ userProfile,
24
+ clientUrl,
25
+ serverUrl,
26
+ session
27
+ }: Props) {
28
28
 
29
29
  // Consts
30
30
  const personalDetails = 'personal details'
@@ -82,8 +82,8 @@ export default function Profile({
82
82
  async function setProfile() {
83
83
 
84
84
  const restApiService: RestApiService =
85
- new RestApiService(clientUrl,
86
- serverUrl)
85
+ new RestApiService(clientUrl,
86
+ serverUrl)
87
87
 
88
88
  restApiService.submit({
89
89
  relativeUrl: '/api/account/profile/update',
@@ -103,7 +103,8 @@ export default function Profile({
103
103
  setNotificationSuccessText: setNotificationSuccessText,
104
104
  setNotificationSuccessOpened: setNotificationSuccessOpened,
105
105
  setNotificationErrorText: setNotificationErrorText,
106
- setNotificationErrorOpened: setNotificationErrorOpened })
106
+ setNotificationErrorOpened: setNotificationErrorOpened
107
+ })
107
108
  }
108
109
 
109
110
  // Events
@@ -117,15 +118,15 @@ export default function Profile({
117
118
  // console.log(`fetching getUserPreferencesQuery for userProfileId: ${user.id}`)
118
119
 
119
120
  const results = await
120
- fetchGetUserPreferencesQuery({
121
- userProfileId: userProfile.id,
122
- category: personalDetails,
123
- keys: [
124
- profileService.fullName,
125
- profileService.firstName,
126
- profileService.countryCode,
127
- ]
128
- })
121
+ fetchGetUserPreferencesQuery({
122
+ userProfileId: userProfile.id,
123
+ category: personalDetails,
124
+ keys: [
125
+ profileService.fullName,
126
+ profileService.firstName,
127
+ profileService.countryCode,
128
+ ]
129
+ })
129
130
 
130
131
  // Set profile data
131
132
  const keyValues = results.data['getUserPreferences']
@@ -162,16 +163,16 @@ export default function Profile({
162
163
  return (
163
164
  <>
164
165
  {session ?
165
- <>
166
- <p>You're signed in: &nbsp;
167
- <span style={{ color: 'gray', fontWeight: '600' }}>{session.user.email}</span>
168
- <span style={{ marginLeft: '1em' }}>
169
- (<a
170
- href='#'
171
- onClick={handleSignout}
172
- className='btn-signin'>Sign out</a>)
173
- </span>
174
- </p>
166
+ <>
167
+ <p>You're signed in: &nbsp;
168
+ <span style={{ color: 'gray', fontWeight: '600' }}>{session.user.email}</span>
169
+ <span style={{ marginLeft: '1em' }}>
170
+ (<a
171
+ href='#'
172
+ onClick={handleSignout}
173
+ className='btn-signin'>Sign out</a>)
174
+ </span>
175
+ </p>
175
176
 
176
177
  {/* <p>userProfile: {JSON.stringify(userProfile)}</p> */}
177
178
 
@@ -213,7 +214,7 @@ export default function Profile({
213
214
  }
214
215
  }}
215
216
  required />
216
- <br/><br/>
217
+ <br /><br />
217
218
  <TextField
218
219
  fullWidth
219
220
  variant='outlined'
@@ -221,7 +222,7 @@ export default function Profile({
221
222
  value={firstName}
222
223
  onChange={(e) => setFirstName(e.target.value)}
223
224
  required />
224
- <br/><br/>
225
+ <br /><br />
225
226
  <FormControl fullWidth>
226
227
  <InputLabel
227
228
  htmlFor='select-country'
@@ -245,7 +246,7 @@ export default function Profile({
245
246
  ))}
246
247
  </Select>
247
248
  </FormControl>
248
- <br/><br/>
249
+ <br /><br />
249
250
 
250
251
  <Button
251
252
  type='submit'
@@ -255,25 +256,25 @@ export default function Profile({
255
256
  </Button>
256
257
  </form>
257
258
  <ActionNotification
258
- message='Updated.'
259
- autoHideDuration={5000}
260
- notificationOpened={notificationSuccessOpened}
261
- setNotificationOpened={setNotificationSuccessOpened} />
259
+ message='Updated.'
260
+ autoHideDuration={5000}
261
+ notificationOpened={notificationSuccessOpened}
262
+ setNotificationOpened={setNotificationSuccessOpened} />
262
263
  <ActionNotification
263
- message={notificationErrorText}
264
- autoHideDuration={5000}
265
- notificationOpened={notificationErrorOpened}
266
- setNotificationOpened={setNotificationErrorOpened} />
267
- </>
268
- :
269
- <>
270
- <Typography variant='body1'>
271
- You aren't signed in.
272
- </Typography>
273
-
274
- <a href='#' onClick={handleSignin} className='btn-signin'>Sign in</a>
275
- </>
264
+ message={notificationErrorText}
265
+ autoHideDuration={5000}
266
+ notificationOpened={notificationErrorOpened}
267
+ setNotificationOpened={setNotificationErrorOpened} />
268
+ </>
269
+ :
270
+ <>
271
+ <Typography variant='body1'>
272
+ You aren't signed in.
273
+ </Typography>
274
+
275
+ <a href='#' onClick={handleSignin} className='btn-signin'>Sign in</a>
276
+ </>
276
277
  }
277
- </>
278
+ </>
278
279
  )
279
280
  }
@@ -7,11 +7,11 @@ interface Props {
7
7
  style?: any
8
8
  }
9
9
 
10
- export default function CopyTextIcon({
11
- text,
12
- title = 'Copy',
13
- style = {}
14
- }: Props) {
10
+ export function CopyTextIcon({
11
+ text,
12
+ title = 'Copy',
13
+ style = {}
14
+ }: Props) {
15
15
 
16
16
  const handleCopy = async () => {
17
17
  try {
@@ -9,12 +9,12 @@ export interface Props {
9
9
  onChange?: any
10
10
  }
11
11
 
12
- export default function EditableStringList({
13
- label,
14
- values,
15
- setValues,
16
- onChange
17
- }: Props) {
12
+ export function EditableStringList({
13
+ label,
14
+ values,
15
+ setValues,
16
+ onChange
17
+ }: Props) {
18
18
 
19
19
  const [input, setInput] = useState('')
20
20
  const [editIndex, setEditIndex] = useState<number | null>(null)
@@ -67,7 +67,7 @@ export default function EditableStringList({
67
67
  <IconButton edge='end' onClick={() => handleAddOrUpdate()}>
68
68
  {editIndex !== null ?
69
69
  <Check />
70
- :
70
+ :
71
71
  <Add />
72
72
  }
73
73
  </IconButton>
@@ -11,16 +11,16 @@ interface Props {
11
11
  style?: any
12
12
  }
13
13
 
14
- export default function TextAreaField({
15
- disabled,
16
- id,
17
- label,
18
- minRows = 5,
19
- onChange = {},
20
- required = false,
21
- value,
22
- style = {}
23
- }: Props) {
14
+ export function TextAreaField({
15
+ disabled,
16
+ id,
17
+ label,
18
+ minRows = 5,
19
+ onChange = {},
20
+ required = false,
21
+ value,
22
+ style = {}
23
+ }: Props) {
24
24
 
25
25
  // Render
26
26
  return (
@@ -8,12 +8,12 @@ interface Props {
8
8
  style?: any
9
9
  }
10
10
 
11
- export default function ViewLinkField({
12
- label,
13
- href,
14
- value,
15
- style = {}
16
- }: Props) {
11
+ export function ViewLinkField({
12
+ label,
13
+ href,
14
+ value,
15
+ style = {}
16
+ }: Props) {
17
17
 
18
18
  // Render
19
19
  return (
@@ -7,11 +7,11 @@ interface Props {
7
7
  style?: any
8
8
  }
9
9
 
10
- export default function ViewMarkdownField({
11
- label,
12
- value,
13
- style = {}
14
- }: Props) {
10
+ export function ViewMarkdownField({
11
+ label,
12
+ value,
13
+ style = {}
14
+ }: Props) {
15
15
 
16
16
  // Render
17
17
  return (
@@ -7,11 +7,11 @@ interface Props {
7
7
  style?: any
8
8
  }
9
9
 
10
- export default function ViewTextField({
11
- label,
12
- value,
13
- style = {}
14
- }: Props) {
10
+ export function ViewTextField({
11
+ label,
12
+ value,
13
+ style = {}
14
+ }: Props) {
15
15
 
16
16
  // Render
17
17
  return (
@@ -12,16 +12,16 @@ interface Props {
12
12
  style?: any
13
13
  }
14
14
 
15
- export default function LabeledIconButton({
16
- disabled,
17
- icon,
18
- label,
19
- onClick,
20
- color = grey[700],
21
- textColor = grey[500],
22
- backgroundColor = grey[100],
23
- style = {}
24
- }: Props) {
15
+ export function LabeledIconButton({
16
+ disabled,
17
+ icon,
18
+ label,
19
+ onClick,
20
+ color = grey[700],
21
+ textColor = grey[500],
22
+ backgroundColor = grey[100],
23
+ style = {}
24
+ }: Props) {
25
25
 
26
26
  // Consts
27
27
  const Icon = icon
@@ -7,9 +7,9 @@ interface Props {
7
7
  mailingListName: string
8
8
  }
9
9
 
10
- export default function MailingListSignUp({
11
- mailingListName
12
- }: Props) {
10
+ export function MailingListSignUp({
11
+ mailingListName
12
+ }: Props) {
13
13
 
14
14
  // Types
15
15
  type AlertSeverity = 'error' | 'warning' | 'info' | 'success' | undefined
@@ -118,7 +118,7 @@ export default function MailingListSignUp({
118
118
  severity={alertSeverity}>
119
119
  {message}
120
120
  </Alert>
121
- :
121
+ :
122
122
  <></>
123
123
  }
124
124
  </>
@@ -9,11 +9,11 @@ interface Props {
9
9
  setNotificationOpened: any
10
10
  }
11
11
 
12
- export default function ActionNotification({
13
- message,
14
- autoHideDuration,
15
- notificationOpened,
16
- setNotificationOpened }: Props) {
12
+ export function ActionNotification({
13
+ message,
14
+ autoHideDuration,
15
+ notificationOpened,
16
+ setNotificationOpened }: Props) {
17
17
 
18
18
  const handleNotificationClose =
19
19
  (event: React.SyntheticEvent | Event, reason?: string) => {
@@ -8,11 +8,11 @@ interface Props {
8
8
  setTechs: any
9
9
  }
10
10
 
11
- export default function LoadTechByFilter({
12
- userProfileId,
13
- resource,
14
- setTechs
15
- }: Props) {
11
+ export function LoadTechByFilter({
12
+ userProfileId,
13
+ resource,
14
+ setTechs
15
+ }: Props) {
16
16
 
17
17
  // GraphQL
18
18
  const { refetch: fetchTechsQuery } =
@@ -35,10 +35,10 @@ export default function LoadTechByFilter({
35
35
 
36
36
  // Query
37
37
  const { data } = await
38
- fetchTechsQuery({
39
- userProfileId: userProfileId,
40
- resource: resource
41
- })
38
+ fetchTechsQuery({
39
+ userProfileId: userProfileId,
40
+ resource: resource
41
+ })
42
42
 
43
43
  // Set results
44
44
  const results = data.getTechs
@@ -18,16 +18,16 @@ interface Props {
18
18
  variant?: TextFieldVariants | undefined
19
19
  }
20
20
 
21
- export default function TechAutocomplete({
22
- disabled = false,
23
- label,
24
- onChange = () => {},
25
- setValue,
26
- style = {},
27
- value,
28
- values,
29
- variant = 'standard'
30
- }: Props) {
21
+ export function TechAutocomplete({
22
+ disabled = false,
23
+ label,
24
+ onChange = () => { },
25
+ setValue,
26
+ style = {},
27
+ value,
28
+ values,
29
+ variant = 'standard'
30
+ }: Props) {
31
31
 
32
32
  const selectedTech = values.find((tech) => tech.id === value) || null
33
33
 
@@ -9,11 +9,11 @@ interface Props {
9
9
  setTips: any
10
10
  }
11
11
 
12
- export default function LoadTips({
13
- userProfileId,
14
- tipTags,
15
- setTips
16
- }: Props) {
12
+ export function LoadTips({
13
+ userProfileId,
14
+ tipTags,
15
+ setTips
16
+ }: Props) {
17
17
 
18
18
  // GraphQL
19
19
  const { refetch: fetchGetTipsByUserProfileIdAndTagsQuery } =
@@ -36,11 +36,11 @@ export default function LoadTips({
36
36
  // Get tips data
37
37
  const { data } = await
38
38
  fetchGetTipsByUserProfileIdAndTagsQuery({
39
- variables: {
40
- userProfileId: userProfileId,
41
- tags: tipTags
42
- }
43
- })
39
+ variables: {
40
+ userProfileId: userProfileId,
41
+ tags: tipTags
42
+ }
43
+ })
44
44
 
45
45
  // Set profile data
46
46
  const results = data.getTipsByUserProfileIdAndTags
@@ -13,15 +13,15 @@ interface Props {
13
13
  userProfileId: string
14
14
  }
15
15
 
16
- export default function Tip({
17
- name,
18
- label,
19
- text,
20
- setFocusRef = undefined,
21
- setTipVisible,
22
- style = {},
23
- userProfileId
24
- }: Props) {
16
+ export function Tip({
17
+ name,
18
+ label,
19
+ text,
20
+ setFocusRef = undefined,
21
+ setTipVisible,
22
+ style = {},
23
+ userProfileId
24
+ }: Props) {
25
25
 
26
26
  // GraphQL
27
27
  const [sendUpsertTipGotItMutation] =
@@ -44,11 +44,11 @@ export default function Tip({
44
44
  // Get tips data
45
45
  const { data } = await
46
46
  sendUpsertTipGotItMutation({
47
- variables: {
48
- name: name,
49
- userProfileId: userProfileId
50
- }
51
- })
47
+ variables: {
48
+ name: name,
49
+ userProfileId: userProfileId
50
+ }
51
+ })
52
52
 
53
53
  // Set profile data
54
54
  const results = data.upsertTipGotIt