Apply wrapped unionize
authorMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Sat, 25 Aug 2018 22:46:34 +0000 (00:46 +0200)
committerMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Sat, 25 Aug 2018 22:46:34 +0000 (00:46 +0200)
Feature #14102

Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski@contractors.roche.com>

src/store/auth/auth-action.ts
src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts
src/store/collections/creator/collection-creator-action.ts
src/store/collections/uploader/collection-uploader-actions.ts
src/store/data-explorer/data-explorer-action.ts
src/store/dialog/dialog-actions.ts
src/store/favorites/favorites-actions.ts
src/store/snackbar/snackbar-actions.ts
src/store/tree-picker/tree-picker-actions.ts

index 72e2d3453299322775da2d421a5417e34d0eb5e0..07426b754445a73d9dcb255e17d1adec2e38d392 100644 (file)
@@ -2,14 +2,12 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ofType, default as unionize, UnionOf } from "unionize";
+import { ofType, unionize, UnionOf } from '~/common/unionize';
 import { Dispatch } from "redux";
 import { User } from "~/models/user";
 import { RootState } from "../store";
 import { ServiceRepository } from "~/services/services";
 import { AxiosInstance } from "axios";
-import { initSidePanelTree } from '../side-panel-tree/side-panel-tree-actions';
-import { updateResources } from '../resources/resources-actions';
 
 export const authActions = unionize({
     SAVE_API_TOKEN: ofType<string>(),
@@ -18,10 +16,7 @@ export const authActions = unionize({
     INIT: ofType<{ user: User, token: string }>(),
     USER_DETAILS_REQUEST: {},
     USER_DETAILS_SUCCESS: ofType<User>()
-}, {
-        tag: 'type',
-        value: 'payload'
-    });
+});
 
 function setAuthorizationHeader(services: ServiceRepository, token: string) {
     services.apiClient.defaults.headers.common = {
index 97abfef09f2822c51912097f7643be5a68bc293b..01b4fe4fac2f489e1aebf7402d3569322745d85d 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { default as unionize, ofType, UnionOf } from "unionize";
+import { unionize, ofType, UnionOf } from "~/common/unionize";
 import { Dispatch } from "redux";
 import { CollectionFilesTree, CollectionFileType } from "~/models/collection-file";
 import { ServiceRepository } from "~/services/services";
@@ -22,7 +22,7 @@ export const collectionPanelFilesAction = unionize({
     TOGGLE_COLLECTION_FILE_SELECTION: ofType<{ id: string }>(),
     SELECT_ALL_COLLECTION_FILES: ofType<{}>(),
     UNSELECT_ALL_COLLECTION_FILES: ofType<{}>(),
-}, { tag: 'type', value: 'payload' });
+});
 
 export type CollectionPanelFilesAction = UnionOf<typeof collectionPanelFilesAction>;
 
index 8c35ffa8336bd30a5eae76815ec305835c352171..8c42f2d4304688a70b09efed5e01e377d969e3fc 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { default as unionize, ofType, UnionOf } from "unionize";
+import { unionize, ofType, UnionOf } from "~/common/unionize";
 import { Dispatch } from "redux";
 
 import { RootState } from "../../store";
@@ -16,10 +16,7 @@ export const collectionCreateActions = unionize({
     CLOSE_COLLECTION_CREATOR: ofType<{}>(),
     CREATE_COLLECTION: ofType<{}>(),
     CREATE_COLLECTION_SUCCESS: ofType<{}>(),
-}, {
-        tag: 'type',
-        value: 'payload'
-    });
+});
 
 export type CollectionCreateAction = UnionOf<typeof collectionCreateActions>;
 
index 0fa55d836cd9510d1840ffb450b9e57801a4a34b..58dcdc4cd1b31ffb05ccfcdecaedb5557d1893a3 100644 (file)
@@ -2,7 +2,7 @@
 //\r
 // SPDX-License-Identifier: AGPL-3.0\r
 \r
-import { default as unionize, ofType, UnionOf } from "unionize";\r
+import { unionize, ofType, UnionOf } from "~/common/unionize";\r
 import { Dispatch } from 'redux';\r
 import { RootState } from '~/store/store';\r
 import { ServiceRepository } from '~/services/services';\r
