Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Raphael Ochsenbein
openid-connect-playground
Commits
d12c48c6
Verified
Commit
d12c48c6
authored
May 22, 2020
by
Raphael Ochsenbein
Browse files
Fix linting issues introduced by automatic migration
parent
68ecdbae
Pipeline
#1084
passed with stages
in 4 minutes and 38 seconds
Changes
17
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/app/app.component.spec.ts
View file @
d12c48c6
import
{
TestBed
,
async
}
from
'
@angular/core/testing
'
;
import
{
AppComponent
}
from
'
./app.component
'
;
import
{
BrowserModule
}
from
'
@angular/platform-browser
'
;
import
{
FormsModule
}
from
'
@angular/forms
'
;
import
{
BrowserAnimationsModule
}
from
'
@angular/platform-browser/animations
'
;
import
{
HttpClientModule
}
from
'
@angular/common/http
'
;
import
{
ButtonModule
}
from
'
carbon-components-angular
'
;
import
{
ToastModule
}
from
'
./toast
'
;
import
{
BrowserModule
}
from
'
@angular/platform-browser
'
;
import
{
FormsModule
}
from
'
@angular/forms
'
;
import
{
BrowserAnimationsModule
}
from
'
@angular/platform-browser/animations
'
;
import
{
HttpClientModule
}
from
'
@angular/common/http
'
;
import
{
ButtonModule
}
from
'
carbon-components-angular
'
;
import
{
ToastModule
}
from
'
./toast
'
;
describe
(
'
AppComponent
'
,
()
=>
{
beforeEach
(
async
(()
=>
{
...
...
src/app/configured-oidc.module.ts
View file @
d12c48c6
import
{
ModuleWithProviders
,
NgModule
}
from
'
@angular/core
'
;
import
{
NgOidcClientModule
}
from
'
ng-oidc-client
'
;
import
{
ModuleWithProviders
,
NgModule
}
from
'
@angular/core
'
;
import
{
NgOidcClientModule
}
from
'
ng-oidc-client
'
;
// Workaround according to:
// https://github.com/angular/angular/issues/23609
...
...
src/app/logout.metareducer.ts
View file @
d12c48c6
import
{
ActionReducer
,
MetaReducer
}
from
'
@ngrx/store
'
;
import
{
OidcActions
}
from
'
ng-oidc-client
'
;
import
{
State
}
from
'
./app.module
'
;
import
{
NotificationModule
}
from
'
carbon-components-angular
'
;
import
{
ActionReducer
,
MetaReducer
}
from
'
@ngrx/store
'
;
import
{
OidcActions
}
from
'
ng-oidc-client
'
;
import
{
State
}
from
'
./app.module
'
;
export
function
logout
(
reducer
:
ActionReducer
<
any
>
):
ActionReducer
<
any
>
{
return
(
state
:
any
,
action
:
any
)
=>
{
...
...
src/app/oidc-effects.service.ts
View file @
d12c48c6
import
{
tap
}
from
'
rxjs/operators
'
;
import
{
OidcActions
}
from
'
ng-oidc-client
'
;
import
{
Actions
,
Effect
,
ofType
}
from
'
@ngrx/effects
'
;
import
{
Action
}
from
'
@ngrx/store
'
;
import
{
Observable
}
from
'
rxjs
'
;
import
{
ToastService
}
from
'
./toast
'
;
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
tap
}
from
'
rxjs/operators
'
;
import
{
OidcActions
}
from
'
ng-oidc-client
'
;
import
{
Actions
,
Effect
,
ofType
}
from
'
@ngrx/effects
'
;
import
{
Action
}
from
'
@ngrx/store
'
;
import
{
Observable
}
from
'
rxjs
'
;
import
{
ToastService
}
from
'
./toast
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
@
Injectable
()
export
class
OidcEffectsService
{
...
...
src/app/oidc-guard.service.ts
View file @
d12c48c6
import
{
ActivatedRouteSnapshot
,
CanActivate
,
Router
,
RouterStateSnapshot
}
from
'
@angular/router
'
;
import
{
OidcFacade
}
from
'
ng-oidc-client
'
;
import
{
Observable
,
of
}
from
'
rxjs
'
;
import
{
switchMap
,
take
}
from
'
rxjs/operators
'
;
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
ActivatedRouteSnapshot
,
CanActivate
,
Router
,
RouterStateSnapshot
}
from
'
@angular/router
'
;
import
{
OidcFacade
}
from
'
ng-oidc-client
'
;
import
{
Observable
,
of
}
from
'
rxjs
'
;
import
{
switchMap
,
take
}
from
'
rxjs/operators
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
@
Injectable
()
export
class
OidcGuardService
implements
CanActivate
{
...
...
src/app/oidc-interceptor.service.ts
View file @
d12c48c6
import
{
switchMap
,
tap
}
from
'
rxjs/operators
'
;
import
{
HttpEvent
,
HttpHandler
,
HttpInterceptor
,
HttpRequest
}
from
'
@angular/common/http
'
;
import
{
Observable
}
from
'
rxjs
'
;
import
{
OidcFacade
}
from
'
ng-oidc-client
'
;
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
switchMap
}
from
'
rxjs/operators
'
;
import
{
HttpEvent
,
HttpHandler
,
HttpInterceptor
,
HttpRequest
}
from
'
@angular/common/http
'
;
import
{
Observable
}
from
'
rxjs
'
;
import
{
OidcFacade
}
from
'
ng-oidc-client
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
@
Injectable
()
export
class
OidcInterceptorService
implements
HttpInterceptor
{
...
...
src/app/toast-alt/toast-data.service.spec.ts
View file @
d12c48c6
import
{
BehaviorSubject
}
from
'
rxjs
'
;
import
{
ToastDataService
}
from
'
./toast-data.service
'
;
import
{
ToastRef
}
from
'
./toast-ref
'
;
import
{
BehaviorSubject
}
from
'
rxjs
'
;
import
{
ToastDataService
}
from
'
./toast-data.service
'
;
import
{
ToastRef
}
from
'
./toast-ref
'
;
describe
(
`ToastDataService`
,
()
=>
{
let
service
:
ToastDataService
;
...
...
src/app/toast-alt/toast-data.service.ts
View file @
d12c48c6
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
ToastRef
}
from
'
./toast-ref
'
;
import
{
BehaviorSubject
,
Observable
}
from
'
rxjs
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
ToastRef
}
from
'
./toast-ref
'
;
import
{
BehaviorSubject
,
Observable
}
from
'
rxjs
'
;
@
Injectable
()
export
class
ToastDataService
{
...
...
src/app/toast-alt/toast.component.ts
View file @
d12c48c6
import
{
Component
,
EventEmitter
,
Input
,
OnChanges
,
Output
}
from
'
@angular/core
'
;
import
{
OnInit
}
from
'
@angular/core
'
;
import
{
HostBinding
}
from
'
@angular/core
'
;
import
{
ToastStyle
}
from
'
./toast-ref
'
;
import
{
Component
,
EventEmitter
,
Input
,
OnChanges
,
Output
}
from
'
@angular/core
'
;
import
{
OnInit
}
from
'
@angular/core
'
;
import
{
HostBinding
}
from
'
@angular/core
'
;
import
{
ToastStyle
}
from
'
./toast-ref
'
;
@
Component
({
selector
:
'
app-toast-alt
'
,
...
...
src/app/toast-alt/toast.module.ts
View file @
d12c48c6
import
{
NgModule
}
from
'
@angular/core
'
;
import
{
ToastsComponent
}
from
'
./toasts.component
'
;
import
{
ToastService
}
from
'
./toast.service
'
;
import
{
CommonModule
}
from
'
@angular/common
'
;
import
{
ToastDataService
}
from
'
./toast-data.service
'
;
import
{
ToastComponent
}
from
'
./toast.component
'
;
import
{
OverlayModule
}
from
'
@angular/cdk/overlay
'
;
import
{
NgModule
}
from
'
@angular/core
'
;
import
{
ToastsComponent
}
from
'
./toasts.component
'
;
import
{
ToastService
}
from
'
./toast.service
'
;
import
{
CommonModule
}
from
'
@angular/common
'
;
import
{
ToastDataService
}
from
'
./toast-data.service
'
;
import
{
ToastComponent
}
from
'
./toast.component
'
;
import
{
OverlayModule
}
from
'
@angular/cdk/overlay
'
;
const
declareAndExport
=
[
ToastsComponent
,
...
...
src/app/toast-alt/toast.service.spec.ts
View file @
d12c48c6
import
{
Overlay
}
from
'
@angular/cdk/overlay
'
;
import
{
fakeAsync
,
tick
}
from
'
@angular/core/testing
'
;
import
{
ToastService
}
from
'
./toast.service
'
;
import
{
ToastDataService
}
from
'
./toast-data.service
'
;
import
{
Overlay
}
from
'
@angular/cdk/overlay
'
;
import
{
fakeAsync
,
tick
}
from
'
@angular/core/testing
'
;
import
{
ToastService
}
from
'
./toast.service
'
;
import
{
ToastDataService
}
from
'
./toast-data.service
'
;
export
class
PositionStrategyMock
{
global
=
()
=>
this
;
...
...
src/app/toast-alt/toast.service.ts
View file @
d12c48c6
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Overlay
}
from
'
@angular/cdk/overlay
'
;
import
{
MonoTypeOperatorFunction
,
throwError
,
timer
}
from
'
rxjs
'
;
import
{
ComponentPortal
}
from
'
@angular/cdk/portal
'
;
import
{
ToastsComponent
}
from
'
./toasts.component
'
;
import
{
ToastDataService
}
from
'
./toast-data.service
'
;
import
{
ToastRef
,
ToastStyle
,
ToastStyles
}
from
'
./toast-ref
'
;
import
{
catchError
,
take
}
from
'
rxjs/operators
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Overlay
}
from
'
@angular/cdk/overlay
'
;
import
{
MonoTypeOperatorFunction
,
throwError
,
timer
}
from
'
rxjs
'
;
import
{
ComponentPortal
}
from
'
@angular/cdk/portal
'
;
import
{
ToastsComponent
}
from
'
./toasts.component
'
;
import
{
ToastDataService
}
from
'
./toast-data.service
'
;
import
{
ToastRef
,
ToastStyle
,
ToastStyles
}
from
'
./toast-ref
'
;
import
{
catchError
,
take
}
from
'
rxjs/operators
'
;
const
fadeTime
=
500
;
...
...
src/app/toast-alt/toasts.component.spec.ts
View file @
d12c48c6
import
{
ComponentFixture
,
TestBed
}
from
'
@angular/core/testing
'
;
import
{
ToastsComponent
}
from
'
./toasts.component
'
;
import
{
ToastDataService
}
from
'
./toast-data.service
'
;
import
{
ToastComponent
}
from
'
./toast.component
'
;
import
{
ToastRef
,
ToastStyle
}
from
'
./toast-ref
'
;
import
{
NO_ERRORS_SCHEMA
}
from
'
@angular/core
'
;
import
{
ComponentFixture
,
TestBed
}
from
'
@angular/core/testing
'
;
import
{
ToastsComponent
}
from
'
./toasts.component
'
;
import
{
ToastDataService
}
from
'
./toast-data.service
'
;
import
{
ToastComponent
}
from
'
./toast.component
'
;
import
{
ToastRef
,
ToastStyle
}
from
'
./toast-ref
'
;
import
{
NO_ERRORS_SCHEMA
}
from
'
@angular/core
'
;
describe
(
`ToastsComponent`
,
()
=>
{
...
...
src/app/toast-alt/toasts.component.ts
View file @
d12c48c6
import
{
Component
,
HostBinding
,
ViewEncapsulation
}
from
'
@angular/core
'
;
import
{
Observable
}
from
'
rxjs
'
;
import
{
ToastRef
}
from
'
./toast-ref
'
;
import
{
ToastDataService
}
from
'
./toast-data.service
'
;
import
{
Component
,
HostBinding
,
ViewEncapsulation
}
from
'
@angular/core
'
;
import
{
Observable
}
from
'
rxjs
'
;
import
{
ToastRef
}
from
'
./toast-ref
'
;
import
{
ToastDataService
}
from
'
./toast-data.service
'
;
@
Component
({
selector
:
'
app-toasts-alt
'
,
...
...
src/app/toast/toast.component.ts
View file @
d12c48c6
import
{
Component
,
OnInit
,
OnDestroy
,
Inject
}
from
'
@angular/core
'
;
import
{
AnimationEvent
}
from
'
@angular/animations
'
;
import
{
ToastData
,
_TOAST_CONFIG_TOKEN
,
MyToastConfig
,
defaultToastConfig
}
from
'
./toast.config
'
;
import
{
ToastData
,
_TOAST_CONFIG_TOKEN
,
MyToastConfig
,
defaultToastConfig
}
from
'
./toast.config
'
;
import
{
ToastRef
}
from
'
./toast.ref
'
;
import
{
toastAnimations
,
ToastAnimationState
}
from
'
./toast.animation
'
;
...
...
src/app/toast/toast.module.ts
View file @
d12c48c6
import
{
ModuleWithProviders
,
NgModule
}
from
'
@angular/core
'
;
import
{
OverlayModule
}
from
'
@angular/cdk/overlay
'
;
import
{
ModuleWithProviders
,
NgModule
}
from
'
@angular/core
'
;
import
{
OverlayModule
}
from
'
@angular/cdk/overlay
'
;
import
{
NotificationModule
}
from
'
carbon-components-angular
'
;
import
{
ToastComponent
}
from
'
./toast.component
'
;
import
{
defaultToastConfig
,
_TOAST_CONFIG_TOKEN
}
from
'
./toast.config
'
;
...
...
src/app/toast/toast.service.ts
View file @
d12c48c6
import
{
Injectable
,
Injector
,
Inject
}
from
'
@angular/core
'
;
import
{
Overlay
,
OverlayRef
}
from
'
@angular/cdk/overlay
'
;
import
{
Overlay
,
}
from
'
@angular/cdk/overlay
'
;
import
{
ComponentPortal
,
PortalInjector
}
from
'
@angular/cdk/portal
'
;
import
{
ToastComponent
}
from
'
./toast.component
'
;
import
{
ToastData
,
_TOAST_CONFIG_TOKEN
,
MyToastConfig
,
defaultToastConfig
}
from
'
./toast.config
'
;
import
{
ToastRef
}
from
'
./toast.ref
'
;
import
{
interval
,
Observable
,
ReplaySubject
,
Subject
}
from
'
rxjs
'
;
import
{
auditTime
,
debounceTime
,
delay
,
delayWhen
,
throttleTime
}
from
'
rxjs/operators
'
;
import
{
interval
,
Observable
,
ReplaySubject
,
Subject
}
from
'
rxjs
'
;
import
{
delayWhen
,
}
from
'
rxjs/operators
'
;
@
Injectable
({
providedIn
:
'
root
'
})
export
class
ToastService
{
private
lastToast
:
ToastRef
;
private
toastsSubject
:
Subject
<
ToastData
>
=
new
ReplaySubject
(
1
);
private
trefSubject
:
Subject
<
ToastRef
>
=
new
ReplaySubject
(
1
);
private
toastsSubject
:
Subject
<
ToastData
>
=
new
ReplaySubject
<
ToastData
>
(
1
);
private
trefSubject
:
Subject
<
ToastRef
>
=
new
ReplaySubject
<
ToastRef
>
(
1
);
private
lastToastTime
:
number
;
constructor
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment