import { SnackbarKind } from "store/snackbar/snackbar-actions";
import { ContextMenuResource } from 'store/context-menu/context-menu-actions';
-export const multiselectActionContants = {
+export const multiselectActionConstants = {
TOGGLE_VISIBLITY: "TOGGLE_VISIBLITY",
SET_CHECKEDLIST: "SET_CHECKEDLIST",
SELECT_ONE: 'SELECT_ONE',
export const toggleMSToolbar = (isVisible: boolean) => {
return dispatch => {
- dispatch({ type: multiselectActionContants.TOGGLE_VISIBLITY, payload: isVisible });
+ dispatch({ type: multiselectActionConstants.TOGGLE_VISIBLITY, payload: isVisible });
};
};
export const setCheckedListOnStore = (checkedList: TCheckedList) => {
return dispatch => {
dispatch(setSelectedUuid(isExactlyOneSelected(checkedList)))
- dispatch({ type: multiselectActionContants.SET_CHECKEDLIST, payload: checkedList });
+ dispatch({ type: multiselectActionConstants.SET_CHECKEDLIST, payload: checkedList });
};
};
export const selectOne = (uuid: string) => {
return dispatch => {
- dispatch({ type: multiselectActionContants.SELECT_ONE, payload: uuid });
+ dispatch({ type: multiselectActionConstants.SELECT_ONE, payload: uuid });
};
};
export const deselectOne = (uuid: string) => {
return dispatch => {
- dispatch({ type: multiselectActionContants.DESELECT_ONE, payload: uuid });
+ dispatch({ type: multiselectActionConstants.DESELECT_ONE, payload: uuid });
};
};
export const toggleOne = (uuid: string) => {
return dispatch => {
- dispatch({ type: multiselectActionContants.TOGGLE_ONE, payload: uuid });
+ dispatch({ type: multiselectActionConstants.TOGGLE_ONE, payload: uuid });
};
};
export const setSelectedUuid = (uuid: string | null) => {
return dispatch => {
- dispatch({ type: multiselectActionContants.SET_SELECTED_UUID, payload: uuid });
+ dispatch({ type: multiselectActionConstants.SET_SELECTED_UUID, payload: uuid });
};
};
export const addDisabledButton = (buttonName: string) => {
return dispatch => {
- dispatch({ type: multiselectActionContants.ADD_DISABLED, payload: buttonName });
+ dispatch({ type: multiselectActionConstants.ADD_DISABLED, payload: buttonName });
};
};
export const removeDisabledButton = (buttonName: string) => {
return dispatch => {
- dispatch({ type: multiselectActionContants.REMOVE_DISABLED, payload: buttonName });
+ dispatch({ type: multiselectActionConstants.REMOVE_DISABLED, payload: buttonName });
};
};
-export const multiselectActions = {
- toggleMSToolbar,
- setCheckedListOnStore,
- selectOne,
- deselectOne,
- toggleOne,
- setSelectedUuid,
- addDisabledButton,
- removeDisabledButton,
-};
//
// SPDX-License-Identifier: AGPL-3.0
-import { multiselectActionContants } from "./multiselect-actions";
+import { multiselectActionConstants } from "./multiselect-actions";
import { TCheckedList } from "components/data-table/data-table";
type MultiselectToolbarState = {
isVisible: boolean;
checkedList: TCheckedList;
selectedUuid: string;
- disabledButtons: string[]
+ disabledButtons: string[];
};
const multiselectToolbarInitialState = {
disabledButtons: []
};
-const { TOGGLE_VISIBLITY, SET_CHECKEDLIST, SELECT_ONE, DESELECT_ONE, TOGGLE_ONE, SET_SELECTED_UUID, ADD_DISABLED, REMOVE_DISABLED } = multiselectActionContants;
+const { TOGGLE_VISIBLITY, SET_CHECKEDLIST, SELECT_ONE, DESELECT_ONE, TOGGLE_ONE, SET_SELECTED_UUID, ADD_DISABLED, REMOVE_DISABLED } = multiselectActionConstants;
export const multiselectReducer = (state: MultiselectToolbarState = multiselectToolbarInitialState, action) => {
switch (action.type) {
import { allProcessesPanelColumns } from "views/all-processes-panel/all-processes-panel";
import { userProfileGroupsColumns } from "views/user-profile-panel/user-profile-panel-root";
import { selectedToArray, selectedToKindSet } from "components/multiselect-toolbar/MultiselectToolbar";
-import { multiselectActions } from "store/multiselect/multiselect-actions";
+import { deselectOne } from "store/multiselect/multiselect-actions";
import { treePickerActions } from "store/tree-picker/tree-picker-actions";
export const WORKBENCH_LOADING_SCREEN = "workbenchLoadingScreen";
link: collection.ownerUuid,
})
);
- dispatch<any>(multiselectActions.deselectOne(copyToProject.uuid));
+ dispatch<any>(deselectOne(copyToProject.uuid));
}
} catch (e) {
dispatch(