strata.client.react 0.0.1 → 1.0.0-snapshot.1795471241780

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 (87) hide show
  1. package/{dist/Main → Main}/ReactApplication.d.ts +12 -8
  2. package/Main/ReactApplication.js +22 -0
  3. package/Main/ReactApplication.js.map +1 -0
  4. package/Main/index.d.ts +1 -0
  5. package/Main/index.js +6 -0
  6. package/Main/index.js.map +1 -0
  7. package/{dist/Presenter → Presenter}/IPresenterViewProperty.d.ts +3 -3
  8. package/{dist/Presenter → Presenter}/IPresenterViewProperty.js +2 -2
  9. package/Presenter/IPresenterViewProperty.js.map +1 -0
  10. package/Presenter/IRenderable.d.ts +4 -0
  11. package/{dist/Presenter → Presenter}/IRenderable.js +2 -2
  12. package/Presenter/IRenderable.js.map +1 -0
  13. package/{dist/Presenter → Presenter}/IRenderableViewProperty.d.ts +4 -4
  14. package/{dist/Presenter → Presenter}/IRenderableViewProperty.js +2 -2
  15. package/Presenter/IRenderableViewProperty.js.map +1 -0
  16. package/{dist/Presenter → Presenter}/PresenterView.d.ts +12 -10
  17. package/{dist/Presenter → Presenter}/PresenterView.js +13 -13
  18. package/Presenter/PresenterView.js.map +1 -0
  19. package/{dist/Presenter → Presenter}/RenderableView.d.ts +9 -8
  20. package/{dist/Presenter → Presenter}/RenderableView.js +13 -13
  21. package/Presenter/RenderableView.js.map +1 -0
  22. package/Presenter/index.d.ts +5 -0
  23. package/Presenter/index.js +8 -0
  24. package/Presenter/index.js.map +1 -0
  25. package/package.json +22 -24
  26. package/strata.client.react-v1.0.0-snapshot.1795471241780.tgz +0 -0
  27. package/Strata.Client.React.iml +0 -10
  28. package/dist/Main/ReactApplication.js +0 -19
  29. package/dist/Main/ReactApplication.js.map +0 -1
  30. package/dist/Navigation/IMenuItemLinkPropertySet.d.ts +0 -5
  31. package/dist/Navigation/IMenuItemLinkPropertySet.js +0 -3
  32. package/dist/Navigation/IMenuItemLinkPropertySet.js.map +0 -1
  33. package/dist/Navigation/INavigationMenuBarPropertySet.d.ts +0 -3
  34. package/dist/Navigation/INavigationMenuBarPropertySet.js +0 -3
  35. package/dist/Navigation/INavigationMenuBarPropertySet.js.map +0 -1
  36. package/dist/Navigation/INavigationMenuPropertySet.d.ts +0 -11
  37. package/dist/Navigation/INavigationMenuPropertySet.js +0 -3
  38. package/dist/Navigation/INavigationMenuPropertySet.js.map +0 -1
  39. package/dist/Navigation/ISearchInputPropertySet.d.ts +0 -2
  40. package/dist/Navigation/ISearchInputPropertySet.js +0 -3
  41. package/dist/Navigation/ISearchInputPropertySet.js.map +0 -1
  42. package/dist/Navigation/LoginAndProfileMenu.d.ts +0 -7
  43. package/dist/Navigation/LoginAndProfileMenu.js +0 -25
  44. package/dist/Navigation/LoginAndProfileMenu.js.map +0 -1
  45. package/dist/Navigation/MenuItemLink.d.ts +0 -13
  46. package/dist/Navigation/MenuItemLink.js +0 -27
  47. package/dist/Navigation/MenuItemLink.js.map +0 -1
  48. package/dist/Navigation/NavigationMenu.d.ts +0 -8
  49. package/dist/Navigation/NavigationMenu.js +0 -26
  50. package/dist/Navigation/NavigationMenu.js.map +0 -1
  51. package/dist/Navigation/NavigationMenuBar.d.ts +0 -12
  52. package/dist/Navigation/NavigationMenuBar.js +0 -30
  53. package/dist/Navigation/NavigationMenuBar.js.map +0 -1
  54. package/dist/Navigation/SearchInput.d.ts +0 -6
  55. package/dist/Navigation/SearchInput.js +0 -16
  56. package/dist/Navigation/SearchInput.js.map +0 -1
  57. package/dist/Navigation/StandardNavigationMenuBar.d.ts +0 -7
  58. package/dist/Navigation/StandardNavigationMenuBar.js +0 -34
  59. package/dist/Navigation/StandardNavigationMenuBar.js.map +0 -1
  60. package/dist/Presenter/IPresenterViewProperty.js.map +0 -1
  61. package/dist/Presenter/IRenderable.d.ts +0 -3
  62. package/dist/Presenter/IRenderable.js.map +0 -1
  63. package/dist/Presenter/IRenderableViewProperty.js.map +0 -1
  64. package/dist/Presenter/PresenterView.js.map +0 -1
  65. package/dist/Presenter/RenderableView.js.map +0 -1
  66. package/dist/index.d.ts +0 -15
  67. package/dist/index.js +0 -19
  68. package/dist/index.js.map +0 -1
  69. package/src/Main/ReactApplication.tsx +0 -38
  70. package/src/Navigation/IMenuItemLinkPropertySet.ts +0 -9
  71. package/src/Navigation/INavigationMenuBarPropertySet.ts +0 -5
  72. package/src/Navigation/INavigationMenuPropertySet.ts +0 -15
  73. package/src/Navigation/ISearchInputPropertySet.ts +0 -5
  74. package/src/Navigation/LoginAndProfileMenu.tsx +0 -42
  75. package/src/Navigation/MenuItemLink.tsx +0 -35
  76. package/src/Navigation/NavigationMenu.tsx +0 -40
  77. package/src/Navigation/NavigationMenuBar.tsx +0 -50
  78. package/src/Navigation/SearchInput.tsx +0 -28
  79. package/src/Navigation/StandardNavigationMenuBar.tsx +0 -44
  80. package/src/Presenter/IPresenterViewProperty.ts +0 -5
  81. package/src/Presenter/IRenderable.ts +0 -5
  82. package/src/Presenter/IRenderableViewProperty.ts +0 -7
  83. package/src/Presenter/PresenterView.tsx +0 -30
  84. package/src/Presenter/RenderableView.ts +0 -19
  85. package/src/index.ts +0 -17
  86. package/strata.client.react-0.0.1.tgz +0 -0
  87. package/tsconfig.json +0 -19
