[ADF-1453] Restructure README.md files (#2239)

* ADF-1453: Restructured Activiti Analytics readme

* ADF-1453: Restructured Activiti Diagrams readme

* ADF-1453: Restructured Activiti Form readme

* ADF-1453: Restructured Activiti Process List readme

* ADF-1453: Restructured Activiti Task List readme

* ADF-1453: Restructured Alfresco Core readme

* [ADF-1453] Restructured DataTable readme

* [ADF-1453] Restructured Document List readme

* [ADF-1453] Restructured Login readme

* [ADF-1453] Restructured Alfresco Search readme

* [ADF-1453] Restructured Alfresco Social readme

* [ADF-1453] Restructured Alfresco Tag readme

* [ADF-1453] Restructured Alfresco User Info readme

* [ADF-1453] Restructured Alfresco Viewer readme

* [ADF-1453] Restructured Alfresco Webscript readme

* [ADF-1453] Fixed table display glitch

* [ADF-1453] Fixed Markdown lint errors in readme files

* [ADF-1453] Adding missing fileUploadDelete event to table in Upload readme

* [ADF-1453] Resolved merge conflict with Upload readme

* [ADF-1453] Changes from npm run doc
This commit is contained in:
Andy Stark
2017-08-25 17:27:09 +01:00
committed by Mario Romano
parent 541cbcb258
commit 54f4a07f53
25 changed files with 2034 additions and 1666 deletions

View File

@@ -1,40 +1,36 @@
# Search Component
# Search library
Contains the Search and Search Results components.
<!-- markdown-toc start - Don't edit this section. npm run toc to generate it-->
<!-- toc -->
- [Prerequisites](#prerequisites)
- [Install](#install)
- [Basic usage](#basic-usage)
- [Properties](#properties)
- [Events](#events)
- [Basic usage Search results](#basic-usage-search-results)
* [Properties](#properties-1)
* [Events](#events-1)
- [Build from sources](#build-from-sources)
- [NPM scripts](#npm-scripts)
- [Demo](#demo)
- [License](#license)
- [Search component](#search-component)
* [Basic usage](#basic-usage)
+ [Properties](#properties)
+ [Events](#events)
* [Details](#details)
- [Search Results component](#search-results-component)
* [Basic usage](#basic-usage-1)
+ [Properties](#properties-1)
+ [Events](#events-1)
* [Details](#details-1)
- [Project Information](#project-information)
* [Prerequisites](#prerequisites)
* [Install](#install)
* [Build from sources](#build-from-sources)
* [NPM scripts](#npm-scripts)
* [Demo](#demo)
* [License](#license)
<!-- tocstop -->
<!-- markdown-toc end -->
## Prerequisites
## Search component
Before you start using this development framework, make sure you have installed all required software and done all the
necessary configuration, see this [page](https://github.com/Alfresco/alfresco-ng2-components/blob/master/PREREQUISITES.md).
> If you plan using this component with projects generated by Angular CLI, please refer to the following article: [Using ADF with Angular CLI](https://github.com/Alfresco/alfresco-ng2-components/wiki/Angular-CLI)
## Install
```sh
npm install ng2-alfresco-search
```
## Basic usage
### Basic usage
```html
<adf-search-control
@@ -46,11 +42,7 @@ npm install ng2-alfresco-search
</adf-search-control>
```
Example of a component that uses the search control. In this example the search term is simply logged to the console
but instead the component could emit an event to be consumed upstream, or it could trigger a change inside a search
results component embedded inside the same component.
## Properties
#### Properties
| Name | Type | Default | Description |
| --- | --- | --- | --- |
@@ -65,7 +57,7 @@ results component embedded inside the same component.
| liveSearchMaxResults | number | 5 | Maximum number of results to show in the live search. |
| liveSearchResultSort | string | | Criteria to sort live search results by, must be one of "name" , "modifiedAt" or "createdAt" |
## Events
#### Events
| Name | Description |
| --- | --- |
@@ -74,7 +66,25 @@ results component embedded inside the same component.
| fileSelect | Emitted when a file item from the list of find-as-you-type results is selected |
| expand | Emitted when the expanded state of the control changes based on focus events and the content of the input control |
## Basic usage Search results
### Details
```html
<adf-search-control
[searchTerm]="searchTerm"
inputType="search"
(searchChange)="onSearchChange($event);"
(searchSubmit)="onSearchSubmit($event);"
(fileSelect)="onSearchResultSelect($event);">
</adf-search-control>
```
Example of a component that uses the search control. In this example the search term is simply logged to the console
but instead the component could emit an event to be consumed upstream, or it could trigger a change inside a search
results component embedded inside the same component.
## Search Results component
### Basic usage
```html
<adf-search
@@ -82,11 +92,7 @@ results component embedded inside the same component.
</adf-search>
```
Example of a component that displays search results, using the Angular2 router to supply a 'q' parameter containing the
search term. If no router is present on the page or if the router does not provide such parameter then an empty
results page will be shown.
### Properties
#### Properties
| Name | Type | Default | Description |
| --- | --- | --- | --- |
@@ -98,7 +104,7 @@ results page will be shown.
| navigationMode | string | "dblclick" | Event used to initiate a navigation action to a specific result, one of "click" or "dblclick" |
| navigate | boolean | true | Allow documentlist to navigate or not. For more information see documentlist component's documentation |
### Events
#### Events
| Name | Description |
| --- | --- |
@@ -106,7 +112,34 @@ results page will be shown.
| nodeDbClick | Emitted when user acts upon files or folders with double click **only when `navigation-mode` is set to false**, giving more freedom then just simply previewing the file |
| resultsLoad | Emitted when search results have fully loaded |
## Build from sources
### Details
```html
<adf-search
[searchTerm]="searchTerm">
</adf-search>
```
Example of a component that displays search results, using the Angular2 router to supply a 'q' parameter containing the
search term. If no router is present on the page or if the router does not provide such parameter then an empty
results page will be shown.
## Project Information
### Prerequisites
Before you start using this development framework, make sure you have installed all required software and done all the
necessary configuration, see this [page](https://github.com/Alfresco/alfresco-ng2-components/blob/master/PREREQUISITES.md).
> If you plan using this component with projects generated by Angular CLI, please refer to the following article: [Using ADF with Angular CLI](https://github.com/Alfresco/alfresco-ng2-components/wiki/Angular-CLI)
### Install
```sh
npm install ng2-alfresco-search
```
### Build from sources
You can build component from sources with the following commands:
@@ -118,7 +151,7 @@ npm run build
> The `build` task rebuilds all the code, runs tslint, license checks
> and other quality check tools before performing unit testing.
## NPM scripts
### NPM scripts
| Command | Description |
| --- | --- |
@@ -127,7 +160,7 @@ npm run build
| npm run test-browser | Run unit tests in the browser
| npm run coverage | Run unit tests and display code coverage report |
## Demo
### Demo
Please check the demo folder for a demo project
@@ -137,6 +170,6 @@ npm install
npm start
```
## License
### License
[Apache Version 2.0](https://github.com/Alfresco/alfresco-ng2-components/blob/master/LICENSE)