@ebubekirylmaz/link-test 1.2.44 → 1.2.45

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 (73) hide show
  1. package/package.json +9 -6
  2. package/src/Platform.jsx +14 -15
  3. package/src/config/schemas.js +1 -0
  4. package/src/context/Context.js +98 -0
  5. package/src/context/reducer.js +590 -10
  6. package/src/hooks/index.js +2 -1
  7. package/src/hooks/use-beta.js +8 -0
  8. package/src/layouts/auth/modern.jsx +4 -2
  9. package/src/layouts/common/account-popover.jsx +1 -2
  10. package/src/lib/APIDialogAction/APIDialogAction.jsx +109 -0
  11. package/src/lib/APIDialogAction/index.js +1 -0
  12. package/src/lib/APIDialogAction/styles.js +6 -0
  13. package/src/lib/APIParams/APIParams.jsx +57 -0
  14. package/src/lib/APIParams/index.js +1 -0
  15. package/src/lib/APIPath/APIPath.jsx +82 -0
  16. package/src/lib/APIPath/index.js +1 -0
  17. package/src/lib/APIPath/styles.js +19 -0
  18. package/src/lib/APITree/APITree.jsx +409 -0
  19. package/src/lib/APITree/Arrow.jsx +21 -0
  20. package/src/lib/APITree/DeleteMethodDialog.jsx +41 -0
  21. package/src/lib/APITree/index.js +1 -0
  22. package/src/lib/APITree/styles.js +19 -0
  23. package/src/lib/APITypes/APITypes.jsx +141 -0
  24. package/src/lib/APITypes/TypeEditor.jsx +46 -0
  25. package/src/lib/APITypes/TypeList.jsx +180 -0
  26. package/src/lib/APITypes/index.js +1 -0
  27. package/src/lib/BlankTreeMessage/BlankTreeMessage.jsx +39 -0
  28. package/src/lib/BlankTreeMessage/index.js +1 -0
  29. package/src/lib/DialogTootip/DialogTooltip.jsx +67 -0
  30. package/src/lib/DialogTootip/index.js +1 -0
  31. package/src/lib/DialogTootip/styles.js +9 -0
  32. package/src/lib/Flow/connectors/DynamicConnector.jsx +179 -107
  33. package/src/lib/Flow/core/Flow.jsx +2 -0
  34. package/src/lib/Flow/core/FlowNode.jsx +2 -0
  35. package/src/lib/Flow/core/FlowViewport.jsx +41 -9
  36. package/src/lib/Flow/hooks/useNodeStyle.js +14 -0
  37. package/src/lib/Flow/nodes/FlowNodeView.jsx +105 -21
  38. package/src/lib/Flow/styles.js +4 -0
  39. package/src/lib/NewApiBody/NewAPIBody.jsx +97 -0
  40. package/src/lib/NewApiBody/ParamView.jsx +38 -0
  41. package/src/lib/NucDialog/NucDialog.jsx +108 -0
  42. package/src/lib/NucDialog/index.js +1 -0
  43. package/src/lib/ParamTable/ParamTable.jsx +133 -0
  44. package/src/lib/ParamTable/TypeMenu.jsx +102 -0
  45. package/src/lib/ParamTable/defaults.js +47 -0
  46. package/src/lib/ParamTable/index.js +1 -0
  47. package/src/lib/ParamTable/styles.js +12 -0
  48. package/src/lib/ResourceMenu/AlertMassage.jsx +28 -0
  49. package/src/lib/ResourceMenu/DeleteResourceDialog.jsx +60 -0
  50. package/src/lib/ResourceMenu/ResourceMenu.jsx +156 -0
  51. package/src/lib/ResourceMenu/index.js +1 -0
  52. package/src/lib/ResourceMenu/styles.js +5 -0
  53. package/src/lib/Schema/Schema.jsx +204 -0
  54. package/src/lib/Schema/index.js +1 -0
  55. package/src/lib/SchemaEditor/SchemaEditor.jsx +258 -0
  56. package/src/lib/SchemaEditor/SchemaEditor.test.js +193 -0
  57. package/src/lib/SchemaEditor/SchemaPropertyEditor.jsx +135 -0
  58. package/src/lib/SchemaEditor/SchemaUtils.js +152 -0
  59. package/src/lib/SchemaEditor/index.js +1 -0
  60. package/src/lib/ToggleableMenu/ToggleableMenu.jsx +35 -0
  61. package/src/lib/ToggleableMenu/index.js +1 -0
  62. package/src/lib/index.js +14 -0
  63. package/src/pages/Callback.jsx +6 -8
  64. package/src/pages/LoginPage.jsx +3 -12
  65. package/src/stories/APITree.stories.jsx +429 -0
  66. package/src/stories/FlowChart.stories.jsx +1 -1
  67. package/src/templates/ActionTemplate.js +24 -0
  68. package/src/widgets/Login/CognitoLogin.jsx +163 -179
  69. package/src/widgets/Login/DemoLogin.jsx +9 -7
  70. package/src/widgets/Login/amplifyAuth.js +6 -6
  71. package/src/widgets/Login/amplifyConfig.js +3 -0
  72. package/src/widgets/LoginForm/LoginForm.jsx +8 -3
  73. package/src/widgets/SettingsDialog.jsx +171 -7
