mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
[ADF- 2670] Checked and updated docs for 2.3 (#3197)
* [ADF-2670] Reviewed docs for 2.3 with only minor changes * [ADF-2670] Checked and updated docs for 2.3
This commit is contained in:
parent
e4b9d775a2
commit
460e33ccdb
@ -127,7 +127,7 @@ for more information about installing and using the source code.
|
||||
| [Form service](core/form.service.md) | Implements Process Services form methods | [Source](../lib/core/form/services/form.service.ts) |
|
||||
| [Node service](core/node.service.md) | Gets Alfresco Repository node metadata and creates nodes with metadata. | [Source](../lib/core/form/services/node.service.ts) |
|
||||
| [Process content service](core/process-content.service.md) | Manipulates content related to a Process Instance or Task Instance in APS. | [Source](../lib/core/form/services/process-content.service.ts) |
|
||||
| [Alfresco api service](core/alfresco-api.service.md) | Provides access to initialized **AlfrescoJSApi** instance. | [Source](../lib/core/services/alfresco-api.service.ts) |
|
||||
| [Alfresco api service](core/alfresco-api.service.md) | Provides access to an initialized **AlfrescoJSApi** instance. | [Source](../lib/core/services/alfresco-api.service.ts) |
|
||||
| [Apps process service](core/apps-process.service.md) | Gets details of the Process Services apps that are deployed for the user. | [Source](../lib/core/services/apps-process.service.ts) |
|
||||
| [Auth guard bpm service](core/auth-guard-bpm.service.md) | Adds authentication with Process Services to a route within the app. | [Source](../lib/core/services/auth-guard-bpm.service.ts) |
|
||||
| [Auth guard ecm service](core/auth-guard-ecm.service.md) | Adds authentication with Content Services to a route within the app. | [Source](../lib/core/services/auth-guard-ecm.service.ts) |
|
||||
@ -192,7 +192,7 @@ for more information about installing and using the source code.
|
||||
| ---- | ----------- | ----------- |
|
||||
| [Breadcrumb component](content-services/breadcrumb.component.md) | Indicates the current position within a navigation hierarchy. | [Source](../lib/content-services/breadcrumb/breadcrumb.component.ts) |
|
||||
| [Dropdown breadcrumb component](content-services/dropdown-breadcrumb.component.md) | Indicates the current position within a navigation hierarchy using a dropdown menu. | [Source](../lib/content-services/breadcrumb/dropdown-breadcrumb.component.ts) |
|
||||
| [Content metadata component](content-services/content-metadata.component.md) | Allows a user to display and edit metadata related to a node. | [Source](../lib/content-services/content-metadata/components/content-metadata/content-metadata.component.ts) |
|
||||
| [Content metadata component](content-services/content-metadata.component.md) | Displays and edits metadata related to a node. | [Source](../lib/content-services/content-metadata/components/content-metadata/content-metadata.component.ts) |
|
||||
| [Content node selector panel component](content-services/content-node-selector-panel.component.md) | Opens a Content Node Selector in its own dialog window. | [Source](../lib/content-services/content-node-selector/content-node-selector-panel.component.ts) |
|
||||
| [Content node selector component](content-services/content-node-selector.component.md) | Allows a user to select items from a Content Services repository. | [Source](../lib/content-services/content-node-selector/content-node-selector.component.ts) |
|
||||
| [Content action component](content-services/content-action.component.md) | Adds options to a Document List actions menu for a particular content type. | [Source](../lib/content-services/document-list/components/content-action/content-action.component.ts) |
|
||||
@ -210,7 +210,7 @@ for more information about installing and using the source code.
|
||||
| [Tag node list component](content-services/tag-node-list.component.md) | Shows tags for a node. | [Source](../lib/content-services/tag/tag-node-list.component.ts) |
|
||||
| [File uploading dialog component](content-services/file-uploading-dialog.component.md) | Shows a dialog listing all the files uploaded with the Upload Button or Drag Area components. | [Source](../lib/content-services/upload/components/file-uploading-dialog.component.ts) |
|
||||
| [Upload button component](content-services/upload-button.component.md) | Activates a file upload. | [Source](../lib/content-services/upload/components/upload-button.component.ts) |
|
||||
| [Upload drag area component](content-services/upload-drag-area.component.md) | Adds a drag and drop area to upload files to Alfresco. | [Source](../lib/content-services/upload/components/upload-drag-area.component.ts) |
|
||||
| [Upload drag area component](content-services/upload-drag-area.component.md) | Adds a drag and drop area to upload files to ACS. | [Source](../lib/content-services/upload/components/upload-drag-area.component.ts) |
|
||||
| [Upload version button component](content-services/upload-version-button.component.md)  | Activates a file version upload. | [Source](../lib/content-services/upload/components/upload-version-button.component.ts) |
|
||||
| [Version list component](content-services/version-list.component.md)  | Displays the version history of a node in a Version Manager component | [Source](../lib/content-services/version-manager/version-list.component.ts) |
|
||||
| [Version manager component](content-services/version-manager.component.md)  | Displays the version history of a node with the ability to upload a new version. | [Source](../lib/content-services/version-manager/version-manager.component.ts) |
|
||||
@ -245,6 +245,7 @@ for more information about installing and using the source code.
|
||||
| [Document list service](content-services/document-list.service.md) | Implements node operations used by the Document List component. | [Source](../lib/content-services/document-list/services/document-list.service.ts) |
|
||||
| [Folder actions service](content-services/folder-actions.service.md) | Implements the folder menu actions for the Document List component. | [Source](../lib/content-services/document-list/services/folder-actions.service.ts) |
|
||||
| [Node permission service](content-services/node-permission.service.md) | Manages the role permissions for the content nodes | [Source](../lib/content-services/permission-manager/services/node-permission.service.ts) |
|
||||
| [Search query builder service](content-services/search-query-builder.service.md) | Stores information from all the custom search and faceted search widgets, compiles and runs the final Search query. | [Source](../lib/content-services/search/search-query-builder.service.ts) |
|
||||
| [Rating service](content-services/rating.service.md) | Manages ratings for items in Content Services. | [Source](../lib/content-services/social/services/rating.service.ts) |
|
||||
| [Tag service](content-services/tag.service.md) | Manages tags in Content Services. | [Source](../lib/content-services/tag/services/tag.service.ts) |
|
||||
|
||||
|
@ -13,7 +13,7 @@ for more information about installing and using the source code.
|
||||
| ---- | ----------- | ----------- |
|
||||
| [Breadcrumb component](breadcrumb.component.md) | Indicates the current position within a navigation hierarchy. | [Source](../../lib/content-services/breadcrumb/breadcrumb.component.ts) |
|
||||
| [Dropdown breadcrumb component](dropdown-breadcrumb.component.md) | Indicates the current position within a navigation hierarchy using a dropdown menu. | [Source](../../lib/content-services/breadcrumb/dropdown-breadcrumb.component.ts) |
|
||||
| [Content metadata component](content-metadata.component.md) | Allows a user to display and edit metadata related to a node. | [Source](../../lib/content-services/content-metadata/components/content-metadata/content-metadata.component.ts) |
|
||||
| [Content metadata component](content-metadata.component.md) | Displays and edits metadata related to a node. | [Source](../../lib/content-services/content-metadata/components/content-metadata/content-metadata.component.ts) |
|
||||
| [Content node selector panel component](content-node-selector-panel.component.md) | Opens a Content Node Selector in its own dialog window. | [Source](../../lib/content-services/content-node-selector/content-node-selector-panel.component.ts) |
|
||||
| [Content node selector component](content-node-selector.component.md) | Allows a user to select items from a Content Services repository. | [Source](../../lib/content-services/content-node-selector/content-node-selector.component.ts) |
|
||||
| [Content action component](content-action.component.md) | Adds options to a Document List actions menu for a particular content type. | [Source](../../lib/content-services/document-list/components/content-action/content-action.component.ts) |
|
||||
@ -31,7 +31,7 @@ for more information about installing and using the source code.
|
||||
| [Tag node list component](tag-node-list.component.md) | Shows tags for a node. | [Source](../../lib/content-services/tag/tag-node-list.component.ts) |
|
||||
| [File uploading dialog component](file-uploading-dialog.component.md) | Shows a dialog listing all the files uploaded with the Upload Button or Drag Area components. | [Source](../../lib/content-services/upload/components/file-uploading-dialog.component.ts) |
|
||||
| [Upload button component](upload-button.component.md) | Activates a file upload. | [Source](../../lib/content-services/upload/components/upload-button.component.ts) |
|
||||
| [Upload drag area component](upload-drag-area.component.md) | Adds a drag and drop area to upload files to Alfresco. | [Source](../../lib/content-services/upload/components/upload-drag-area.component.ts) |
|
||||
| [Upload drag area component](upload-drag-area.component.md) | Adds a drag and drop area to upload files to ACS. | [Source](../../lib/content-services/upload/components/upload-drag-area.component.ts) |
|
||||
| [Upload version button component](upload-version-button.component.md)  | Activates a file version upload. | [Source](../../lib/content-services/upload/components/upload-version-button.component.ts) |
|
||||
| [Version list component](version-list.component.md)  | Displays the version history of a node in a Version Manager component | [Source](../../lib/content-services/version-manager/version-list.component.ts) |
|
||||
| [Version manager component](version-manager.component.md)  | Displays the version history of a node with the ability to upload a new version. | [Source](../../lib/content-services/version-manager/version-manager.component.ts) |
|
||||
@ -66,6 +66,7 @@ for more information about installing and using the source code.
|
||||
| [Document list service](document-list.service.md) | Implements node operations used by the Document List component. | [Source](../../lib/content-services/document-list/services/document-list.service.ts) |
|
||||
| [Folder actions service](folder-actions.service.md) | Implements the folder menu actions for the Document List component. | [Source](../../lib/content-services/document-list/services/folder-actions.service.ts) |
|
||||
| [Node permission service](node-permission.service.md) | Manages the role permissions for the content nodes | [Source](../../lib/content-services/permission-manager/services/node-permission.service.ts) |
|
||||
| [Search query builder service](search-query-builder.service.md) | Stores information from all the custom search and faceted search widgets, compiles and runs the final Search query. | [Source](../../lib/content-services/search/search-query-builder.service.ts) |
|
||||
| [Rating service](rating.service.md) | Manages ratings for items in Content Services. | [Source](../../lib/content-services/social/services/rating.service.ts) |
|
||||
| [Tag service](tag.service.md) | Manages tags in Content Services. | [Source](../../lib/content-services/tag/services/tag.service.ts) |
|
||||
|
||||
|
@ -1,18 +1,17 @@
|
||||
---
|
||||
Added: v2.1.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-04-16
|
||||
---
|
||||
|
||||
# Content Metadata Card component
|
||||
|
||||
Allows a user to display and edit metadata related to a node.
|
||||
Displays and edits metadata related to a node.
|
||||
|
||||
<img src="../docassets/images/ContentMetadata.png" width="325">
|
||||

|
||||
|
||||
## Basic Usage
|
||||
|
||||
The component shows metadata related to the given node. The component uses the card view component to render the properties of metadata aspects.
|
||||
The different aspects and their properties to be shown can be configured as application config preset, for details about it see the related section below. By default the component only shows the basic properties of the node. Clicking on the pencil icon at the bottom, renders the underlying card view component in edit mode enabling to edit and update the metadata properties.
|
||||
|
||||
```html
|
||||
<adf-content-metadata-card
|
||||
[displayEmpty]="false"
|
||||
@ -21,29 +20,40 @@ The different aspects and their properties to be shown can be configured as appl
|
||||
</adf-content-metadata-card>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| node | MinimalNodeEntryEntity | - | (**required**) The node entity to fetch metadata about |
|
||||
| displayEmpty | boolean | false | Display empty values in card view or not |
|
||||
| readOnly | boolean | true | Whether the edit button to be shown or not |
|
||||
| multi | boolean | false | multi parameter of the underlying material expansion panel |
|
||||
| preset | string | "*" | The metadata preset's name, which defines aspects and their properties |
|
||||
| displayEmpty | boolean | false | Toggles whether to display empty values in the card view |
|
||||
| readOnly | boolean | true | Toggles whether the edit button should be shown |
|
||||
| multi | boolean | false | The multi parameter of the underlying material expansion panel |
|
||||
| preset | string | "*" | Name of the metadata preset, which defines aspects and their properties |
|
||||
|
||||
## Details
|
||||
|
||||
The component shows metadata related to a given node. It uses the
|
||||
[Card View component](../core/card-view.component.md) to render the properties of metadata aspects.
|
||||
The different aspects and their properties to be shown can be configured as application config
|
||||
presets (see below). By default the component only shows the basic properties of the node.
|
||||
The user can click on the pencil icon at the bottom of the component to edit the metadata
|
||||
properties.
|
||||
|
||||
### Application config presets
|
||||
|
||||
In the application config file you can define different presets for the metadata component or override the default preset. The **default** preset is "*" if not set, meaning the component will display every aspects and properties of the nodes without filtering.
|
||||
You can define different presets for the metadata component or override the default presets in
|
||||
the `app.config.json` file. The **default** preset is "*" if not set, meaning the component
|
||||
will display every aspect and property of a node without filtering.
|
||||
|
||||
Beside the default preset you can define as many presets as you want, if you'd like to use different metadata components with different presets.
|
||||
You can define as many extra presets as you need for your components.
|
||||
|
||||
To understand presets better, you can have a look at on the following different example configurations.
|
||||
The example configurations below show the options in detail.
|
||||
|
||||
### Indifferent config
|
||||
#### Indifferent config
|
||||
|
||||
If you don't have any preset configured manually in you application config, this would be equivalent as if you had the application config as defined below:
|
||||
The default configuration behaves like the following:
|
||||
|
||||
```json
|
||||
...
|
||||
@ -55,13 +65,15 @@ If you don't have any preset configured manually in you application config, this
|
||||
...
|
||||
```
|
||||
|
||||
### Aspect oriented config
|
||||
#### Aspect oriented config
|
||||
|
||||
With this type of configuration you are able to "whitelist" aspects and properties for a preset, but everything will be grouped by aspects and there is no further way to group properties. If you want to group different properties in groups you define, scroll down a bit and have a look at on the layout oriented configruration.
|
||||
With this type of configuration you can "whitelist" aspects and properties for a preset, but everything will be grouped by aspects and there is no further way to group properties. Use a
|
||||
[layout oriented configuration](#layout-oriented-config) if you want to define your own
|
||||
custom groups.
|
||||
|
||||
#### Whitelisting only a few aspects in the default preset
|
||||
|
||||
If you want to restrict to only a few aspects (e.g.: exif, your-custom-aspect), you have to use the name of that particular aspect to be able to whitelist it. In case of exif aspect this is "exif:exif".
|
||||
The default configuration shows every aspect but you can restrict it to just a small selection
|
||||
of aspects by "whitelisting" the ones you want in the `default` section. In the example below,
|
||||
just the `exif:exif` and `custom:aspect` aspects are whitelisted:
|
||||
|
||||
```json
|
||||
...
|
||||
@ -76,9 +88,8 @@ If you want to restrict to only a few aspects (e.g.: exif, your-custom-aspect),
|
||||
...
|
||||
```
|
||||
|
||||
#### Whitelisting only a few properties of a few aspects in the default preset
|
||||
|
||||
If you want to filter more, you can do this on property level also. For this, you have to list the names of whitelisted aspect properties in an array of strings. Again, for identifying a property, you have to use its name.
|
||||
You can further restrict the whitelist to specific properties of one or more aspects by using
|
||||
an array of property names in place of the "*" filter:
|
||||
|
||||
```json
|
||||
...
|
||||
@ -93,9 +104,7 @@ If you want to filter more, you can do this on property level also. For this, yo
|
||||
...
|
||||
```
|
||||
|
||||
#### Whitelisting only a few properties of a few aspects in a custom preset
|
||||
|
||||
And finally, you can create any custom aspect following the same rules.
|
||||
A final example shows the same process applied to a custom preset called "kitten-images":
|
||||
|
||||
```json
|
||||
...
|
||||
@ -113,11 +122,15 @@ And finally, you can create any custom aspect following the same rules.
|
||||
|
||||
### Layout oriented config
|
||||
|
||||
Beside the aspect oriented configuration, it is possible to configure the groups and properties in a more detailed way. With this type of configuration any property of any aspect / type can be "cherry picked"-ed and grouped into and accordion drawer, with defining a translatable title in the preset configuration.
|
||||
You can also go beyond the aspect oriented configuration if you need to configure the groups and properties in a more detailed way. With this type of configuration any property of any aspect/type
|
||||
can be "cherry picked" and grouped into an accordion drawer, along wwith a translatable title
|
||||
defined in the preset configuration.
|
||||
|
||||
#### Basic elements
|
||||
|
||||
The following config will result in one accordion group named "TRANSLATABLE_TITLE_FOR_GROUP_1", with all the properties from the custom:aspect followed by the two properties (exif:pixelXDimension, exif:pixelYDimension) from the exif:exif aspect followed by one property (custom:myPropertyName) from custom:type.
|
||||
The following config will produce one accordion group named "TRANSLATABLE_TITLE_FOR_GROUP_1",
|
||||
with all the properties from `custom:aspect` followed by the two properties (`exif:pixelXDimension`
|
||||
and `exif:pixelYDimension`) from the `exif:exif` aspect and then one property (`custom:myPropertyName`) from `custom:type`:
|
||||
|
||||
```json
|
||||
...
|
||||
@ -138,7 +151,7 @@ The following config will result in one accordion group named "TRANSLATABLE_TITL
|
||||
|
||||
#### More complex example
|
||||
|
||||
As a more complex config, you can study the one below:
|
||||
A more complex config is shown in the example below:
|
||||
|
||||
```json
|
||||
"content-metadata": {
|
||||
@ -177,7 +190,7 @@ As a more complex config, you can study the one below:
|
||||
]
|
||||
}
|
||||
```
|
||||
The end result of this config would be two accordion groups with the properties like this:
|
||||
The result of this config would be two accordion groups with the following properties:
|
||||
|
||||
|GROUP-TITLE1-TRANSLATION-KEY|
|
||||
|---|
|
||||
@ -198,4 +211,5 @@ The end result of this config would be two accordion groups with the properties
|
||||
|
||||
## What happens when there is a whitelisted aspect in the config but the given node doesn't relate to that aspect
|
||||
|
||||
Nothing, this aspect (as it is not related to the node) will be simply ignored and not be displayed. The aspects to be displayed are calculated as an intersection of the preset's aspects and the aspects related to the node.
|
||||
Nothing - since this aspect is not related to the node, it will simply be ignored and not
|
||||
displayed. The aspects to be displayed are calculated as an intersection of the preset's aspects and the aspects related to the node.
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.1.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-03-12
|
||||
Last reviewed: 2018-04-16
|
||||
---
|
||||
|
||||
# Content Node Selector Panel component
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-03-09
|
||||
Last reviewed: 2018-04-13
|
||||
---
|
||||
|
||||
# Document List component
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-04-05
|
||||
Last reviewed: 2018-04-16
|
||||
---
|
||||
|
||||
# Document List service
|
||||
|
@ -1,54 +1,40 @@
|
||||
---
|
||||
Added: v2.3.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-04-16
|
||||
---
|
||||
|
||||
# Search Settings Component
|
||||
# Search Filter component
|
||||
|
||||
Represents a main container component for custom search and faceted search settings.
|
||||
|
||||
## Usage example
|
||||
## Basic usage
|
||||
|
||||
```html
|
||||
<adf-search-filter #settings></adf-search-filter>
|
||||
```
|
||||
|
||||
The component is based on dynamically created Widgets to modify the resulting query and options,
|
||||
and the `Query Builder` to build and execute the search queries.
|
||||
## Class members
|
||||
|
||||
## Query Builder Service
|
||||
### Properties
|
||||
|
||||
Stores information from all the custom search and faceted search widgets,
|
||||
compiles and runs the final Search query.
|
||||
For the property types please refer to the [Search Category interface](#categories).
|
||||
|
||||
The Query Builder is UI agnostic and does not rely on Angular components.
|
||||
It is possible to reuse it with multiple component implementations.
|
||||
| Property | Description |
|
||||
| --- | --- |
|
||||
| id | Unique identifier of the category. Also used to access QueryBuilder customizations for a particular widget. |
|
||||
| name | Public display name for the category. |
|
||||
| enabled | Toggles category availability. Set to `false` if you want to exclude a category from processing. |
|
||||
| expanded | Toggles the expanded state of the category |
|
||||
| component.selector | The id of the Angular component selector to render the Category |
|
||||
| component.settings | An object containing component specific settings. Put any properties needed for the target component here. |
|
||||
|
||||
Allows custom widgets to populate and edit the following parts of the resulting query:
|
||||
## Details
|
||||
|
||||
- categories
|
||||
- query fragments that form query expression
|
||||
- include fields
|
||||
- scope settings
|
||||
- filter queries
|
||||
- facet fields
|
||||
- range queries
|
||||
The component is based on dynamically created widgets to modify the resulting query and options,
|
||||
and the [Search Query Builder service](search-query-builder.service.md)` to build and execute the search queries.
|
||||
|
||||
```ts
|
||||
constructor(queryBuilder: QueryBuilderService) {
|
||||
|
||||
queryBuilder.updated.subscribe(query => {
|
||||
this.queryBuilder.execute();
|
||||
});
|
||||
|
||||
queryBuilder.executed.subscribe(data => {
|
||||
this.onDataLoaded(data);
|
||||
});
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
## Configuration
|
||||
### Configuration
|
||||
|
||||
The configuration should be provided via the `search` entry in the `app.config.json` file.
|
||||
|
||||
@ -105,11 +91,12 @@ Below is an example configuration:
|
||||
}
|
||||
```
|
||||
|
||||
## Categories
|
||||
### Categories
|
||||
|
||||
The Search Settings component and Query Builder require `categories` section provided within the configuration.
|
||||
The Search Settings component and Query Builder require a `categories` section provided within the configuration.
|
||||
|
||||
Categories are needed to build Widgets so that users can modify the search query at runtime. Every Category can be represented by a single Angular component, either simple or composite one.
|
||||
Categories are needed to build widgets so that users can modify the search query at runtime. Every Category can be represented by a single Angular component, which can be either a simple one or a
|
||||
composite one.
|
||||
|
||||
```ts
|
||||
export interface SearchCategory {
|
||||
@ -124,31 +111,25 @@ export interface SearchCategory {
|
||||
}
|
||||
```
|
||||
|
||||
The interface above also describes entries in the `search.query.categories` section for the `app.config.json`.
|
||||
The interface above also describes entries in the `search.query.categories` section for the `app.config.json` file.
|
||||
|
||||

