2021-05-04 05:09:59 -04:00
|
|
|
import boardListsQuery from 'ee_else_ce/boards/graphql/board_lists.query.graphql';
|
2021-02-03 16:09:17 -05:00
|
|
|
import { __ } from '~/locale';
|
2021-04-14 11:09:04 -04:00
|
|
|
import updateEpicSubscriptionMutation from '~/sidebar/queries/update_epic_subscription.mutation.graphql';
|
2021-04-09 05:09:10 -04:00
|
|
|
import updateEpicTitleMutation from '~/sidebar/queries/update_epic_title.mutation.graphql';
|
2021-03-16 02:09:57 -04:00
|
|
|
import boardBlockingIssuesQuery from './graphql/board_blocking_issues.query.graphql';
|
2022-08-31 08:13:01 -04:00
|
|
|
import boardBlockingEpicsQuery from './graphql/board_blocking_epics.query.graphql';
|
2021-04-29 05:10:11 -04:00
|
|
|
import destroyBoardListMutation from './graphql/board_list_destroy.mutation.graphql';
|
2021-04-27 02:09:45 -04:00
|
|
|
import updateBoardListMutation from './graphql/board_list_update.mutation.graphql';
|
2021-05-04 05:09:59 -04:00
|
|
|
|
2021-04-14 11:09:04 -04:00
|
|
|
import issueSetSubscriptionMutation from './graphql/issue_set_subscription.mutation.graphql';
|
2021-04-09 05:09:10 -04:00
|
|
|
import issueSetTitleMutation from './graphql/issue_set_title.mutation.graphql';
|
2021-02-03 16:09:17 -05:00
|
|
|
|
2021-04-20 20:11:06 -04:00
|
|
|
/* eslint-disable-next-line @gitlab/require-i18n-strings */
|
|
|
|
export const AssigneeIdParamValues = ['Any', 'None'];
|
|
|
|
|
2021-03-05 04:09:07 -05:00
|
|
|
export const issuableTypes = {
|
|
|
|
issue: 'issue',
|
|
|
|
epic: 'epic',
|
|
|
|
};
|
|
|
|
|
2020-04-30 05:09:39 -04:00
|
|
|
export const BoardType = {
|
|
|
|
project: 'project',
|
|
|
|
group: 'group',
|
|
|
|
};
|
|
|
|
|
2019-10-15 05:06:09 -04:00
|
|
|
export const ListType = {
|
|
|
|
assignee: 'assignee',
|
|
|
|
milestone: 'milestone',
|
2021-02-03 16:09:17 -05:00
|
|
|
iteration: 'iteration',
|
2019-10-15 05:06:09 -04:00
|
|
|
backlog: 'backlog',
|
|
|
|
closed: 'closed',
|
|
|
|
label: 'label',
|
|
|
|
};
|
|
|
|
|
2021-02-03 16:09:17 -05:00
|
|
|
export const ListTypeTitles = {
|
|
|
|
assignee: __('Assignee'),
|
|
|
|
milestone: __('Milestone'),
|
|
|
|
iteration: __('Iteration'),
|
|
|
|
label: __('Label'),
|
2021-06-09 08:10:27 -04:00
|
|
|
backlog: __('Open'),
|
2021-02-03 16:09:17 -05:00
|
|
|
};
|
|
|
|
|
2021-02-08 22:09:18 -05:00
|
|
|
export const formType = {
|
|
|
|
new: 'new',
|
|
|
|
delete: 'delete',
|
|
|
|
edit: 'edit',
|
|
|
|
};
|
|
|
|
|
2021-06-17 11:10:03 -04:00
|
|
|
export const toggleFormEventPrefix = {
|
|
|
|
epic: 'toggle-epic-form-',
|
|
|
|
issue: 'toggle-issue-form-',
|
|
|
|
};
|
|
|
|
|
2022-01-14 04:14:36 -05:00
|
|
|
export const active = 'active';
|
|
|
|
|
2020-07-24 11:09:39 -04:00
|
|
|
export const inactiveId = 0;
|
2020-04-22 17:10:00 -04:00
|
|
|
|
2020-08-25 02:10:18 -04:00
|
|
|
export const ISSUABLE = 'issuable';
|
|
|
|
export const LIST = 'list';
|
2022-01-13 04:15:32 -05:00
|
|
|
export const INCIDENT = 'INCIDENT';
|
2020-08-25 02:10:18 -04:00
|
|
|
|
2021-02-15 13:09:09 -05:00
|
|
|
export const flashAnimationDuration = 2000;
|
|
|
|
|
2021-05-04 05:09:59 -04:00
|
|
|
export const listsQuery = {
|
|
|
|
[issuableTypes.issue]: {
|
|
|
|
query: boardListsQuery,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2021-03-16 02:09:57 -04:00
|
|
|
export const blockingIssuablesQueries = {
|
|
|
|
[issuableTypes.issue]: {
|
|
|
|
query: boardBlockingIssuesQuery,
|
|
|
|
},
|
2022-08-31 08:13:01 -04:00
|
|
|
[issuableTypes.epic]: {
|
|
|
|
query: boardBlockingEpicsQuery,
|
|
|
|
},
|
2021-03-16 02:09:57 -04:00
|
|
|
};
|
2021-04-09 05:09:10 -04:00
|
|
|
|
2021-04-27 02:09:45 -04:00
|
|
|
export const updateListQueries = {
|
|
|
|
[issuableTypes.issue]: {
|
|
|
|
mutation: updateBoardListMutation,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2021-04-29 05:10:11 -04:00
|
|
|
export const deleteListQueries = {
|
|
|
|
[issuableTypes.issue]: {
|
|
|
|
mutation: destroyBoardListMutation,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2021-04-09 05:09:10 -04:00
|
|
|
export const titleQueries = {
|
|
|
|
[issuableTypes.issue]: {
|
|
|
|
mutation: issueSetTitleMutation,
|
|
|
|
},
|
|
|
|
[issuableTypes.epic]: {
|
|
|
|
mutation: updateEpicTitleMutation,
|
|
|
|
},
|
|
|
|
};
|
2021-04-14 11:09:04 -04:00
|
|
|
|
|
|
|
export const subscriptionQueries = {
|
|
|
|
[issuableTypes.issue]: {
|
|
|
|
mutation: issueSetSubscriptionMutation,
|
|
|
|
},
|
|
|
|
[issuableTypes.epic]: {
|
|
|
|
mutation: updateEpicSubscriptionMutation,
|
|
|
|
},
|
|
|
|
};
|
2021-04-27 08:10:12 -04:00
|
|
|
|
2021-06-02 08:10:05 -04:00
|
|
|
export const FilterFields = {
|
|
|
|
[issuableTypes.issue]: [
|
|
|
|
'assigneeUsername',
|
|
|
|
'assigneeWildcardId',
|
|
|
|
'authorUsername',
|
2021-12-09 07:15:43 -05:00
|
|
|
'confidential',
|
2021-06-02 08:10:05 -04:00
|
|
|
'labelName',
|
|
|
|
'milestoneTitle',
|
2021-11-30 07:10:26 -05:00
|
|
|
'milestoneWildcardId',
|
2021-06-02 08:10:05 -04:00
|
|
|
'myReactionEmoji',
|
|
|
|
'releaseTag',
|
|
|
|
'search',
|
2021-08-06 23:08:35 -04:00
|
|
|
'types',
|
2021-08-18 05:10:26 -04:00
|
|
|
'weight',
|
2021-06-02 08:10:05 -04:00
|
|
|
],
|
|
|
|
};
|
|
|
|
|
2021-11-30 07:10:26 -05:00
|
|
|
/* eslint-disable @gitlab/require-i18n-strings */
|
|
|
|
export const AssigneeFilterType = {
|
|
|
|
any: 'Any',
|
2022-01-13 07:14:38 -05:00
|
|
|
none: 'None',
|
2021-11-30 07:10:26 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
export const MilestoneFilterType = {
|
|
|
|
any: 'Any',
|
|
|
|
none: 'None',
|
|
|
|
started: 'Started',
|
|
|
|
upcoming: 'Upcoming',
|
|
|
|
};
|
|
|
|
|
2021-08-18 08:11:19 -04:00
|
|
|
export const DraggableItemTypes = {
|
|
|
|
card: 'card',
|
|
|
|
list: 'list',
|
|
|
|
};
|
|
|
|
|
2021-09-07 05:11:43 -04:00
|
|
|
export const MilestoneIDs = {
|
|
|
|
NONE: 0,
|
|
|
|
ANY: -1,
|
|
|
|
};
|
|
|
|
|
2021-04-27 08:10:12 -04:00
|
|
|
export default {
|
|
|
|
BoardType,
|
|
|
|
ListType,
|
|
|
|
};
|
2022-08-18 02:09:51 -04:00
|
|
|
|
|
|
|
export const DEFAULT_BOARD_LIST_ITEMS_SIZE = 10;
|