From 3d202a04b99f0e61b6ccf8b7a5610e1a15ca58e7 Mon Sep 17 00:00:00 2001 From: Herbert Eiselt Date: Mon, 11 Feb 2019 14:54:12 +0100 Subject: 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 --- .../odlux/framework/src/actions/authentication.ts | 8 ++++ .../wt/odlux/framework/src/actions/errorActions.ts | 25 ++++++++++++ .../framework/src/actions/navigationActions.ts | 47 ++++++++++++++++++++++ .../odlux/framework/src/actions/snackbarActions.ts | 20 +++++++++ .../wt/odlux/framework/src/actions/titleActions.ts | 10 +++++ 5 files changed, 110 insertions(+) create mode 100644 sdnr/wt/odlux/framework/src/actions/authentication.ts create mode 100644 sdnr/wt/odlux/framework/src/actions/errorActions.ts create mode 100644 sdnr/wt/odlux/framework/src/actions/navigationActions.ts create mode 100644 sdnr/wt/odlux/framework/src/actions/snackbarActions.ts create mode 100644 sdnr/wt/odlux/framework/src/actions/titleActions.ts (limited to 'sdnr/wt/odlux/framework/src/actions') 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 extends NavigationAction { + + constructor(public applicationName: string, public href?: string, public state?: TState, public replace: boolean = false ) { + super(); + + } +} + +export class PushAction extends NavigationAction { + constructor(public href: string, public state?: TState) { + super(); + + } +} + +export class ReplaceAction 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) { + 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 -- cgit 1.2.3-korg