@@ -26,9 +26,6 @@ export const collectionUploaderActions = unionize({
     START_UPLOAD: ofType(),\r
     SET_UPLOAD_PROGRESS: ofType<{ fileId: number, loaded: number, total: number, currentTime: number }>(),\r
     CLEAR_UPLOAD: ofType()\r
-}, {\r
-    tag: 'type',\r
-    value: 'payload'\r
 });\r
 \r
 export type CollectionUploaderAction = UnionOf<typeof collectionUploaderActions>;\r
index abb293fdcf2dd062cfdd0ffb20b6f6ed1ad5a0c0..e637043dacde193f4af1983706289f1dc4b3255c 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { default as unionize, ofType, UnionOf } from "unionize";
+import { unionize, ofType, UnionOf } from "~/common/unionize";
 import { DataTableFilterItem } from "~/components/data-table-filters/data-table-filters";
 import { DataColumns } from "~/components/data-table/data-table";
 
@@ -17,7 +17,7 @@ export const dataExplorerActions = unionize({
     TOGGLE_COLUMN: ofType<{ id: string, columnName: string }>(),
     TOGGLE_SORT: ofType<{ id: string, columnName: string }>(),
     SET_SEARCH_VALUE: ofType<{ id: string, searchValue: string }>(),
-}, { tag: "type", value: "payload" });
+});
 
 export type DataExplorerAction = UnionOf<typeof dataExplorerActions>;
 
index df4418f41363b32ba92e75b12c5a07547ee9b06d..22629b692f2bff6dea8c7f78ee97ea18fe0308ca 100644 (file)
@@ -2,14 +2,11 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { default as unionize, ofType, UnionOf } from "unionize";
+import { unionize, ofType, UnionOf } from "~/common/unionize";
 
 export const dialogActions = unionize({
     OPEN_DIALOG: ofType<{ id: string, data: any }>(),
     CLOSE_DIALOG: ofType<{ id: string }>()
-}, {
-        tag: 'type',
-        value: 'payload'
-    });
+});
 
 export type DialogAction = UnionOf<typeof dialogActions>;
index 57eecf8f54d1ec51f24714d4e4762b88d014a4f6..e5a8e591d20d1527b0137fffc3a4c35c8cd4b1ff 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { unionize, ofType, UnionOf } from "unionize";
+import { unionize, ofType, UnionOf } from "~/common/unionize";
 import { Dispatch } from "redux";
 import { RootState } from "../store";
 import { checkFavorite } from "./favorites-reducer";
@@ -13,7 +13,7 @@ export const favoritesActions = unionize({
     TOGGLE_FAVORITE: ofType<{ resourceUuid: string }>(),
     CHECK_PRESENCE_IN_FAVORITES: ofType<string[]>(),
     UPDATE_FAVORITES: ofType<Record<string, boolean>>()
-}, { tag: 'type', value: 'payload' });
+});
 
 export type FavoritesAction = UnionOf<typeof favoritesActions>;
 
index 2f6175ad68ac9040028ccc77ed28c918426d7cc7..55d9f3a8651b86afecc516aa48dc1af0abc412e1 100644 (file)
@@ -2,11 +2,11 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { unionize, ofType, UnionOf } from "unionize";
+import { unionize, ofType, UnionOf } from "~/common/unionize";
 
 export const snackbarActions = unionize({
     OPEN_SNACKBAR: ofType<{message: string; hideDuration?: number}>(),
     CLOSE_SNACKBAR: ofType<{}>()
-}, { tag: 'type', value: 'payload' });
+});
 
 export type SnackbarAction = UnionOf<typeof snackbarActions>;
index 34f1303717e0097a723c4851af8e94481f4f213d..97f72d6437a8f720ead158b289ea3f028fea111a 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { default as unionize, ofType, UnionOf } from "unionize";
+import { unionize, ofType, UnionOf } from "~/common/unionize";
 
 import { TreePickerNode } from "./tree-picker";
 
@@ -12,9 +12,6 @@ export const treePickerActions = unionize({
     TOGGLE_TREE_PICKER_NODE_COLLAPSE: ofType<{ nodeId: string, pickerId: string }>(),
     TOGGLE_TREE_PICKER_NODE_SELECT: ofType<{ nodeId: string, pickerId: string }>(),
     RESET_TREE_PICKER: ofType<{ pickerId: string }>()
-}, {
-        tag: 'type',
-        value: 'payload'
-    });
+});
 
 export type TreePickerAction = UnionOf<typeof treePickerActions>;