mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2670] Final doc checks for release (#3205)
* [ADF-2670] Fixed files with wrong name or location * [ADF-2670] Fixed display glitch with tutorial index
This commit is contained in:
committed by
Eugenio Romano
parent
1681958d6b
commit
02620f5563
@@ -28,7 +28,8 @@ Gets details of the Process Services apps that are deployed for the user.
|
||||
|
||||
This service can be used to access the Process Services apps that are available
|
||||
to the current user. You can find more information about the
|
||||
returned `AppDefinitionRepresentation` class in the [Filter model page](filter.model.md)
|
||||
returned `AppDefinitionRepresentation` class in the
|
||||
[Filter model page](../process-services/filter.model.md)
|
||||
and in the
|
||||
[Process Services Apps API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppsApi.md#getAppDefinitions).
|
||||
The methods of this service make use of the
|
||||
@@ -37,4 +38,4 @@ method, also from the Apps API.
|
||||
|
||||
## See also
|
||||
|
||||
- [Filter model](filter.model.md)
|
||||
- [Filter model](../process-services/filter.model.md)
|
||||
|
@@ -1,84 +0,0 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-04-10
|
||||
---
|
||||
|
||||
# File Draggable directive
|
||||
|
||||
Provides drag-and-drop features for an element such as a `div`.
|
||||
|
||||
## Basic Usage
|
||||
|
||||
```html
|
||||
<div [file-draggable]="true" id="DragAndDropBorder" class="drag-and-drop-border"
|
||||
(filesDropped)="onFilesDropped($event)"
|
||||
(filesEntityDropped)="onFilesEntityDropped($event)"
|
||||
(folderEntityDropped)="onFolderEntityDropped($event)"
|
||||
dropzone="" webkitdropzone="*" #dragAndDropArea>
|
||||
<ng-content></ng-content>
|
||||
Drag and Drop files here!
|
||||
</div>
|
||||
```
|
||||
|
||||
Some sample CSS to show the drag and drop area:
|
||||
|
||||
```css
|
||||
.drag-and-drop-border {
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
border: double;
|
||||
background-color: lightblue;
|
||||
width: 400px;
|
||||
height: 100px;
|
||||
}
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| file-draggable | `boolean` | true | Enables/disables drag-and-drop functionality. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| filesDropped | `EventEmitter<File[]>` | Emitted when one or more files are dragged and dropped onto the draggable element. |
|
||||
| filesEntityDropped | `EventEmitter<any>` | Emitted when one or more files are dragged and dropped onto the draggable element. |
|
||||
| folderEntityDropped | `EventEmitter<any>` | Emitted when a directory is dragged and dropped onto the draggable element. |
|
||||
|
||||
## Details
|
||||
|
||||
Typically you would use the Upload Drag Area component instead of this directive.
|
||||
|
||||
### Event handler implementations
|
||||
|
||||
```ts
|
||||
export class SomeComponent implements OnInit {
|
||||
|
||||
onFilesDropped(files: File[]): void {
|
||||
if (files.length) {
|
||||
// Use for example the uploadService to upload files to ACS
|
||||
console.log('# of files dropped: ', files.length);
|
||||
}
|
||||
}
|
||||
|
||||
onFilesEntityDropped(item: any): void {
|
||||
// Use for example the uploadService to upload files to ACS
|
||||
console.log('# of files dropped: ', item);
|
||||
}
|
||||
|
||||
onFolderEntityDropped(folder: any): void {
|
||||
if (folder.isDirectory) {
|
||||
// Use for example the uploadService to upload folder content to ACS
|
||||
console.log('Folder dropped: ', folder);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [Upload Drag Area component](../content-services/upload-drag-area.component.md)
|
88
docs/core/log.service.md
Normal file
88
docs/core/log.service.md
Normal file
@@ -0,0 +1,88 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
# Log Service
|
||||
|
||||
Provide a log functionality for your ADF application.
|
||||
|
||||
## Basic Usage
|
||||
|
||||
**app.component.ts**
|
||||
|
||||
```ts
|
||||
import { LogService } from '@alfresco/adf-core';
|
||||
|
||||
@Component({...})
|
||||
export class AppComponent {
|
||||
|
||||
constructor(logService: LogService) {
|
||||
}
|
||||
|
||||
myMethod(){
|
||||
this.logService.error('My error');
|
||||
this.logService.trace('My trace')
|
||||
this.logService.debug('My debug')
|
||||
this.logService.info('My info')
|
||||
this.logService.warn('My warn')
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
### Log levels
|
||||
|
||||
The log service provide 6 level of logs:
|
||||
|
||||
Name | Level
|
||||
-|-
|
||||
TRACE |5
|
||||
DEBUG |4
|
||||
INFO |3
|
||||
WARN |2
|
||||
ERROR |1
|
||||
SILENT |0
|
||||
|
||||
You can configure the log level setting the ***logLevel*** properties in the **app.config.json**. By default the level is TRACE.
|
||||
|
||||
If you want set for example the log to warning:
|
||||
|
||||
**app.config.json**
|
||||
|
||||
```json
|
||||
{
|
||||
"logLevel": "WARN"
|
||||
}
|
||||
```
|
||||
|
||||
### Log message bus
|
||||
|
||||
The logservice provide also an Observable ***onMessage*** where you can subscribe and recive all the logs:
|
||||
|
||||
The messagge object recived form the bus is composed:
|
||||
|
||||
```ts
|
||||
{
|
||||
text: "Message log text"
|
||||
type: "ERROR|DEBUG|INFO|LOG|TRACE|WARN|ASSERT"
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```ts
|
||||
import { LogService } from '@alfresco/adf-core';
|
||||
|
||||
@Component({...})
|
||||
export class AppComponent {
|
||||
|
||||
constructor(logService: LogService, myIntegrationService: MyIntegrationService)) {
|
||||
|
||||
logService.onMessage.subscribe((message) => {
|
||||
myIntegrationService.send(message.text,message.type);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
```
|
Reference in New Issue
Block a user