diff --git a/docs/README.md b/docs/README.md index 959c96d1bc..bba11df644 100644 --- a/docs/README.md +++ b/docs/README.md @@ -133,9 +133,9 @@ for more information about installing and using the source code. | Name | Description | Source link | | ---- | ----------- | ----------- | -| [Data Table Adapter interface](DataTableAdapter.md) | Defines how table data is supplied to [DataTable](datatable.component.md) and [Tasklist](task-list.component.md) components. | [Source](../core/datatable/data/datatable-adapter.ts) | -| [Form Field Validator interface](FormFieldValidator.md) | Defines how the input fields of [ADF Form](form.component.md) and [ADF Task Details](task-details.component.md) components are validated. | [Source](../core/form/components/widgets/core/form-field-validator.ts) | -| [Search Configuration interface](search-configuration.interface.md) | Provides fine control of parameters to a search. | [Source](../core/services/search-configuration.service.ts) | +| [Data Table Adapter interface](DataTableAdapter.md) | Defines how table data is supplied to [DataTable](datatable.component.md) and [Tasklist](task-list.component.md) components. | [Source](../lib/core/datatable/data/datatable-adapter.ts) | +| [Form Field Validator interface](FormFieldValidator.md) | Defines how the input fields of [ADF Form](form.component.md) and [ADF Task Details](task-details.component.md) components are validated. | [Source](../lib/core/form/components/widgets/core/form-field-validator.ts) | +| [Search Configuration interface](search-configuration.interface.md) | Provides fine control of parameters to a search. | [Source](../lib/core/services/search-configuration.service.ts) | [(Back to Contents)](#contents) @@ -152,6 +152,7 @@ for more information about installing and using the source code. | Name | Description | Source link | | ---- | ----------- | ----------- | +| [Sites dropdown component](sites-dropdown.component.md) | Displays a dropdown menu to show and interact with the sites of the current user. | [Source](../lib/content-services/site-dropdown/sites-dropdown.component.ts) | | _Breadcrumb component_ | _Not currently documented_ | [Source](../lib/content-services/breadcrumb/breadcrumb.component.ts) | | _Dropdown breadcrumb component_ | _Not currently documented_ | [Source](../lib/content-services/breadcrumb/dropdown-breadcrumb.component.ts) | | _Content node selector panel component_ | _Not currently documented_ | [Source](../lib/content-services/content-node-selector/content-node-selector-panel.component.ts) | @@ -160,7 +161,6 @@ for more information about installing and using the source code. | _Document list component_ | _Not currently documented_ | [Source](../lib/content-services/document-list/components/document-list.component.ts) | | _Search control component_ | _Not currently documented_ | [Source](../lib/content-services/search/components/search-control.component.ts) | | _Search component_ | _Not currently documented_ | [Source](../lib/content-services/search/components/search.component.ts) | -| _Sites dropdown component_ | _Not currently documented_ | [Source](../lib/content-services/site-dropdown/sites-dropdown.component.ts) | | _Like component_ | _Not currently documented_ | [Source](../lib/content-services/social/like.component.ts) | | _Rating component_ | _Not currently documented_ | [Source](../lib/content-services/social/rating.component.ts) | | _Tag actions component_ | _Not currently documented_ | [Source](../lib/content-services/tag/tag-actions.component.ts) | @@ -208,7 +208,6 @@ for more information about installing and using the source code. | Name | Description | Source link | | ---- | ----------- | ----------- | -| [Process list component](process-list.component.md) | Renders a list containing all the process instances matched by the parameters specified. | [Source](../lib/process-services/process-list/components/process-list.component.ts) | | _Apps list component_ | _Not currently documented_ | [Source](../lib/process-services/app-list/apps-list.component.ts) | | _Create process attachment component_ | _Not currently documented_ | [Source](../lib/process-services/attachment/create-process-attachment.component.ts) | | _Create task attachment component_ | _Not currently documented_ | [Source](../lib/process-services/attachment/create-task-attachment.component.ts) | @@ -217,13 +216,16 @@ for more information about installing and using the source code. | _Comment list component_ | _Not currently documented_ | [Source](../lib/process-services/comments/comment-list.component.ts) | | _Comments component_ | _Not currently documented_ | [Source](../lib/process-services/comments/comments.component.ts) | | _Process comments component_ | _Not currently documented_ | [Source](../lib/process-services/comments/process-comments.component.ts) | -| _People list component_ | _Not currently documented_ | [Source](../lib/process-services/people/people-list.component.ts) | -| _People search component_ | _Not currently documented_ | [Source](../lib/process-services/people/people-search.component.ts) | -| _People component_ | _Not currently documented_ | [Source](../lib/process-services/people/people.component.ts) | +| _People component_ | _Not currently documented_ | [Source](../lib/process-services/people/components/people/people.component.ts) | +| _People list component_ | _Not currently documented_ | [Source](../lib/process-services/people/components/people-list/people-list.component.ts) | +| _People search component_ | _Not currently documented_ | [Source](../lib/process-services/people/components/people-search/people-search.component.ts) | +| _People search field component_ | _Not currently documented_ | [Source](../lib/process-services/people/components/people-search-field/people-search-field.component.ts) | +| _People selector component_ | _Not currently documented_ | [Source](../lib/process-services/people/components/people-selector/people-selector.component.ts) | | _Process filters component_ | _Not currently documented_ | [Source](../lib/process-services/process-list/components/process-filters.component.ts) | | _Process instance details component_ | _Not currently documented_ | [Source](../lib/process-services/process-list/components/process-instance-details.component.ts) | | _Process instance header component_ | _Not currently documented_ | [Source](../lib/process-services/process-list/components/process-instance-header.component.ts) | | _Process instance tasks component_ | _Not currently documented_ | [Source](../lib/process-services/process-list/components/process-instance-tasks.component.ts) | +| _Process list component_ | _Not currently documented_ | [Source](../lib/process-services/process-list/components/process-list.component.ts) | | _Start process component_ | _Not currently documented_ | [Source](../lib/process-services/process-list/components/start-process.component.ts) | | _Checklist component_ | _Not currently documented_ | [Source](../lib/process-services/task-list/components/checklist.component.ts) | | _Start task component_ | _Not currently documented_ | [Source](../lib/process-services/task-list/components/start-task.component.ts) | @@ -236,6 +238,8 @@ for more information about installing and using the source code. | Name | Description | Source link | | ---- | ----------- | ----------- | +| _People search action label directive_ | _Not currently documented_ | [Source](../lib/process-services/people/directives/people-search-action-label.directive.ts) | +| _People search title directive_ | _Not currently documented_ | [Source](../lib/process-services/people/directives/people-search-title.directive.ts) | | _Process audit directive_ | _Not currently documented_ | [Source](../lib/process-services/process-list/components/process-audit.directive.ts) | | _Task audit directive_ | _Not currently documented_ | [Source](../lib/process-services/task-list/components/task-audit.directive.ts) | diff --git a/docs/rating.component.md b/docs/rating.component.md index e1bb0b6534..57af8c04be 100644 --- a/docs/rating.component.md +++ b/docs/rating.component.md @@ -1,4 +1,4 @@ -# ADF Rating component +# Rating component Allows a user to add ratings to an item. @@ -14,15 +14,15 @@ Allows a user to add ratings to an item. ### Properties -| Attribute | Type | Default | Description | -| --------- | ---- | ------- | ----------- | -| nodeId | string | | The identifier of a node | +| Name | Type | Default value | Description | +| ---- | ---- | ------------- | ----------- | +| nodeId | `string` | | Identifier of the node to apply the rating to. | ### Events -| Name | Description | -| ---- | ----------- | -| changeVote | Raised when vote gets changed | +| Name | Type | Description | +| ---- | ---- | ----------- | +| changeVote | `EventEmitter<{}>` | Emitted when the "vote" gets changed. | ## See also diff --git a/docs/search-control.component.md b/docs/search-control.component.md index fa492e3adb..92e91f21e0 100644 --- a/docs/search-control.component.md +++ b/docs/search-control.component.md @@ -16,24 +16,23 @@ Displays a input text which shows find-as-you-type suggestions. ### Properties -| Name | Type | Default | Description | -| ---- | ---- | ------- | ----------- | -| searchTerm | string | | Search term to pre-populate the field with | -| inputType | string | "text" | Type of the input field to render, e.g. "search" or "text" (default) | -| autocomplete | boolean | true | Whether the browser should offer field auto-completion for the input field to the user. | -| highlight | boolean | false | Use the true value if you want to see the searched word highlighted. | -| expandable | boolean | true | Whether to use an expanding search control, if false then a regular input is used. | -| liveSearchEnabled | boolean | true | Whether find-as-you-type suggestions should be offered for matching content items. Set to false to disable. | -| liveSearchMaxResults | number | 5 | Maximum number of results to show in the live search. | -| customQueryBody | [QueryBody](https://github.com/Alfresco/alfresco-js-api/blob/1.6.0/src/alfresco-search-rest-api/docs/QueryBody.md) | | object which allow you to perform more elaborated query from the search api. This input is deprecated, to use the extended query body function please refer to the suggested solution [here](search-configuration.interface.md) | +| Name | Type | Default value | Description | +| ---- | ---- | ------------- | ----------- | +| expandable | `boolean` | `true` | Toggles whether to use an expanding search control. If false then a regular input is used. | +| highlight | `boolean` | `false` | Toggles highlighting of the search term in the results. | +| inputType | `string` | `'text'` | Type of the input field to render, e.g. "search" or "text" (default). | +| autocomplete | `boolean` | `false` | Toggles auto-completion of the search input field. | +| liveSearchEnabled | `boolean` | `true` | Toggles "find-as-you-type" suggestions for possible matches. | +| liveSearchMaxResults | `number` | `5` | Maximum number of results to show in the live search. | +| customQueryBody | `QueryBody` | | | ### Events -| Name | Description | -| ---- | ----------- | -| searchChange | Emitted when the search term is changed. The search term is provided in the 'value' property of the returned object. If the term is less than three characters in length then the term is truncated to an empty string. | -| submit | Emitted when the search is submitted pressing ENTER button. The search term is provided as value of the event. | -| optionClicked | Emitted when a file item from the list of find-as-you-type results is selected | +| Name | Type | Description | +| ---- | ---- | ----------- | +| submit | `EventEmitter` | Emitted when the search is submitted pressing ENTER button. The search term is provided as value of the event. | +| searchChange | `EventEmitter` | Emitted when the search term is changed. The search term is provided in the 'value' property of the returned object. If the term is less than three characters in length then the term is truncated to an empty string. | +| optionClicked | `EventEmitter` | Emitted when a file item from the list of "find-as-you-type" results is selected. | ## Details diff --git a/docs/search.component.md b/docs/search.component.md index e7b8f6b709..360fb1e2c4 100644 --- a/docs/search.component.md +++ b/docs/search.component.md @@ -13,19 +13,21 @@ Searches items for supplied search terms. ### Properties -| Name | Type | Default | Description | -| ---- | ---- | ------- | ----------- | -| searchTerm | string | | Search term to use when executing the search. Updating this value will run a new search and update the results | -| maxResults | number | 20 | Maximum number of results to show in the search. | -| skipResults | number | 0 | Number of results to skip from the results pagination. | -| displayWith | function | | Function that maps an option's value to its display value in the trigger | -| queryBody | [QueryBody](https://github.com/Alfresco/alfresco-js-api/blob/1.6.0/src/alfresco-search-rest-api/docs/QueryBody.md) | | object which allow you to perform more elaborated query from the search api. This input is deprecated, to use the extended query body function please refer to the suggested solution [here](search-configuration.interface.md) | +| Name | Type | Default value | Description | +| ---- | ---- | ------------- | ----------- | +| displayWith | `(value: any) => string` | `null` | Function that maps an option's value to its display value in the trigger. | +| maxResults | `number` | `20` | Maximum number of results to show in the search. | +| skipResults | `number` | `0` | Number of results to skip from the results pagination. | +| queryBody | `QueryBody` | | | +| searchTerm | `string` | `''` | Search term to use when executing the search. Updating this value will run a new search and update the results. | +| classList | `string` | | CSS class for display. | ### Events -| Name | Description | -| ---- | ----------- | -| resultLoaded | Emitted when search results have fully loaded | +| Name | Type | Description | +| ---- | ---- | ----------- | +| resultLoaded | `EventEmitter` | Emitted when search results have fully loaded. | +| error | `EventEmitter` | Emitted when an error occurs. | ## Details diff --git a/docs/sidebar-action-menu.component.md b/docs/sidebar-action-menu.component.md index d4bb2cb2a4..718d88ef3f 100644 --- a/docs/sidebar-action-menu.component.md +++ b/docs/sidebar-action-menu.component.md @@ -24,15 +24,15 @@ Displays a sidebar-action menu information panel. ### Properties -| Name | Type | Default | Description | -| --- | --- | --- | --- | -| title | string | null | The title of the Sidebar action | -| expanded | boolean | false | Toggle the sidebar action menu on expand. +| Name | Type | Default value | Description | +| ---- | ---- | ------------- | ----------- | +| title | `string` | | The title of the sidebar action. | +| expanded | `boolean` | | Toggle the sidebar action menu on expand. | + ## Details As the name suggests, this is basically just a layout with CSS styling. There are three regions where you can add your own content, as shown in the example: -- sidebar-menu-title-icon -- sidebar-menu-options -- sidebar-menu-expand-icon - +- sidebar-menu-title-icon +- sidebar-menu-options +- sidebar-menu-expand-icon diff --git a/docs/sites-dropdown.component.md b/docs/sites-dropdown.component.md index 4011eacacf..dc889d46c2 100644 --- a/docs/sites-dropdown.component.md +++ b/docs/sites-dropdown.component.md @@ -15,13 +15,13 @@ Displays a dropdown menu to show and interact with the sites of the current user ### Properties | Attribute | Type | Default | Description | -| --- | --- | --- | --- | +| --------- | ---- | ------- | ----------- | | hideMyFiles | boolean | false | Hide the "My Files" option added to the list by default | | siteList | [SitePaging](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md) | null | A custom list of sites to be displayed by the dropdown. If no value is given, the sites of the current user are displayed by default. A list of objects only with properties 'title' and 'guid' is enough to be able to display the dropdown. | -| placeholder | string | 'DROPDOWN.PLACEHOLDER_LABEL' | The placeholder text/the key from translation files for the placeholder text to be shown by default| +| placeholder | string | 'DROPDOWN.PLACEHOLDER_LABEL' | The placeholder text/the key from translation files for the placeholder text to be shown by default | ### Events | Name | Returned Type | Description | -| --- | --- | --- | -| change | [SiteModel](site.model.md) | emitted when user selects a site. When default option is selected an empty model is emitted | +| ---- | ------------- | ----------- | +| change | [SiteModel](site.model.md) | emitted when user selects a site. When default option is selected an empty model is emitted | diff --git a/lib/content-services/search/components/search-control.component.ts b/lib/content-services/search/components/search-control.component.ts index a9901719ed..e55e057bc8 100644 --- a/lib/content-services/search/components/search-control.component.ts +++ b/lib/content-services/search/components/search-control.component.ts @@ -45,21 +45,29 @@ import { MatListItem } from '@angular/material'; }) export class SearchControlComponent implements OnInit, OnDestroy { + /** Toggles whether to use an expanding search control. If false + * then a regular input is used. + */ @Input() expandable: boolean = true; + /** Toggles highlighting of the search term in the results. */ @Input() highlight: boolean = false; + /** Type of the input field to render, e.g. "search" or "text" (default). */ @Input() inputType: string = 'text'; + /** Toggles auto-completion of the search input field. */ @Input() autocomplete: boolean = false; + /** Toggles "find-as-you-type" suggestions for possible matches. */ @Input() liveSearchEnabled: boolean = true; + /** Maximum number of results to show in the live search. */ @Input() liveSearchMaxResults: number = 5; @@ -67,12 +75,21 @@ export class SearchControlComponent implements OnInit, OnDestroy { @Input() customQueryBody: QueryBody; + /** Emitted when the search is submitted pressing ENTER button. + * The search term is provided as value of the event. + */ @Output() submit: EventEmitter = new EventEmitter(); + /** Emitted when the search term is changed. The search term is provided + * in the 'value' property of the returned object. If the term is less + * than three characters in length then the term is truncated to an empty + * string. + */ @Output() searchChange: EventEmitter = new EventEmitter(); + /** Emitted when a file item from the list of "find-as-you-type" results is selected. */ @Output() optionClicked: EventEmitter = new EventEmitter(); @@ -211,7 +228,7 @@ export class SearchControlComponent implements OnInit, OnDestroy { let previousElement: any = this.getPreviousElementSibling( $event.target); if (previousElement) { previousElement.focus(); - }else { + } else { this.searchInput.nativeElement.focus(); this.focusSubject.next(new FocusEvent('focus')); } diff --git a/lib/content-services/search/components/search.component.ts b/lib/content-services/search/components/search.component.ts index 48fc102e23..287462ed99 100644 --- a/lib/content-services/search/components/search.component.ts +++ b/lib/content-services/search/components/search.component.ts @@ -51,12 +51,15 @@ export class SearchComponent implements AfterContentInit, OnChanges { @ContentChild(TemplateRef) template: TemplateRef; + /** Function that maps an option's value to its display value in the trigger. */ @Input() displayWith: ((value: any) => string) | null = null; + /** Maximum number of results to show in the search. */ @Input() maxResults: number = 20; + /** Number of results to skip from the results pagination. */ @Input() skipResults: number = 0; @@ -64,9 +67,13 @@ export class SearchComponent implements AfterContentInit, OnChanges { @Input() queryBody: QueryBody; + /** Search term to use when executing the search. Updating this value will + * run a new search and update the results. + */ @Input() searchTerm: string = ''; + /** CSS class for display. */ @Input('class') set classList(classList: string) { if (classList && classList.length) { @@ -75,9 +82,11 @@ export class SearchComponent implements AfterContentInit, OnChanges { } } + /** Emitted when search results have fully loaded. */ @Output() resultLoaded: EventEmitter = new EventEmitter(); + /** Emitted when an error occurs. */ @Output() error: EventEmitter = new EventEmitter(); diff --git a/lib/content-services/site-dropdown/sites-dropdown.component.ts b/lib/content-services/site-dropdown/sites-dropdown.component.ts index 0949b44912..5ff428dbc9 100644 --- a/lib/content-services/site-dropdown/sites-dropdown.component.ts +++ b/lib/content-services/site-dropdown/sites-dropdown.component.ts @@ -26,15 +26,25 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; }) export class DropdownSitesComponent implements OnInit { + /** Hide the "My Files" option. */ @Input() hideMyFiles: boolean = false; + /** A custom list of sites to be displayed by the dropdown. If no value + * is given, the sites of the current user are displayed by default. A + * list of objects only with properties 'title' and 'guid' is enough to + * be able to display the dropdown. + */ @Input() siteList: SitePaging = null; + /** Text or a translation key to act as a placeholder. */ @Input() placeholder: string = 'DROPDOWN.PLACEHOLDER_LABEL'; + /** Emitted when the user selects a site. When the default option is selected, + * an empty model is emitted. + */ @Output() change: EventEmitter = new EventEmitter(); @@ -54,7 +64,7 @@ export class DropdownSitesComponent implements OnInit { let siteFound; if (this.siteSelected === this.MY_FILES_VALUE) { siteFound = { entry: {}}; - }else { + } else { siteFound = this.siteList.list.entries.find( site => site.entry.guid === this.siteSelected); } this.change.emit(siteFound); diff --git a/lib/content-services/social/rating.component.ts b/lib/content-services/social/rating.component.ts index 9ff14ed40c..887e8cc1f7 100644 --- a/lib/content-services/social/rating.component.ts +++ b/lib/content-services/social/rating.component.ts @@ -27,6 +27,7 @@ import { RatingService } from './services/rating.service'; }) export class RatingComponent implements OnChanges { + /** Identifier of the node to apply the rating to. */ @Input() nodeId: string; @@ -34,6 +35,7 @@ export class RatingComponent implements OnChanges { ratingType: string = 'fiveStar'; + /** Emitted when the "vote" gets changed. */ @Output() changeVote = new EventEmitter(); diff --git a/lib/core/sidebar/sidebar-action-menu.component.ts b/lib/core/sidebar/sidebar-action-menu.component.ts index b082d56904..d9e4417a9a 100644 --- a/lib/core/sidebar/sidebar-action-menu.component.ts +++ b/lib/core/sidebar/sidebar-action-menu.component.ts @@ -28,9 +28,11 @@ import { ChangeDetectionStrategy, Component, Directive, Input, ViewEncapsulation export class SidebarActionMenuComponent { + /** The title of the sidebar action. */ @Input() title: string; + /** Toggle the sidebar action menu on expand. */ @Input() expanded: boolean;