mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
[ACS-6647] covert aca:fields to app:fields (#3838)
This commit is contained in:
parent
2e9ab2b35c
commit
acb848d39d
@ -20,7 +20,7 @@ In order to configure multiple search form you have to add your search configura
|
||||
| name | `string` | "" | Display title of the form |
|
||||
| order | `string` | | Visualization order in the dropdown |
|
||||
| default | `boolean` | | if the search has to be used as default search |
|
||||
| aca:fields| `string[]`| | list of aspects property to add in the query and search in the value for the given text. The property will be concatenated in AND|
|
||||
| app:fields| `string[]`| | list of aspects property to add in the query and search in the value for the given text. The property will be concatenated in AND|
|
||||
|
||||
### Search configuration properties
|
||||
|
||||
|
@ -20,7 +20,7 @@ In this tutorial, we are going to implement the following features:
|
||||
| name | `string` | "" | Display title of the form |
|
||||
| order | `string` | | Visualization order in the dropdown |
|
||||
| default | `boolean` | | if the search has to be used as default search |
|
||||
| aca:fields| `string[]`| | list of aspects property to add in the query and search in the value for the given text. The property will be concatenated in AND|
|
||||
| app:fields| `string[]`| | list of aspects property to add in the query and search in the value for the given text. The property will be concatenated in AND|
|
||||
|
||||
### Search configuration properties
|
||||
|
||||
@ -41,7 +41,7 @@ Update `your-app.extensions.json` file, and insert a new entry to the `features.
|
||||
"order": 200,
|
||||
"name": "APP.SEARCH.MY_CUSTOM_SEARCH",
|
||||
"default": false,
|
||||
"aca:fields": [ "cm:name", "cm:title", "cm:description", "TEXT", "TAG"],
|
||||
"app:fields": [ "cm:name", "cm:title", "cm:description", "TEXT", "TAG"],
|
||||
"filterQueries": [
|
||||
{
|
||||
"query": "+ASPECT: 'cm:person'"
|
||||
@ -70,7 +70,7 @@ To replace the default search with your configuration set to true the default fi
|
||||
"order": 200,
|
||||
"name": "APP.SEARCH.MY_CUSTOM_SEARCH",
|
||||
"default": true,
|
||||
"aca:fields": [ "cm:name", "cm:title", "cm:description", "TEXT", "TAG"],
|
||||
"app:fields": [ "cm:name", "cm:title", "cm:description", "TEXT", "TAG"],
|
||||
"filterQueries": [
|
||||
{
|
||||
"query": "+ASPECT: 'cm:person'"
|
||||
|
@ -1315,7 +1315,7 @@
|
||||
"name": "APP.BROWSE.SEARCH.DEFAULT_SEARCH",
|
||||
"default": true,
|
||||
"filterWithContains": true,
|
||||
"aca:fields": ["cm:name", "cm:title", "cm:description", "TEXT", "TAG"],
|
||||
"app:fields": ["cm:name", "cm:title", "cm:description", "TEXT", "TAG"],
|
||||
"include": ["path", "allowableOperations", "properties"],
|
||||
"sorting": {
|
||||
"options": [
|
||||
@ -1560,7 +1560,7 @@
|
||||
"name": "APP.BROWSE.SEARCH.DUBLIN_CORE",
|
||||
"default": false,
|
||||
"filterWithContains": true,
|
||||
"aca:fields": ["cm:name", "cm:title", "cm:description", "cm:identifier", "cm:contributor", "cm:coverage", "cm:dcsource", "cm:publisher", "cm:rights", "cm:subject", "cm:type", "TEXT", "TAG"],
|
||||
"app:fields": ["cm:name", "cm:title", "cm:description", "cm:identifier", "cm:contributor", "cm:coverage", "cm:dcsource", "cm:publisher", "cm:rights", "cm:subject", "cm:type", "TEXT", "TAG"],
|
||||
"include": ["path", "allowableOperations", "properties"],
|
||||
"sorting": {
|
||||
"options": [
|
||||
@ -1736,7 +1736,7 @@
|
||||
"name": "APP.BROWSE.SEARCH.EFFECTIVITY",
|
||||
"default": false,
|
||||
"filterWithContains": true,
|
||||
"aca:fields": ["cm:name", "cm:title", "cm:description", "cm:from", "cm:contributor", "cm:to", "TEXT", "TAG"],
|
||||
"app:fields": ["cm:name", "cm:title", "cm:description", "cm:from", "cm:contributor", "cm:to", "TEXT", "TAG"],
|
||||
"include": ["path", "allowableOperations", "properties"],
|
||||
"sorting": {
|
||||
"options": [
|
||||
|
@ -270,7 +270,7 @@ describe('SearchComponent', () => {
|
||||
|
||||
it('should update the user query whenever configuration changed', () => {
|
||||
params.next({ q: '=orange' });
|
||||
queryBuilder.configUpdated.next({ 'aca:fields': ['cm:tag'] } as any);
|
||||
queryBuilder.configUpdated.next({ 'app:fields': ['cm:tag'] } as any);
|
||||
expect(queryBuilder.userQuery).toBe(`((=cm:tag:"orange"))`);
|
||||
expect(queryBuilder.update).toHaveBeenCalled();
|
||||
});
|
||||
|
@ -127,7 +127,7 @@ export class SearchResultsComponent extends PageComponent implements OnInit {
|
||||
.subscribe(([params, searchConfig]) => {
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
this.searchedWord = params.hasOwnProperty(this.queryParamName) ? params[this.queryParamName] : null;
|
||||
const query = this.formatSearchQuery(this.searchedWord, searchConfig['aca:fields']);
|
||||
const query = this.formatSearchQuery(this.searchedWord, searchConfig['app:fields']);
|
||||
if (query) {
|
||||
this.queryBuilder.userQuery = decodeURIComponent(query);
|
||||
}
|
||||
|
@ -1074,7 +1074,7 @@ describe('AppExtensionService', () => {
|
||||
name: 'default',
|
||||
default: true,
|
||||
filterWithContains: true,
|
||||
'aca:fields': ['cm:name', 'cm:title', 'cm:description', 'TEXT', 'TAG'],
|
||||
'app:fields': ['cm:name', 'cm:title', 'cm:description', 'TEXT', 'TAG'],
|
||||
include: ['path', 'allowableOperations', 'properties'],
|
||||
categories: [
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user