@ebubekirylmaz/link-test 1.2.44 → 1.2.46

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 (121) hide show
  1. package/package.json +13 -6
  2. package/src/Platform.jsx +14 -15
  3. package/src/assets/illustrations/avatar-shape.jsx +6 -7
  4. package/src/assets/illustrations/booking-illustration.jsx +4 -14
  5. package/src/assets/illustrations/check-in-illustration.jsx +4 -10
  6. package/src/assets/illustrations/check-out-illustration.jsx +4 -3
  7. package/src/assets/illustrations/coming-soon-illustration.jsx +4 -17
  8. package/src/assets/illustrations/forbidden-illustration.jsx +4 -12
  9. package/src/assets/illustrations/maintenance-illustration.jsx +4 -24
  10. package/src/assets/illustrations/motivation-illustration.jsx +4 -9
  11. package/src/assets/illustrations/order-complete-illustration.jsx +4 -12
  12. package/src/assets/illustrations/page-not-found-illustration.jsx +4 -9
  13. package/src/assets/illustrations/seo-illustration.jsx +4 -16
  14. package/src/assets/illustrations/sever-error-illustration.jsx +4 -21
  15. package/src/assets/illustrations/upgrade-storage-illustration.jsx +4 -20
  16. package/src/assets/illustrations/upload-illustration.jsx +4 -81
  17. package/src/components/NucleoidLoginForm/NucleoidLoginForm.jsx +1 -0
  18. package/src/components/TopNavBar/TopNavBar.jsx +6 -2
  19. package/src/components/file-thumbnail/file-thumbnail.jsx +5 -6
  20. package/src/components/nav-section/horizontal/nav-section-horizontal.jsx +5 -6
  21. package/src/components/settings/drawer/layout-options.jsx +5 -4
  22. package/src/components/settings/drawer/presets-options.jsx +6 -5
  23. package/src/components/settings/drawer/settings-drawer.jsx +7 -4
  24. package/src/components/settings/drawer/stretch-options.jsx +5 -5
  25. package/src/config/schemas.js +1 -0
  26. package/src/context/Context.js +98 -0
  27. package/src/context/reducer.js +590 -10
  28. package/src/hooks/index.js +2 -1
  29. package/src/hooks/use-beta.js +8 -0
  30. package/src/layouts/DashboardLayout/header.jsx +5 -4
  31. package/src/layouts/DashboardLayout/nav-mini.jsx +5 -7
  32. package/src/layouts/DashboardLayout/nav-vertical.jsx +11 -11
  33. package/src/layouts/FullScreenLayout/FullScreenLayout.jsx +5 -1
  34. package/src/layouts/FullScreenLayout/nav-vertical.jsx +11 -11
  35. package/src/layouts/MainLayout/footer.jsx +7 -7
  36. package/src/layouts/MainLayout/header.jsx +3 -2
  37. package/src/layouts/MainLayout/nav/desktop/nav-list.jsx +8 -8
  38. package/src/layouts/MainLayout/nav/mobile/index.jsx +7 -6
  39. package/src/layouts/auth/classic.jsx +6 -6
  40. package/src/layouts/auth/modern.jsx +7 -6
  41. package/src/layouts/common/ProjectBar/index.jsx +13 -11
  42. package/src/layouts/common/account-popover.jsx +1 -2
  43. package/src/layouts/common/header-sim.jsx +3 -2
  44. package/src/layouts/common/header-simple.jsx +6 -3
  45. package/src/layouts/common/notifications-popover/index.jsx +18 -13
  46. package/src/layouts/common/notifications-popover/notification-item.jsx +28 -16
  47. package/src/lib/APIDialogAction/APIDialogAction.jsx +109 -0
  48. package/src/lib/APIDialogAction/index.js +1 -0
  49. package/src/lib/APIDialogAction/styles.js +6 -0
  50. package/src/lib/APIParams/APIParams.jsx +57 -0
  51. package/src/lib/APIParams/index.js +1 -0
  52. package/src/lib/APIPath/APIPath.jsx +82 -0
  53. package/src/lib/APIPath/index.js +1 -0
  54. package/src/lib/APIPath/styles.js +19 -0
  55. package/src/lib/APITree/APITree.jsx +411 -0
  56. package/src/lib/APITree/Arrow.jsx +21 -0
  57. package/src/lib/APITree/DeleteMethodDialog.jsx +41 -0
  58. package/src/lib/APITree/index.js +1 -0
  59. package/src/lib/APITree/styles.js +19 -0
  60. package/src/lib/APITypes/APITypes.jsx +141 -0
  61. package/src/lib/APITypes/TypeEditor.jsx +46 -0
  62. package/src/lib/APITypes/TypeList.jsx +180 -0
  63. package/src/lib/APITypes/index.js +1 -0
  64. package/src/lib/AddItemWizard/AddItemWizard.jsx +21 -10
  65. package/src/lib/BlankTreeMessage/BlankTreeMessage.jsx +39 -0
  66. package/src/lib/BlankTreeMessage/index.js +1 -0
  67. package/src/lib/CustomBreadcrumbs/CustomBreadcrumbs.jsx +3 -2
  68. package/src/lib/DialogTootip/DialogTooltip.jsx +67 -0
  69. package/src/lib/DialogTootip/index.js +1 -0
  70. package/src/lib/DialogTootip/styles.js +9 -0
  71. package/src/lib/Flow/connectors/DynamicConnector.jsx +179 -107
  72. package/src/lib/Flow/core/Flow.jsx +2 -0
  73. package/src/lib/Flow/core/FlowNode.jsx +2 -0
  74. package/src/lib/Flow/core/FlowViewport.jsx +41 -9
  75. package/src/lib/Flow/hooks/useNodeStyle.js +14 -0
  76. package/src/lib/Flow/layouts/CardLayout.jsx +4 -3
  77. package/src/lib/Flow/nodes/DefaultCard.jsx +6 -8
  78. package/src/lib/Flow/nodes/FlowNodeView.jsx +105 -21
  79. package/src/lib/Flow/styles.js +4 -0
  80. package/src/lib/IconSelector/IconSelector.jsx +5 -1
  81. package/src/lib/ItemSummary/ItemSummary.jsx +11 -6
  82. package/src/lib/ItemSummary/ItemsSummary.jsx +38 -26
  83. package/src/lib/NewApiBody/NewAPIBody.jsx +97 -0
  84. package/src/lib/NewApiBody/ParamView.jsx +38 -0
  85. package/src/lib/NucDialog/NucDialog.jsx +108 -0
  86. package/src/lib/NucDialog/index.js +1 -0
  87. package/src/lib/ParamTable/ParamTable.jsx +133 -0
  88. package/src/lib/ParamTable/TypeMenu.jsx +102 -0
  89. package/src/lib/ParamTable/defaults.js +47 -0
  90. package/src/lib/ParamTable/index.js +1 -0
  91. package/src/lib/ParamTable/styles.js +12 -0
  92. package/src/lib/ResourceMenu/AlertMassage.jsx +28 -0
  93. package/src/lib/ResourceMenu/DeleteResourceDialog.jsx +60 -0
  94. package/src/lib/ResourceMenu/ResourceMenu.jsx +158 -0
  95. package/src/lib/ResourceMenu/index.js +1 -0
  96. package/src/lib/ResourceMenu/styles.js +5 -0
  97. package/src/lib/Schema/Schema.jsx +204 -0
  98. package/src/lib/Schema/index.js +1 -0
  99. package/src/lib/SchemaEditor/SchemaEditor.jsx +258 -0
  100. package/src/lib/SchemaEditor/SchemaEditor.test.js +193 -0
  101. package/src/lib/SchemaEditor/SchemaPropertyEditor.jsx +135 -0
  102. package/src/lib/SchemaEditor/SchemaUtils.js +152 -0
  103. package/src/lib/SchemaEditor/index.js +1 -0
  104. package/src/lib/SparkleInput/SparkleInput.jsx +31 -28
  105. package/src/lib/TableSelectedAction/TableSelectedAction.jsx +7 -8
  106. package/src/lib/ToggleableMenu/ToggleableMenu.jsx +35 -0
  107. package/src/lib/ToggleableMenu/index.js +1 -0
  108. package/src/lib/index.js +14 -0
  109. package/src/pages/Callback.jsx +6 -8
  110. package/src/pages/ConfigError.jsx +3 -1
  111. package/src/pages/LoginPage.jsx +3 -12
  112. package/src/stories/APITree.stories.jsx +429 -0
  113. package/src/stories/FlowChart.stories.jsx +1 -1
  114. package/src/templates/ActionTemplate.js +24 -0
  115. package/src/theme/overrides/default-props.jsx +17 -11
  116. package/src/widgets/Login/CognitoLogin.jsx +165 -173
  117. package/src/widgets/Login/DemoLogin.jsx +43 -38
  118. package/src/widgets/Login/amplifyAuth.js +6 -6
  119. package/src/widgets/Login/amplifyConfig.js +3 -0
  120. package/src/widgets/LoginForm/LoginForm.jsx +8 -3
  121. package/src/widgets/SettingsDialog.jsx +206 -16
