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
<div class="row mt-3"> | |
<div class="col-2 p-1 text-center align-self-center" | |
[ngClass]="{ | |
'bg-info': item.color === 'blue', | |
'bg-success': item.color === 'green', | |
'bg-warning': item.color === 'yellow', | |
'bg-danger': item.color === 'red' | |
}" | |
*ngFor="let item of filteredData"> | |
<strong>{{item.company}}</strong><br> |
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
.bounceIn | |
opacity: 0; | |
animation-name: bounceIn; | |
animation-duration: 450ms; | |
animation-timing-function: linear; | |
animation-fill-mode: forwards; | |
@keyframes bounceIn | |
0% | |
opacity: 0; |
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
filterApplied: boolean = false; | |
private applyFilterAnimation(): void { | |
this.filterApplied = true; | |
setTimeout(() => this.filterApplied = false, 1500); | |
} |
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
<div class="row mt-3"> | |
<div class="col-2 p-1 text-center align-self-center" | |
[ngClass]="{ | |
'bg-info': item.color === 'blue', | |
'bg-success': item.color === 'green', | |
'bg-warning': item.color === 'yellow', | |
'bg-danger': item.color === 'red', | |
'bounceIn': filterApplied | |
}" | |
[ngStyle]="(filterApplied)?{ 'animation-delay': (150 + gridIdx * 1000 / filteredData.length ) + 'ms' }:{}" |
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
'use strict'; | |
const _ = require('lodash'); | |
const Utils = require('../../utils'); | |
const DataTypes = require('../../data-types'); | |
const TableHints = require('../../table-hints'); | |
const AbstractQueryGenerator = require('../abstract/query-generator'); | |
const randomBytes = require('crypto').randomBytes; | |
const semver = require('semver'); |
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
import { TransitionService } from '@uirouter/core'; | |
import { AuthService } from './auth.service'; | |
/** | |
* This file contains a Transition Hook which protects a | |
* route that requires authentication. | |
* | |
* This hook redirects to /login when both: | |
* - The user is not authenticated | |
* - The user is navigating to a state that requires authentication |
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
imports: [ | |
UIRouterModule.forRoot({ | |
states: APP_STATES, | |
useHash: true, | |
otherwise: { state: 'home' }, | |
config: routerConfigFn, | |
}), | |
GlobalModule, | |
BrowserModule, | |
FormsModule, |
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
{ | |
name: 'main.dashboards', | |
url: '/dashboards', | |
data: { | |
requiresAuth: true, | |
routeEnabled: true | |
}, | |
views: { | |
'desktop-view@main': DashboardsPageComponent | |
} |
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
const redirectToLogin = (transition) => { | |
const authService: AuthService = transition.injector().get(AuthService); | |
const $state = transition.router.stateService; | |
if (!authService.isAuthenticated()) { | |
return $state.target('login', undefined, { location: false }); | |
} else { | |
const toState = transition.to(); | |
try { | |
if (!toState.data.routeEnabled) { | |
return $state.target(null, undefined, { location: false }); |
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
/** UIRouter Config */ | |
export function uiRouterConfigFn(router: UIRouter, injector: Injector) { | |
// If no URL matches, go to the `login` state by default | |
router.urlService.rules.otherwise({ | |
state: 'login' | |
}); | |
const transitionService = router.transitionService; | |
requiresAuthHook(transitionService); |