Skip to content

Commit 102978d

Browse files
committed
added new components
1 parent ce86d38 commit 102978d

File tree

519 files changed

+31655
-9975
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

519 files changed

+31655
-9975
lines changed

angular.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
"node_modules/rickshaw/rickshaw.min.js",
3636
"node_modules/moment/min/moment.min.js",
3737
"node_modules/fullcalendar/dist/fullcalendar.min.js",
38+
"node_modules/skycons/skycons.js",
39+
"node_modules/dropzone/dist/dropzone.js",
3840
"node_modules/parsleyjs/dist/parsley.js",
3941
"node_modules/jasny-bootstrap/dist/js/jasny-bootstrap.min.js",
4042
"node_modules/markdown/lib/markdown.js",
@@ -51,6 +53,8 @@
5153
"node_modules/jquery-ui/ui/mouse.js",
5254
"node_modules/jquery-ui/ui/sortable.js",
5355
"node_modules/jquery-ui/ui/draggable.js",
56+
"node_modules/jvectormap/jquery-jvectormap.min.js",
57+
"node_modules/jvectormap-world/jquery-jvectormap-world-mill-en.js",
5458
"node_modules/jquery-sparkline/jquery.sparkline.min.js",
5559
"node_modules/magnific-popup/dist/jquery.magnific-popup.min.js",
5660
"node_modules/jquery-flot/jquery.flot.js",

