@visns-studio/visns-components 4.3.2 → 4.3.3

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.
@@ -6,42 +6,45 @@ function Breadcrumb({ data, page }) {
6
6
  const getNestedData = (data, keys) =>
7
7
  keys.reduce((acc, key) => (acc && acc[key] ? acc[key] : null), data);
8
8
 
9
+ const nestedData =
10
+ data && page.parentTitleKey
11
+ ? getNestedData(data, page.parentTitleKey)
12
+ : null;
13
+
9
14
  return (
10
15
  <h1>
11
16
  {page?.parentTitle && page?.parentUrl && (
12
17
  <>
13
- <Link to={page.parentUrl}>
14
- {page.parentTitle}{' '}
15
- <CircleChevronRight strokeWidth={2} size={18} />
16
- </Link>
17
-
18
- {data &&
19
- page.parentTitleKey &&
20
- getNestedData(data, page.parentTitleKey) ? (
21
- <Link
22
- to={`${page.parentUrl}/${getNestedData(
23
- data,
24
- page.parentUrlKey
25
- )}`}
26
- >
27
- {getNestedData(data, page.parentTitleKey)}
28
- <CircleChevronRight
29
- strokeWidth={2}
30
- size={18}
31
- />{' '}
32
- </Link>
33
- ) : null}
18
+ <Link to={page.parentUrl}>{page.parentTitle}</Link>
19
+ <CircleChevronRight strokeWidth={2} size={18} />
34
20
  </>
35
21
  )}
36
- <Link to={page && page.previousUrl ? page.previousUrl : null}>
37
- {page && page.title ? page.title : null}
38
- </Link>{' '}
39
- {page?.titleKey && data && data[page.titleKey] ? (
22
+
23
+ {nestedData ? (
40
24
  <>
41
- <CircleChevronRight strokeWidth={2} size={18} />{' '}
42
- {data[page.titleKey]}
25
+ <Link
26
+ to={`${page.parentUrl}/${getNestedData(
27
+ data,
28
+ page.parentUrlKey
29
+ )}`}
30
+ >
31
+ {nestedData}
32
+ </Link>
33
+ <CircleChevronRight strokeWidth={2} size={18} />
43
34
  </>
44
- ) : null}
35
+ ) : (
36
+ page &&
37
+ page.title && (
38
+ <>
39
+ <Link to={page.previousUrl}>{page.title}</Link>
40
+ <CircleChevronRight strokeWidth={2} size={18} />
41
+ </>
42
+ )
43
+ )}
44
+
45
+ {page.titleKey && data && data[page.titleKey] && (
46
+ <>{data[page.titleKey]}</>
47
+ )}
45
48
  </h1>
46
49
  );
47
50
  }
@@ -325,19 +325,15 @@ function Navigation({
325
325
  return () => {
326
326
  window.removeEventListener('scroll', handleScroll);
327
327
  };
328
+
329
+ console.info(layout);
328
330
  }, []);
329
331
 
330
332
  return layout === 'simple' || layout === 'cms' ? (
331
333
  <div className="cwrap">
332
334
  <aside
333
335
  className={
334
- layout === 'cms'
335
- ? isOpen
336
- ? 'aside--cms'
337
- : 'aside--cms aside--cms--open'
338
- : isOpen
339
- ? 'aside'
340
- : 'aside aside--open'
336
+ isOpen ? 'aside--cms' : 'aside--cms aside--cms--open'
341
337
  }
342
338
  >
343
339
  <div className="logo">
@@ -27,6 +27,7 @@ const ProtectedRoute = ({ user, loading, redirectPath = '/login' }) => {
27
27
  };
28
28
 
29
29
  const GenericAuth = ({
30
+ layout = 'full',
30
31
  logo,
31
32
  headerLogo,
32
33
  providers,
@@ -106,6 +107,7 @@ const GenericAuth = ({
106
107
  path="/*"
107
108
  element={
108
109
  <GenericMain
110
+ layout={layout}
109
111
  logo={headerLogo}
110
112
  navigation={navigation}
111
113
  routeConfig={routeConfig}
@@ -4,8 +4,10 @@ import { Routes, Route, Navigate } from 'react-router-dom';
4
4
  import Call from '../Call';
5
5
  import Loader from '../Loader';
6
6
  import Navigation from '../Navigation';
7
+ import { FullScreen } from 'akar-icons';
7
8
 
8
9
  const GenericMain = ({
10
+ layout = 'full',
9
11
  logo,
10
12
  navigation,
11
13
  routeConfig,
@@ -65,6 +67,7 @@ const GenericMain = ({
65
67
  <div>
66
68
  <header className="header">
67
69
  <Navigation
70
+ layout={layout}
68
71
  logo={logo}
69
72
  navConfig={navigation}
70
73
  setSystemAuth={setSystemAuth}
@@ -17,7 +17,7 @@
17
17
  transition: all 200ms;
18
18
  opacity: 0.8;
19
19
  left: 0;
20
- padding: 19px 20px;
20
+ padding: 19px 25px;
21
21
  transform-origin: top left;
22
22
  cursor: text;
23
23
  }
package/package.json CHANGED
@@ -57,7 +57,7 @@
57
57
  "react-dom": "^17.0.1"
58
58
  },
59
59
  "name": "@visns-studio/visns-components",
60
- "version": "4.3.2",
60
+ "version": "4.3.3",
61
61
  "description": "Various packages to assist in the development of our Custom Applications.",
62
62
  "main": "index.js",
63
63
  "scripts": {