supernav-test 2.2.9 → 2.2.10
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/dist/components/lsac-supernavbar/components/SidebarMainLink.js +3 -2
- package/dist/components/lsac-supernavbar/components/Topnav.js +16 -8
- package/dist/components/lsac-supernavbar/static/images/saama_logo.svg +2 -2
- package/dist/components/lsac-supernavbar/util/SubmenuUtil.js +10 -2
- package/package.json +1 -1
- package/src/components/lsac-supernavbar/components/SidebarMainLink.tsx +2 -2
- package/src/components/lsac-supernavbar/components/Topnav.tsx +8 -8
- package/src/components/lsac-supernavbar/static/images/saama_logo.svg +2 -2
- package/src/components/lsac-supernavbar/util/SubmenuUtil.tsx +5 -5
- package/tsconfig.json +2 -2
@@ -17,13 +17,14 @@ var _SidebarActions = require("../actions/SidebarActions");
|
|
17
17
|
|
18
18
|
var _Models = require("../interfaces/Models");
|
19
19
|
|
20
|
+
var _rightIcon = require("../static/images/sidebar-icons/rightIcon.svg");
|
21
|
+
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
21
23
|
|
22
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
23
25
|
|
24
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
25
27
|
|
26
|
-
// import IconRight from '../static/images/sidebar-icons/rightIcon.svg';
|
27
28
|
var styles = require('../stylesheets/sidebar-main-link.scss');
|
28
29
|
|
29
30
|
function SidebarMainLink(props) {
|
@@ -89,7 +90,7 @@ function SidebarMainLink(props) {
|
|
89
90
|
className: "icon-right"
|
90
91
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
91
92
|
className: "icon-right-arrow"
|
92
|
-
}));
|
93
|
+
}, /*#__PURE__*/_react.default.createElement(_rightIcon.ReactComponent, null)));
|
93
94
|
|
94
95
|
if (subMenu) {
|
95
96
|
return /*#__PURE__*/_react.default.createElement("div", {
|
@@ -11,6 +11,14 @@ var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
12
12
|
var _reactRedux = require("react-redux");
|
13
13
|
|
14
|
+
var _hamburgerIcon = require("../static/images/hamburger-icon.svg");
|
15
|
+
|
16
|
+
var _closeHamburgerIcon = require("../static/images/close-hamburger-icon.svg");
|
17
|
+
|
18
|
+
var _saama_logo = require("../static/images/saama_logo.svg");
|
19
|
+
|
20
|
+
var _iconUser = require("../static/images/icon-user.svg");
|
21
|
+
|
14
22
|
var _classnames = _interopRequireDefault(require("classnames"));
|
15
23
|
|
16
24
|
var _SidebarActions = require("../actions/SidebarActions");
|
@@ -29,10 +37,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
29
37
|
|
30
38
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
31
39
|
|
32
|
-
// import Hamburger from '../static/images/hamburger-icon.svg';
|
33
|
-
// import CloseHamburger from '../static/images/close-hamburger-icon.svg'
|
34
|
-
// import SaamaLogo from '../static/images/saama_logo.svg';
|
35
|
-
// import UserIcon from '../static/images/icon-user.svg';
|
36
40
|
// icon imports
|
37
41
|
require('../stylesheets/topnav.scss');
|
38
42
|
|
@@ -94,8 +98,12 @@ function TopNav(props) {
|
|
94
98
|
var showHamburger = function showHamburger() {
|
95
99
|
var menuIcon;
|
96
100
|
|
97
|
-
if (isLogoClickable) {
|
98
|
-
|
101
|
+
if (isLogoClickable) {
|
102
|
+
menuIcon = isMinimal || expanded ? /*#__PURE__*/_react.default.createElement("span", {
|
103
|
+
className: "close-hamburger-icon"
|
104
|
+
}, /*#__PURE__*/_react.default.createElement(_closeHamburgerIcon.ReactComponent, null)) : /*#__PURE__*/_react.default.createElement(_hamburgerIcon.ReactComponent, null);
|
105
|
+
} else {
|
106
|
+
menuIcon = /*#__PURE__*/_react.default.createElement(_hamburgerIcon.ReactComponent, null);
|
99
107
|
}
|
100
108
|
|
101
109
|
return menuIcon;
|
@@ -123,7 +131,7 @@ function TopNav(props) {
|
|
123
131
|
clickable: isLogoClickable
|
124
132
|
}),
|
125
133
|
onClick: handleToggleClick
|
126
|
-
}), /*#__PURE__*/_react.default.createElement("span", {
|
134
|
+
}, /*#__PURE__*/_react.default.createElement(_saama_logo.ReactComponent, null)), /*#__PURE__*/_react.default.createElement("span", {
|
127
135
|
className: "LSAC-logo"
|
128
136
|
}, "Life Science ", /*#__PURE__*/_react.default.createElement("br", null), "Analytics Cloud"), !!applicationTitle ? /*#__PURE__*/_react.default.createElement("span", {
|
129
137
|
className: "app-name"
|
@@ -149,7 +157,7 @@ function TopNav(props) {
|
|
149
157
|
id: "dropdown-basic"
|
150
158
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
151
159
|
className: "account-name"
|
152
|
-
}, accountName)), /*#__PURE__*/_react.default.createElement("div", {
|
160
|
+
}, accountName), /*#__PURE__*/_react.default.createElement(_iconUser.ReactComponent, null)), /*#__PURE__*/_react.default.createElement("div", {
|
153
161
|
className: "user-dropdown-contents"
|
154
162
|
}, /*#__PURE__*/_react.default.createElement(_reactBootstrap.Dropdown.Menu, null, /*#__PURE__*/_react.default.createElement("span", null, userName), /*#__PURE__*/_react.default.createElement("span", {
|
155
163
|
className: "switch-account-link-wrapper"
|
@@ -7,6 +7,12 @@ exports.default = void 0;
|
|
7
7
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
9
9
|
|
10
|
+
var _rbqmTriangle = require("../static/images/sidebar-icons/rbqm-triangle.svg");
|
11
|
+
|
12
|
+
var _caret_down = require("../static/images/sidebar-icons/caret_down.svg");
|
13
|
+
|
14
|
+
var _caret_up = require("../static/images/sidebar-icons/caret_up.svg");
|
15
|
+
|
10
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
17
|
|
12
18
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
@@ -191,9 +197,11 @@ var SubmenuUtil = /*#__PURE__*/function () {
|
|
191
197
|
className: "sub-option-parent"
|
192
198
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
193
199
|
className: "sub-option-icon-container"
|
194
|
-
}), /*#__PURE__*/_react.default.createElement("span", {
|
200
|
+
}, /*#__PURE__*/_react.default.createElement(_rbqmTriangle.ReactComponent, null)), /*#__PURE__*/_react.default.createElement("span", {
|
195
201
|
className: "label"
|
196
|
-
}, "RBQM")
|
202
|
+
}, "RBQM"), /*#__PURE__*/_react.default.createElement("span", {
|
203
|
+
className: "caret"
|
204
|
+
}, showSubApps ? /*#__PURE__*/_react.default.createElement(_caret_up.ReactComponent, null) : /*#__PURE__*/_react.default.createElement(_caret_down.ReactComponent, null))), showSubApps && subApps);
|
197
205
|
} else {
|
198
206
|
return /*#__PURE__*/_react.default.createElement("div", {
|
199
207
|
key: Math.random()
|
package/package.json
CHANGED
@@ -5,7 +5,7 @@ import { RootState } from "../reducers/RootReducer";
|
|
5
5
|
import { SetSelectedSidebarOption, SetExpandSidebar, SetMinimalSidebar } from "../actions/SidebarActions";
|
6
6
|
import { SidebarMenuTypes } from "../constants/SidebarConstants";
|
7
7
|
import { KeycloakAppInfo, SidebarCategory } from "../interfaces/Models";
|
8
|
-
|
8
|
+
import {ReactComponent as IconRight} from '../static/images/sidebar-icons/rightIcon.svg';
|
9
9
|
|
10
10
|
const styles = require('../stylesheets/sidebar-main-link.scss');
|
11
11
|
|
@@ -63,7 +63,7 @@ function SidebarMainLink(props: SidebarMainLinkProps) {
|
|
63
63
|
const iconRight = (
|
64
64
|
<div className="icon-right" >
|
65
65
|
<div className="icon-right-arrow">
|
66
|
-
|
66
|
+
<IconRight />
|
67
67
|
</div>
|
68
68
|
</div>
|
69
69
|
);
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import React, {useEffect, useRef} from 'react';
|
2
2
|
import {useDispatch, useSelector} from "react-redux";
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
import {ReactComponent as Hamburger} from '../static/images/hamburger-icon.svg';
|
4
|
+
import {ReactComponent as CloseHamburger} from '../static/images/close-hamburger-icon.svg'
|
5
|
+
import {ReactComponent as SaamaLogo} from '../static/images/saama_logo.svg';
|
6
|
+
import {ReactComponent as UserIcon} from '../static/images/icon-user.svg';
|
7
7
|
import cx from 'classnames';
|
8
8
|
import {RootState} from "../reducers/RootReducer";
|
9
9
|
import {SetExpandSidebar, SetTopnavToggleref, SetMinimalSidebar} from "../actions/SidebarActions";
|
@@ -71,9 +71,9 @@ function TopNav(props: Props) {
|
|
71
71
|
const showHamburger = () => {
|
72
72
|
let menuIcon;
|
73
73
|
if(isLogoClickable){
|
74
|
-
|
74
|
+
menuIcon = isMinimal || expanded ? <span className="close-hamburger-icon"><CloseHamburger /></span> : <Hamburger />
|
75
75
|
}else{
|
76
|
-
|
76
|
+
menuIcon= <Hamburger />
|
77
77
|
}
|
78
78
|
return menuIcon
|
79
79
|
}
|
@@ -91,7 +91,7 @@ function TopNav(props: Props) {
|
|
91
91
|
{showHamburger() }
|
92
92
|
</span>
|
93
93
|
<span className={cx('saama-logo', { clickable: isLogoClickable })} onClick={handleToggleClick}>
|
94
|
-
|
94
|
+
<SaamaLogo />
|
95
95
|
</span>
|
96
96
|
<span className='LSAC-logo'>Life Science <br/>Analytics Cloud</span>
|
97
97
|
{ !!applicationTitle ? <span className="app-name">{applicationTitle}</span> : <></>}
|
@@ -114,7 +114,7 @@ function TopNav(props: Props) {
|
|
114
114
|
<Dropdown>
|
115
115
|
<Dropdown.Toggle variant="" id="dropdown-basic">
|
116
116
|
<span className="account-name">{accountName}</span>
|
117
|
-
|
117
|
+
<UserIcon />
|
118
118
|
</Dropdown.Toggle>
|
119
119
|
<div className="user-dropdown-contents">
|
120
120
|
<Dropdown.Menu>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import IcomoonReact from "icomoon-react";
|
3
3
|
import { Application, KeycloakAppInfo, SidebarCategory } from "../interfaces/Models";
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
import {ReactComponent as Rbqmtriangle} from '../static/images/sidebar-icons/rbqm-triangle.svg';
|
5
|
+
import {ReactComponent as CaretDown} from '../static/images/sidebar-icons/caret_down.svg';
|
6
|
+
import {ReactComponent as CaretUp} from '../static/images/sidebar-icons/caret_up.svg';
|
7
7
|
import iconSet from "../resources/icomoon-library.json";
|
8
8
|
const baseUrlForIcons = "https://static-content.lsac.cloud/app-icons/";
|
9
9
|
export default class SubmenuUtil {
|
@@ -137,10 +137,10 @@ export default class SubmenuUtil {
|
|
137
137
|
<div className="sub-option" onClick={subAppClick} key={Math.random()}>
|
138
138
|
<div className="sub-option-parent">
|
139
139
|
<span className="sub-option-icon-container">
|
140
|
-
|
140
|
+
<Rbqmtriangle />
|
141
141
|
</span>
|
142
142
|
<span className='label'>RBQM</span>
|
143
|
-
|
143
|
+
<span className="caret">{showSubApps ? <CaretUp /> : <CaretDown />}</span>
|
144
144
|
</div>
|
145
145
|
{showSubApps && subApps}
|
146
146
|
</div>
|