arlas-web-components / Exports / ResultActionsComponent
Class: ResultActionsComponent
This component displays actions of an item.
- Actions are only displayed when we hover an item.
BUT
An action can be reversible. It means that this action has a reverse action.
- An example of reversible action: Action => Add layer to map --///-- Reverse Action => Remove layer from map.
- When you click on a reversible action for the first time, the action become 'activated'.
- Activated actions should be displayed all the time on the resultlist (in list and grid view).
- When you click on an 'activated' action, the action is reversed and goes back to its initial state.
- Actions that are not activated are only displayed when we hover an item.
ALSO
When a reversible action has fields
attribute. It means that this action needs the existence of the fields values in order to be executed.
- If one of the fields values is absent in the current item, the action will be hidden.
Implements
OnInit
OnChanges
OnDestroy
Table of contents
Constructors
Properties
- actionOnItemEvent
- actions
- activatedActionsPerItem
- detailedDataRetriever
- item
- mode
- stopPropagation
- width
Methods
Constructors
constructor
• new ResultActionsComponent(notifier
)
Parameters
Name | Type |
---|---|
notifier |
ResultlistNotifierService |
Defined in
projects/arlas-components/src/lib/components/results/result-actions/result-actions.component.ts:69
Properties
actionOnItemEvent
• actionOnItemEvent: Subject
<Action
>
Emits an event when the action is clicked on it.
Defined in
projects/arlas-components/src/lib/components/results/result-actions/result-actions.component.ts:62
actions
• actions: Action
[]
Defined in
projects/arlas-components/src/lib/components/results/result-actions/result-actions.component.ts:67
activatedActionsPerItem
• activatedActionsPerItem: Map
<string
, Set
<string
>>
Map
Defined in
projects/arlas-components/src/lib/components/results/result-actions/result-actions.component.ts:53
detailedDataRetriever
• detailedDataRetriever: DetailedDataRetriever
= null
This data retriever allows to fetch the actions of each items + check if an action should be hidden.
Defined in
projects/arlas-components/src/lib/components/results/result-actions/result-actions.component.ts:55
item
• item: Item
The item which actions are managed by this component.
Defined in
projects/arlas-components/src/lib/components/results/result-actions/result-actions.component.ts:49
mode
• mode: "icon"
| "text"
= 'icon'
Whether to display the actions as icon buttons or text buttons.
Defined in
projects/arlas-components/src/lib/components/results/result-actions/result-actions.component.ts:59
stopPropagation
• stopPropagation: boolean
= false
Whether to stop propagation at click/hover of the action.
Defined in
projects/arlas-components/src/lib/components/results/result-actions/result-actions.component.ts:57
width
• width: number
Width of the component.
Defined in
projects/arlas-components/src/lib/components/results/result-actions/result-actions.component.ts:51
Methods
ngOnChanges
▸ ngOnChanges(changes
): void
Parameters
Name | Type |
---|---|
changes |
SimpleChanges |
Returns
void
Implementation of
OnChanges.ngOnChanges
Defined in
projects/arlas-components/src/lib/components/results/result-actions/result-actions.component.ts:90
ngOnDestroy
▸ ngOnDestroy(): void
Returns
void
Implementation of
OnDestroy.ngOnDestroy
Defined in
projects/arlas-components/src/lib/components/results/result-actions/result-actions.component.ts:172
ngOnInit
▸ ngOnInit(): void
Returns
void
Implementation of
OnInit.ngOnInit
Defined in
projects/arlas-components/src/lib/components/results/result-actions/result-actions.component.ts:86
triggerAction
▸ triggerAction(event
, action
): void
An action can be reversible. It means that this action has a reverse action. - When you click on a reversible action for the first time, the action become 'activated'. - Activated actions should be displayed all the time on the resultlist (in list and grid view). - When you click on an 'activated' action, the action is reversed and goes back to its initial state.
Parameters
Name | Type |
---|---|
event |
Event |
action |
Action |
Returns
void
Defined in
projects/arlas-components/src/lib/components/results/result-actions/result-actions.component.ts:102