Skip to content

Commit

Permalink
[ACA-4486] support search widget chips layout (#7122)
Browse files Browse the repository at this point in the history
* [ACA-4486] support search widget chips layout

* * revert to old config

* * resolved rebase conflicts

* [ci:force] force e2e

* [ci:force] docs update and remove directive added

* [ci:force] config updated

* [ci:force] add missing app config schema to prod build
  • Loading branch information
dhrn committed Jun 25, 2021
1 parent 87be0b0 commit 26d180e
Show file tree
Hide file tree
Showing 97 changed files with 3,619 additions and 1,269 deletions.
4 changes: 1 addition & 3 deletions demo-shell/resources/i18n/en.json
Expand Up @@ -350,7 +350,5 @@
"ACTION_TYPE": "Action Type"
}
},
"SEARCH_FORMS": {
"ALL": "All"
}
"DEFAULT_SEARCH": "Default"
}
252 changes: 251 additions & 1 deletion demo-shell/src/app.config.json
Expand Up @@ -366,8 +366,258 @@
}
]
},
"name": "SEARCH_FORMS.ALL",
"name": "DEFAULT_SEARCH",
"default": true
},
{
"filterWithContains": true,
"app:fields": [
"cm:name",
"cm:title",
"cm:description",
"ia:whatEvent",
"ia:descriptionEvent",
"lnk:title",
"lnk:description",
"TEXT",
"TAG"
],
"include": [
"path",
"allowableOperations",
"properties"
],
"sorting": {
"options": [
{
"key": "name",
"label": "Name",
"type": "FIELD",
"field": "cm:name",
"ascending": true
},
{
"key": "content.sizeInBytes",
"label": "Size",
"type": "FIELD",
"field": "content.size",
"ascending": true
},
{
"key": "createdByUser",
"label": "Author",
"type": "FIELD",
"field": "cm:creator",
"ascending": true
},
{
"key": "createdAt",
"label": "Created",
"type": "FIELD",
"field": "cm:created",
"ascending": true
},
{
"key": "score",
"label": "Relevance",
"type": "SCORE",
"field": "score",
"ascending": false
}
],
"defaults": [
{
"key": "score",
"type": "FIELD",
"field": "score",
"ascending": false
}
]
},
"resetButton": true,
"filterQueries": [
{
"query": "TYPE:'cm:folder'"
},
{
"query": "NOT cm:creator:System"
}
],
"facetFields": {
"expanded": true,
"fields": [
{
"field": "content.size",
"mincount": 1,
"label": "Folder Size",
"settings": {
"allowUpdateOnChange": false,
"hideDefaultAction": true,
"unit": "Bytes"
}
},
{
"field": "creator",
"mincount": 1,
"label": "Field created",
"settings": {
"allowUpdateOnChange": false,
"hideDefaultAction": true
}
},
{
"field": "modifier",
"mincount": 1,
"label": "Folder Modifier",
"settings": {
"allowUpdateOnChange": false,
"hideDefaultAction": true
}
},
{
"field": "created",
"mincount": 1,
"label": "Folder Created",
"settings": {
"allowUpdateOnChange": false,
"hideDefaultAction": true
}
}
]
},
"facetQueries": {
"label": "SEARCH.FACET_QUERIES.MY_FACET_QUERIES",
"pageSize": 5,
"expanded": true,
"mincount": 1,
"queries": [
{
"query": "created:2019",
"label": "SEARCH.FACET_QUERIES.CREATED_THIS_YEAR"
},
{
"query": "content.mimetype:text/html",
"label": "SEARCH.FACET_QUERIES.MIMETYPE",
"group": "Type facet queries"
},
{
"query": "content.size:[0 TO 10240]",
"label": "SEARCH.FACET_QUERIES.XTRASMALL",
"group": "Size facet queries"
},
{
"query": "content.size:[10240 TO 102400]",
"label": "SEARCH.FACET_QUERIES.SMALL",
"group": "Size facet queries"
},
{
"query": "content.size:[102400 TO 1048576]",
"label": "SEARCH.FACET_QUERIES.MEDIUM",
"group": "Size facet queries"
},
{
"query": "content.size:[1048576 TO 16777216]",
"label": "SEARCH.FACET_QUERIES.LARGE",
"group": "Size facet queries"
},
{
"query": "content.size:[16777216 TO 134217728]",
"label": "SEARCH.FACET_QUERIES.XTRALARGE",
"group": "Size facet queries"
},
{
"query": "content.size:[134217728 TO MAX]",
"label": "SEARCH.FACET_QUERIES.XXTRALARGE",
"group": "Size facet queries"
}
],
"settings": {
"allowUpdateOnChange": false,
"hideDefaultAction": true
}
},
"facetIntervals": {
"expanded": true,
"intervals": [
{
"label": "The Created",
"field": "cm:created",
"sets": [
{
"label": "lastYear",
"start": "2018",
"end": "2019",
"endInclusive": false
},
{
"label": "currentYear",
"start": "NOW/YEAR",
"end": "NOW/YEAR+1YEAR"
},
{
"label": "earlier",
"start": "*",
"end": "2018",
"endInclusive": false
}
],
"settings": {
"allowUpdateOnChange": false,
"hideDefaultAction": true
}
},
{
"label": "The Modified",
"field": "cm:modified",
"sets": [
{
"label": "2017",
"start": "2017",
"end": "2018",
"endInclusive": false
},
{
"label": "2017-2018",
"start": "2017",
"end": "2018",
"endInclusive": true
},
{
"label": "currentYear",
"start": "NOW/YEAR",
"end": "NOW/YEAR+1YEAR"
},
{
"label": "earlierThan2017",
"start": "*",
"end": "2017",
"endInclusive": false
}
],
"settings": {
"allowUpdateOnChange": false,
"hideDefaultAction": true
}
}
]
},
"categories": [],
"highlight": {
"prefix": " ",
"postfix": " ",
"mergeContiguous": true,
"fields": [
{
"field": "cm:title"
},
{
"field": "description",
"prefix": "(",
"postfix": ")"
}
]
},
"name": "Folder"
}],
"search-headers": {
"filterWithContains": true,
Expand Down
4 changes: 3 additions & 1 deletion demo-shell/src/app/app.module.ts
Expand Up @@ -114,6 +114,7 @@ import localeDa from '@angular/common/locales/da';
import localeSv from '@angular/common/locales/sv';
import { setupAppNotifications } from './services/app-notifications-factory';
import { AppNotificationsService } from './services/app-notifications.service';
import { SearchFilterChipsComponent } from './components/search/search-filter-chips.component';

registerLocaleData(localeFr);
registerLocaleData(localeDe);
Expand Down Expand Up @@ -204,7 +205,8 @@ registerLocaleData(localeSv);
CustomEditorComponent,
CustomWidgetComponent,
ProcessCloudLayoutComponent,
ServiceTaskListCloudDemoComponent
ServiceTaskListCloudDemoComponent,
SearchFilterChipsComponent
],
providers: [
{
Expand Down
6 changes: 6 additions & 0 deletions demo-shell/src/app/app.routes.ts
Expand Up @@ -55,6 +55,7 @@ import { FilteredSearchComponent } from './components/files/filtered-search.comp
import { ProcessCloudLayoutComponent } from './components/cloud/process-cloud-layout.component';
import { ServiceTaskListCloudDemoComponent } from './components/cloud/service-task-list-cloud-demo.component';
import { AspectListSampleComponent } from './components/aspect-list-sample/aspect-list-sample.component';
import { SearchFilterChipsComponent } from './components/search/search-filter-chips.component';

export const appRoutes: Routes = [
{ path: 'login', loadChildren: () => import('./components/login/login.module').then(m => m.AppLoginModule) },
Expand Down Expand Up @@ -325,6 +326,11 @@ export const appRoutes: Routes = [
component: SearchResultComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'search-filter-chips',
component: SearchFilterChipsComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'extendedSearch',
component: SearchExtendedComponent,
Expand Down
@@ -0,0 +1,39 @@
<div class="app-search-results">
<div class="app-search-results__content">
<mat-progress-bar *ngIf="isLoading" color="primary" mode="indeterminate"></mat-progress-bar>
<div class="app-search-results__sorting">
<div style="padding: 0 12px">
<adf-search-form></adf-search-form>
</div>

<mat-divider [vertical]="true"></mat-divider>

<div style="padding: 0 12px; flex: 65%">
<adf-search-filter-chips></adf-search-filter-chips>
</div>

<mat-icon adf-reset-search matTooltip="reset" style="padding-right: 5px;">refresh</mat-icon>

<adf-search-sorting-picker style="width: 240px"></adf-search-sorting-picker>
</div>
<app-files-component
[showHeader]="showHeader"
[sorting]="sorting"
[sortingMode]="'server'"
[showRecentFiles]="false"
[showSitePicker]="false"
[showSettingsPanel]="false"
[currentFolderId]="null"
[nodeResult]="$any(data)"
[disableDragArea]="true"
[pagination]="pagination"
[searchTerm]="searchedWord"
(changedPageSize)="onRefreshPagination($event)"
(changedPageNumber)="onRefreshPagination($event)"
(turnedNextPage)="onRefreshPagination($event)"
(loadNext)="onRefreshPagination($event)"
(turnedPreviousPage)="onRefreshPagination($event)"
(deleteElementSuccess)="onDeleteElementSuccess()">
</app-files-component>
</div>
</div>
@@ -0,0 +1,44 @@
.app-search-results {
display: flex;
margin-left: 5px;

.app-search-settings {
width: 260px;
border: 1px solid #eee;
}

&__facets {
margin: 5px;
}

&__content {
flex: 1;
}

&__sorting {
padding-top: 16px;
padding-bottom: 16px;
display: flex;
}
}

div.app-search-results-container {
padding: 0 20px 20px;
}

.app-search-title {
font-size: 22px;
padding: 15px 0;
}

@media screen and (max-width: 600px) {
:host .app-col-display-name {
min-width: 100px;
}
:host .app-col-modified-at, :host .app-col-modified-by {
display: none;
}
:host div.app-search-results-container table {
width: 100%;
}
}

0 comments on commit 26d180e

Please sign in to comment.