mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
[ADF-1769] Added JSDocs for directives (#2964)
This commit is contained in:
parent
d731cc651c
commit
b45048b5ed
@ -30,17 +30,17 @@ Some sample CSS to show the drag and drop area:
|
|||||||
|
|
||||||
### Properties
|
### Properties
|
||||||
|
|
||||||
| Name | Type | Default | Description |
|
| Name | Type | Default value | Description |
|
||||||
| ---- | ---- | ------- | ----------- |
|
| ---- | ---- | ------------- | ----------- |
|
||||||
| file-draggable | boolean | true | Toggles between enable/disable of the drag-and-drop functionality. |
|
| enabled | `boolean` | `true` | Enables/disables drag-and-drop functionality. |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Type | Description |
|
||||||
| ---- | ----------- |
|
| ---- | ---- | ----------- |
|
||||||
| filesEntityDropped | Emitted when one or more files are dragged and dropped onto the draggable element, such as a `div` |
|
| filesDropped | `EventEmitter<File[]>` | Emitted when one or more files are dragged and dropped onto the draggable element. |
|
||||||
| folderEntityDropped | Emitted when a directory is dragged and dropped onto the draggable element, such as a `div` |
|
| filesEntityDropped | `EventEmitter<any>` | Emitted when one or more files are dragged and dropped onto the draggable element. |
|
||||||
| filesDropped | Emitted when one or more files are dragged and dropped onto the draggable element, such as a `div` |
|
| folderEntityDropped | `EventEmitter<any>` | Emitted when a directory is dragged and dropped onto the draggable element. |
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@ Allows folders to be created.
|
|||||||
|
|
||||||
### Properties
|
### Properties
|
||||||
|
|
||||||
| Name | Type | Default | Description |
|
| Name | Type | Default value | Description |
|
||||||
| ---- | ---- | ------- | ----------- |
|
| ---- | ---- | ------------- | ----------- |
|
||||||
| adf-create-folder | string | '-my-' | Parent folder where the new folder will be located after creation |
|
| parentNodeId | `string` | `DEFAULT_FOLDER_PARENT_ID` | Parent folder where the new folder will be located after creation. |
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@ Allows folders to be edited.
|
|||||||
|
|
||||||
### Properties
|
### Properties
|
||||||
|
|
||||||
| Name | Type | Default | Description |
|
| Name | Type | Default value | Description |
|
||||||
| ----------------- | ---------------------- | ------- | ----------------------------------- |
|
| ---- | ---- | ------------- | ----------- |
|
||||||
| adf-edit-folder | MinimalNodeEntryEntity | | The folder node entity for editing |
|
| folder | `MinimalNodeEntryEntity` | | Folder node to edit. |
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
|
@ -14,6 +14,14 @@ Adds highlighting to selected sections of an HTML element's content.
|
|||||||
</div>
|
</div>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
|
||||||
|
| Name | Type | Default value | Description |
|
||||||
|
| ---- | ---- | ------------- | ----------- |
|
||||||
|
| selector | `string` | `''` | Class selector for highlightable elements. |
|
||||||
|
| search | `string` | `''` | Text to highlight. |
|
||||||
|
| classToApply | `string` | `'adf-highlight'` | CSS class used to apply highlighting. |
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
Add `adf-highlight` with a search term to an element to highlight occurrences
|
Add `adf-highlight` with a search term to an element to highlight occurrences
|
||||||
|
@ -19,16 +19,16 @@ Deletes multiple files and folders.
|
|||||||
|
|
||||||
### Properties
|
### Properties
|
||||||
|
|
||||||
| Name | Type | Default | Description |
|
| Name | Type | Default value | Description |
|
||||||
| ---- | ---- | ------- | ----------- |
|
| ---- | ---- | ------------- | ----------- |
|
||||||
| adf-delete | MinimalNodeEntity\[] | \[] | Nodes to delete |
|
| selection | `MinimalNodeEntity[]` | | Array of nodes to delete. |
|
||||||
| permanent | boolean | false | Permanent delete |
|
| permanent | `boolean` | `false` | If true then the nodes are deleted immediately rather than being put in the trash. |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Type | Description |
|
||||||
| ---- | ----------- |
|
| ---- | ---- | ----------- |
|
||||||
| delete | emitted when delete process is done |
|
| delete | `EventEmitter<any>` | Emitted when the nodes have been deleted. |
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
|
@ -16,3 +16,9 @@ Allows folders and/or files to be downloaded. Multiple nodes are packed as a '.Z
|
|||||||
...
|
...
|
||||||
</adf-document-list>
|
</adf-document-list>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
|
||||||
|
| Name | Type | Default value | Description |
|
||||||
|
| ---- | ---- | ------------- | ----------- |
|
||||||
|
| nodes | `MinimalNodeEntity[]` | | Nodes to download. |
|
||||||
|
@ -32,15 +32,15 @@ export class MyComponent {
|
|||||||
|
|
||||||
### Properties
|
### Properties
|
||||||
|
|
||||||
| Name | Type | Default | Description |
|
| Name | Type | Default value | Description |
|
||||||
| ----------------- | ------------------- | ------- | --------------------------- |
|
| ---- | ---- | ------------- | ----------- |
|
||||||
| adf-node-favorite | MinimalNodeEntity[] | [] | Nodes to toggle as favorite |
|
| selection | `MinimalNodeEntity[]` | `[]` | Array of nodes to toggle as favorites. |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Type | Description |
|
||||||
| ------------------------- | -------------------------------------------- |
|
| ---- | ---- | ----------- |
|
||||||
| toggle | emitted when toggle favorite process is done |
|
| toggle | `EventEmitter<any>` | Emitted when the favorite setting is complete. |
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
@ -66,5 +66,4 @@ The directive performs as follows:
|
|||||||
are being marked
|
are being marked
|
||||||
- if all nodes in the selection are favorites, then they are removed from favorites
|
- if all nodes in the selection are favorites, then they are removed from favorites
|
||||||
|
|
||||||
|
|
||||||
See **Demo Shell**
|
See **Demo Shell**
|
||||||
|
@ -6,10 +6,10 @@ Selectively disables an HTML element or Angular component
|
|||||||
|
|
||||||
### Properties
|
### Properties
|
||||||
|
|
||||||
| Name | Type | Default | Description |
|
| Name | Type | Default value | Description |
|
||||||
| ---- | ---- | ------- | ----------- |
|
| ---- | ---- | ------------- | ----------- |
|
||||||
| adf-node-permission | [Permissions](https://github.com/Alfresco/alfresco-ng2-components/blob/master/ng2-components/ng2-alfresco-core/src/models/permissions.enum.ts) | null | Node permission to check (create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions) |
|
| permission | `string` | `null` | Node permission to check (create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions). |
|
||||||
| adf-nodes | MinimalNodeEntity\[] | \[] | Nodes to check permission for |
|
| nodes | `MinimalNodeEntity[]` | `[]` | Nodes to check permission for. |
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
|
@ -22,16 +22,16 @@ Restores deleted nodes to their original location.
|
|||||||
|
|
||||||
### Properties
|
### Properties
|
||||||
|
|
||||||
| Name | Type | Default | Description |
|
| Name | Type | Default value | Description |
|
||||||
| ---- | ---- | ------- | ----------- |
|
| ---- | ---- | ------------- | ----------- |
|
||||||
| adf-restore | DeletedNodeEntry\[] | \[] | Deleted nodes to restore |
|
| selection | `DeletedNodeEntry[]` | | Array of deleted nodes to restore. |
|
||||||
| location | string | '' | Route path to view restored node |
|
| location | `string` | `''` | Path to restored node. |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Type | Description |
|
||||||
| ---- | ----------- |
|
| ---- | ---- | ----------- |
|
||||||
| restore | Raised when the restore is done |
|
| restore | `EventEmitter<any>` | Emitted when restoration is complete. |
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
|
@ -19,16 +19,16 @@ Fetches the Process Audit information in the pdf or json format.
|
|||||||
|
|
||||||
### Properties
|
### Properties
|
||||||
|
|
||||||
| Name | Type | Default | Description |
|
| Name | Type | Default value | Description |
|
||||||
| --- | --- | --- | --- |
|
| ---- | ---- | ------------- | ----------- |
|
||||||
| taskId | string | | (**required**) The id of the task. |
|
| processId | `string` | | ID of the process. |
|
||||||
| format | string | pdf | In whitch format you want the task audit information (pdf or json). |
|
| fileName | `string` | `'Audit'` | Name of the file to download (for PDF downloads). |
|
||||||
| download | boolean | false | True If you want download the file on the click event. |
|
| format | `string` | `'pdf'` | Format for the audit information (can be "pdf" or "json"). |
|
||||||
| fileName | string | Audit | Represent the name of the file to download in case the format is pdf. |
|
| download | `boolean` | `true` | Enables downloading of the audit file on clicking. |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Type | Description |
|
||||||
| --- | --- |
|
| ---- | ---- | ----------- |
|
||||||
| clicked | Raised when the task audit info is ready |
|
| clicked | `EventEmitter<any>` | Emitted when the decorated element is clicked. |
|
||||||
| error | Raised if there is an error during fetching task information |
|
| error | `EventEmitter<any>` | Emitted when an error occurs. |
|
||||||
|
@ -18,16 +18,16 @@ Fetches the Task Audit information in the pdf or json format.
|
|||||||
|
|
||||||
### Properties
|
### Properties
|
||||||
|
|
||||||
| Name | Type | Default | Description |
|
| Name | Type | Default value | Description |
|
||||||
| --- | --- | --- | --- |
|
| ---- | ---- | ------------- | ----------- |
|
||||||
| taskId | string | | (**required**) The id of the task. |
|
| taskId | `string` | | (**required**) The id of the task. |
|
||||||
| format | string | pdf | In whitch format you want the task audit information (pdf or json). |
|
| fileName | `string` | `'Audit'` | Name of the downloaded file (for PDF downloads). |
|
||||||
| download | boolean | false | True If you want download the file on the click event. |
|
| format | `string` | `'pdf'` | Format of the audit information. Can be "pdf" or "json". |
|
||||||
| fileName | string | Audit | Represent the name of the file to download in case the format is pdf. |
|
| download | `boolean` | `true` | Enables downloading of the audit when the decorated element is clicked. |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Type | Description |
|
||||||
| --- | --- |
|
| ---- | ---- | ----------- |
|
||||||
| clicked | Raised when the task audit info is ready |
|
| clicked | `EventEmitter<any>` | Emitted when the decorated element is clicked. |
|
||||||
| error | Raised if there is an error during fetching task information |
|
| error | `EventEmitter<any>` | Emitted when an error occurs. |
|
||||||
|
@ -31,6 +31,17 @@ You can decorate any element including buttons, for example:
|
|||||||
</button>
|
</button>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
|
||||||
|
| Name | Type | Default value | Description |
|
||||||
|
| ---- | ---- | ------------- | ----------- |
|
||||||
|
| enabled | `boolean` | `true` | Enables/disables uploading. |
|
||||||
|
| data | `any` | | Data to upload. |
|
||||||
|
| mode | `string[]` | `['drop']` | Upload mode. Can be "drop" (receives dropped files) or "click" (clicking opens a file dialog). Both modes can be active at once. |
|
||||||
|
| multiple | `boolean` | | Toggles multiple file uploads. |
|
||||||
|
| accept | `string` | | (Click mode only) MIME type filter for files to accept. |
|
||||||
|
| directory | `boolean` | | (Click mode only) Toggles uploading of directories. |
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
Used by attaching to an element or component.
|
Used by attaching to an element or component.
|
||||||
|
@ -185,14 +185,14 @@ var ServiceDocAutoContent = /** @class */ (function () {
|
|||||||
}());
|
}());
|
||||||
function updatePhase(tree, pathname, aggData) {
|
function updatePhase(tree, pathname, aggData) {
|
||||||
var fileNameNoSuffix = path.basename(pathname, ".md");
|
var fileNameNoSuffix = path.basename(pathname, ".md");
|
||||||
var itemType = fileNameNoSuffix.match(/component|service/);
|
var itemType = fileNameNoSuffix.match(/component|directive|service/);
|
||||||
if (itemType) {
|
if (itemType) {
|
||||||
var srcData = aggData.srcData[fileNameNoSuffix];
|
var srcData = aggData.srcData[fileNameNoSuffix];
|
||||||
if (srcData) {
|
if (srcData) {
|
||||||
var srcPath = srcData.path;
|
var srcPath = srcData.path;
|
||||||
var className = fixAngularFilename(fileNameNoSuffix);
|
var className = fixAngularFilename(fileNameNoSuffix);
|
||||||
var classData = void 0;
|
var classData = void 0;
|
||||||
if (itemType[0] === "component") {
|
if ((itemType[0] === "component") || (itemType[0] === "directive")) {
|
||||||
classData = new ComponentDocAutoContent();
|
classData = new ComponentDocAutoContent();
|
||||||
}
|
}
|
||||||
else if (itemType[0] === "service") {
|
else if (itemType[0] === "service") {
|
||||||
|
@ -264,7 +264,7 @@ class ServiceDocAutoContent implements NgDocAutoContent {
|
|||||||
export function updatePhase(tree, pathname, aggData) {
|
export function updatePhase(tree, pathname, aggData) {
|
||||||
let fileNameNoSuffix = path.basename(pathname, ".md");
|
let fileNameNoSuffix = path.basename(pathname, ".md");
|
||||||
|
|
||||||
let itemType = fileNameNoSuffix.match(/component|service/);
|
let itemType = fileNameNoSuffix.match(/component|directive|service/);
|
||||||
|
|
||||||
if (itemType) {
|
if (itemType) {
|
||||||
let srcData = aggData.srcData[fileNameNoSuffix];
|
let srcData = aggData.srcData[fileNameNoSuffix];
|
||||||
@ -275,7 +275,7 @@ export function updatePhase(tree, pathname, aggData) {
|
|||||||
|
|
||||||
let classData: NgDocAutoContent;
|
let classData: NgDocAutoContent;
|
||||||
|
|
||||||
if (itemType[0] === "component") {
|
if ((itemType[0] === "component") || (itemType[0] === "directive")) {
|
||||||
classData = new ComponentDocAutoContent();
|
classData = new ComponentDocAutoContent();
|
||||||
} else if (itemType[0] === "service") {
|
} else if (itemType[0] === "service") {
|
||||||
classData = new ServiceDocAutoContent();
|
classData = new ServiceDocAutoContent();
|
||||||
|
@ -27,6 +27,7 @@ import { DownloadZipDialogComponent } from '../dialogs/download-zip.dialog';
|
|||||||
})
|
})
|
||||||
export class NodeDownloadDirective {
|
export class NodeDownloadDirective {
|
||||||
|
|
||||||
|
/** Nodes to download. */
|
||||||
// tslint:disable-next-line:no-input-rename
|
// tslint:disable-next-line:no-input-rename
|
||||||
@Input('adfNodeDownload')
|
@Input('adfNodeDownload')
|
||||||
nodes: MinimalNodeEntity[];
|
nodes: MinimalNodeEntity[];
|
||||||
|
@ -31,6 +31,7 @@ const DEFAULT_FOLDER_PARENT_ID = '-my-';
|
|||||||
export class FolderCreateDirective {
|
export class FolderCreateDirective {
|
||||||
static DIALOG_WIDTH: number = 400;
|
static DIALOG_WIDTH: number = 400;
|
||||||
|
|
||||||
|
/** Parent folder where the new folder will be located after creation. */
|
||||||
@Input('adf-create-folder')
|
@Input('adf-create-folder')
|
||||||
parentNodeId: string = DEFAULT_FOLDER_PARENT_ID;
|
parentNodeId: string = DEFAULT_FOLDER_PARENT_ID;
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ import { ContentService } from '@alfresco/adf-core';
|
|||||||
export class FolderEditDirective {
|
export class FolderEditDirective {
|
||||||
static DIALOG_WIDTH: number = 400;
|
static DIALOG_WIDTH: number = 400;
|
||||||
|
|
||||||
|
/** Folder node to edit. */
|
||||||
@Input('adf-edit-folder')
|
@Input('adf-edit-folder')
|
||||||
folder: MinimalNodeEntryEntity;
|
folder: MinimalNodeEntryEntity;
|
||||||
|
|
||||||
|
@ -27,15 +27,19 @@ export class FileDraggableDirective implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
files: File [];
|
files: File [];
|
||||||
|
|
||||||
|
/** Enables/disables drag-and-drop functionality. */
|
||||||
@Input('file-draggable')
|
@Input('file-draggable')
|
||||||
enabled: boolean = true;
|
enabled: boolean = true;
|
||||||
|
|
||||||
|
/** Emitted when one or more files are dragged and dropped onto the draggable element. */
|
||||||
@Output()
|
@Output()
|
||||||
filesDropped: EventEmitter<File[]> = new EventEmitter<File[]>();
|
filesDropped: EventEmitter<File[]> = new EventEmitter<File[]>();
|
||||||
|
|
||||||
|
/** Emitted when one or more files are dragged and dropped onto the draggable element. */
|
||||||
@Output()
|
@Output()
|
||||||
filesEntityDropped: EventEmitter<any> = new EventEmitter();
|
filesEntityDropped: EventEmitter<any> = new EventEmitter();
|
||||||
|
|
||||||
|
/** Emitted when a directory is dragged and dropped onto the draggable element. */
|
||||||
@Output()
|
@Output()
|
||||||
folderEntityDropped: EventEmitter<any> = new EventEmitter();
|
folderEntityDropped: EventEmitter<any> = new EventEmitter();
|
||||||
|
|
||||||
|
@ -25,12 +25,15 @@ import { HighlightTransformService, HightlightTransformResult } from '../service
|
|||||||
})
|
})
|
||||||
export class HighlightDirective {
|
export class HighlightDirective {
|
||||||
|
|
||||||
|
/** Class selector for highlightable elements. */
|
||||||
@Input('adf-highlight-selector')
|
@Input('adf-highlight-selector')
|
||||||
selector: string = '';
|
selector: string = '';
|
||||||
|
|
||||||
|
/** Text to highlight. */
|
||||||
@Input('adf-highlight')
|
@Input('adf-highlight')
|
||||||
search: string = '';
|
search: string = '';
|
||||||
|
|
||||||
|
/** CSS class used to apply highlighting. */
|
||||||
@Input('adf-highlight-class')
|
@Input('adf-highlight-class')
|
||||||
classToApply: string = 'adf-highlight';
|
classToApply: string = 'adf-highlight';
|
||||||
|
|
||||||
|
@ -53,12 +53,17 @@ interface ProcessStatus {
|
|||||||
selector: '[adf-delete]'
|
selector: '[adf-delete]'
|
||||||
})
|
})
|
||||||
export class NodeDeleteDirective implements OnChanges {
|
export class NodeDeleteDirective implements OnChanges {
|
||||||
|
/** Array of nodes to delete. */
|
||||||
@Input('adf-delete')
|
@Input('adf-delete')
|
||||||
selection: MinimalNodeEntity[];
|
selection: MinimalNodeEntity[];
|
||||||
|
|
||||||
|
/** If true then the nodes are deleted immediately rather than being
|
||||||
|
* put in the trash.
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
permanent: boolean = false;
|
permanent: boolean = false;
|
||||||
|
|
||||||
|
/** Emitted when the nodes have been deleted. */
|
||||||
@Output()
|
@Output()
|
||||||
delete: EventEmitter<any> = new EventEmitter();
|
delete: EventEmitter<any> = new EventEmitter();
|
||||||
|
|
||||||
|
@ -31,9 +31,11 @@ import 'rxjs/observable/forkJoin';
|
|||||||
export class NodeFavoriteDirective implements OnChanges {
|
export class NodeFavoriteDirective implements OnChanges {
|
||||||
private favorites: any[] = [];
|
private favorites: any[] = [];
|
||||||
|
|
||||||
|
/** Array of nodes to toggle as favorites. */
|
||||||
@Input('adf-node-favorite')
|
@Input('adf-node-favorite')
|
||||||
selection: MinimalNodeEntity[] = [];
|
selection: MinimalNodeEntity[] = [];
|
||||||
|
|
||||||
|
/** Emitted when the favorite setting is complete. */
|
||||||
@Output() toggle: EventEmitter<any> = new EventEmitter();
|
@Output() toggle: EventEmitter<any> = new EventEmitter();
|
||||||
|
|
||||||
@HostListener('click')
|
@HostListener('click')
|
||||||
|
@ -31,9 +31,13 @@ export interface NodePermissionSubject {
|
|||||||
})
|
})
|
||||||
export class NodePermissionDirective implements OnChanges {
|
export class NodePermissionDirective implements OnChanges {
|
||||||
|
|
||||||
|
/** Node permission to check (create, delete, update, updatePermissions,
|
||||||
|
* !create, !delete, !update, !updatePermissions).
|
||||||
|
*/
|
||||||
@Input('adf-node-permission')
|
@Input('adf-node-permission')
|
||||||
permission: string = null;
|
permission: string = null;
|
||||||
|
|
||||||
|
/** Nodes to check permission for. */
|
||||||
@Input('adf-nodes')
|
@Input('adf-nodes')
|
||||||
nodes: MinimalNodeEntity[] = [];
|
nodes: MinimalNodeEntity[] = [];
|
||||||
|
|
||||||
|
@ -34,12 +34,15 @@ import 'rxjs/add/operator/mergeMap';
|
|||||||
export class NodeRestoreDirective {
|
export class NodeRestoreDirective {
|
||||||
private restoreProcessStatus;
|
private restoreProcessStatus;
|
||||||
|
|
||||||
|
/** Array of deleted nodes to restore. */
|
||||||
@Input('adf-restore')
|
@Input('adf-restore')
|
||||||
selection: DeletedNodeEntry[];
|
selection: DeletedNodeEntry[];
|
||||||
|
|
||||||
|
/** Path to restored node. */
|
||||||
@Input()
|
@Input()
|
||||||
location: string = '';
|
location: string = '';
|
||||||
|
|
||||||
|
/** Emitted when restoration is complete. */
|
||||||
@Output()
|
@Output()
|
||||||
restore: EventEmitter<any> = new EventEmitter();
|
restore: EventEmitter<any> = new EventEmitter();
|
||||||
|
|
||||||
|
@ -25,21 +25,29 @@ import { FileInfo, FileUtils } from '../utils/file-utils';
|
|||||||
})
|
})
|
||||||
export class UploadDirective implements OnInit, OnDestroy {
|
export class UploadDirective implements OnInit, OnDestroy {
|
||||||
|
|
||||||
|
/** Enables/disables uploading. */
|
||||||
@Input('adf-upload')
|
@Input('adf-upload')
|
||||||
enabled: boolean = true;
|
enabled: boolean = true;
|
||||||
|
|
||||||
|
/** Data to upload. */
|
||||||
@Input('adf-upload-data')
|
@Input('adf-upload-data')
|
||||||
data: any;
|
data: any;
|
||||||
|
|
||||||
|
/** Upload mode. Can be "drop" (receives dropped files) or "click"
|
||||||
|
* (clicking opens a file dialog). Both modes can be active at once.
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
mode: string[] = ['drop']; // click|drop
|
mode: string[] = ['drop']; // click|drop
|
||||||
|
|
||||||
|
/** Toggles multiple file uploads. */
|
||||||
@Input()
|
@Input()
|
||||||
multiple: boolean;
|
multiple: boolean;
|
||||||
|
|
||||||
|
/** (Click mode only) MIME type filter for files to accept. */
|
||||||
@Input()
|
@Input()
|
||||||
accept: string;
|
accept: string;
|
||||||
|
|
||||||
|
/** (Click mode only) Toggles uploading of directories. */
|
||||||
@Input()
|
@Input()
|
||||||
directory: boolean;
|
directory: boolean;
|
||||||
|
|
||||||
|
@ -33,21 +33,27 @@ const PDF_FORMAT: string = 'pdf';
|
|||||||
})
|
})
|
||||||
export class ProcessAuditDirective implements OnChanges {
|
export class ProcessAuditDirective implements OnChanges {
|
||||||
|
|
||||||
|
/** ID of the process. */
|
||||||
@Input('process-id')
|
@Input('process-id')
|
||||||
processId: string;
|
processId: string;
|
||||||
|
|
||||||
|
/** Name of the file to download (for PDF downloads). */
|
||||||
@Input()
|
@Input()
|
||||||
fileName: string = 'Audit';
|
fileName: string = 'Audit';
|
||||||
|
|
||||||
|
/** Format for the audit information (can be "pdf" or "json"). */
|
||||||
@Input()
|
@Input()
|
||||||
format: string = 'pdf';
|
format: string = 'pdf';
|
||||||
|
|
||||||
|
/** Enables downloading of the audit file on clicking. */
|
||||||
@Input()
|
@Input()
|
||||||
download: boolean = true;
|
download: boolean = true;
|
||||||
|
|
||||||
|
/** Emitted when the decorated element is clicked. */
|
||||||
@Output()
|
@Output()
|
||||||
clicked: EventEmitter<any> = new EventEmitter<any>();
|
clicked: EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
|
||||||
|
/** Emitted when an error occurs. */
|
||||||
@Output()
|
@Output()
|
||||||
error: EventEmitter<any> = new EventEmitter<any>();
|
error: EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
|
||||||
|
@ -33,21 +33,27 @@ const PDF_FORMAT: string = 'pdf';
|
|||||||
})
|
})
|
||||||
export class TaskAuditDirective implements OnChanges {
|
export class TaskAuditDirective implements OnChanges {
|
||||||
|
|
||||||
|
/** (**required**) The id of the task. */
|
||||||
@Input('task-id')
|
@Input('task-id')
|
||||||
taskId: string;
|
taskId: string;
|
||||||
|
|
||||||
|
/** Name of the downloaded file (for PDF downloads). */
|
||||||
@Input()
|
@Input()
|
||||||
fileName: string = 'Audit';
|
fileName: string = 'Audit';
|
||||||
|
|
||||||
|
/** Format of the audit information. Can be "pdf" or "json". */
|
||||||
@Input()
|
@Input()
|
||||||
format: string = 'pdf';
|
format: string = 'pdf';
|
||||||
|
|
||||||
|
/** Enables downloading of the audit when the decorated element is clicked. */
|
||||||
@Input()
|
@Input()
|
||||||
download: boolean = true;
|
download: boolean = true;
|
||||||
|
|
||||||
|
/** Emitted when the decorated element is clicked. */
|
||||||
@Output()
|
@Output()
|
||||||
clicked: EventEmitter<any> = new EventEmitter<any>();
|
clicked: EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
|
||||||
|
/** Emitted when an error occurs. */
|
||||||
@Output()
|
@Output()
|
||||||
error: EventEmitter<any> = new EventEmitter<any>();
|
error: EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user