forked from openedx/frontend-app-authoring
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.js
More file actions
77 lines (71 loc) · 2.97 KB
/
constants.js
File metadata and controls
77 lines (71 loc) · 2.97 KB
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
import messages from './sidebar/messages';
import addComponentMessages from './add-component/messages';
export const getUnitReleaseStatus = (intl) => ({
release: intl.formatMessage(messages.releaseStatusTitle),
released: intl.formatMessage(messages.releasedStatusTitle),
scheduled: intl.formatMessage(messages.scheduledStatusTitle),
});
export const UNIT_VISIBILITY_STATES = {
staffOnly: 'staff_only',
live: 'live',
ready: 'ready',
};
export const ICON_COLOR_VARIANTS = {
BLACK: '#000',
GREEN: '#0D7D4D',
};
export const PUBLISH_TYPES = {
republish: 'republish',
discardChanges: 'discard_changes',
makePublic: 'make_public',
};
export const getXBlockSupportMessages = (intl) => ({
fs: { // Fully supported
label: intl.formatMessage(addComponentMessages.modalComponentSupportLabelFullySupported),
tooltip: intl.formatMessage(addComponentMessages.modalComponentSupportTooltipFullySupported),
},
ps: { // Provisionally supported
label: intl.formatMessage(addComponentMessages.modalComponentSupportLabelProvisionallySupported),
tooltip: intl.formatMessage(addComponentMessages.modalComponentSupportTooltipProvisionallySupported),
},
us: { // Not supported
label: intl.formatMessage(addComponentMessages.modalComponentSupportLabelNotSupported),
tooltip: intl.formatMessage(addComponentMessages.modalComponentSupportTooltipNotSupported),
},
});
export const messageTypes = {
refreshXBlock: 'refreshXBlock',
showMoveXBlockModal: 'showMoveXBlockModal',
completeXBlockMoving: 'completeXBlockMoving',
rollbackMovedXBlock: 'rollbackMovedXBlock',
showMultipleComponentPicker: 'showMultipleComponentPicker',
showSingleComponentPicker: 'showSingleComponentPicker',
addSelectedComponentsToBank: 'addSelectedComponentsToBank',
showXBlockLibraryChangesPreview: 'showXBlockLibraryChangesPreview',
copyXBlock: 'copyXBlock',
manageXBlockAccess: 'manageXBlockAccess',
completeManageXBlockAccess: 'completeManageXBlockAccess',
deleteXBlock: 'deleteXBlock',
completeXBlockDeleting: 'completeXBlockDeleting',
duplicateXBlock: 'duplicateXBlock',
completeXBlockDuplicating: 'completeXBlockDuplicating',
newXBlockEditor: 'newXBlockEditor',
toggleCourseXBlockDropdown: 'toggleCourseXBlockDropdown',
addXBlock: 'addXBlock',
scrollToXBlock: 'scrollToXBlock',
handleViewXBlockContent: 'handleViewXBlockContent',
handleViewGroupConfigurations: 'handleViewGroupConfigurations',
editXBlock: 'editXBlock',
closeXBlockEditorModal: 'closeXBlockEditorModal',
saveEditedXBlockData: 'saveEditedXBlockData',
completeXBlockEditing: 'completeXBlockEditing',
studioAjaxError: 'studioAjaxError',
refreshPositions: 'refreshPositions',
openManageTags: 'openManageTags',
showComponentTemplates: 'showComponentTemplates',
addNewComponent: 'addNewComponent',
pasteNewComponent: 'pasteComponent',
copyXBlockLegacy: 'copyXBlockLegacy',
hideProcessingNotification: 'hideProcessingNotification',
handleRedirectToXBlockEditPage: 'handleRedirectToXBlockEditPage',
};