-
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.
update upload and add remove to upload-file component
- Loading branch information
Yanek Voloshchuk
committed
Sep 16, 2024
1 parent
a834e56
commit f035d4e
Showing
9 changed files
with
194 additions
and
38 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
77 changes: 77 additions & 0 deletions
77
src/app/component-demos/upload-demo/upload-demo-api-spec/upload-demo-api-spec.component.html
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,77 @@ | ||
<div class="api-specification"> | ||
<h2>Properties</h2> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>Property</th> | ||
<th>Type</th> | ||
<th>Default Value</th> | ||
<th>Description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td><code>id</code></td> | ||
<td><code>string</code></td> | ||
<td><code>''</code></td> | ||
<td> | ||
HTML id of the element. | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><code>multiple</code></td> | ||
<td><code>boolean</code></td> | ||
<td><code></code></td> | ||
<td>if <code>false</code> only 1 document can be added, otherwise you can add as much documents as you want.</td> | ||
</tr> | ||
<tr> | ||
<td><code>accept</code></td> | ||
<td><code>string[]</code></td> | ||
<td><code>'[]'</code></td> | ||
<td>is a string array which contains all valid document types.</td> | ||
</tr> | ||
<tr> | ||
<td><code>text</code></td> | ||
<td><code>string</code></td> | ||
<td><code>'Upload'</code></td> | ||
<td>Text in the Upload Field.</td> | ||
</tr> | ||
<tr> | ||
<td><code>showFileList</code></td> | ||
<td><code>boolean</code></td> | ||
<td><code>false</code></td> | ||
<td>Shows the list of added files.</td> | ||
</tr> | ||
<tr> | ||
<td><code>removable</code></td> | ||
<td><code>boolean</code></td> | ||
<td><code>true</code></td> | ||
<td>Uploaded file can be deleted using icon in chip.</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<h2>Events</h2> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>Event</th> | ||
<th>Description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td><code>fileEmitter</code></td> | ||
<td>Emits when file is uploaded/removed. Contains file list</td> | ||
</tr> | ||
<tr> | ||
<td><code>errorEmitter</code></td> | ||
<td>(ErrorType) ONLY_SINGLE_FILE: if only 1 File is allowed and user tries to add more than 1 File in 1 dialog.</td> | ||
</tr> | ||
<tr> | ||
<td><code>errorEmitter</code></td> | ||
<td>(ErrorType) FILETYPE_NOT_SUPPORTED: if user tries to add unsupported file type</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> |
24 changes: 24 additions & 0 deletions
24
src/app/component-demos/upload-demo/upload-demo-api-spec/upload-demo-api-spec.component.scss
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 @@ | ||
.api-specification { | ||
font-family: Arial, sans-serif; | ||
} | ||
|
||
.api-specification h2 { | ||
color: #333; | ||
} | ||
|
||
.api-specification table { | ||
width: 100%; | ||
border-collapse: collapse; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.api-specification th, | ||
.api-specification td { | ||
border: 1px solid #ccc; | ||
padding: 8px; | ||
text-align: left; | ||
} | ||
|
||
.api-specification th { | ||
background-color: #f2f2f2; | ||
} |
12 changes: 12 additions & 0 deletions
12
src/app/component-demos/upload-demo/upload-demo-api-spec/upload-demo-api-spec.component.ts
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,12 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-upload-demo-api-spec', | ||
standalone: true, | ||
imports: [], | ||
templateUrl: './upload-demo-api-spec.component.html', | ||
styleUrl: './upload-demo-api-spec.component.scss' | ||
}) | ||
export class UploadDemoApiSpecComponent { | ||
|
||
} |
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