All files / app/assets/javascripts/invite_members constants.js

100% Statements 34/34
100% Branches 0/0
100% Functions 0/0
100% Lines 34/34

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139    17x   17x             17x         17x     17x 17x 17x 17x 17x 17x     17x     17x       17x     17x     17x 17x 17x     17x     17x       17x 17x     17x       17x 17x   17x 17x 17x 17x 17x     17x 17x 17x   17x                                                                                                                             17x  
import { __, s__ } from '~/locale';
 
export const SEARCH_DELAY = 200;
 
export const INVITE_MEMBERS_FOR_TASK = {
  minimum_access_level: 30,
  name: 'invite_members_for_task',
  view: 'modal_opened_from_email',
  submit: 'submit',
};
 
export const GROUP_FILTERS = {
  ALL: 'all',
  DESCENDANT_GROUPS: 'descendant_groups',
};
 
export const API_MESSAGES = {
  EMAIL_ALREADY_INVITED: __('Invite email has already been taken'),
};
export const USERS_FILTER_ALL = 'all';
export const USERS_FILTER_SAML_PROVIDER_ID = 'saml_provider_id';
export const TRIGGER_ELEMENT_BUTTON = 'button';
export const TRIGGER_ELEMENT_SIDE_NAV = 'side-nav';
export const MEMBERS_MODAL_DEFAULT_TITLE = s__('InviteMembersModal|Invite members');
export const MEMBERS_MODAL_CELEBRATE_TITLE = s__(
  'InviteMembersModal|GitLab is better with colleagues!',
);
export const MEMBERS_MODAL_CELEBRATE_INTRO = s__(
  'InviteMembersModal|How about inviting a colleague or two to join you?',
);
export const MEMBERS_TO_GROUP_DEFAULT_INTRO_TEXT = s__(
  "InviteMembersModal|You're inviting members to the %{strongStart}%{name}%{strongEnd} group.",
);
 
export const MEMBERS_TO_PROJECT_DEFAULT_INTRO_TEXT = s__(
  "InviteMembersModal|You're inviting members to the %{strongStart}%{name}%{strongEnd} project.",
);
export const MEMBERS_TO_PROJECT_CELEBRATE_INTRO_TEXT = s__(
  "InviteMembersModal|Congratulations on creating your project, you're almost there!",
);
export const MEMBERS_SEARCH_FIELD = s__('InviteMembersModal|GitLab member or email address');
export const MEMBERS_PLACEHOLDER = s__('InviteMembersModal|Select members or type email addresses');
export const MEMBERS_TASKS_TO_BE_DONE_TITLE = s__(
  'InviteMembersModal|Create issues for your new team member to work on (optional)',
);
export const MEMBERS_TASKS_TO_BE_DONE_NO_PROJECTS = s__(
  'InviteMembersModal|To assign issues to a new team member, you need a project for the issues. %{linkStart}Create a project to get started.%{linkEnd}',
);
export const MEMBERS_TASKS_PROJECTS_TITLE = s__(
  'InviteMembersModal|Choose a project for the issues',
);
 
export const GROUP_MODAL_DEFAULT_TITLE = s__('InviteMembersModal|Invite a group');
export const GROUP_MODAL_TO_GROUP_DEFAULT_INTRO_TEXT = s__(
  "InviteMembersModal|You're inviting a group to the %{strongStart}%{name}%{strongEnd} group.",
);
export const GROUP_MODAL_TO_PROJECT_DEFAULT_INTRO_TEXT = s__(
  "InviteMembersModal|You're inviting a group to the %{strongStart}%{name}%{strongEnd} project.",
);
 
export const GROUP_SEARCH_FIELD = s__('InviteMembersModal|Select a group to invite');
export const GROUP_PLACEHOLDER = s__('InviteMembersModal|Search for a group to invite');
 
export const ACCESS_LEVEL = s__('InviteMembersModal|Select a role');
export const ACCESS_EXPIRE_DATE = s__('InviteMembersModal|Access expiration date (optional)');
export const TOAST_MESSAGE_SUCCESSFUL = s__('InviteMembersModal|Members were successfully added');
export const INVALID_FEEDBACK_MESSAGE_DEFAULT = s__('InviteMembersModal|Something went wrong');
export const READ_MORE_TEXT = s__(
  `InviteMembersModal|%{linkStart}Read more%{linkEnd} about role permissions`,
);
export const INVITE_BUTTON_TEXT = s__('InviteMembersModal|Invite');
export const CANCEL_BUTTON_TEXT = s__('InviteMembersModal|Cancel');
export const HEADER_CLOSE_LABEL = s__('InviteMembersModal|Close invite team members');
 
export const MODAL_LABELS = {
  members: {
    modal: {
      default: {
        title: MEMBERS_MODAL_DEFAULT_TITLE,
      },
      celebrate: {
        title: MEMBERS_MODAL_CELEBRATE_TITLE,
        intro: MEMBERS_MODAL_CELEBRATE_INTRO,
      },
    },
    toGroup: {
      default: {
        introText: MEMBERS_TO_GROUP_DEFAULT_INTRO_TEXT,
      },
    },
    toProject: {
      default: {
        introText: MEMBERS_TO_PROJECT_DEFAULT_INTRO_TEXT,
      },
      celebrate: {
        introText: MEMBERS_TO_PROJECT_CELEBRATE_INTRO_TEXT,
      },
    },
    searchField: MEMBERS_SEARCH_FIELD,
    placeHolder: MEMBERS_PLACEHOLDER,
    tasksToBeDone: {
      title: MEMBERS_TASKS_TO_BE_DONE_TITLE,
      noProjects: MEMBERS_TASKS_TO_BE_DONE_NO_PROJECTS,
    },
    tasksProject: {
      title: MEMBERS_TASKS_PROJECTS_TITLE,
    },
  },
  group: {
    modal: {
      default: {
        title: GROUP_MODAL_DEFAULT_TITLE,
      },
    },
    toGroup: {
      default: {
        introText: GROUP_MODAL_TO_GROUP_DEFAULT_INTRO_TEXT,
      },
    },
    toProject: {
      default: {
        introText: GROUP_MODAL_TO_PROJECT_DEFAULT_INTRO_TEXT,
      },
    },
    searchField: GROUP_SEARCH_FIELD,
    placeHolder: GROUP_PLACEHOLDER,
  },
  accessLevel: ACCESS_LEVEL,
  accessExpireDate: ACCESS_EXPIRE_DATE,
  toastMessageSuccessful: TOAST_MESSAGE_SUCCESSFUL,
  invalidFeedbackMessageDefault: INVALID_FEEDBACK_MESSAGE_DEFAULT,
  readMoreText: READ_MORE_TEXT,
  inviteButtonText: INVITE_BUTTON_TEXT,
  cancelButtonText: CANCEL_BUTTON_TEXT,
  headerCloseLabel: HEADER_CLOSE_LABEL,
};
 
export const LEARN_GITLAB = 'learn_gitlab';