@@ -1 +0,0 @@
1
- {"version":3,"file":"SearchInput.js","sourceRoot":"","sources":["../../src/Navigation/SearchInput.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,iCAAgC;AAEhC,4CAAqD;AAErD,MACM,WACF,SAAQ,iBAAsC;IAG9C,YAAY,KAA8B;QAEtC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;IAED,MAAM;QAEF,OAAO,CACH,oBAAC,iBAAU,IACP,SAAS,EAAC,aAAa,EACvB,QAAQ,EAAC,QAAQ,EACjB,WAAW,EAAC,QAAQ,EACpB,IAAI,EAAC,MAAM,EACX,MAAM,EAAE,aAAM,CAAC,IAAI,EACnB,KAAK,EAAE,IAAI,GACF,CAAC,CAAC;IACvB,CAAC;CACJ;AAtBD,kCAsBC"}
@@ -1,7 +0,0 @@
1
- import { NavigationMenuBar } from "./NavigationMenuBar";
2
- import { INavigationMenuBarPropertySet } from "./INavigationMenuBarPropertySet";
3
- export declare class StandardNavigationMenuBar extends NavigationMenuBar {
4
- constructor(props: INavigationMenuBarPropertySet);
5
- protected renderLeft(): any;
6
- protected renderRight(): any;
7
- }
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StandardNavigationMenuBar = void 0;
4
- const React = require("react");
5
- const NavigationMenuBar_1 = require("./NavigationMenuBar");
6
- const core_1 = require("@blueprintjs/core");
7
- const NavigationMenu_1 = require("./NavigationMenu");
8
- const LoginAndProfileMenu_1 = require("./LoginAndProfileMenu");
9
- const SearchInput_1 = require("./SearchInput");
10
- const alignment_1 = require("@blueprintjs/core/lib/esm/common/alignment");
11
- class StandardNavigationMenuBar extends NavigationMenuBar_1.NavigationMenuBar {
12
- constructor(props) {
13
- super(props);
14
- }
15
- renderLeft() {
16
- return (React.createElement(core_1.NavbarGroup, { align: alignment_1.Alignment.LEFT },
17
- React.createElement(core_1.NavbarHeading, null, "Granite"),
18
- React.createElement(core_1.NavbarDivider, null),
19
- React.createElement(NavigationMenu_1.NavigationMenu, { id: "main.home", to: "/home", text: "Home", selected: true, menubar: this }),
20
- React.createElement(NavigationMenu_1.NavigationMenu, { id: "main.user", to: "/user", text: "User", selected: false, menubar: this }),
21
- React.createElement(NavigationMenu_1.NavigationMenu, { id: "main.group", to: "/group", text: "Group", selected: false, menubar: this }),
22
- React.createElement(NavigationMenu_1.NavigationMenu, { id: "main.role", to: "/role", text: "Role", selected: false, menubar: this }),
23
- React.createElement(NavigationMenu_1.NavigationMenu, { id: "main.tenant", to: "/tenant", text: "Tenant", selected: false, menubar: this }),
24
- React.createElement(NavigationMenu_1.NavigationMenu, { id: "main.help", to: "/help", text: "Help", selected: false, menubar: this })));
25
- }
26
- renderRight() {
27
- return (React.createElement(core_1.NavbarGroup, { align: alignment_1.Alignment.RIGHT },
28
- React.createElement(LoginAndProfileMenu_1.LoginAndProfileMenu, { id: "main.login-profile", to: "", text: "guest", selected: false, menubar: this }),
29
- React.createElement(core_1.NavbarDivider, null),
30
- React.createElement(SearchInput_1.SearchInput, null)));
31
- }
32
- }
33
- exports.StandardNavigationMenuBar = StandardNavigationMenuBar;
34
- //# sourceMappingURL=StandardNavigationMenuBar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StandardNavigationMenuBar.js","sourceRoot":"","sources":["../../src/Navigation/StandardNavigationMenuBar.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,2DAAsD;AAEtD,4CAA0E;AAC1E,qDAAgD;AAChD,+DAA0D;AAC1D,+CAA0C;AAC1C,0EAAqE;AAGrE,MACM,yBACF,SAAQ,qCAAiB;IAEzB,YAAY,KAAoC;QAE5C,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;IAES,UAAU;QAEhB,OAAO,CACH,oBAAC,kBAAW,IAAC,KAAK,EAAE,qBAAS,CAAC,IAAI;YAC9B,oBAAC,oBAAa,kBAAwB;YACtC,oBAAC,oBAAa,OAAE;YAChB,oBAAC,+BAAc,IAAC,EAAE,EAAC,WAAW,EAAC,EAAE,EAAC,OAAO,EAAC,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,GAAG;YACtF,oBAAC,+BAAc,IAAC,EAAE,EAAC,WAAW,EAAC,EAAE,EAAC,OAAO,EAAC,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,GAAG;YACvF,oBAAC,+BAAc,IAAC,EAAE,EAAC,YAAY,EAAC,EAAE,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,GAAG;YAC1F,oBAAC,+BAAc,IAAC,EAAE,EAAC,WAAW,EAAC,EAAE,EAAC,OAAO,EAAC,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,GAAG;YACvF,oBAAC,+BAAc,IAAC,EAAE,EAAC,aAAa,EAAC,EAAE,EAAC,SAAS,EAAC,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,GAAG;YAC7F,oBAAC,+BAAc,IAAC,EAAE,EAAC,WAAW,EAAC,EAAE,EAAC,OAAO,EAAC,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,GAAG,CAC7E,CAAC,CAAC;IACxB,CAAC;IAES,WAAW;QAEjB,OAAO,CACH,oBAAC,kBAAW,IAAC,KAAK,EAAE,qBAAS,CAAC,KAAK;YAC/B,oBAAC,yCAAmB,IAAC,EAAE,EAAC,oBAAoB,EAAC,EAAE,EAAC,EAAE,EAAC,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,GAAG;YACjG,oBAAC,oBAAa,OAAE;YAChB,oBAAC,yBAAW,OAAE,CACJ,CAAC,CAAC;IACxB,CAAC;CACJ;AAjCD,8DAiCC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"IPresenterViewProperty.js","sourceRoot":"","sources":["../../src/Presenter/IPresenterViewProperty.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export interface IRenderable {
2
- render(): any;
3
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"IRenderable.js","sourceRoot":"","sources":["../../src/Presenter/IRenderable.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"IRenderableViewProperty.js","sourceRoot":"","sources":["../../src/Presenter/IRenderableViewProperty.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"PresenterView.js","sourceRoot":"","sources":["../../src/Presenter/PresenterView.tsx"],"names":[],"mappings":";;;AACA,iCAAgC;AAKhC,MACe,aAKX,SAAQ,iBAAc;IAGtB,YAAsB,KAAQ;QAE1B,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;IAED,kBAAkB;QAEd,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IACjD,CAAC;CAMJ;AAvBD,sCAuBC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderableView.js","sourceRoot":"","sources":["../../src/Presenter/RenderableView.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAKhC,MACM,cACF,SAAQ,iBAAsC;IAE9C,YAAY,KAA8B;QAEtC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;IAED,MAAM;QAEF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IACpC,CAAC;CACJ;AAbD,wCAaC"}
package/dist/index.d.ts DELETED
@@ -1,15 +0,0 @@
1
- export { IRenderable } from './Presenter/IRenderable';
2
- export { IPresenterViewProperty } from './Presenter/IPresenterViewProperty';
3
- export { IRenderableViewProperty } from './Presenter/IRenderableViewProperty';
4
- export { RenderableView } from './Presenter/RenderableView';
5
- export { PresenterView } from './Presenter/PresenterView';
6
- export { IMenuItemLinkPropertySet } from './Navigation/IMenuItemLinkPropertySet';
7
- export { INavigationMenuBarPropertySet } from './Navigation/INavigationMenuBarPropertySet';
8
- export { INavigationMenuPropertySet } from './Navigation/INavigationMenuPropertySet';
9
- export { ISearchInputPropertySet } from './Navigation/ISearchInputPropertySet';
10
- export { LoginAndProfileMenu } from './Navigation/LoginAndProfileMenu';
11
- export { MenuItemLink } from './Navigation/MenuItemLink';
12
- export { NavigationMenu } from './Navigation/NavigationMenu';
13
- export { NavigationMenuBar } from './Navigation/NavigationMenuBar';
14
- export { SearchInput } from './Navigation/SearchInput';
15
- export { ReactApplication } from './Main/ReactApplication';
package/dist/index.js DELETED
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var RenderableView_1 = require("./Presenter/RenderableView");
4
- Object.defineProperty(exports, "RenderableView", { enumerable: true, get: function () { return RenderableView_1.RenderableView; } });
5
- var PresenterView_1 = require("./Presenter/PresenterView");
6
- Object.defineProperty(exports, "PresenterView", { enumerable: true, get: function () { return PresenterView_1.PresenterView; } });
7
- var LoginAndProfileMenu_1 = require("./Navigation/LoginAndProfileMenu");
8
- Object.defineProperty(exports, "LoginAndProfileMenu", { enumerable: true, get: function () { return LoginAndProfileMenu_1.LoginAndProfileMenu; } });
9
- var MenuItemLink_1 = require("./Navigation/MenuItemLink");
10
- Object.defineProperty(exports, "MenuItemLink", { enumerable: true, get: function () { return MenuItemLink_1.MenuItemLink; } });
11
- var NavigationMenu_1 = require("./Navigation/NavigationMenu");
12
- Object.defineProperty(exports, "NavigationMenu", { enumerable: true, get: function () { return NavigationMenu_1.NavigationMenu; } });
13
- var NavigationMenuBar_1 = require("./Navigation/NavigationMenuBar");
14
- Object.defineProperty(exports, "NavigationMenuBar", { enumerable: true, get: function () { return NavigationMenuBar_1.NavigationMenuBar; } });
15
- var SearchInput_1 = require("./Navigation/SearchInput");
16
- Object.defineProperty(exports, "SearchInput", { enumerable: true, get: function () { return SearchInput_1.SearchInput; } });
17
- var ReactApplication_1 = require("./Main/ReactApplication");
18
- Object.defineProperty(exports, "ReactApplication", { enumerable: true, get: function () { return ReactApplication_1.ReactApplication; } });
19
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAGA,6DAA0D;AAAlD,gHAAA,cAAc,OAAA;AACtB,2DAAwD;AAAhD,8GAAA,aAAa,OAAA;AAMrB,wEAAqE;AAA7D,0HAAA,mBAAmB,OAAA;AAC3B,0DAAuD;AAA/C,4GAAA,YAAY,OAAA;AACpB,8DAA2D;AAAnD,gHAAA,cAAc,OAAA;AACtB,oEAAiE;AAAzD,sHAAA,iBAAiB,OAAA;AACzB,wDAAqD;AAA7C,0GAAA,WAAW,OAAA;AAEnB,4DAAyD;AAAjD,oHAAA,gBAAgB,OAAA"}
@@ -1,38 +0,0 @@
1
- import * as React from "react";
2
- import * as ReactDOM from 'react-dom';
3
- import {
4
- AbstractApplication,
5
- IApplication,
6
- IPresenter
7
- } from "strata.client.core";
8
- import {BrowserRouter} from 'react-router-dom';
9
- import {IRenderable} from "../Presenter/IRenderable";
10
-
11
- export
12
- abstract class ReactApplication<M,V extends IRenderable,P extends IPresenter<M,V>>
13
- extends AbstractApplication<M,V,P>
14
- implements IApplication
15
- {
16
-
17
- protected constructor()
18
- {
19
- super();
20
- }
21
-
22
- start(): void
23
- {
24
- ReactDOM.render(
25
- <BrowserRouter>
26
- {this.getMainView()}
27
- </BrowserRouter>,
28
- document.getElementById('root')
29
- );
30
- }
31
-
32
- stop(): void
33
- {
34
-
35
- }
36
-
37
- protected abstract getMainView(): any;
38
- }
@@ -1,9 +0,0 @@
1
- import {IMenuItemProps} from '@blueprintjs/core';
2
-
3
- export
4
- interface IMenuItemLinkPropertySet
5
- extends IMenuItemProps
6
- {
7
- to: string;
8
- callback: () => void;
9
- }
@@ -1,5 +0,0 @@
1
- export
2
- interface INavigationMenuBarPropertySet
3
- {
4
- heading: string;
5
- }
@@ -1,15 +0,0 @@
1
- import {INavbarGroupProps} from '@blueprintjs/core';
2
- import {NavigationMenuBar} from './NavigationMenuBar';
3
- import {BrowserRouter} from 'react-router-dom';
4
-
5
- export
6
- interface INavigationMenuPropertySet
7
- extends INavbarGroupProps
8
- {
9
- id: string;
10
- to: string;
11
- text: string;
12
- selected: boolean;
13
- menubar: NavigationMenuBar;
14
- router?: BrowserRouter;
15
- }
@@ -1,5 +0,0 @@
1
- export
2
- interface ISearchInputPropertySet
3
- {
4
-
5
- }
@@ -1,42 +0,0 @@
1
- import * as React from 'react';
2
- import {Button, Classes, Intent, Menu, MenuItem, Popover, Position, Tab} from '@blueprintjs/core';
3
- import {INavigationMenuPropertySet} from './INavigationMenuPropertySet';
4
- import {NavigationMenu} from './NavigationMenu';
5
- import MenuItemLink from './MenuItemLink';
6
-
7
- export
8
- class LoginAndProfileMenu
9
- extends NavigationMenu
10
- {
11
- router?: History;
12
-
13
- constructor(props: INavigationMenuPropertySet)
14
- {
15
- super(props);
16
- }
17
-
18
- render(): any
19
- {
20
- let className: string;
21
-
22
- if (this.state.selected)
23
- className = "bp3-minimal menu-selected";
24
- else
25
- className = "bp3-minimal";
26
-
27
- return (
28
- <Popover
29
- className="bp3-minimal"
30
- popoverClassName={Classes.POPOVER_DISMISS}
31
- content={
32
- <Menu className={Classes.POPOVER_DISMISS}>
33
- <MenuItemLink icon="log-in" to="/login" text="Login" callback={() => this.select()}/>
34
- <MenuItemLink icon="cog" to="/profile" text="Edit Profile" callback={() => this.select()}/>
35
- </Menu>}
36
- position={Position.BOTTOM_LEFT}>
37
- <Button className={className} small={true} icon="user" rightIcon="caret-down" text={this.props.text} intent={Intent.NONE}/>
38
- </Popover>);
39
- }
40
-
41
- }
42
-
@@ -1,35 +0,0 @@
1
- import * as React from 'react';
2
- import {Component} from 'react';
3
- import { RouteComponentProps, withRouter } from 'react-router-dom';
4
- import {MenuItem} from '@blueprintjs/core';
5
- import {IMenuItemLinkPropertySet} from './IMenuItemLinkPropertySet';
6
-
7
-
8
- export
9
- class MenuItemLink
10
- extends Component<IMenuItemLinkPropertySet & RouteComponentProps,any>
11
- {
12
- constructor(props: IMenuItemLinkPropertySet & RouteComponentProps)
13
- {
14
- super(props);
15
- }
16
-
17
- render()
18
- {
19
- return (
20
- <MenuItem className="bp3-minimal" icon={this.props.icon} text={this.props.text} onClick={() => this.doClick()}/>);
21
- }
22
-
23
- doClick()
24
- {
25
- this
26
- .props
27
- .history
28
- .push(this.props.to);
29
- this
30
- .props
31
- .callback();
32
- }
33
- }
34
-
35
- export default withRouter(MenuItemLink);
@@ -1,40 +0,0 @@
1
- import * as React from 'react';
2
- import {Component} from 'react';
3
- import {NavLink} from 'react-router-dom';
4
- import {INavigationMenuPropertySet} from './INavigationMenuPropertySet';
5
-
6
- export
7
- class NavigationMenu
8
- extends Component<INavigationMenuPropertySet,any>
9
- {
10
- constructor(props:INavigationMenuPropertySet)
11
- {
12
- super(props);
13
- this.state = { selected: props.selected };
14
- if (props.menubar != null)
15
- props.menubar.register(this);
16
- }
17
-
18
- render()
19
- {
20
- return (
21
- <NavLink
22
- className="bp3-button bp3-minimal"
23
- role="button"
24
- activeClassName="menu-selected"
25
- id={this.props.id}
26
- to={this.props.to}
27
- onClick={() => this.select()}>{this.props.text}</NavLink>);
28
- }
29
-
30
- select()
31
- {
32
- this.setState(() => ({selected:true}));
33
- this.props.menubar.onSelectionChange(this);
34
- }
35
-
36
- unselect()
37
- {
38
- this.setState(() => ({selected:false}));
39
- }
40
- }
@@ -1,50 +0,0 @@
1
- import * as React from 'react';
2
- import {Component} from 'react';
3
- import {INavigationMenuBarPropertySet} from './INavigationMenuBarPropertySet';
4
- import {NavigationMenu} from './NavigationMenu';
5
- import {Navbar,NavbarGroup} from "@blueprintjs/core";
6
- import {Alignment} from "@blueprintjs/core/lib/esm/common/alignment";
7
-
8
- export
9
- abstract class NavigationMenuBar
10
- extends Component<INavigationMenuBarPropertySet,any>
11
- {
12
- private menus: Map<string,NavigationMenu>
13
-
14
- protected constructor(props: INavigationMenuBarPropertySet)
15
- {
16
- super(props);
17
- this.menus = new Map<string,NavigationMenu>();
18
- }
19
-
20
- render(): any
21
- {
22
- return (
23
- <Navbar>
24
- {this.renderLeft()}
25
- {this.renderRight()}
26
- </Navbar>
27
- );
28
- }
29
-
30
- register(menu:NavigationMenu)
31
- {
32
- this.menus.set(menu.props.id,menu);
33
- }
34
-
35
- onSelectionChange(selected:NavigationMenu)
36
- {
37
- this
38
- .menus
39
- .forEach(
40
- (menu) =>
41
- {
42
- if (menu.props.id != selected.props.id)
43
- menu.unselect();
44
- });
45
- }
46
-
47
- protected abstract renderLeft(): any;
48
-
49
- protected abstract renderRight(): any;
50
- }
@@ -1,28 +0,0 @@
1
- import * as React from 'react';
2
- import {Component} from 'react';
3
- import {ISearchInputPropertySet} from './ISearchInputPropertySet';
4
- import {InputGroup, Intent} from '@blueprintjs/core';
5
-
6
- export
7
- class SearchInput
8
- extends Component<ISearchInputPropertySet,any>
9
- {
10
-
11
- constructor(props: ISearchInputPropertySet)
12
- {
13
- super(props);
14
- }
15
-
16
- render()
17
- {
18
- return (
19
- <InputGroup
20
- className="bp3-minimal"
21
- leftIcon="search"
22
- placeholder="Search"
23
- type="text"
24
- intent={Intent.NONE}
25
- small={true}>
26
- </InputGroup>);
27
- }
28
- }
@@ -1,44 +0,0 @@
1
- import * as React from "react";
2
- import {NavigationMenuBar} from "./NavigationMenuBar";
3
- import {INavigationMenuBarPropertySet} from "./INavigationMenuBarPropertySet";
4
- import {NavbarDivider,NavbarGroup,NavbarHeading} from "@blueprintjs/core";
5
- import {NavigationMenu} from "./NavigationMenu";
6
- import {LoginAndProfileMenu} from "./LoginAndProfileMenu";
7
- import {SearchInput} from "./SearchInput";
8
- import {Alignment} from "@blueprintjs/core/lib/esm/common/alignment";
9
-
10
-
11
- export
12
- class StandardNavigationMenuBar
13
- extends NavigationMenuBar
14
- {
15
- constructor(props: INavigationMenuBarPropertySet)
16
- {
17
- super(props);
18
- }
19
-
20
- protected renderLeft(): any
21
- {
22
- return (
23
- <NavbarGroup align={Alignment.LEFT}>
24
- <NavbarHeading>Granite</NavbarHeading>
25
- <NavbarDivider/>
26
- <NavigationMenu id="main.home" to="/home" text="Home" selected={true} menubar={this}/>
27
- <NavigationMenu id="main.user" to="/user" text="User" selected={false} menubar={this}/>
28
- <NavigationMenu id="main.group" to="/group" text="Group" selected={false} menubar={this}/>
29
- <NavigationMenu id="main.role" to="/role" text="Role" selected={false} menubar={this}/>
30
- <NavigationMenu id="main.tenant" to="/tenant" text="Tenant" selected={false} menubar={this}/>
31
- <NavigationMenu id="main.help" to="/help" text="Help" selected={false} menubar={this}/>
32
- </NavbarGroup>);
33
- }
34
-
35
- protected renderRight(): any
36
- {
37
- return (
38
- <NavbarGroup align={Alignment.RIGHT}>
39
- <LoginAndProfileMenu id="main.login-profile" to="" text="guest" selected={false} menubar={this}/>
40
- <NavbarDivider/>
41
- <SearchInput/>
42
- </NavbarGroup>);
43
- }
44
- }
@@ -1,5 +0,0 @@
1
- export
2
- interface IPresenterViewProperty<P>
3
- {
4
- presenter: P;
5
- }
@@ -1,5 +0,0 @@
1
- export
2
- interface IRenderable
3
- {
4
- render(): any;
5
- }
@@ -1,7 +0,0 @@
1
- import {IRenderable} from "./IRenderable";
2
-
3
- export
4
- interface IRenderableViewProperty
5
- {
6
- view: IRenderable;
7
- }
@@ -1,30 +0,0 @@
1
- import * as React from 'react';
2
- import {Component} from 'react';
3
- import {IRenderable} from "./IRenderable";
4
- import {IPresenterViewProperty} from "./IPresenterViewProperty";
5
- import {IPresentable} from "strata.client.core";
6
-
7
- export
8
- abstract class PresenterView<
9
- V,
10
- T extends IPresentable<V>,
11
- P extends IPresenterViewProperty<T>,
12
- S={}>
13
- extends Component<P,S>
14
- implements IRenderable
15
- {
16
- protected constructor(props: P)
17
- {
18
- super(props);
19
- }
20
-
21
- componentWillMount(): void
22
- {
23
- this.props.presenter.setView(this.getSelf());
24
- }
25
-
26
- abstract render(): any;
27
-
28
- protected abstract getSelf(): V;
29
-
30
- }
@@ -1,19 +0,0 @@
1
- import {Component} from 'react';
2
- import {IRenderableViewProperty} from "./IRenderableViewProperty";
3
- import {IRenderable} from "./IRenderable";
4
- import {IPresenter} from "strata.client.core";
5
-
6
- export
7
- class RenderableView<M,V extends IRenderable,P extends IPresenter<M,V>>
8
- extends Component<IRenderableViewProperty,any>
9
- {
10
- constructor(props: IRenderableViewProperty)
11
- {
12
- super(props);
13
- }
14
-
15
- render(): any
16
- {
17
- return this.props.view.render();
18
- }
19
- }
package/src/index.ts DELETED
@@ -1,17 +0,0 @@
1
- export {IRenderable} from './Presenter/IRenderable';
2
- export {IPresenterViewProperty} from './Presenter/IPresenterViewProperty';
3
- export {IRenderableViewProperty} from './Presenter/IRenderableViewProperty';
4
- export {RenderableView} from './Presenter/RenderableView';
5
- export {PresenterView} from './Presenter/PresenterView';
6
-
7
- export {IMenuItemLinkPropertySet} from './Navigation/IMenuItemLinkPropertySet';
8
- export {INavigationMenuBarPropertySet} from './Navigation/INavigationMenuBarPropertySet';
9
- export {INavigationMenuPropertySet} from './Navigation/INavigationMenuPropertySet';
10
- export {ISearchInputPropertySet} from './Navigation/ISearchInputPropertySet';
11
- export {LoginAndProfileMenu} from './Navigation/LoginAndProfileMenu';
12
- export {MenuItemLink} from './Navigation/MenuItemLink';
13
- export {NavigationMenu} from './Navigation/NavigationMenu';
14
- export {NavigationMenuBar} from './Navigation/NavigationMenuBar';
15
- export {SearchInput} from './Navigation/SearchInput';
16
-
17
- export {ReactApplication} from './Main/ReactApplication';
Binary file
package/tsconfig.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "CommonJS",
4
- "target": "ES2020",
5
- "sourceMap": true,
6
- "declaration": true,
7
- "outDir": "./dist",
8
- "jsx": "react"
9
- },
10
- "include": [
11
- "src/**/*",
12
- "typings/**/*"
13
- ],
14
- "exclude": [
15
- "node_modules",
16
- "lib",
17
- "Strata.Foundation.Core.iml"
18
- ]
19
- }