strata.client.mui 0.0.0-snapshot.62 → 0.0.0-snapshot.63
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.
|
@@ -8,7 +8,7 @@ import { IMenuItemPropertySet } from "./IMenuItemPropertySet";
|
|
|
8
8
|
import { UserTypeNavigationGroup } from "./UserTypeNavigationGroup";
|
|
9
9
|
export declare abstract class NavigationMenuBar extends Component<INavigationMenuBarPropertySet, INavigationMenuBarState> {
|
|
10
10
|
private links;
|
|
11
|
-
private
|
|
11
|
+
private holder;
|
|
12
12
|
protected constructor(props: INavigationMenuBarPropertySet);
|
|
13
13
|
render(): Element;
|
|
14
14
|
register(menu: NavigationLink): void;
|
|
@@ -8,15 +8,14 @@ const NavigationLink_1 = require("./NavigationLink");
|
|
|
8
8
|
const HamburgerMenu_1 = require("./HamburgerMenu");
|
|
9
9
|
const Utility_1 = require("../Utility");
|
|
10
10
|
const Utility_2 = require("../Utility");
|
|
11
|
-
const Utility_3 = require("
|
|
12
|
-
const Utility_4 = require("strata.foundation.core/Utility");
|
|
11
|
+
const Utility_3 = require("strata.foundation.core/Utility");
|
|
13
12
|
class NavigationMenuBar extends react_1.Component {
|
|
14
13
|
links;
|
|
15
|
-
|
|
14
|
+
holder;
|
|
16
15
|
constructor(props) {
|
|
17
16
|
super(props);
|
|
18
17
|
this.links = new Map();
|
|
19
|
-
this.
|
|
18
|
+
this.holder = new Utility_3.Holder();
|
|
20
19
|
this.setFocus = this.setFocus.bind(this);
|
|
21
20
|
this.state = { currentUserType: this.props.initialUserType };
|
|
22
21
|
}
|
|
@@ -31,7 +30,7 @@ class NavigationMenuBar extends react_1.Component {
|
|
|
31
30
|
this.links.get(menu.props.userType).push(menu);
|
|
32
31
|
}
|
|
33
32
|
changeUserType(newUserType) {
|
|
34
|
-
const alternator = this.
|
|
33
|
+
const alternator = this.holder.get();
|
|
35
34
|
if (alternator.hasAlternate(newUserType))
|
|
36
35
|
alternator.setCurrent(newUserType);
|
|
37
36
|
}
|
|
@@ -59,9 +58,8 @@ class NavigationMenuBar extends react_1.Component {
|
|
|
59
58
|
React.createElement(material_1.Typography, null, this.props.heading)));
|
|
60
59
|
}
|
|
61
60
|
renderMenus() {
|
|
62
|
-
const holder = new Utility_4.Holder();
|
|
63
61
|
return (React.createElement(material_1.Box, { sx: { display: { xs: 'none', md: 'flex' } } },
|
|
64
|
-
React.createElement(Utility_1.Alternator, { initialEngaged: this.props.initialUserType, consumer: holder }, this.getUserTypeNavigationGroups().map((group) => React.createElement(Utility_2.Alternate, { id: group.getUserType(), onEngage: () => { this.setFocus(); }, onDisengage: () => { }, supplier: holder }, group.getNavigationItems().map((item) => React.createElement(NavigationLink_1.NavigationLink, { userType: group.getUserType(), id: item.getId(), to: item.getTo(), text: item.getText(), selected: item.isSelected(), menubar: this })))))));
|
|
62
|
+
React.createElement(Utility_1.Alternator, { initialEngaged: this.props.initialUserType, consumer: this.holder }, this.getUserTypeNavigationGroups().map((group) => React.createElement(Utility_2.Alternate, { id: group.getUserType(), onEngage: () => { this.setFocus(); }, onDisengage: () => { }, supplier: this.holder }, group.getNavigationItems().map((item) => React.createElement(NavigationLink_1.NavigationLink, { userType: group.getUserType(), id: item.getId(), to: item.getTo(), text: item.getText(), selected: item.isSelected(), menubar: this })))))));
|
|
65
63
|
}
|
|
66
64
|
initializeIfNeeded(menu) {
|
|
67
65
|
if (!this.links.has(menu.props.userType))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationMenuBar.js","sourceRoot":"","sources":["../../../main/typescript/Navigation/NavigationMenuBar.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,iCAAyC;AACzC,4CAOuB;AAGvB,qDAAgD;AAEhD,mDAA8C;AAG9C,wCAAsC;AACtC,wCAAqC;AACrC,
|
|
1
|
+
{"version":3,"file":"NavigationMenuBar.js","sourceRoot":"","sources":["../../../main/typescript/Navigation/NavigationMenuBar.tsx"],"names":[],"mappings":";;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