[ADF-3530, ADF-3598] Sharing files (#3828)

* share node

* lint fix

* createSharedLinks parameter

* remove es6 async

* use fakeAsync

* removed trailing comma

* e2e update dialog title locator

* Expires label localization

* docs update
This commit is contained in:
Cilibiu Bogdan
2018-10-01 16:10:40 +03:00
committed by Eugenio Romano
parent b34ca87657
commit 42f4bee2b4
39 changed files with 1241 additions and 435 deletions

View File

@@ -15,6 +15,8 @@ Creates and manages public shared links for files.
```html
<adf-toolbar>
<button mat-icon-button
#shared="adfShare"
[disabled]="!shared.isFile"
[baseShareUrl]="http://localhost:8080/myrouteForShareFile/"
[adf-share]="documentList.selection[0]">
<mat-icon>share</mat-icon>
@@ -33,7 +35,9 @@ Creates and manages public shared links for files.
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| baseShareUrl | `string` | | Prefix to add to the generated link. |
| node | [`MinimalNodeEntity`](../content-services/document-library.model.md) | | Node to share. |
| adf-share | [`MinimalNodeEntity`](../content-services/document-library.model.md) | | Node to share. |
| isFile | `boolean` | false | bound to 'adfShare' exportAs |
| isShared | `boolean` | false | bound to 'adfShare' exportAs |
## Details
@@ -42,6 +46,14 @@ For example, if you set the input parameter as follows:
[baseShareUrl]="http://localhost:8080/myrouteForShareFile/"
...or through `app.config.json`:
{
...
"baseShareUrl": 'http://external/url',
...
}
...then the directive will ask the [Content service](../core/content.service.md) to generate
a `sharedId` for the file. This will create a URL like the following: