Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
anis
anis-client
Commits
acd2b3ee
Commit
acd2b3ee
authored
Nov 12, 2020
by
Tifenn Guillas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comments for search multiple module => DONE
parent
840368f6
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
476 additions
and
27 deletions
+476
-27
src/app/search-multiple/components/datasets/dataset-list.component.ts
...ch-multiple/components/datasets/dataset-list.component.ts
+30
-3
src/app/search-multiple/components/datasets/datasets-by-family.component.ts
...tiple/components/datasets/datasets-by-family.component.ts
+34
-0
src/app/search-multiple/components/progress-bar-multiple.component.ts
...ch-multiple/components/progress-bar-multiple.component.ts
+9
-0
src/app/search-multiple/components/result/datasets-result.component.ts
...h-multiple/components/result/datasets-result.component.ts
+80
-0
src/app/search-multiple/components/result/download-section.component.ts
...-multiple/components/result/download-section.component.ts
+18
-0
src/app/search-multiple/components/result/overview.component.ts
...p/search-multiple/components/result/overview.component.ts
+40
-4
src/app/search-multiple/components/summary-multiple.component.ts
.../search-multiple/components/summary-multiple.component.ts
+16
-2
src/app/search-multiple/containers/datasets.component.ts
src/app/search-multiple/containers/datasets.component.ts
+20
-2
src/app/search-multiple/containers/position.component.ts
src/app/search-multiple/containers/position.component.ts
+17
-1
src/app/search-multiple/containers/result-multiple.component.ts
...p/search-multiple/containers/result-multiple.component.ts
+33
-1
src/app/search-multiple/containers/search-multiple.component.ts
...p/search-multiple/containers/search-multiple.component.ts
+4
-0
src/app/search-multiple/search-multiple-routing.module.ts
src/app/search-multiple/search-multiple-routing.module.ts
+4
-0
src/app/search-multiple/search-multiple.module.ts
src/app/search-multiple/search-multiple.module.ts
+4
-0
src/app/search-multiple/store/model/data-by-dataset.model.ts
src/app/search-multiple/store/model/data-by-dataset.model.ts
+5
-0
src/app/search-multiple/store/model/dataset-count.model.ts
src/app/search-multiple/store/model/dataset-count.model.ts
+5
-0
src/app/search-multiple/store/model/search-multiple-query-params.model.ts
...ultiple/store/model/search-multiple-query-params.model.ts
+5
-0
src/app/search-multiple/store/search-multiple.action.ts
src/app/search-multiple/store/search-multiple.action.ts
+80
-1
src/app/search-multiple/store/search-multiple.effects.ts
src/app/search-multiple/store/search-multiple.effects.ts
+25
-0
src/app/search-multiple/store/search-multiple.reducer.ts
src/app/search-multiple/store/search-multiple.reducer.ts
+22
-7
src/app/search-multiple/store/search-multiple.service.ts
src/app/search-multiple/store/search-multiple.service.ts
+20
-1
src/app/shared/cone-search/conainers/cone-search.component.ts
...app/shared/cone-search/conainers/cone-search.component.ts
+1
-1
src/app/shared/cone-search/store/cone-search.effects.ts
src/app/shared/cone-search/store/cone-search.effects.ts
+4
-4
No files found.
src/app/search-multiple/components/datasets/dataset-list.component.ts
View file @
acd2b3ee
...
...
@@ -17,6 +17,10 @@ import { sortByDisplay } from '../../../shared/utils';
templateUrl
:
'
dataset-list.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
/**
* @class
* @classdesc Search multiple dataset list component.
*/
export
class
DatasetListComponent
{
@
Input
()
projectList
:
Project
[];
@
Input
()
datasetFamilyList
:
Family
[];
...
...
@@ -24,9 +28,11 @@ export class DatasetListComponent {
@
Input
()
selectedDatasets
:
string
[];
@
Output
()
updateSelectedDatasets
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
();
// Return dataset families that contains datasets with cone search enabled
// Return dataset families are sorted by display
/**
* Returns dataset family list sorted by display, that contains datasets with cone search enabled.
*
* @return Family[]
*/
getDatasetFamilyList
():
Family
[]
{
const
familyId
:
number
[]
=
[];
this
.
datasetList
.
forEach
(
d
=>
{
...
...
@@ -39,16 +45,37 @@ export class DatasetListComponent {
.
sort
(
sortByDisplay
);
}
/**
* Returns dataset list that belongs to the given ID family.
*
* @param {number} familyId - The dataset family ID.
*
* @return Dataset[]
*/
getDatasetsByFamily
(
familyId
:
number
):
Dataset
[]
{
return
this
.
datasetList
.
filter
(
d
=>
d
.
id_dataset_family
===
familyId
);
}
/**
* Checks if all datasets that belongs to the given dataset family ID are selected.
*
* @param {number} familyId - The dataset family ID.
*
* @return boolean
*/
getIsAllSelected
(
familyId
:
number
):
boolean
{
const
datasetListName
=
this
.
getDatasetsByFamily
(
familyId
).
map
(
d
=>
d
.
name
);
const
filteredSelectedDatasets
=
this
.
selectedDatasets
.
filter
(
name
=>
datasetListName
.
indexOf
(
name
)
>
-
1
);
return
datasetListName
.
length
===
filteredSelectedDatasets
.
length
;
}
/**
* Checks if none of datasets that belongs to the given dataset family ID are selected.
*
* @param {number} familyId - The dataset family ID.
*
* @return boolean
*/
getIsAllUnselected
(
familyId
:
number
):
boolean
{
const
datasetListName
=
this
.
getDatasetsByFamily
(
familyId
).
map
(
d
=>
d
.
name
);
const
filteredSelectedDatasets
=
this
.
selectedDatasets
.
filter
(
name
=>
datasetListName
.
indexOf
(
name
)
>
-
1
);
...
...
src/app/search-multiple/components/datasets/datasets-by-family.component.ts
View file @
acd2b3ee
...
...
@@ -19,6 +19,10 @@ import { sortByDisplay } from '../../../shared/utils';
changeDetection
:
ChangeDetectionStrategy
.
OnPush
,
encapsulation
:
ViewEncapsulation
.
None
})
/**
* @class
* @classdesc Search multiple datasets by family component.
*/
export
class
DatasetsByFamilyComponent
{
@
Input
()
datasetFamily
:
Family
;
@
Input
()
projectList
:
Project
[];
...
...
@@ -28,14 +32,31 @@ export class DatasetsByFamilyComponent {
@
Input
()
isAllUnselected
:
boolean
;
@
Output
()
updateSelectedDatasets
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
();
/**
* Returns dataset list sorted by display.
*
* @return Dataset[]
*/
getDatasetSortedByDisplay
():
Dataset
[]
{
return
this
.
datasetList
.
sort
(
sortByDisplay
);
}
/**
* Checks if dataset is selected fot the given dataset name.
*
* @param {string} dname - The dataset name.
*
* @return boolean
*/
isSelected
(
dname
:
string
):
boolean
{
return
this
.
selectedDatasets
.
filter
(
i
=>
i
===
dname
).
length
>
0
;
}
/**
* Emits event to update dataset list selection with the given updated selected dataset name list.
*
* @param {string} dname - The dataset name.
*/
toggleSelection
(
dname
:
string
):
void
{
const
clonedSelectedDatasets
=
[...
this
.
selectedDatasets
];
const
index
=
clonedSelectedDatasets
.
indexOf
(
dname
);
...
...
@@ -47,6 +68,9 @@ export class DatasetsByFamilyComponent {
this
.
updateSelectedDatasets
.
emit
(
clonedSelectedDatasets
);
}
/**
* Emits event to update dataset list selection with all datasets names.
*/
selectAll
():
void
{
const
clonedSelectedDatasets
=
[...
this
.
selectedDatasets
];
const
datasetListName
=
this
.
datasetList
.
map
(
d
=>
d
.
name
);
...
...
@@ -56,6 +80,9 @@ export class DatasetsByFamilyComponent {
this
.
updateSelectedDatasets
.
emit
(
clonedSelectedDatasets
);
}
/**
* Emits event to update dataset list selection with no datasets names.
*/
unselectAll
():
void
{
const
clonedSelectedDatasets
=
[...
this
.
selectedDatasets
];
const
datasetListName
=
this
.
datasetList
.
map
(
d
=>
d
.
name
);
...
...
@@ -66,6 +93,13 @@ export class DatasetsByFamilyComponent {
this
.
updateSelectedDatasets
.
emit
(
clonedSelectedDatasets
);
}
/**
* Returns project description of the given project name.
*
* @param {string} projectName - The project name.
*
* @return string
*/
getProjectDescription
(
projectName
:
string
):
string
{
return
this
.
projectList
.
find
(
p
=>
p
.
name
===
projectName
).
description
;
}
...
...
src/app/search-multiple/components/progress-bar-multiple.component.ts
View file @
acd2b3ee
...
...
@@ -17,6 +17,10 @@ import { SearchMultipleQueryParams } from '../store/model';
styleUrls
:
[
'
progress-bar-multiple.component.css
'
],
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
/**
* @class
* @classdesc Search multiple progress bar component.
*/
export
class
ProgressBarMultipleComponent
{
@
Input
()
currentStep
:
string
;
@
Input
()
positionStepChecked
:
boolean
;
...
...
@@ -26,6 +30,11 @@ export class ProgressBarMultipleComponent {
@
Input
()
noSelectedDatasets
:
boolean
;
@
Input
()
queryParams
:
SearchMultipleQueryParams
;
/**
* Returns step class that match to the current step.
*
* @return string
*/
getStepClass
():
string
{
switch
(
this
.
currentStep
)
{
case
'
position
'
:
...
...
src/app/search-multiple/components/result/datasets-result.component.ts
View file @
acd2b3ee
...
...
@@ -22,6 +22,10 @@ import { sortByDisplay } from '../../../shared/utils';
templateUrl
:
'
datasets-result.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
/**
* @class
* @classdesc Search multiple result datasets component.
*/
export
class
DatasetsResultComponent
{
@
Input
()
datasetsCountIsLoaded
:
boolean
;
@
Input
()
datasetFamilyList
:
Family
[];
...
...
@@ -38,6 +42,11 @@ export class DatasetsResultComponent {
@
Output
()
retrieveData
:
EventEmitter
<
Pagination
>
=
new
EventEmitter
();
@
Output
()
updateSelectedData
:
EventEmitter
<
{
dname
:
string
,
data
:
(
string
|
number
)[]
}[]
>
=
new
EventEmitter
();
/**
* Returns dataset list with result ordered by dataset family display and dataset display.
*
* @return Dataset[]
*/
getOrderedDatasetWithResults
():
Dataset
[]
{
let
datasets
:
Dataset
[]
=
[];
const
sortedDatasetFamilyList
:
Family
[]
=
[...
this
.
datasetFamilyList
].
sort
(
sortByDisplay
);
...
...
@@ -55,14 +64,35 @@ export class DatasetsResultComponent {
return
datasets
;
}
/**
* Returns results number for the given dataset name.
*
* @param {string} dname - The dataset name.
*
* @return number
*/
getCount
(
dname
:
string
):
number
{
return
this
.
datasetsCount
.
find
(
c
=>
c
.
dname
===
dname
).
count
;
}
/**
* Checks if attribute list is loaded for the given dataset name.
*
* @param {string} dname - The dataset name.
*
* @return boolean
*/
attributeListIsLoaded
(
dname
:
string
):
boolean
{
return
this
.
datasetsWithAttributeList
.
includes
(
dname
)
&&
this
.
allAttributeList
[
dname
].
isLoaded
;
}
/**
* Returns attribute list for the given dataset name.
*
* @param {string} dname - The dataset name.
*
* @return Attribute[]
*/
getDatasetAttributeList
(
dname
:
string
):
Attribute
[]
{
if
(
this
.
attributeListIsLoaded
(
dname
))
{
return
this
.
allAttributeList
[
dname
].
attributeList
;
...
...
@@ -70,6 +100,13 @@ export class DatasetsResultComponent {
return
[];
}
/**
* Returns output list for the given dataset name.
*
* @param {string} dname - The dataset name.
*
* @return number[]
*/
getOutputList
(
dname
:
string
):
number
[]
{
return
this
.
getDatasetAttributeList
(
dname
)
.
filter
(
attribute
=>
attribute
.
selected
&&
attribute
.
id_output_category
)
...
...
@@ -77,6 +114,13 @@ export class DatasetsResultComponent {
.
map
(
attribute
=>
attribute
.
id
);
}
/**
* Returns data for the given dataset name.
*
* @param {string} dname - The dataset name.
*
* @return any[]
*/
getData
(
dname
:
string
):
any
[]
{
if
(
this
.
datasetsWithData
.
includes
(
dname
)
&&
this
.
allData
[
dname
].
isLoaded
)
{
return
this
.
allData
[
dname
].
data
;
...
...
@@ -84,6 +128,13 @@ export class DatasetsResultComponent {
return
[];
}
/**
* Returns selected data for the given dataset name.
*
* @param {string} dname - The dataset name.
*
* @return (string | number)[]
*/
getSelectedData
(
dname
:
string
):
(
string
|
number
)[]
{
// if (this.selectedData.find(d => d.dname === dname) === undefined) {
return
[];
...
...
@@ -91,6 +142,14 @@ export class DatasetsResultComponent {
// return this.selectedData.find(d => d.dname === dname).data;
}
/**
* Adds data to selected data and emits updated data selection.
*
* @param {string} dname - The dataset name.
* @param {(string | number)} data - The data ID.
*
* @fires EventEmitter<{ dname: string, data: (string | number)[] }[]>
*/
addSelectedData
(
dname
:
string
,
data
:
string
|
number
):
void
{
const
selectedDataByDataset
=
this
.
selectedData
.
find
(
d
=>
d
.
dname
===
dname
);
let
updatedSelection
:
{
dname
:
string
,
data
:
(
string
|
number
)[]
}[];
...
...
@@ -102,6 +161,14 @@ export class DatasetsResultComponent {
this
.
updateSelectedData
.
emit
(
updatedSelection
);
}
/**
* Remove data to selected data and emits updated data selection.
*
* @param {string} dname - The dataset name.
* @param {(string | number)} data - The data ID.
*
* @fires EventEmitter<{ dname: string, data: (string | number)[] }[]>
*/
deleteSelectedData
(
dname
:
string
,
data
:
string
|
number
):
void
{
const
selectedDataByDataset
=
this
.
selectedData
.
find
(
d
=>
d
.
dname
===
dname
);
let
updatedSelection
:
{
dname
:
string
,
data
:
(
string
|
number
)[]
}[];
...
...
@@ -116,6 +183,14 @@ export class DatasetsResultComponent {
this
.
updateSelectedData
.
emit
(
updatedSelection
);
}
/**
* When accordion opens, emits retrieve metadata for the
* given dataset name if not already loaded and emits retrieve
* data for the given dataset name otherwise.
*
* @param {boolean} isOpen - If the accordion is open.
* @param {string} dname - The dataset name.
*/
loadData
(
isOpen
:
boolean
,
dname
:
string
)
:
void
{
if
(
isOpen
&&
!
this
.
datasetsWithAttributeList
.
includes
(
dname
))
{
this
.
retrieveMeta
.
emit
(
dname
);
...
...
@@ -126,6 +201,11 @@ export class DatasetsResultComponent {
}
}
/**
* Emits execute process event.
*
* @param {string} typeProcess - The process type.
*/
executeProcess
(
typeProcess
:
string
):
void
{
// console.log('executeProcess: ' + typeProcess);
}
...
...
src/app/search-multiple/components/result/download-section.component.ts
View file @
acd2b3ee
...
...
@@ -19,11 +19,22 @@ import { ConeSearch } from '../../../shared/cone-search/store/model';
styleUrls
:
[
'
download-section.component.css
'
],
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
/**
* @class
* @classdesc Search multiple result download component.
*/
export
class
DownloadSectionComponent
{
@
Input
()
dataset
:
Dataset
;
@
Input
()
coneSearch
:
ConeSearch
;
@
Input
()
outputList
:
number
[];
/**
* Checks if configuration allowed downloading for the given format.
*
* @param {string} format - The format.
*
* @return boolean
*/
getConfigDownloadResultFormat
(
format
:
string
):
boolean
{
if
(
this
.
dataset
.
config
&&
this
.
dataset
.
config
.
download_results_format
&&
this
.
dataset
.
config
.
download_results_format
[
format
])
{
return
this
.
dataset
.
config
.
download_results_format
[
format
];
...
...
@@ -31,6 +42,13 @@ export class DownloadSectionComponent {
return
false
;
}
/**
* Returns URL to download data in the given format.
*
* @param {string} format - The format.
*
* @return string
*/
getUrl
(
format
:
string
):
string
{
let
query
:
string
=
host
()
+
'
/search/
'
+
this
.
dataset
.
name
+
'
?a=
'
+
this
.
outputList
.
join
(
'
;
'
);
query
+=
'
&cs=
'
+
this
.
coneSearch
.
ra
+
'
:
'
+
this
.
coneSearch
.
dec
+
'
:
'
+
this
.
coneSearch
.
radius
;
...
...
src/app/search-multiple/components/result/overview.component.ts
View file @
acd2b3ee
...
...
@@ -18,8 +18,18 @@ import { sortByDisplay } from '../../../shared/utils';
selector
:
'
app-overview
'
,
templateUrl
:
'
overview.component.html
'
})
/**
* @class
* @classdesc Search multiple result overview component.
*/
export
class
OverviewComponent
{
@
Input
()
set
datasetSearchMetaIsLoaded
(
datasetSearchMetaIsLoaded
:
boolean
)
{
/**
* Emits event to get dataset result number when dataset metadata is loaded.
*
* @param {boolean} datasetSearchMetaIsLoaded - Is dataset metadata loaded.
*/
@
Input
()
set
datasetSearchMetaIsLoaded
(
datasetSearchMetaIsLoaded
:
boolean
)
{
if
(
datasetSearchMetaIsLoaded
)
{
this
.
getDatasetCount
.
emit
();
}
...
...
@@ -33,7 +43,11 @@ export class OverviewComponent {
@
Input
()
datasetsCount
:
DatasetCount
[];
@
Output
()
getDatasetCount
:
EventEmitter
<
null
>
=
new
EventEmitter
();
/**
* Returns total amount of results for all datasets.
*
* @return number
*/
getTotalObject
():
number
{
let
total
:
number
=
0
;
this
.
datasetsCount
...
...
@@ -42,12 +56,20 @@ export class OverviewComponent {
return
total
;
}
/**
* Returns total number of datasets with results.
*
* @return number
*/
getTotalDatasets
():
number
{
return
this
.
datasetsCount
.
filter
(
c
=>
c
.
count
>
0
).
length
;
}
// Return dataset families that contains datasets with cone search enabled
// Returned dataset families are sorted by display
/**
* Returns dataset families sorted by display, that contains selected datasets.
*
* @return Family[]
*/
getSortedDatasetFamilyList
():
Family
[]
{
let
datasetFamiliesWithSelectedDataset
:
Family
[]
=
[];
this
.
selectedDatasets
.
forEach
(
dname
=>
{
...
...
@@ -60,12 +82,26 @@ export class OverviewComponent {
return
datasetFamiliesWithSelectedDataset
.
sort
(
sortByDisplay
);
}
/**
* Returns selected dataset list for the given dataset family ID.
*
* @param {number} familyId - The family ID.
*
* @return Dataset[]
*/
getSelectedDatasetsByFamily
(
familyId
:
number
):
Dataset
[]
{
return
this
.
datasetList
.
filter
(
d
=>
d
.
id_dataset_family
===
familyId
)
.
filter
(
d
=>
this
.
selectedDatasets
.
includes
(
d
.
name
));
}
/**
* Returns the result number for the given dataset name.
*
* @param {string} dname - The dataset name.
*
* @return number
*/
getCountByDataset
(
dname
:
string
):
number
{
return
this
.
datasetsCount
.
find
(
c
=>
c
.
dname
===
dname
).
count
;
}
...
...
src/app/search-multiple/components/summary-multiple.component.ts
View file @
acd2b3ee
...
...
@@ -20,6 +20,10 @@ import { sortByDisplay } from '../../shared/utils';
styleUrls
:
[
'
summary-multiple.component.css
'
],
changeDetection
:
ChangeDetectionStrategy
.
OnPush
,
})
/**
* @class
* @classdesc Search multiple summary component.
*/
export
class
SummaryMultipleComponent
{
@
Input
()
currentStep
:
string
;
@
Input
()
isValidConeSearch
:
boolean
;
...
...
@@ -34,8 +38,11 @@ export class SummaryMultipleComponent {
accordionFamilyIsOpen
=
true
;
// Return dataset families that contains datasets with cone search enabled
// Returned dataset families are sorted by display
/**
* Returns dataset families sorted by display, that contains datasets with cone search enabled.
*
* @return Family[]
*/
getDatasetFamilyList
():
Family
[]
{
const
familiesId
:
number
[]
=
[];
this
.
datasetList
.
forEach
(
d
=>
{
...
...
@@ -48,6 +55,13 @@ export class SummaryMultipleComponent {
.
sort
(
sortByDisplay
);
}
/**
* Returns dataset list for the given dataset family ID.
*
* @param {number} familyId - The family ID.
*
* @return Dataset[]
*/
getSelectedDatasetsByFamily
(
familyId
:
number
):
Dataset
[]
{
return
this
.
datasetList
.
filter
(
d
=>
d
.
id_dataset_family
===
familyId
)
...
...
src/app/search-multiple/containers/datasets.component.ts
View file @
acd2b3ee
...
...
@@ -24,7 +24,11 @@ import * as coneSearchSelector from '../../shared/cone-search/store/cone-search.
import
{
ConeSearch
}
from
'
../../shared/cone-search/store/model
'
;
import
{
ScrollTopService
}
from
'
../../shared/service/sroll-top.service
'
;
/**
* Interface for store state.
*
* @interface StoreState
*/
interface
StoreState
{
searchMultiple
:
fromSearchMultiple
.
State
;
metamodel
:
fromMetamodel
.
State
;
...
...
@@ -34,6 +38,12 @@ interface StoreState {
selector
:
'
app-datasets
'
,
templateUrl
:
'
datasets.component.html
'
})
/**
* @class
* @classdesc Search multiple datasets container.
*
* @implements OnInit
*/
export
class
DatasetsComponent
implements
OnInit
{
public
datasetSearchMetaIsLoading
:
Observable
<
boolean
>
;
public
datasetSearchMetaIsLoaded
:
Observable
<
boolean
>
;
...
...
@@ -70,11 +80,19 @@ export class DatasetsComponent implements OnInit {
this
.
scrollTopService
.
setScrollTop
();
}
/**
* Dispatches action to check datasets step.
*/
checkStep
():
void
{
this
.
store
.
dispatch
(
new
searchMultipleActions
.
DatasetsCheckedAction
());
}
updateSelectedDatasets
(
selectedDatasets
:
string
[])
{
/**
* Dispatches action to update dataset list selection with the given updated selected dataset name list.
*
* @param {string[]} selectedDatasets - The updated dataset name list.
*/
updateSelectedDatasets
(
selectedDatasets
:
string
[]):
void
{
this
.
store
.
dispatch
(
new
searchMultipleActions
.
UpdateSelectedDatasetsAction
(
selectedDatasets
));
}
}
src/app/search-multiple/containers/position.component.ts
View file @
acd2b3ee
...
...
@@ -25,7 +25,11 @@ import * as coneSearchSelector from '../../shared/cone-search/store/cone-search.
import
{
ConeSearch
}
from
'
../../shared/cone-search/store/model
'
;
import
{
ScrollTopService
}
from
'
../../shared/service/sroll-top.service
'
;
/**
* Interface for store state.
*
* @interface StoreState
*/
interface
StoreState
{
searchMultiple
:
fromSearchMultiple
.
State
;
metamodel
:
fromMetamodel
.
State
;
...
...
@@ -36,6 +40,12 @@ interface StoreState {
templateUrl
:
'
position.component.html
'
,
styleUrls
:
[
'
position.component.css
'
]
})
/**
* @class
* @classdesc Search multiple position container.
*
* @implements OnInit
*/
export
class
PositionComponent
implements
OnInit
{
public
datasetSearchMetaIsLoading
:
Observable
<
boolean
>
;
public
datasetSearchMetaIsLoaded
:
Observable
<
boolean
>
;
...
...
@@ -70,10 +80,16 @@ export class PositionComponent implements OnInit {
this
.
scrollTopService
.
setScrollTop
();
}
/**
* Dispatches action to check position step.
*/
checkStep
():
void
{
this
.
store
.
dispatch
(
new
searchMultipleActions
.
PositionCheckedAction
());
}
/**
* Dispatches action to reset cone search.
*/
resetConeSearch
():
void
{
this
.
store
.
dispatch
(
new
coneSearchActions
.
DeleteConeSearchAction
());
}
...
...
src/app/search-multiple/containers/result-multiple.component.ts
View file @
acd2b3ee
...
...
@@ -27,7 +27,11 @@ import { ConeSearch } from '../../shared/cone-search/store/model';
import
{
Pagination
}
from
'
../../shared/datatable/model
'
;
import
{
ScrollTopService
}
from
'
../../shared/service/sroll-top.service
'
;
/**
* Interface for store state.
*
* @interface StoreState
*/
interface
StoreState
{
searchMultiple
:
fromSearchMultiple
.
State
;
metamodel
:
fromMetamodel
.
State
;
...
...
@@ -37,6 +41,13 @@ interface StoreState {
selector
:
'
app-result-multiple
'
,
templateUrl
:
'
result-multiple.component.html
'
})
/**
* @class
* @classdesc Search multiple result container.
*
* @implements OnInit
* @implements OnDestroy
*/
export
class
ResultMultipleComponent
implements
OnInit
,
OnDestroy
{
public
datasetSearchMetaIsLoading
:
Observable
<
boolean
>
;
public
datasetSearchMetaIsLoaded
:
Observable
<
boolean
>
;
...
...
@@ -84,18 +95,36 @@ export class ResultMultipleComponent implements OnInit, OnDestroy {
this
.
scrollTopService
.
setScrollTop
();
}