package.json

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
"test": "ng test",
1212
"lint": "ng lint"
1313
},
14+
"private": true,
1415
"dependencies": {
15-
"@agm/core": "1.0.0-beta.5",
16+
"@agm/core": "1.0.0-beta.6",
1617
"@angular/animations": "8.0.0",
1718
"@angular/common": "8.0.0",
1819
"@angular/compiler": "8.0.0",
@@ -22,8 +23,11 @@
2223
"@angular/platform-browser": "8.0.0",
2324
"@angular/platform-browser-dynamic": "8.0.0",
2425
"@angular/router": "8.0.0",
25-
"angular-froala-wysiwyg": "3.0.2",
26-
"angular2-datatable": "0.6.0",
26+
"@ngx-loading-bar/core": "4.1.1",
27+
"@ngx-loading-bar/router": "4.1.1",
28+
"@swimlane/ngx-datatable": "15.0.2",
29+
"@tinymce/tinymce-angular": "2.2.0",
30+
"angular2-text-mask": "8.0.5",
2731
"animate.css": "3.5.2",
2832
"awesome-bootstrap-checkbox": "1.0.1",
2933
"bootstrap": "4.0.0-beta",
@@ -34,29 +38,33 @@
3438
"bootstrap-slider": "9.8.1",
3539
"core-js": "2.4.1",
3640
"d3": "3.5.17",
41+
"dropzone": "5.1.1",
3742
"easy-pie-chart": "2.1.7",
3843
"font-awesome": "4.7.0",
3944
"fullcalendar": "3.4.0",
4045
"glyphicons-halflings": "https://github.com/inway/glyphicons-halflings#df545d9e4bdae9b5ffa112fcb70b3f8350929875",
46+
"govpredict-morris": "^0.5.1",
4147
"jasny-bootstrap": "3.1.3",
4248
"jquery": "3.2.1",
4349
"jquery-flot": "0.8.3",
4450
"jquery-slimscroll": "1.3.8",
4551
"jquery-sparkline": "2.4.0",
4652
"jquery-ui": "git://github.com/jquery/jquery-ui.git#1.11.4",
47-
"jqvmap": "https://github.com/shoudaos/jqvmap.git#7828d7cbacfcc91850831aa6fe6f7b8657e7aa17",
53+
"jquery.animate-number": "0.0.14",
54+
"jvectormap": "2.0.4",
55+
"line-awesome": "icons8/line-awesome",
4856
"magnific-popup": "1.1.0",
4957
"markdown": "0.5.0",
5058
"messenger": "git+https://github.com/HubSpot/messenger.git#v1.4.2",
5159
"moment": "2.15.2",
5260
"morris.js": "0.5.0",
5361
"ng-autosize": "1.1.0",
62+
"ng2-carouselamos": "3.2.0",
5463
"ng2-datetime": "1.4.0",
55-
"ng2-file-upload": "1.2.1",
5664
"ng2-select2": "1.0.0-beta.16",
5765
"ng2-table": "1.3.2",
5866
"ngx-bootstrap": "5.0.0",
59-
"ngx-chips": "2.0.2",
67+
"ngx-trend": "^3.4.3",
6068
"nvd3": "1.8.6",
6169
"parsleyjs": "2.7.2",
6270
"popper.js": "1.12.9",
@@ -72,7 +80,14 @@
7280
},
7381
"napa": {
7482
"twitter-bootstrap-wizard": "git://github.com/VinceG/twitter-bootstrap-wizard.git#62a9aca8cc61fdb496c4bf7b92e1ff70c698667e",
75-
"jquery.flot.animator": "https://github.com/Codicode/flotanimator.git#3c256c0183d713fd3bf41d04417873928eb1a751"
83+
"jvectormap-world": "http://jvectormap.com/js/jquery-jvectormap-world-mill-en.js",
84+
"bootstrap_calendar": "https://github.com/xero/bootstrap_calendar.git#1.0.1",
85+
"jquery.nestable": "https://github.com/dbushell/Nestable.git#4f93032cfafe2002f24ed6bd7dc1510931498503",
86+
"jquery.flot.animator": "https://github.com/Codicode/flotanimator.git#3c256c0183d713fd3bf41d04417873928eb1a751",
87+
"jQuery-Mapael": "https://github.com/neveldo/jQuery-Mapael.git#0.7.1",
88+
"skycons": "https://github.com/darkskyapp/skycons.git#7095ecf5f653dbcadbddb0d317b42e65fe091eae",
89+
"flot.dashes": "https://github.com/cquartier/flot.dashes.git",
90+
"jquery.flot-orderBars": "https://github.com/emmerich/flot-orderBars.git"
7691
},
7792
"devDependencies": {
7893
"@angular-builders/custom-webpack": "^8.1.0",

src/app/app.config.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { Injectable } from '@angular/core';
2+
3+
@Injectable()
4+
export class AppConfig {
5+
config = {
6+
settings: {
7+
colors: {
8+
'white': '#fff',
9+
'black': '#000',
10+
'gray-light': '#999',
11+
'gray-lighter': '#eee',
12+
'gray': '#666',
13+
'gray-dark': '#343434',
14+
'gray-darker': '#222',
15+
'gray-semi-light': '#777',
16+
'gray-semi-lighter': '#ddd',
17+
'brand-primary': '#5d8fc2',
18+
'brand-success': '#64bd63',
19+
'brand-warning': '#f0b518',
20+
'brand-danger': '#dd5826',
21+
'brand-info': '#5dc4bf'
22+
},
23+
},
24+
};
25+
26+
getConfig(): Object {
27+
return this.config;
28+
}
29+
}
30+

src/app/app.routes.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ export const ROUTES: Routes = [{
1313
{
1414
path: 'error', component: ErrorComponent
1515
},
16-
{
17-
path: 'landing', loadChildren: './pages/landing/landing.module#LandingModule'
18-
},
1916
{
2017
path: '**', component: ErrorComponent
2118
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {Directive, ElementRef, OnInit} from '@angular/core';
2+
declare let jQuery: any;
3+
declare let Dropzone: any;
4+
5+
Dropzone.autoDiscover = false;
6+
7+
@Directive ({
8+
selector: '[dropzone-demo]'
9+
})
10+
11+
export class DropzoneDemoDirective implements OnInit {
12+
$el: any;
13+
14+
constructor(el: ElementRef) {
15+
this.$el = jQuery(el.nativeElement);
16+
this.$el.addClass('dropzone');
17+
}
18+
19+
ngOnInit(): void {
20+
const dropzone = new Dropzone(this.$el[0], {});
21+
}
22+
23+
}

src/app/layout/directives/flot/flot.directive.ts renamed to src/app/components/flot/flot.directive.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { Directive, ElementRef, Input } from '@angular/core';
1+
import {AfterViewInit, Directive, ElementRef, Input} from '@angular/core';
22
declare let jQuery: any;
33

44
@Directive ({
55
selector: '[flot-chart]'
66
})
77

8-
export class FlotChart {
8+
export class FlotChartDirective implements AfterViewInit {
99
$el: any;
1010
@Input() data: any;
1111
@Input() options: string;
@@ -43,7 +43,7 @@ export class FlotChart {
4343
});
4444
}
4545

46-
ngOnInit(): void {
46+
ngAfterViewInit(): void {
4747
this.render();
4848
}
4949
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { NgModule } from '@angular/core';
2+
import { FlotChartDirective } from './flot.directive';
3+
4+
@NgModule({
5+
declarations: [
6+
FlotChartDirective
7+
],
8+
exports: [
9+
FlotChartDirective
10+
]
11+
})
12+
export class FlotChartModule {
13+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import {AfterViewInit, Directive, ElementRef, Input} from '@angular/core';
2+
declare let jQuery: any;
3+
4+
@Directive ({
5+
selector: '[mapael-layers-map]'
6+
})
7+
8+
export class MapaelLayersMapDirective implements AfterViewInit {
9+
$el: any;
10+
@Input() height: number;
11+
@Input() marginBottom: number;
12+
@Input() data: any;
13+
@Input() zoom: any;
14+
15+
constructor(el: ElementRef) {
16+
this.$el = jQuery(el.nativeElement);
17+
}
18+
19+
render(): void {
20+
const $map = this.$el;
21+
$map.css('height', this.height || 394).css('margin-bottom', this.marginBottom || (-15));
22+
if ($map.parents('.widget')[0]) {
23+
$map.find('.map').css('height', parseInt($map.parents('.widget').css('height'), 10) - 40);
24+
}
25+
$map.mapael(this.data);
26+
27+
if (this.zoom) {
28+
$map.trigger('zoom', this.zoom);
29+
}
30+
}
31+
32+
ngAfterViewInit(): void {
33+
this.render();
34+
}
35+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { NgModule } from '@angular/core';
2+
import { MapaelLayersMapDirective } from './mapael.directive';
3+
4+
@NgModule({
5+
declarations: [
6+
MapaelLayersMapDirective
7+
],
8+
exports: [
9+
MapaelLayersMapDirective
10+
]
11+
})
12+
export class MapaelLayersMapModule {
13+
}

src/app/layout/directives/morris/morris.directive.ts renamed to src/app/components/morris/morris.directive.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { Directive, ElementRef, Input } from '@angular/core';
1+
import {AfterViewInit, Directive, ElementRef, Input} from '@angular/core';
22
declare let jQuery: any;
33

44
@Directive ({
55
selector: '[morris-chart]'
66
})
77

8-
export class MorrisChart {
8+
export class MorrisChartDirective implements AfterViewInit {
99
$el: any;
1010
@Input() height: number;
1111
@Input() type: string;
@@ -28,7 +28,7 @@ export class MorrisChart {
2828
/* tslint:enable */
2929
}
3030

31-
ngOnInit(): void {
32-
this.render();
31+
ngAfterViewInit(): void {
32+
this.render();
3333
}
3434
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { NgModule } from '@angular/core';
2+
import { MorrisChartDirective } from './morris.directive';
3+
4+
@NgModule({
5+
declarations: [
6+
MorrisChartDirective
7+
],
8+
exports: [
9+
MorrisChartDirective
10+
]
11+
})
12+
export class MorrisChartModule {
13+
}

src/app/layout/directives/nvd3/nvd3.directive.ts renamed to src/app/components/nvd3/nvd3.directive.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Directive, ElementRef, Input } from '@angular/core';
1+
import {AfterViewInit, Directive, ElementRef, Input} from '@angular/core';
22
declare let jQuery: any;
33
declare let nv: any;
44
declare let d3: any;
@@ -7,7 +7,7 @@ declare let d3: any;
77
selector: '[nvd3-chart]'
88
})
99

10-
export class Nvd3Chart {
10+
export class Nvd3ChartDirective implements AfterViewInit {
1111
$el: any;
1212
@Input() chart: any;
1313
@Input() height: string;
@@ -19,7 +19,7 @@ export class Nvd3Chart {
1919

2020
render(): void {
2121
nv.addGraph(() => {
22-
let chart = this.chart;
22+
const chart = this.chart;
2323
d3.select(this.$el.find('svg')[0])
2424
.style('height', this.height || '300px')
2525
.datum(this.datum)
@@ -33,7 +33,7 @@ export class Nvd3Chart {
3333
});
3434
}
3535

36-
ngOnInit(): void {
36+
ngAfterViewInit(): void {
3737
this.render();
3838
}
3939
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { NgModule } from '@angular/core';
2+
import { Nvd3ChartDirective } from './nvd3.directive';
3+
4+
@NgModule({
5+
declarations: [
6+
Nvd3ChartDirective
7+
],
8+
exports: [
9+
Nvd3ChartDirective
10+
]
11+
})
12+
export class Nvd3ChartModule {
13+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import {AfterViewInit, Directive, ElementRef, Input} from '@angular/core';
2+
declare let jQuery: any;
3+
declare let Rickshaw: any;
4+
5+
@Directive ({
6+
selector: '[rickshaw-chart]'
7+
})
8+
9+
export class RickshawChartDirective implements AfterViewInit {
10+
$el: any;
11+
@Input() height: string;
12+
@Input() series: Array<any>;
13+
@Input() seriesData: Array<any>;
14+
@Input() random: any;
15+
@Input() configureProps: Object;
16+
@Input() realtime: boolean;
17+
@Input() renderer: string;
18+
19+
constructor(el: ElementRef) {
20+
this.$el = jQuery(el.nativeElement);
21+
}
22+
23+
render(): void {
24+
const graph = new Rickshaw.Graph({
25+
element: this.$el[0],
26+
height: this.height,
27+
renderer: this.renderer || 'area',
28+
series: this.series
29+
});
30+
31+
const onResize = () => {
32+
const configureProperties = jQuery.extend({
33+
height: this.height
34+
}, this.configureProps);
35+
graph.configure(configureProperties);
36+
graph.render();
37+
38+
this.$el.find('svg').css({height: this.height, width: '100%'});
39+
};
40+
41+
jQuery(window).on('sn:resize', onResize);
42+
onResize();
43+
44+
const hoverDetail = new Rickshaw.Graph.HoverDetail({
45+
graph: graph,
46+
xFormatter: function(x): string {
47+
return new Date(x * 1000).toString();
48+
}
49+
});
50+
51+
if (this.realtime) {
52+
setInterval( () => {
53+
this.random.removeData(this.seriesData);
54+
this.random.addData(this.seriesData);
55+
graph.update();
56+
57+
}, 1000 );
58+
}
59+
}
60+
61+
ngAfterViewInit(): void {
62+
this.render();
63+
}
64+
}

0 commit comments

Comments
 (0)