@@ -1,10 +1,19 @@
1
+ import Iconify from "../components/Iconify";
2
+ import config from "../config/config";
3
+ import { useEvent } from "@nucleoidai/react-event";
4
+ import useSettings from "../hooks/useSettings";
5
+ import { useSettingsContext } from "../components/settings/context";
6
+ import { useUser } from "../hooks/use-user";
7
+
1
8
  import {
2
9
  Avatar,
3
10
  Box,
11
+ Chip,
4
12
  FormControl,
5
13
  Grow,
6
14
  IconButton,
7
15
  InputLabel,
16
+ Link,
8
17
  List,
9
18
  ListItem,
10
19
  ListItemAvatar,
@@ -12,6 +21,7 @@ import {
12
21
  ListItemText,
13
22
  NativeSelect,
14
23
  Stack,
24
+ Switch,
15
25
  Tab,
16
26
  Tabs,
17
27
  TextField,
@@ -20,11 +30,17 @@ import {
20
30
  import { Button, Dialog, DialogActions, DialogContent } from "@mui/material";
21
31
  import React, { useEffect, useState } from "react";
22
32
 
23
- import Iconify from "../components/Iconify";
24
- import config from "../config/config";
25
- import { useEvent } from "@nucleoidai/react-event";
26
- import useSettings from "../hooks/useSettings";
27
- import { useUser } from "../hooks/use-user";
33
+ let pkg = {
34
+ name: "",
35
+ version: "",
36
+ description: "",
37
+ };
38
+
39
+ try {
40
+ pkg = require("../../../../../../package.json");
41
+ } catch (error) {
42
+ console.error("Failed to load package.json for About tab:", error);
43
+ }
28
44
 
29
45
  function a11yProps(index) {
30
46
  return {
@@ -42,6 +58,9 @@ const TabPanel = (props) => {
42
58
  const SettingsDialogTabs = ({ tabs }) => {
43
59
  const [value, setValue] = useState(0);
44
60
 
61
+ const hasPkgInfo =
62
+ pkg && (pkg.name || pkg.version || pkg.description) ? true : false;
63
+
45
64
  const handleChange = (event, newValue) => {
46
65
  setValue(newValue);
47
66
  };
@@ -95,13 +114,20 @@ const SettingsDialogTabs = ({ tabs }) => {
95
114
  sx={{ "& label": { color: "custom.grey" } }}
96
115
  {...a11yProps(1)}
97
116
  />
117
+ {hasPkgInfo && (
118
+ <Tab
119
+ label={"About"}
120
+ sx={{ "& label": { color: "custom.grey" } }}
121
+ {...a11yProps(2)}
122
+ />
123
+ )}
98
124
  {tabs?.map((tab, index) => (
99
125
  <Tab
100
126
  key={tab.label}
101
127
  iconPosition="start"
102
128
  label={tab.label}
103
129
  sx={{ "& label": { color: "custom.grey" } }}
104
- {...a11yProps(index + 2)}
130
+ {...a11yProps(index + (hasPkgInfo ? 3 : 2))}
105
131
  />
106
132
  ))}
107
133
  </Tabs>
@@ -112,8 +138,17 @@ const SettingsDialogTabs = ({ tabs }) => {
112
138
  <TabPanel value={value} index={1}>
113
139
  <Settings />
114
140
  </TabPanel>
141
+ {hasPkgInfo && (
142
+ <TabPanel value={value} index={2}>
143
+ <About />
144
+ </TabPanel>
145
+ )}
115
146
  {tabs?.map((tab, index) => (
116
- <TabPanel key={tab.label} value={value} index={index + 2}>
147
+ <TabPanel
148
+ key={tab.label}
149
+ value={value}
150
+ index={index + (hasPkgInfo ? 3 : 2)}
151
+ >
117
152
  <tab.panel />
118
153
  </TabPanel>
119
154
  ))}
@@ -249,6 +284,7 @@ const Permission = () => {
249
284
  const Settings = () => {
250
285
  const projectId = localStorage.getItem("projectId");
251
286
  const { settings, updateSettings } = useSettings(projectId);
287
+ const { beta, onUpdate } = useSettingsContext();
252
288
 
253
289
  const timeZones = [
254
290
  "Asia/Kolkata",
@@ -300,9 +336,137 @@ const Settings = () => {
300
336
  </NativeSelect>
301
337
  </FormControl>
302
338
  </ListItem>
339
+ <ListItem
340
+ sx={{
341
+ backgroundColor: "background.paper",
342
+ boxShadow: 1,
343
+ borderRadius: 1,
344
+ m: 1,
345
+ p: 2,
346
+ ":hover": { boxShadow: 3 },
347
+ transition: "all 0.2s ease-in-out",
348
+ }}
349
+ >
350
+ <ListItemText primary="Beta" secondary="Enable beta features" />
351
+ <Switch checked={beta} onChange={() => onUpdate("beta", !beta)} />
352
+ </ListItem>
303
353
  </List>
304
354
  </Stack>
305
355
  );
306
356
  };
307
357
 
358
+ const About = () => {
359
+ const iconSrc = config().template?.login?.icon || "";
360
+
361
+ const appName = pkg.name;
362
+ const version = pkg.version;
363
+ const description = pkg.description;
364
+
365
+ return (
366
+ <Stack direction="column" spacing={2} p={2}>
367
+ <Box
368
+ sx={{
369
+ p: 3,
370
+ borderRadius: 3,
371
+ border: "1px solid",
372
+ borderColor: "divider",
373
+ background:
374
+ "linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01))",
375
+ }}
376
+ >
377
+ <Stack direction="row" spacing={2.5} alignItems="center">
378
+ <Avatar
379
+ src={iconSrc}
380
+ variant="rounded"
381
+ sx={{
382
+ width: 56,
383
+ height: 56,
384
+ borderRadius: 2,
385
+ bgcolor: "background.paper",
386
+ boxShadow: 1,
387
+ }}
388
+ >
389
+ <Iconify icon="solar:widget-bold-duotone" width={28} />
390
+ </Avatar>
391
+
392
+ <Box sx={{ flex: 1, minWidth: 0 }}>
393
+ <Typography variant="h5" fontWeight={600}>
394
+ {appName.toUpperCase()}
395
+ </Typography>
396
+
397
+ {description && (
398
+ <Typography
399
+ variant="body2"
400
+ color="text.secondary"
401
+ sx={{ mt: 0.5, maxWidth: 520 }}
402
+ >
403
+ {description}
404
+ </Typography>
405
+ )}
406
+
407
+ <Stack direction="row" spacing={1} sx={{ mt: 1 }}>
408
+ <Chip size="small" label={`v${version}`} />
409
+ </Stack>
410
+ </Box>
411
+ </Stack>
412
+
413
+ <Box
414
+ sx={{
415
+ my: 2,
416
+ borderBottom: "1px dashed",
417
+ borderColor: "divider",
418
+ }}
419
+ />
420
+
421
+ <Stack spacing={1.2}>
422
+ <InfoRow label="Version" value={version} />
423
+ <InfoRow label="Deployment" value="On-Premise" />
424
+ <InfoRow
425
+ label="Support"
426
+ value="support@greycollar.ai"
427
+ link="mailto:support@greycollar.ai"
428
+ />
429
+ <InfoRow
430
+ label="Documentation"
431
+ value="greycollar.ai/docs"
432
+ link="https://greycollar.ai/docs"
433
+ />
434
+ </Stack>
435
+
436
+ <Box
437
+ sx={{
438
+ mt: 3,
439
+ pt: 2,
440
+ borderTop: "1px dashed",
441
+ borderColor: "divider",
442
+ textAlign: "center",
443
+ }}
444
+ >
445
+ <Typography variant="caption" color="text.secondary">
446
+ © 2026 greycollar.ai. All rights reserved.
447
+ </Typography>
448
+ </Box>
449
+ </Box>
450
+ </Stack>
451
+ );
452
+ };
453
+
454
+ const InfoRow = ({ label, value, link }) => {
455
+ return (
456
+ <Stack direction="row" spacing={1.5} alignItems="center">
457
+ <Typography variant="body2" color="text.secondary" sx={{ minWidth: 110 }}>
458
+ {label}
459
+ </Typography>
460
+
461
+ {link ? (
462
+ <Link href={link} target="_blank" rel="noreferrer" underline="hover">
463
+ {value}
464
+ </Link>
465
+ ) : (
466
+ <Typography variant="body2">{value}</Typography>
467
+ )}
468
+ </Stack>
469
+ );
470
+ };
471
+
308
472
  export default SettingsDialog;