@@ -0,0 +1,141 @@
1
+ import Schema from "../Schema/Schema";
2
+ import SchemaEditor from "../SchemaEditor";
3
+ import TypeList from "./TypeList";
4
+ import { publish } from "@nucleoidai/react-event";
5
+
6
+ import { Box, Divider, Paper } from "@mui/material";
7
+ import React, { useState } from "react";
8
+
9
+ const APITypes = ({ tstypes, nuctypes, typesRef }) => {
10
+ const combinedData = [
11
+ ...tstypes.map((item) => ({ ...item, isTypeScript: true })),
12
+ ...nuctypes.map((item) => ({ ...item, isTypeScript: false })),
13
+ ];
14
+ const [selectedType, setSelectedType] = useState(
15
+ combinedData.length > 0 ? combinedData[0].name : null
16
+ );
17
+ const preloaded = {};
18
+ combinedData.forEach((item) => {
19
+ preloaded[item.name] = true;
20
+ });
21
+
22
+ const isTypeScriptType = (typeName) => {
23
+ return tstypes.some((type) => type.name === typeName);
24
+ };
25
+
26
+ const handleAddType = (typeName) => {
27
+ publish("API_TYPE_ADD", { typeName });
28
+ };
29
+
30
+ const handleDeleteType = (typeName) => {
31
+ publish("API_TYPE_DELETE", { typeName });
32
+ };
33
+
34
+ const handleUpdateType = (oldTypeName, newTypeName) => {
35
+ publish("API_TYPE_RENAME", { oldTypeName, newTypeName });
36
+ };
37
+
38
+ const renderRightPanel = () => {
39
+ if (!selectedType) return null;
40
+
41
+ const useSchemaEditor = !isTypeScriptType(selectedType);
42
+ const initialData = findSchemaByName(selectedType);
43
+
44
+ return (
45
+ <Box sx={{ width: "100%", height: "100%" }} data-cy="type-schema-editor">
46
+ {useSchemaEditor ? (
47
+ <SchemaEditor
48
+ key={selectedType}
49
+ ref={typesRef}
50
+ initialData={initialData}
51
+ />
52
+ ) : (
53
+ <Schema initialData={initialData} />
54
+ )}
55
+ </Box>
56
+ );
57
+ };
58
+
59
+ const handleTypeSelect = (name) => {
60
+ setSelectedType(name);
61
+ };
62
+
63
+ return (
64
+ <Box
65
+ sx={{
66
+ display: "flex",
67
+ flexDirection: "row",
68
+ height: "85%",
69
+ p: 2,
70
+ }}
71
+ data-cy="api-types"
72
+ >
73
+ <Box
74
+ sx={{
75
+ flex: 1,
76
+ display: "flex",
77
+ flexDirection: "column",
78
+ }}
79
+ >
80
+ <Paper
81
+ elevation={3}
82
+ sx={{
83
+ width: "100%",
84
+ p: 2,
85
+ bgcolor: "background.paper",
86
+ borderRadius: 2,
87
+ height: "100%",
88
+ boxSizing: "border-box",
89
+ display: "flex",
90
+ flexDirection: "column",
91
+ justifyContent: "space-between",
92
+ alignItems: "center",
93
+ }}
94
+ >
95
+ <TypeList
96
+ combinedData={combinedData}
97
+ selectedType={selectedType}
98
+ onTypeSelect={handleTypeSelect}
99
+ onAddType={handleAddType}
100
+ onUpdateType={handleUpdateType}
101
+ onDeleteType={handleDeleteType}
102
+ />
103
+ </Paper>
104
+ </Box>
105
+ <Divider orientation="vertical" flexItem sx={{ width: "1rem" }} />
106
+
107
+ <Box
108
+ sx={{
109
+ flex: 1,
110
+ display: "flex",
111
+ flexDirection: "column",
112
+ }}
113
+ >
114
+ <Paper
115
+ elevation={3}
116
+ sx={{
117
+ width: "100%",
118
+ p: 2,
119
+ bgcolor: "background.paper",
120
+ borderRadius: 2,
121
+ height: "100%",
122
+ boxSizing: "border-box",
123
+ display: "flex",
124
+ flexDirection: "column",
125
+ justifyContent: "center",
126
+ alignItems: "center",
127
+ }}
128
+ >
129
+ {renderRightPanel()}
130
+ </Paper>
131
+ </Box>
132
+ </Box>
133
+ );
134
+
135
+ function findSchemaByName(name) {
136
+ const schema = combinedData.find((schema) => schema.name === name);
137
+ return schema ? schema.schema : null;
138
+ }
139
+ };
140
+
141
+ export default APITypes;
@@ -0,0 +1,46 @@
1
+ import { Box, IconButton, TextField } from "@mui/material";
2
+ import { Check, Close } from "@mui/icons-material";
3
+ import React, { useState } from "react";
4
+
5
+ const TypeEditor = ({ initialValue = "", onConfirm, onCancel }) => {
6
+ const [typeName, setTypeName] = useState(initialValue);
7
+
8
+ const handleConfirm = () => {
9
+ onConfirm(typeName);
10
+ setTypeName("");
11
+ };
12
+
13
+ return (
14
+ <Box
15
+ sx={{
16
+ display: "flex",
17
+ alignItems: "center",
18
+ justifyContent: "space-between",
19
+ width: "100%",
20
+ }}
21
+ >
22
+ <TextField
23
+ value={typeName}
24
+ onChange={(e) => setTypeName(e.target.value)}
25
+ variant="outlined"
26
+ size="small"
27
+ sx={{ width: "60%", marginRight: 1 }}
28
+ data-cy="type-name-input"
29
+ />
30
+ <Box>
31
+ <IconButton
32
+ onClick={handleConfirm}
33
+ size="small"
34
+ data-cy="confirm-type-button"
35
+ >
36
+ <Check />
37
+ </IconButton>
38
+ <IconButton onClick={onCancel} size="small">
39
+ <Close />
40
+ </IconButton>
41
+ </Box>
42
+ </Box>
43
+ );
44
+ };
45
+
46
+ export default TypeEditor;
@@ -0,0 +1,180 @@
1
+ import ToggleableMenu from "../ToggleableMenu";
2
+ import TypeEditor from "./TypeEditor";
3
+
4
+ import { Add, Delete, Edit, MoreVert } from "@mui/icons-material";
5
+ import { Box, Fab, IconButton, Typography } from "@mui/material";
6
+ import React, { useState } from "react";
7
+
8
+ const TypeList = ({
9
+ combinedData,
10
+ selectedType,
11
+ onTypeSelect,
12
+ onAddType,
13
+ onUpdateType,
14
+ onDeleteType,
15
+ }) => {
16
+ const [isAddingType, setIsAddingType] = useState(false);
17
+ const [editingType, setEditingType] = useState(null);
18
+
19
+ const handleAddTypeClick = () => {
20
+ setIsAddingType(true);
21
+ };
22
+
23
+ const handleAddTypeConfirm = (typeName) => {
24
+ onAddType(typeName);
25
+ setIsAddingType(false);
26
+ onTypeSelect(typeName);
27
+ };
28
+
29
+ const handleEditType = (item) => {
30
+ setEditingType(item);
31
+ };
32
+
33
+ const handleDeleteType = (typeName) => {
34
+ const deletedIndex = combinedData.findIndex(
35
+ (type) => type.name === typeName
36
+ );
37
+
38
+ onDeleteType(typeName);
39
+
40
+ if (deletedIndex === -1) {
41
+ onTypeSelect(null);
42
+ } else if (deletedIndex > 0) {
43
+ setTimeout(() => {
44
+ onTypeSelect(combinedData[deletedIndex - 1].name);
45
+ }, 0);
46
+ } else if (deletedIndex < combinedData.length - 1) {
47
+ setTimeout(() => {
48
+ onTypeSelect(combinedData[deletedIndex + 1].name);
49
+ }, 0);
50
+ } else {
51
+ onTypeSelect(null);
52
+ }
53
+
54
+ setEditingType(null);
55
+ };
56
+
57
+ const handleUpdateType = (updatedTypeName) => {
58
+ onTypeSelect(null);
59
+ onUpdateType(editingType, updatedTypeName);
60
+ setEditingType(null);
61
+ setTimeout(() => {
62
+ onTypeSelect(updatedTypeName);
63
+ }, 0);
64
+ };
65
+
66
+ return (
67
+ <Box
68
+ sx={{
69
+ width: "100%",
70
+ overflowY: "auto",
71
+ position: "relative",
72
+ height: "100%",
73
+ }}
74
+ data-cy="type-list"
75
+ >
76
+ {combinedData.map((item) => (
77
+ <Box
78
+ key={item.name}
79
+ onClick={() => {
80
+ onTypeSelect(item.name);
81
+ }}
82
+ sx={{
83
+ padding: "6px 16px",
84
+ height: "40px",
85
+ width: "100%",
86
+ borderRadius: 2,
87
+ display: "flex",
88
+ alignItems: "center",
89
+ justifyContent: "space-between",
90
+ cursor: "pointer",
91
+ bgcolor: (theme) =>
92
+ selectedType === item.name
93
+ ? theme.palette.action.selected
94
+ : theme.palette.background.paper,
95
+ "&:hover": {
96
+ bgcolor: (theme) => theme.palette.action.hover,
97
+ },
98
+ }}
99
+ data-cy={`type-list-item-${item.name}`}
100
+ >
101
+ {editingType === item.name ? (
102
+ <TypeEditor
103
+ initialValue={item.name}
104
+ onConfirm={handleUpdateType}
105
+ onCancel={() => setEditingType(null)}
106
+ data-cy="type-editor"
107
+ />
108
+ ) : (
109
+ <>
110
+ <Typography variant="body1" style={{ textAlign: "left" }}>
111
+ {item.name}
112
+ </Typography>
113
+ <Box
114
+ sx={{ display: "flex", alignItems: "center" }}
115
+ data-cy={`type-item-actions-${item.name}`}
116
+ >
117
+ {item.isTypeScript && (
118
+ <span
119
+ style={{
120
+ marginRight: "4px",
121
+ color: "#808080",
122
+ fontWeight: "bold",
123
+ }}
124
+ data-cy={`typescript-item-${item.name}`}
125
+ >
126
+ TS
127
+ </span>
128
+ )}
129
+ {!item.isTypeScript && (
130
+ <ToggleableMenu defaultIcon={<MoreVert />}>
131
+ <IconButton
132
+ size="small"
133
+ onClick={() => handleEditType(item.name)}
134
+ data-cy={`edit-type-button-${item.name}`}
135
+ >
136
+ <Edit />
137
+ </IconButton>
138
+ <IconButton
139
+ size="small"
140
+ onClick={() => handleDeleteType(item.name)}
141
+ data-cy={`delete-type-button-${item.name}`}
142
+ >
143
+ <Delete />
144
+ </IconButton>
145
+ </ToggleableMenu>
146
+ )}
147
+ </Box>
148
+ </>
149
+ )}
150
+ </Box>
151
+ ))}
152
+ {isAddingType && (
153
+ <TypeEditor
154
+ onConfirm={handleAddTypeConfirm}
155
+ onCancel={() => setIsAddingType(false)}
156
+ data-cy="add-type-editor"
157
+ />
158
+ )}
159
+ <Box
160
+ sx={{
161
+ position: "absolute",
162
+ bottom: 16,
163
+ left: "50%",
164
+ transform: "translateX(-50%)",
165
+ }}
166
+ >
167
+ <Fab
168
+ color="primary"
169
+ onClick={handleAddTypeClick}
170
+ size="small"
171
+ data-cy="add-type-button"
172
+ >
173
+ <Add />
174
+ </Fab>
175
+ </Box>
176
+ </Box>
177
+ );
178
+ };
179
+
180
+ export default TypeList;
@@ -0,0 +1 @@
1
+ export { default } from "./APITypes";
@@ -73,10 +73,11 @@ function AddItemWizard({ onSubmit, items, steps, stepExp }) {
73
73
  <Stack
74
74
  container
75
75
  direction="column"
76
- alignItems="center"
77
- justifyContent="center"
78
76
  spacing={2}
79
- >
77
+ sx={{
78
+ alignItems: "center",
79
+ justifyContent: "center"
80
+ }}>
80
81
  <SparkleInput
81
82
  prop="name"
82
83
  value={newItems[0].details.name}
@@ -94,7 +95,9 @@ function AddItemWizard({ onSubmit, items, steps, stepExp }) {
94
95
  <Typography variant="subtitle1" color={"gray"} sx={{ mb: -2 }}>
95
96
  Service Type
96
97
  </Typography>
97
- <Stack direction="row" alignItems="center">
98
+ <Stack direction="row" sx={{
99
+ alignItems: "center"
100
+ }}>
98
101
  <Typography>Single</Typography>
99
102
  <Switch
100
103
  data-cy="type-switch"
@@ -109,8 +112,14 @@ function AddItemWizard({ onSubmit, items, steps, stepExp }) {
109
112
 
110
113
  const Service = () => {
111
114
  return (
112
- <Grid container justifyContent="center" mt={1} spacing={2}>
113
- <Grid item xs={5}>
115
+ <Grid
116
+ container
117
+ spacing={2}
118
+ sx={{
119
+ justifyContent: "center",
120
+ mt: 1
121
+ }}>
122
+ <Grid size={5}>
114
123
  <Stack
115
124
  sx={{
116
125
  borderStyle: "none dotted none none",
@@ -128,9 +137,11 @@ function AddItemWizard({ onSubmit, items, steps, stepExp }) {
128
137
  <Typography
129
138
  variant="subtitle1"
130
139
  color={"gray"}
131
- textAlign={"center"}
132
- sx={{ marginTop: 2, marginBottom: 1 }}
133
- >
140
+ sx={{
141
+ textAlign: "center",
142
+ marginTop: 2,
143
+ marginBottom: 1
144
+ }}>
134
145
  Select an Icon
135
146
  </Typography>
136
147
  <SelectAvatar
@@ -142,7 +153,7 @@ function AddItemWizard({ onSubmit, items, steps, stepExp }) {
142
153
  />
143
154
  </Stack>
144
155
  </Grid>
145
- <Grid item xs={7}>
156
+ <Grid size={7}>
146
157
  <SparkleInput
147
158
  prop="description"
148
159
  value={newItems[1].details.description}
@@ -0,0 +1,39 @@
1
+ import { AutoAwesome } from "@mui/icons-material";
2
+ import { Box, CardActions, Fab, Typography } from "@mui/material";
3
+
4
+ function BlankTreeMessage({ item, openLogicDialog, functionsExist }) {
5
+ return (
6
+ <Box sx={{ height: "100%", display: "flex", flexDirection: "column" }}>
7
+ <Box
8
+ sx={{
9
+ flex: 1,
10
+ display: "flex",
11
+ justifyContent: "center",
12
+ alignItems: "center",
13
+ }}
14
+ >
15
+ <Typography
16
+ sx={{
17
+ color: "text.secondary",
18
+ textAlign: "center",
19
+ }}
20
+ >
21
+ No {item} defined yet
22
+ </Typography>
23
+ </Box>
24
+ {functionsExist && (
25
+ <Box
26
+ sx={{ display: "flex", justifyContent: "center", marginBottom: 1 }}
27
+ >
28
+ <CardActions>
29
+ <Fab size="medium" onClick={openLogicDialog}>
30
+ <AutoAwesome />
31
+ </Fab>
32
+ </CardActions>
33
+ </Box>
34
+ )}
35
+ </Box>
36
+ );
37
+ }
38
+
39
+ export default BlankTreeMessage;
@@ -0,0 +1 @@
1
+ export { default } from "./BlankTreeMessage";
@@ -19,7 +19,9 @@ export default function CustomBreadcrumbs({
19
19
 
20
20
  return (
21
21
  <Box sx={{ ...sx }}>
22
- <Stack direction="row" alignItems="center">
22
+ <Stack direction="row" sx={{
23
+ alignItems: "center"
24
+ }}>
23
25
  <Box sx={{ flexGrow: 1 }}>
24
26
  {heading && (
25
27
  <Typography variant="h4" gutterBottom>
@@ -43,7 +45,6 @@ export default function CustomBreadcrumbs({
43
45
 
44
46
  {action && <Box sx={{ flexShrink: 0 }}> {action} </Box>}
45
47
  </Stack>
46
-
47
48
  {!!moreLink && (
48
49
  <Box sx={{ mt: 2 }}>
49
50
  {moreLink.map((href) => (
@@ -0,0 +1,67 @@
1
+ import CloseIcon from "@mui/icons-material/Close";
2
+ import IconButton from "@mui/material/IconButton";
3
+ import { styled } from "@mui/material/styles";
4
+
5
+ import { Grid, Tooltip, Typography, tooltipClasses } from "@mui/material";
6
+
7
+ const DialogTooltip = styled(
8
+ ({
9
+ className,
10
+ open,
11
+ handleTooltipClose,
12
+ title,
13
+ message,
14
+ footer,
15
+ ...props
16
+ }) => (
17
+ <Tooltip
18
+ open={open}
19
+ onClose={handleTooltipClose}
20
+ disableFocusListener
21
+ disableHoverListener
22
+ disableTouchListener
23
+ title={
24
+ <>
25
+ <Grid
26
+ container
27
+ sx={{
28
+ display: "flex",
29
+ justifyContent: "space-between",
30
+ alignItems: "center",
31
+ backgroundColor: (theme) => theme.palette.background.paper,
32
+ }}
33
+ >
34
+ <Typography variant="subtitle1" sx={{ flexGrow: 1, marginLeft: 2 }}>
35
+ {title}
36
+ </Typography>
37
+ <IconButton onClick={handleTooltipClose} size="small">
38
+ <CloseIcon />
39
+ </IconButton>
40
+ </Grid>
41
+ <Grid sx={{ padding: 2 }}>
42
+ <Typography
43
+ variant="body2"
44
+ sx={{ color: (theme) => theme.palette.text.primary }}
45
+ >
46
+ {message}
47
+ </Typography>
48
+ {footer}
49
+ </Grid>
50
+ </>
51
+ }
52
+ {...props}
53
+ classes={{ popper: className }}
54
+ />
55
+ )
56
+ )(({ theme }) => ({
57
+ [`& .${tooltipClasses.tooltip}`]: {
58
+ backgroundColor: theme.palette.background.paper,
59
+ color: theme.palette.text.primary,
60
+ width: 600,
61
+ fontSize: theme.typography.pxToRem(12),
62
+ border: `1px solid ${theme.palette.divider}`,
63
+ boxShadow: theme.shadows[1],
64
+ },
65
+ }));
66
+
67
+ export default DialogTooltip;
@@ -0,0 +1 @@
1
+ export { default } from "./DialogTooltip";
@@ -0,0 +1,9 @@
1
+ const styles = {
2
+ header: {
3
+ flexDirection: "row",
4
+ justifyContent: "space-between",
5
+ alignItems: "center",
6
+ },
7
+ };
8
+
9
+ export default styles;