-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from r-hannuschka/development
2.1.0
- Loading branch information
Showing
131 changed files
with
3,390 additions
and
463 deletions.
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
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
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1,5 @@ | ||
<ngx-fileupload [@.disabled]="disableAnimations" [url]="'http://localhost:3000/upload'" [validator]="validator"></ngx-fileupload> | ||
<app-ui--header [menuItems]="menuItems"></app-ui--header> | ||
|
||
<main class="container"> | ||
<router-outlet></router-outlet> | ||
</main> |
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,11 +1,19 @@ | ||
@import 'variables'; | ||
|
||
:host { | ||
|
||
ngx-fileupload { | ||
height: 300px; | ||
width: 480px; | ||
} | ||
::ng-deep { | ||
app-ui--header .navbar { | ||
background-color: map-get($colors, black); | ||
color: map-get($colors, text); | ||
|
||
.nav-link { | ||
color: map-get($colors, textDark); | ||
} | ||
|
||
.fileupload-drop { | ||
background: plum; | ||
.nav-link.route-link-active { | ||
color: inherit; | ||
} | ||
} | ||
} | ||
} | ||
} |
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,30 +1,20 @@ | ||
import { Component, OnInit } from "@angular/core"; | ||
import { Component } from "@angular/core"; | ||
import { environment } from "../environments/environment"; | ||
import { MaxUploadSizeValidator } from "./validators/max-size.validator"; | ||
import { OnlyZipValidator } from "./validators/only-zip.validator"; | ||
import { isImage } from "./validators/image.validator"; | ||
import { Validator, ValidationBuilder } from "lib/public-api"; | ||
import { MenuItem, MainMenuItems } from "@ngx-fileupload-example/data/base/data"; | ||
|
||
@Component({ | ||
selector: "app-root", | ||
templateUrl: "./app.component.html", | ||
styleUrls: ["./app.component.scss"] | ||
}) | ||
export class AppComponent implements OnInit { | ||
export class AppComponent { | ||
title = "ngx-fileupload"; | ||
|
||
public disableAnimations = false; | ||
|
||
public validator: Validator; | ||
public menuItems: MenuItem[] = MainMenuItems; | ||
|
||
constructor() { | ||
this.disableAnimations = environment.disableAnimations || false; | ||
} | ||
|
||
public ngOnInit() { | ||
this.validator = ValidationBuilder.and( | ||
ValidationBuilder.or(new OnlyZipValidator(), isImage), | ||
new MaxUploadSizeValidator() | ||
); | ||
} | ||
} |
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,17 +1,63 @@ | ||
import { BrowserModule } from "@angular/platform-browser"; | ||
import { NgModule } from "@angular/core"; | ||
import { RouterModule } from "@angular/router"; | ||
import { HTTP_INTERCEPTORS } from "@angular/common/http"; | ||
|
||
import { NgxFileUploadModule } from "@r-hannuschka/ngx-fileupload"; | ||
import { IgxIconModule } from "igniteui-angular"; | ||
import { HighlightModule } from "ngx-highlightjs"; | ||
import xml from "highlight.js/lib/languages/xml"; | ||
import scss from "highlight.js/lib/languages/scss"; | ||
import typescript from "highlight.js/lib/languages/typescript"; | ||
import javascript from "highlight.js/lib/languages/javascript"; | ||
|
||
/** | ||
* Import every language you wish to highlight here | ||
* NOTE: The name of each language must match the file name its imported from | ||
*/ | ||
export function hljsLanguages() { | ||
return [ | ||
{name: "typescript", func: typescript}, | ||
{name: "javascript", func: javascript}, | ||
{name: "scss", func: scss}, | ||
{name: "xml", func: xml} | ||
]; | ||
} | ||
|
||
import { AppComponent } from "./app.component"; | ||
import { NgxFileUploadModule } from "lib/public-api"; | ||
import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; | ||
|
||
import { UiModule } from "@ngx-fileupload-example/ui"; | ||
import { FakeUploadInterceptor } from "@ngx-fileupload-example/utils/http"; | ||
import { CustomizePage } from "@ngx-fileupload-example/page/customize"; | ||
import { Dashboard } from "@ngx-fileupload-example/page/dashboard"; | ||
import { ValidationPage } from "@ngx-fileupload-example/page/validation"; | ||
|
||
@NgModule( { | ||
@NgModule({ | ||
declarations: [ | ||
AppComponent | ||
], | ||
imports: [ | ||
BrowserModule, | ||
NgxFileUploadModule | ||
BrowserAnimationsModule, | ||
NgxFileUploadModule, | ||
RouterModule.forRoot([], {useHash: true}), | ||
CustomizePage, | ||
Dashboard, | ||
ValidationPage, | ||
UiModule, | ||
IgxIconModule, | ||
HighlightModule.forRoot({ | ||
languages: hljsLanguages | ||
}) | ||
], | ||
bootstrap: [AppComponent], | ||
} ) | ||
providers: [ | ||
{ | ||
provide: HTTP_INTERCEPTORS, | ||
useClass: FakeUploadInterceptor, | ||
multi: true | ||
} | ||
] | ||
}) | ||
export class AppModule { } |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.