[ACS-8706] split context menu to allow injecting actions (#4203)

* ACS-8706 split context menu to allow injecting actions

* ACS-8706 fix class naming, add context menu components unit tests

* ACS-8706 add context menu service, effects and directive unit tests

* ACS-8706 review remarks - redundant condition, directive unit tests

* ACS-8706 improve unit testing approach, remove unnecessary class attributes

* ACS-8706 documentation

* ACS-8706 fix sonar issues

* ACS-8706 replace takeUntil with takeUntilDestroyed

* ACS-8706 fix sonar lint issue

* ACS-8706 change incorrect import path
This commit is contained in:
Grzegorz Jaśkowski
2024-11-08 08:26:33 +01:00
committed by GitHub
parent 38e667b334
commit 71764b09e2
18 changed files with 642 additions and 95 deletions

View File

@@ -23,5 +23,6 @@
*/
export enum ContextMenuActionTypes {
ContextMenu = 'CONTEXT_MENU'
ContextMenu = 'CONTEXT_MENU',
CustomContextMenu = 'CUSTOM_CONTEXT_MENU'
}

View File

@@ -24,9 +24,16 @@
import { Action } from '@ngrx/store';
import { ContextMenuActionTypes } from './context-menu-action-types';
import { ContentActionRef } from '@alfresco/adf-extensions';
export class ContextMenu implements Action {
readonly type = ContextMenuActionTypes.ContextMenu;
constructor(public event: MouseEvent) {}
}
export class CustomContextMenu implements Action {
readonly type = ContextMenuActionTypes.CustomContextMenu;
constructor(public event: MouseEvent, public payload: ContentActionRef[] = []) {}
}