- LOAD_TREE_PICKER_NODE: ofType<{ id: string, pickerId: string }>(),
- LOAD_TREE_PICKER_NODE_SUCCESS: ofType<{ id: string, nodes: Array<TreePickerNode>, pickerId: string }>(),
- TOGGLE_TREE_PICKER_NODE_COLLAPSE: ofType<{ id: string, pickerId: string }>(),
- TOGGLE_TREE_PICKER_NODE_SELECT: ofType<{ id: string, pickerId: string }>()
-}, {
- tag: 'type',
- value: 'payload'
- });
-
-export const initPickerProjectTree = () => (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
- const uuid = services.authService.getUuid();
-
- dispatch<any>(getPickerTreeProjects(uuid));
- dispatch<any>(getSharedWithMeProjectsPickerTree(uuid));
- dispatch<any>(getFavoritesProjectsPickerTree(uuid));
-};
-
-const getPickerTreeProjects = (uuid: string = '') => {
- return getProjectsPickerTree(uuid, TreePickerKind.PROJECTS);
-};
-
-const getSharedWithMeProjectsPickerTree = (uuid: string = '') => {
- return getProjectsPickerTree(uuid, TreePickerKind.SHARED_WITH_ME);
-};
-
-const getFavoritesProjectsPickerTree = (uuid: string = '') => {
- return getProjectsPickerTree(uuid, TreePickerKind.FAVORITES);
-};
-
-const getProjectsPickerTree = (uuid: string, kind: string) => {
- return receiveTreePickerData(
- '',
- [mockProjectResource({ uuid, name: kind })],
- kind
- );
-};
+ LOAD_TREE_PICKER_NODE: ofType<{ nodeId: string, pickerId: string }>(),
+ LOAD_TREE_PICKER_NODE_SUCCESS: ofType<{ nodeId: string, nodes: Array<TreePickerNode>, pickerId: string }>(),
+ TOGGLE_TREE_PICKER_NODE_COLLAPSE: ofType<{ nodeId: string, pickerId: string }>(),
+ TOGGLE_TREE_PICKER_NODE_SELECT: ofType<{ nodeId: string, pickerId: string }>(),
+ EXPAND_TREE_PICKER_NODES: ofType<{ nodeIds: string[], pickerId: string }>(),
+ RESET_TREE_PICKER: ofType<{ pickerId: string }>()
+});