summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/framework/src/actions
diff options
context:
space:
mode:
authorHerbert Eiselt <herbert.eiselt@highstreet-technologies.com>2019-02-11 14:54:12 +0100
committerHerbert Eiselt <herbert.eiselt@highstreet-technologies.com>2019-02-11 14:54:53 +0100
commit3d202a04b99f0e61b6ccf8b7a5610e1a15ca58e7 (patch)
treeab756cfa8de5eced886d3947423d198be8c0ce62 /sdnr/wt/odlux/framework/src/actions
parent12a8c669f52c0e84d580c078cee849b25133b585 (diff)
Add sdnr wt odlux
Add complete sdnr wireless transport app odlux core and apps Change-Id: I5dcbfb8f3b790e3bda7c8df67bd69d81958f65e5 Issue-ID: SDNC-576 Signed-off-by: Herbert Eiselt <herbert.eiselt@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/odlux/framework/src/actions')
-rw-r--r--sdnr/wt/odlux/framework/src/actions/authentication.ts8
-rw-r--r--sdnr/wt/odlux/framework/src/actions/errorActions.ts25
-rw-r--r--sdnr/wt/odlux/framework/src/actions/navigationActions.ts47
-rw-r--r--sdnr/wt/odlux/framework/src/actions/snackbarActions.ts20
-rw-r--r--sdnr/wt/odlux/framework/src/actions/titleActions.ts10
5 files changed, 110 insertions, 0 deletions
diff --git a/sdnr/wt/odlux/framework/src/actions/authentication.ts b/sdnr/wt/odlux/framework/src/actions/authentication.ts
new file mode 100644
index 000000000..8cbc22271
--- /dev/null
+++ b/sdnr/wt/odlux/framework/src/actions/authentication.ts
@@ -0,0 +1,8 @@
+import { Action } from '../flux/action';
+
+export class UpdateAuthentication extends Action {
+
+ constructor(public bearerToken: string | null) {
+ super();
+ }
+} \ No newline at end of file
diff --git a/sdnr/wt/odlux/framework/src/actions/errorActions.ts b/sdnr/wt/odlux/framework/src/actions/errorActions.ts
new file mode 100644
index 000000000..05d1868b1
--- /dev/null
+++ b/sdnr/wt/odlux/framework/src/actions/errorActions.ts
@@ -0,0 +1,25 @@
+import { Action } from '../flux/action';
+
+import { ErrorInfo } from '../models/errorInfo';
+export { ErrorInfo } from '../models/errorInfo';
+
+export class AddErrorInfoAction extends Action {
+
+ constructor(public errorInfo: ErrorInfo) {
+ super();
+ }
+}
+
+export class RemoveErrorInfoAction extends Action {
+
+ constructor(public errorInfo: ErrorInfo) {
+ super();
+ }
+}
+
+export class ClearErrorInfoAction extends Action {
+
+ constructor() {
+ super();
+ }
+} \ No newline at end of file
diff --git a/sdnr/wt/odlux/framework/src/actions/navigationActions.ts b/sdnr/wt/odlux/framework/src/actions/navigationActions.ts
new file mode 100644
index 000000000..3aee9e455
--- /dev/null
+++ b/sdnr/wt/odlux/framework/src/actions/navigationActions.ts
@@ -0,0 +1,47 @@
+import { Action } from "../flux/action";
+
+export abstract class NavigationAction extends Action { }
+
+export class NavigateToApplication<TState = { }> extends NavigationAction {
+
+ constructor(public applicationName: string, public href?: string, public state?: TState, public replace: boolean = false ) {
+ super();
+
+ }
+}
+
+export class PushAction<TState = { }> extends NavigationAction {
+ constructor(public href: string, public state?: TState) {
+ super();
+
+ }
+}
+
+export class ReplaceAction<TState = { }> extends NavigationAction {
+ constructor(public href: string, public state?: TState) {
+ super();
+
+ }
+}
+
+export class GoAction extends NavigationAction {
+ constructor(public index: number) {
+ super();
+
+ }
+}
+
+export class GoBackAction extends NavigationAction {
+
+}
+
+export class GoForwardeAction extends NavigationAction {
+
+}
+
+export class LocationChanged extends NavigationAction {
+ constructor(public pathname: string, public search: string, public hash: string ) {
+ super();
+
+ }
+} \ No newline at end of file
diff --git a/sdnr/wt/odlux/framework/src/actions/snackbarActions.ts b/sdnr/wt/odlux/framework/src/actions/snackbarActions.ts
new file mode 100644
index 000000000..c5bf9278b
--- /dev/null
+++ b/sdnr/wt/odlux/framework/src/actions/snackbarActions.ts
@@ -0,0 +1,20 @@
+import { Action } from '../flux/action';
+import { SnackbarItem } from '../models/snackbarItem';
+import { Omit } from '@material-ui/core';
+
+export class AddSnackbarNotification extends Action {
+
+ constructor(notification: Omit<SnackbarItem, 'key' >) {
+ super();
+
+ this.notification = { ...notification, key: (new Date().getTime() + Math.random()) }
+ }
+
+ public notification: SnackbarItem
+}
+
+export class RemoveSnackbarNotification extends Action {
+ constructor(public key: number) {
+ super();
+ }
+} \ No newline at end of file
diff --git a/sdnr/wt/odlux/framework/src/actions/titleActions.ts b/sdnr/wt/odlux/framework/src/actions/titleActions.ts
new file mode 100644
index 000000000..b641bab95
--- /dev/null
+++ b/sdnr/wt/odlux/framework/src/actions/titleActions.ts
@@ -0,0 +1,10 @@
+import { Action } from '../flux/action';
+
+import { IconType } from '../models/iconDefinition';
+
+export class SetTitleAction extends Action {
+
+ constructor(public title: string, public icon?: IconType) {
+ super();
+ }
+} \ No newline at end of file