All files / ee/app/assets/javascripts/contextual_sidebar/components constants.js

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

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    2x 2x 2x 2x   2x   2x                                         2x                                                                        
import { s__ } from '~/locale';
 
const ACTIVE_TRIAL_POPOVER = 'trial_status_popover';
const TRIAL_ENDED_POPOVER = 'trial_ended_popover';
const CLICK_BUTTON_ACTION = 'click_button';
const RESIZE_EVENT_DEBOUNCE_MS = 150;
 
export const RESIZE_EVENT = 'resize';
 
export const WIDGET = {
  i18n: {
    widgetTitle: s__('Trials|%{planName} Trial'),
    widgetRemainingDays: s__('Trials|Day %{daysUsed}/%{duration}'),
    widgetTitleExpiredTrial: s__('Trials|Your 30-day trial has ended'),
    widgetBodyExpiredTrial: s__('Trials|Looking to do more with GitLab?'),
    learnAboutButtonTitle: s__('Trials|Learn about features'),
  },
  trackingEvents: {
    action: 'click_link',
    activeTrialOptions: {
      category: 'trial_status_widget',
      label: 'ultimate_trial',
    },
    trialEndedOptions: {
      category: 'trial_ended_widget',
      label: 'your_30_day_trial_has_ended',
    },
  },
};
 
export const POPOVER = {
  i18n: {
    close: s__('Modal|Close'),
    compareAllButtonTitle: s__('Trials|Compare all plans'),
    popoverContent: s__(`Trials|Your trial ends on
      %{boldStart}%{trialEndDate}%{boldEnd}. We hope you’re enjoying the
      features of GitLab %{planName}. To keep those features after your trial
      ends, you’ll need to buy a subscription. (You can also choose GitLab
      Premium if it meets your needs.)`),
    popoverTitleExpiredTrial: s__("Trials|Don't lose out on additional GitLab features"),
    popoverContentExpiredTrial: s__(
      'Trials|Upgrade to regain access to powerful features like advanced team management for code, security, and reporting.',
    ),
    learnAboutButtonTitle: s__('Trials|Learn about features'),
  },
  trackingEvents: {
    activeTrialCategory: ACTIVE_TRIAL_POPOVER,
    trialEndedCategory: TRIAL_ENDED_POPOVER,
    popoverShown: { action: 'render_popover' },
    contactSalesBtnClick: {
      action: CLICK_BUTTON_ACTION,
      label: 'contact_sales',
    },
    compareBtnClick: {
      action: CLICK_BUTTON_ACTION,
      label: 'compare_all_plans',
    },
    learnAboutFeaturesClick: {
      action: CLICK_BUTTON_ACTION,
      label: 'learn_about_features',
    },
  },
  resizeEventDebounceMS: RESIZE_EVENT_DEBOUNCE_MS,
  disabledBreakpoints: ['xs', 'sm'],
  trialEndDateFormatString: 'mmmm d',
};