strata.client.react 0.0.0-snapshot.1 → 0.0.0-snapshot.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.
- package/Main/ReactApplication.d.ts +1 -0
- package/Main/ReactApplication.js +5 -2
- package/Main/ReactApplication.js.map +1 -1
- package/Navigation/LoginAndProfileMenu.js +3 -3
- package/Navigation/MenuItemLink.js +1 -1
- package/Navigation/NavigationMenu.js +1 -1
- package/Navigation/NavigationMenu.js.map +1 -1
- package/Navigation/SearchInput.js +1 -1
- package/package.json +1 -1
- package/strata.client.react-v0.0.0-snapshot.3.tgz +0 -0
- package/strata.client.react-v0.0.0-snapshot.1.tgz +0 -0
|
@@ -2,6 +2,7 @@ import { AbstractApplication, IApplication } from "strata.client.core/Main";
|
|
|
2
2
|
import { IPresenter } from "strata.client.core/Presenter";
|
|
3
3
|
import { IRenderable } from "../Presenter/IRenderable";
|
|
4
4
|
export declare abstract class ReactApplication<M, V extends IRenderable, P extends IPresenter<M, V>> extends AbstractApplication<M, V, P> implements IApplication {
|
|
5
|
+
private root;
|
|
5
6
|
protected constructor();
|
|
6
7
|
start(): void;
|
|
7
8
|
stop(): void;
|
package/Main/ReactApplication.js
CHANGED
|
@@ -2,17 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ReactApplication = void 0;
|
|
4
4
|
const React = require("react");
|
|
5
|
-
const
|
|
5
|
+
const client_1 = require("react-dom/client");
|
|
6
6
|
const Main_1 = require("strata.client.core/Main");
|
|
7
7
|
const react_router_dom_1 = require("react-router-dom");
|
|
8
8
|
class ReactApplication extends Main_1.AbstractApplication {
|
|
9
|
+
root;
|
|
9
10
|
constructor() {
|
|
10
11
|
super();
|
|
12
|
+
this.root = (0, client_1.createRoot)(document.getElementById('root'));
|
|
11
13
|
}
|
|
12
14
|
start() {
|
|
13
|
-
|
|
15
|
+
this.root.render(React.createElement(react_router_dom_1.BrowserRouter, null, this.getMainView()));
|
|
14
16
|
}
|
|
15
17
|
stop() {
|
|
18
|
+
this.root.unmount();
|
|
16
19
|
}
|
|
17
20
|
}
|
|
18
21
|
exports.ReactApplication = ReactApplication;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactApplication.js","sourceRoot":"","sources":["../../../main/typescript/Main/ReactApplication.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;
|
|
1
|
+
{"version":3,"file":"ReactApplication.js","sourceRoot":"","sources":["../../../main/typescript/Main/ReactApplication.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAE/B,6CAAiD;AACjD,kDAAyE;AAEzE,uDAA+C;AAG/C,MACe,gBACX,SAAQ,0BAA0B;IAG1B,IAAI,CAAO;IAEnB;QAEI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAA,mBAAU,EAAC,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAA;IAC3D,CAAC;IAED,KAAK;QAED,IAAI,CAAC,IAAI,CAAC,MAAM,CACZ,oBAAC,gCAAa,QACT,IAAI,CAAC,WAAW,EAAE,CACP,CAAC,CAAC;IAC1B,CAAC;IAED,IAAI;QAEA,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;CAGJ;AA3BD,4CA2BC"}
|
|
@@ -13,10 +13,10 @@ class LoginAndProfileMenu extends NavigationMenu_1.NavigationMenu {
|
|
|
13
13
|
render() {
|
|
14
14
|
let className;
|
|
15
15
|
if (this.state.selected)
|
|
16
|
-
className = "
|
|
16
|
+
className = "bp5-minimal menu-selected";
|
|
17
17
|
else
|
|
18
|
-
className = "
|
|
19
|
-
return (React.createElement(core_1.Popover, { className: "
|
|
18
|
+
className = "bp5-minimal";
|
|
19
|
+
return (React.createElement(core_1.Popover, { className: "bp5-minimal", popoverClassName: core_1.Classes.POPOVER_DISMISS, content: React.createElement(core_1.Menu, { className: core_1.Classes.POPOVER_DISMISS },
|
|
20
20
|
React.createElement(MenuItemLink_1.default, { icon: "log-in", to: "/login", text: "Login", callback: () => this.select() }),
|
|
21
21
|
React.createElement(MenuItemLink_1.default, { icon: "cog", to: "/profile", text: "Edit Profile", callback: () => this.select() })), position: core_1.Position.BOTTOM_LEFT },
|
|
22
22
|
React.createElement(core_1.Button, { className: className, small: true, icon: "user", rightIcon: "caret-down", text: this.props.text, intent: core_1.Intent.NONE })));
|
|
@@ -10,7 +10,7 @@ class MenuItemLink extends react_1.Component {
|
|
|
10
10
|
super(props);
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (React.createElement(core_1.MenuItem, { className: "
|
|
13
|
+
return (React.createElement(core_1.MenuItem, { className: "bp5-minimal", icon: this.props.icon, text: this.props.text, onClick: () => this.doClick() }));
|
|
14
14
|
}
|
|
15
15
|
doClick() {
|
|
16
16
|
this
|
|
@@ -12,7 +12,7 @@ class NavigationMenu extends react_1.Component {
|
|
|
12
12
|
props.menubar.register(this);
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (React.createElement(react_router_dom_1.NavLink, { className: "
|
|
15
|
+
return (React.createElement(react_router_dom_1.NavLink, { className: "bp5-button bp5-minimal nav-menu", role: "button", activeClassName: "menu-selected", id: this.props.id, to: this.props.to, onClick: () => this.select() }, this.props.text));
|
|
16
16
|
}
|
|
17
17
|
select() {
|
|
18
18
|
this.setState(() => ({ selected: true }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationMenu.js","sourceRoot":"","sources":["../../../main/typescript/Navigation/NavigationMenu.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,iCAAgC;AAChC,uDAAyC;AAGzC,MACM,cACF,SAAQ,iBAAyC;IAEjD,YAAY,KAAgC;QAExC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;QAC1C,IAAI,KAAK,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,CAAC,CAAC,CAAC;IAC5C,CAAC;CACL;AAlCD,wCAkCC"}
|
|
@@ -9,7 +9,7 @@ class SearchInput extends react_1.Component {
|
|
|
9
9
|
super(props);
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (React.createElement(core_1.InputGroup, { className: "
|
|
12
|
+
return (React.createElement(core_1.InputGroup, { className: "bp5-minimal", leftIcon: "search", placeholder: "Search", type: "text", intent: core_1.Intent.NONE, small: true }));
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
exports.SearchInput = SearchInput;
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|