This repository has been archived by the owner on May 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f806f0e
commit 9d07481
Showing
7 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
export { ContextType } from './src/app/contexts/context-type'; | ||
export { Context } from './src/app/contexts/context'; | ||
export { Contexts } from './src/app/contexts/contexts'; | ||
export { ContextTypes } from './src/app/contexts/context-types'; | ||
export { WIT_API_URL } from './src/app/api/wit-api'; | ||
export { ProcessTemplate } from './src/app/models/process-template'; | ||
export { Space, SpaceAttributes } from './src/app/models/space'; | ||
export { Team } from './src/app/models/team'; | ||
export { SpaceService } from './src/app/spaces/space.service'; | ||
export { Spaces } from './src/app/spaces/spaces'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export interface ContextType { | ||
name: string; | ||
icon?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { ContextType } from './context-type'; | ||
export class ContextTypes { | ||
|
||
static readonly BUILTIN: Map<string, ContextType> = new Map<string, ContextType>([ | ||
[ | ||
'user', | ||
{ | ||
name: 'User', | ||
icon: 'fa fa-user', | ||
} as ContextType | ||
], | ||
[ | ||
'space', | ||
{ | ||
name: 'Space', | ||
icon: 'fa fa-space-shuttle', | ||
} as ContextType | ||
], | ||
[ | ||
'team', | ||
{ | ||
name: 'Team', | ||
icon: 'fa fa-users' | ||
} as ContextType | ||
], | ||
[ | ||
'organization', | ||
{ | ||
name: 'Organization', | ||
icon: 'fa fa-cubes' | ||
} as ContextType | ||
] | ||
]); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Team } from './../models/team'; | ||
import { Space } from './../models/space'; | ||
import { User } from 'ngx-login-client'; | ||
import { ContextType } from './context-type'; | ||
|
||
export interface Context { | ||
// The entity that this context is for | ||
user: User; | ||
space?: Space; | ||
team?: Team; | ||
type: ContextType; | ||
path: string; | ||
name: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Context } from './context'; | ||
import { Observable } from 'rxjs'; | ||
export interface Contexts { | ||
/** | ||
* An observable which pushes changes to the array of recent contexts. | ||
* It is backed by a multicasted replay subject so you will always received | ||
* the latest value, regardless of when you subscribe. | ||
*/ | ||
recent: Observable<Context[]>; | ||
|
||
/** | ||
* An observable which pushes changes to the current context. | ||
* It is backed by a multicasted replay subject so you will always received | ||
* the latest value, regardless of when you subscribe. | ||
*/ | ||
current: Observable<Context>; | ||
|
||
/** | ||
* An observable which pushes changes to the default context | ||
* It is backed by a multicasted replay subject so you will always received | ||
* the latest value, regardless of when you subscribe. | ||
*/ | ||
default: Observable<Context>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Space } from './../models/space'; | ||
import { Observable } from 'rxjs'; | ||
export interface Spaces { | ||
|
||
/** | ||
* An observable which pushes changes to the current space. | ||
* It is backed by a multicasted replay subject so you will always received | ||
* the latest value, regardless of when you subscribe. | ||
*/ | ||
current: Observable<Space>; | ||
} |