|
||||
|
||||
### Properties
|
||||
### Settings
|
||||
|
||||
For the property types please refer to the `SearchCategory` interface.
|
||||
|
||||
| Property | Description |
|
||||
| --- | --- |
|
||||
| id | Unique identifier of the category. Also used to access QueryBuilder customisations for a particular widget. |
|
||||
| name | Public display name for the category. |
|
||||
| enabled | Toggles category availability. Set to `false` if you want to exclude a category from processing. |
|
||||
| expanded | Toggles the expanded state of the category. Use it |
|
||||
| component.selector | The id of the Angular component selector to render the Category |
|
||||
| component.settings | An object containing component specific settings. Put any properties needed for the target component. |
|
||||
|
||||
Every component can expect different set of settings.
|
||||
Every use case will have a different set of settings.
|
||||
For example Number editors may parse minimum and maximum values, while Text editors can support value formats or length constraints.
|
||||
|
||||
You can use `component.settings` to pass any information to your custom Widget using the following interface:
|
||||
You can use `component.settings` to pass any information to your custom widget using the
|
||||
`SearchWidgetSettings` interface:
|
||||
|
||||
```ts
|
||||
export interface SearchWidgetSettings {
|
||||
field: string;
|
||||
[indexer: string]: any;
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [Search Query Builder service](search-query-builder.service.md)
|
57
docs/content-services/search-query-builder.service.md
Normal file
57
docs/content-services/search-query-builder.service.md
Normal file
@ -0,0 +1,57 @@
|
||||
---
|
||||
Added: v2.3.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Search Query Builder service
|
||||
|
||||
Stores information from all the custom search and faceted search widgets, compiles and runs the final Search query.
|
||||
|
||||
## Class members
|
||||
|
||||
### Methods
|
||||
|
||||
- `addFilterQuery(query: string): void`
|
||||
Adds a filter query to the search.
|
||||
- `query` - Query text
|
||||
- `removeFilterQuery(query: string): void`
|
||||
Removes a previously added filter query from the search.
|
||||
- `query` - Query text
|
||||
- `getFacetQuery(label: string): FacetQuery`
|
||||
Gets a facet query.
|
||||
- `label` - Identifier of the target query
|
||||
- `update(): void`
|
||||
Rebuilds the query and triggers the `updated` event.
|
||||
- `async execute()`
|
||||
Executes the query.
|
||||
- `buildQuery(): QueryBody`
|
||||
Builds the query.
|
||||
|
||||
## Details
|
||||
|
||||
The Query Builder is UI agnostic and does not rely on Angular components.
|
||||
You can reuse it with multiple component implementations.
|
||||
|
||||
You can use custom widgets to populate and edit the following parts of the resulting query:
|
||||
|
||||
- categories
|
||||
- query fragments that form query expression
|
||||
- include fields
|
||||
- scope settings
|
||||
- filter queries
|
||||
- facet fields
|
||||
- range queries
|
||||
|
||||
```ts
|
||||
constructor(queryBuilder: SearchQueryBuilderService) {
|
||||
|
||||
queryBuilder.updated.subscribe(query => {
|
||||
this.queryBuilder.execute();
|
||||
});
|
||||
|
||||
queryBuilder.executed.subscribe(data => {
|
||||
this.onDataLoaded(data);
|
||||
});
|
||||
|
||||
}
|
||||
```
|
@ -1,6 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-04-13
|
||||
---
|
||||
|
||||
# Search component
|
||||
@ -40,7 +41,7 @@ Searches items for supplied search terms.
|
||||
|
||||
### Customise Search Results
|
||||
|
||||
You have to add a template that will be shown when the results are loaded.
|
||||
You can add a custom template to show the search results when once they are loaded:
|
||||
|
||||
<!-- {% raw %} -->
|
||||
|
||||
@ -58,11 +59,11 @@ You have to add a template that will be shown when the results are loaded.
|
||||
|
||||
<!-- {% endraw %} -->
|
||||
|
||||
The results are provided via the [$implicit variable of angular2](https://angular.io/api/common/NgTemplateOutlet) and can be accessed via the sugar sintax 'let-yourChosenName'. As per example above the result will be something like :
|
||||
The results are provided via the [$implicit variable of angular2](https://angular.io/api/common/NgTemplateOutlet) and can be accessed via the sugar syntax 'let-yourChosenName'. The example above will give results like the following:
|
||||
|
||||

|
||||
|
||||
But you can define even a more complex template :
|
||||
However, you can use a more complex template if necessary:
|
||||
|
||||
<!-- {% raw %} -->
|
||||
|
||||
@ -108,14 +109,14 @@ But you can define even a more complex template :
|
||||
|
||||
<!-- {% endraw %} -->
|
||||
|
||||
Which will look like :
|
||||
|
||||

|
||||
|
||||
### Attach an input field to the search
|
||||
|
||||
You can also attach your input field to the adf-search component via the trigger [searchAutocomplete]
|
||||
Yuo can do this by exporting the adf-search panel instance into a local template variable (here we called it "search"), and binding that variable to the input's searchAutocomplete property.
|
||||
You can also attach an input field to the search component via the `searchAutocomplete` property.
|
||||
Export the search panel instance into a local template variable and bind that variable to the
|
||||
input's `searchAutocomplete` property. The example below demonstrates this with an
|
||||
instance called "search":
|
||||
|
||||
<!-- {% raw %} -->
|
||||
|
||||
@ -133,7 +134,7 @@ Yuo can do this by exporting the adf-search panel instance into a local template
|
||||
|
||||
<!-- {% endraw %} -->
|
||||
|
||||
In this way it is possible to fetch the results from the word typed into the input text straight into the adf-search component via the custom template variable.
|
||||
By doing this, you can get the results as the user types into the input text.
|
||||
|
||||
### Custom search configuration
|
||||
|
||||
|
@ -1,10 +1,12 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-04-16
|
||||
---
|
||||
|
||||
# Upload Drag Area Component
|
||||
|
||||
Adds a drag and drop area to upload files to Alfresco.
|
||||
Adds a drag and drop area to upload files to ACS.
|
||||
|
||||
## Basic Usage
|
||||
|
||||
@ -27,18 +29,20 @@ export class AppComponent {
|
||||
}
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| disabled | boolean | false | Toggle component disabled state |
|
||||
| parentId | string | '-root-' | The ID of the folder in which the files will be uploaded. |
|
||||
| versioning | boolean | false | Versioning false is the default uploader behaviour and it renames the file using an integer suffix if there is a name clash. Versioning true to indicate that a major version should be created |
|
||||
| acceptedFilesType | `string` | `'*'` | List of allowed file extensions, for example: ".jpg,.gif,.png,.svg". |
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| acceptedFilesType | `string` | "\*" | Filter for accepted file types. |
|
||||
| disabled | `boolean` | false | Toggle component disabled state. |
|
||||
| parentId | `string` | | ID of parent folder node. |
|
||||
| versioning | `boolean` | false | When false, renames the file using an integer suffix if there is a name clash. Set to true to indicate that a major version should be created instead. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Description |
|
||||
| --- | --- |
|
||||
| success | Raised when the file is uploaded |
|
||||
| error | Raised when the file upload goes in error |
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| error | `EventEmitter<Object>` | Raised when the file upload goes in error. |
|
||||
| success | `EventEmitter<Object>` | Emitted when the file is uploaded. |
|
||||
|
@ -1,15 +1,17 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Experimental
|
||||
Last reviewed: 2018-04-13
|
||||
---
|
||||
|
||||
# Version Manager Component
|
||||
|
||||
Displays the version history of a node with the ability to upload a new version.
|
||||
|
||||
 `This component is still in experimental phase, it has several limitations which will be resolved soon.`
|
||||
|
||||

|
||||
|
||||
 `This component is still in experimental phase. It has several limitations which will be resolved soon.`
|
||||
|
||||
## Basic Usage
|
||||
|
||||
```html
|
||||
|
@ -83,7 +83,7 @@ for more information about installing and using the source code.
|
||||
| [Form service](form.service.md) | Implements Process Services form methods | [Source](../../lib/core/form/services/form.service.ts) |
|
||||
| [Node service](node.service.md) | Gets Alfresco Repository node metadata and creates nodes with metadata. | [Source](../../lib/core/form/services/node.service.ts) |
|
||||
| [Process content service](process-content.service.md) | Manipulates content related to a Process Instance or Task Instance in APS. | [Source](../../lib/core/form/services/process-content.service.ts) |
|
||||
| [Alfresco api service](alfresco-api.service.md) | Provides access to initialized **AlfrescoJSApi** instance. | [Source](../../lib/core/services/alfresco-api.service.ts) |
|
||||
| [Alfresco api service](alfresco-api.service.md) | Provides access to an initialized **AlfrescoJSApi** instance. | [Source](../../lib/core/services/alfresco-api.service.ts) |
|
||||
| [Apps process service](apps-process.service.md) | Gets details of the Process Services apps that are deployed for the user. | [Source](../../lib/core/services/apps-process.service.ts) |
|
||||
| [Auth guard bpm service](auth-guard-bpm.service.md) | Adds authentication with Process Services to a route within the app. | [Source](../../lib/core/services/auth-guard-bpm.service.ts) |
|
||||
| [Auth guard ecm service](auth-guard-ecm.service.md) | Adds authentication with Content Services to a route within the app. | [Source](../../lib/core/services/auth-guard-ecm.service.ts) |
|
||||
|
@ -1,10 +1,12 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-04-13
|
||||
---
|
||||
|
||||
# Alfresco Api Service
|
||||
|
||||
Provides access to initialized **AlfrescoJSApi** instance.
|
||||
Provides access to an initialized **AlfrescoJSApi** instance.
|
||||
|
||||
## Basic Usage
|
||||
|
||||
@ -24,19 +26,37 @@ export class MyComponent implements OnInit {
|
||||
}
|
||||
```
|
||||
|
||||
## Events
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| contentApi | `ContentApi` | | (Read only) Accesses the Content API |
|
||||
| nodesApi | `NodesApi` | | (Read only) Accesses the Nodes API |
|
||||
| renditionsApi | `RenditionsApi` | | (Read only) Accesses the Renditions API |
|
||||
| sharedLinksApi | `SharedLinksApi` | | (Read only) Accesses the Shared Links API |
|
||||
| sitesApi | `SitesApi` | | (Read only) Accesses the Sites API |
|
||||
| favoritesApi | `FavoritesApi` | | (Read only) Accesses the Favorites API |
|
||||
| peopleApi | `PeopleApi` | | (Read only) Accesses the People API |
|
||||
| searchApi | `SearchApi` | | (Read only) Accesses the Search API |
|
||||
| versionsApi | `VersionsApi` | | (Read only) Accesses the Versions API |
|
||||
| classesApi | `ClassesApi` | | (Read only) Accesses the Classes API |
|
||||
| groupsApi | `GroupsApi` | | (Read only) Accesses the Groups API |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| nodeUpdated | `Subject<MinimalNodeEntryEntity>` | Publish/subscribe to events related to node updates. |
|
||||
| nodeUpdated | `Subject<MinimalNodeEntryEntity>` | Emitted when a node updates. |
|
||||
|
||||
## Details
|
||||
|
||||
**Note for developers**: _the TypeScript declaration files for Alfresco JS API
|
||||
are still under development and some Alfresco APIs may not be accessed
|
||||
via your favourite IDE's intellisense or TypeScript compiler.
|
||||
In case of any TypeScript type check errors you can still call any supported
|
||||
Alfresco JS api by casting the instance to `any` type like the following:_
|
||||
**Note for developers**: The TypeScript declaration files for the Alfresco JS API
|
||||
are still under development and some Alfresco APIs may not be accessible
|
||||
via your IDE's intellisense or TypeScript compiler.
|
||||
To avoid these TypeScript type check errors, you can call any supported
|
||||
Alfresco JS api by casting the instance to the `any` type as in the following example:
|
||||
|
||||
```ts
|
||||
let api: any = this.apiService.getInstance();
|
||||
|
@ -1,7 +1,9 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-04-13
|
||||
---
|
||||
|
||||
# Content service
|
||||
|
||||
Accesses app-generated data objects via URLs and file downloads.
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-03-21
|
||||
Last reviewed: 2018-04-16
|
||||
---
|
||||
|
||||
# DataTable component
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-03-20
|
||||
Last reviewed: 2018-04-16
|
||||
---
|
||||
|
||||
# Pagination Component
|
||||
|
@ -1,7 +1,9 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-04-16
|
||||
---
|
||||
|
||||
# User Preferences Service
|
||||
|
||||
Stores preferences for components.
|
||||
@ -31,15 +33,16 @@ Stores preferences for components.
|
||||
- `getDefaultLocale(): string`
|
||||
Gets the default locale.
|
||||
|
||||
- `select : Observable`
|
||||
Return the value for the user status property changed
|
||||
- `select(property: string) : Observable`
|
||||
Return the value for the user status property changed
|
||||
- `property` - The property name to query
|
||||
|
||||
|
||||
## Details
|
||||
|
||||
The preferences are bound to a particular `prefix` so the application can switch between different profiles on demand.
|
||||
|
||||
For example upon login you can set the `prefix` as current username:
|
||||
For example, upon login you can set the `prefix` to the current username:
|
||||
|
||||
```ts
|
||||
import { UserPreferencesService, AuthenticationService } from '@alfresco/adf-core';
|
||||
@ -58,9 +61,9 @@ class AppComponent {
|
||||
}
|
||||
```
|
||||
|
||||
As soon as you assign the storage prefix all settings that you get or set via the `UserPreferencesService` will be saved to dedicated profile.
|
||||
As soon as you assign the storage prefix, all settings that you get or set via the `UserPreferencesService` will be saved to a dedicated profile.
|
||||
|
||||
You can import the service in your controller and use its APIs like below:
|
||||
You can import the service into your controller and use its APIs as shown below:
|
||||
|
||||
```ts
|
||||
@Component({...})
|
||||
@ -87,7 +90,9 @@ The service also provides quick access to a set of the "known" properties used a
|
||||
| locale | `string` | Current locale setting. |
|
||||
|
||||
## User Preference onChange Stream
|
||||
Whenever a property is set to the user preference service an onChange event is sent with the whole set of user properties. This comes in handy when a component wants to react to some property change.
|
||||
|
||||
Whenever a property is set with the user preference service, an `onChange` event is sent with the
|
||||
whole set of user properties. This is useful when a component needs to react to a property change:
|
||||
|
||||
```ts
|
||||
userPreferences.paginationSize = 10;
|
||||
@ -96,7 +101,7 @@ Whenever a property is set to the user preference service an onChange event is s
|
||||
});
|
||||
```
|
||||
|
||||
We have added also the `select` method where the user can give the property name which wants to be notified the changes and get the updated value.
|
||||
You can also use the `select` method to get notification when a particular property is changed.
|
||||
A set of basic properties is added into the enumeration `UserPreferenceValues` which gives you the key value to access the standard user preference service properties : **PaginationSize**, **DisableCSRF**, **Locale** and **SupportedPageSizes**.
|
||||
|
||||
```ts
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-03-21
|
||||
Last reviewed: 2018-04-16
|
||||
---
|
||||
|
||||
# Process Instance List
|
||||
@ -38,11 +38,11 @@ Renders a list containing all the process instances matched by the parameters sp
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| rowClick | Emitted when a row in the process list is clicked |
|
||||
| success | Emitted when the list of process instances has been loaded successfully from the server |
|
||||
| error | Emitted when an error is encountered loading the list of process instances from the server |
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| rowClick | `EventEmitter<string>` | Emitted when a row in the process list is clicked |
|
||||
| success | `EventEmitter<ProcessListModel>` | Emitted when the list of process instances has been loaded successfully from the server |
|
||||
| error | `EventEmitter<any>` | Emitted when an error is encountered loading the list of process instances from the server |
|
||||
|
||||
## Details
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-03-13
|
||||
Last reviewed: 2018-04-16
|
||||
---
|
||||
|
||||
# Task Details component
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-03-12
|
||||
Last reviewed: 2018-04-16
|
||||
---
|
||||
|
||||
# Task List component
|
||||
@ -49,7 +49,7 @@ Renders a list containing all the tasks matched by the parameters specified.
|
||||
## Details
|
||||
|
||||
This component displays lists of process instances both active and completed, using any defined process filter, and
|
||||
render details of any chosen instance.
|
||||
renders details of any chosen instance.
|
||||
|
||||
### Setting the column schema
|
||||
|
||||
|
@ -22,6 +22,7 @@ ADF version in which they were introduced. See the
|
||||
- [Permission list component](content-services/permission-list.component.md)
|
||||
- [Search chip list component](content-services/search-chip-list.component.md)
|
||||
- [Search filter component](content-services/search-filter.component.md)
|
||||
- [Search query builder service](content-services/search-query-builder.service.md)
|
||||
- [Sidenav layout component](core/sidenav-layout.component.md)
|
||||
- [Upload version button component](content-services/upload-version-button.component.md)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user