+ }),
+ }));
+ }
+ };
+export const loadUserProject = (pickerId: string, includeCollections = false, includeFiles = false) =>
+ async (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
+ const uuid = services.authService.getUuid();
+ if (uuid) {
+ dispatch(loadProject({ id: uuid, pickerId, includeCollections, includeFiles }));
+ }
+ };
+
+
+export const initSharedProject = (pickerId: string) =>
+ async (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
+ dispatch(receiveTreePickerData({
+ id: '',
+ pickerId,
+ data: [{ uuid: 'Shared with me', name: 'Shared with me' }],
+ extractNodeData: value => ({
+ id: value.uuid,
+ status: TreeNodeStatus.INITIAL,
+ value,
+ }),
+ }));
+ };
+
+export const initFavoritesProject = (pickerId: string) =>
+ async (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
+ dispatch(receiveTreePickerData({
+ id: '',
+ pickerId,
+ data: [{ uuid: 'Favorites', name: 'Favorites' }],
+ extractNodeData: value => ({
+ id: value.uuid,
+ status: TreeNodeStatus.INITIAL,
+ value,
+ }),