@nauedu/frontend-component-header 20.0.0 → 20.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DesktopHeader.js +242 -0
- package/dist/DesktopHeader.js.map +1 -0
- package/dist/Header.js +9 -13
- package/dist/Header.js.map +1 -1
- package/dist/Header.test.jsx +0 -3
- package/dist/Icons.js +1 -1
- package/dist/LanguageSelector/data/api.js +5 -13
- package/dist/LanguageSelector/data/api.js.map +1 -1
- package/dist/LanguageSelector/index.js +4 -12
- package/dist/LanguageSelector/index.js.map +1 -1
- package/dist/Logo.js +23 -10
- package/dist/Logo.js.map +1 -1
- package/dist/Menu/Menu.js +11 -11
- package/dist/Menu/Menu.js.map +1 -1
- package/dist/Menu/menu.scss +6 -6
- package/dist/MobileHeader.js +244 -0
- package/dist/MobileHeader.js.map +1 -0
- package/dist/__snapshots__/Header.test.jsx.snap +0 -2
- package/dist/index.scss +15 -27
- package/dist/learning-header/AnonymousUserMenu.js +8 -11
- package/dist/learning-header/AnonymousUserMenu.js.map +1 -1
- package/dist/learning-header/AuthenticatedUserDropdown.js +24 -32
- package/dist/learning-header/AuthenticatedUserDropdown.js.map +1 -1
- package/dist/learning-header/LearningHeader.js +14 -15
- package/dist/learning-header/LearningHeader.js.map +1 -1
- package/dist/learning-header/data/api.js +4 -12
- package/dist/learning-header/data/api.js.map +1 -1
- package/dist/learning-header/data/api.test.js +95 -92
- package/dist/learning-header/data/api.test.js.map +1 -1
- package/dist/learning-header/messages.js +0 -5
- package/dist/learning-header/messages.js.map +1 -1
- package/dist/setupTest.js +2 -0
- package/dist/studio-header/BrandNav.js +21 -0
- package/dist/studio-header/BrandNav.js.map +1 -0
- package/dist/studio-header/CourseLockUp.js +45 -0
- package/dist/studio-header/CourseLockUp.js.map +1 -0
- package/dist/studio-header/HeaderBody.js +131 -0
- package/dist/studio-header/HeaderBody.js.map +1 -0
- package/dist/studio-header/MobileHeader.js +79 -0
- package/dist/studio-header/MobileHeader.js.map +1 -0
- package/dist/studio-header/MobileMenu.js +45 -0
- package/dist/studio-header/MobileMenu.js.map +1 -0
- package/dist/studio-header/NavDropdownMenu.js +30 -0
- package/dist/studio-header/NavDropdownMenu.js.map +1 -0
- package/dist/studio-header/StudioHeader.js +72 -0
- package/dist/studio-header/StudioHeader.js.map +1 -0
- package/dist/studio-header/StudioHeader.scss +10 -8
- package/dist/studio-header/UserMenu.js +55 -0
- package/dist/studio-header/UserMenu.js.map +1 -0
- package/dist/studio-header/{index.ts → index.js} +1 -1
- package/dist/studio-header/index.js.map +1 -0
- package/dist/studio-header/{messages.ts → messages.js} +14 -15
- package/dist/studio-header/messages.js.map +1 -0
- package/dist/studio-header/utils.js +29 -0
- package/dist/studio-header/utils.js.map +1 -0
- package/dist/test-utils.js +4 -12
- package/dist/test-utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/desktop-header/DesktopHeader.js +0 -172
- package/dist/desktop-header/DesktopHeader.js.map +0 -1
- package/dist/desktop-header/DesktopHeaderMainOrSecondaryMenu.js +0 -51
- package/dist/desktop-header/DesktopHeaderMainOrSecondaryMenu.js.map +0 -1
- package/dist/desktop-header/DesktopHeaderUserMenu.js +0 -49
- package/dist/desktop-header/DesktopHeaderUserMenu.js.map +0 -1
- package/dist/desktop-header/DesktopLoggedOutItems.js +0 -22
- package/dist/desktop-header/DesktopLoggedOutItems.js.map +0 -1
- package/dist/desktop-header/DesktopUserMenuToggle.js +0 -25
- package/dist/desktop-header/DesktopUserMenuToggle.js.map +0 -1
- package/dist/frontend-platform.d.ts +0 -41
- package/dist/learning-header/LearningHeaderCourseInfo.js +0 -24
- package/dist/learning-header/LearningHeaderCourseInfo.js.map +0 -1
- package/dist/learning-header/LearningHeaderHelpLink.js +0 -13
- package/dist/learning-header/LearningHeaderHelpLink.js.map +0 -1
- package/dist/learning-header/LearningHeaderUserMenuItems.js +0 -20
- package/dist/learning-header/LearningHeaderUserMenuItems.js.map +0 -1
- package/dist/learning-header/LearningLoggedOutButtons.js +0 -24
- package/dist/learning-header/LearningLoggedOutButtons.js.map +0 -1
- package/dist/learning-header/LearningUserMenuToggle.js +0 -26
- package/dist/learning-header/LearningUserMenuToggle.js.map +0 -1
- package/dist/mobile-header/MobileHeader.js +0 -197
- package/dist/mobile-header/MobileHeader.js.map +0 -1
- package/dist/mobile-header/MobileHeaderMainMenu.js +0 -46
- package/dist/mobile-header/MobileHeaderMainMenu.js.map +0 -1
- package/dist/mobile-header/MobileHeaderUserMenu.js +0 -38
- package/dist/mobile-header/MobileHeaderUserMenu.js.map +0 -1
- package/dist/mobile-header/MobileLoggedOutItems.js +0 -27
- package/dist/mobile-header/MobileLoggedOutItems.js.map +0 -1
- package/dist/mobile-header/MobileUserMenuToggle.js +0 -19
- package/dist/mobile-header/MobileUserMenuToggle.js.map +0 -1
- package/dist/plugin-slots/CourseInfoSlot/README.md +0 -128
- package/dist/plugin-slots/CourseInfoSlot/images/add_custom_components_before_and_after_course_info.png +0 -0
- package/dist/plugin-slots/CourseInfoSlot/images/replace_course_info_with_custom_component.png +0 -0
- package/dist/plugin-slots/CourseInfoSlot/images/replace_course_title.png +0 -0
- package/dist/plugin-slots/CourseInfoSlot/index.js +0 -32
- package/dist/plugin-slots/CourseInfoSlot/index.js.map +0 -1
- package/dist/plugin-slots/DesktopHeaderSlot/README.md +0 -44
- package/dist/plugin-slots/DesktopHeaderSlot/images/desktop_header_custom_component.png +0 -0
- package/dist/plugin-slots/DesktopHeaderSlot/index.js +0 -16
- package/dist/plugin-slots/DesktopHeaderSlot/index.js.map +0 -1
- package/dist/plugin-slots/DesktopLoggedOutItemsSlot/README.md +0 -137
- package/dist/plugin-slots/DesktopLoggedOutItemsSlot/images/desktop_logged_out_items_custom_component.png +0 -0
- package/dist/plugin-slots/DesktopLoggedOutItemsSlot/images/desktop_logged_out_items_custom_components_before_after.png +0 -0
- package/dist/plugin-slots/DesktopLoggedOutItemsSlot/images/desktop_logged_out_items_modify_items.png +0 -0
- package/dist/plugin-slots/DesktopLoggedOutItemsSlot/index.js +0 -20
- package/dist/plugin-slots/DesktopLoggedOutItemsSlot/index.js.map +0 -1
- package/dist/plugin-slots/DesktopMainMenuSlot/README.md +0 -137
- package/dist/plugin-slots/DesktopMainMenuSlot/images/desktop_main_menu_custom_component.png +0 -0
- package/dist/plugin-slots/DesktopMainMenuSlot/images/desktop_main_menu_custom_components_before_after.png +0 -0
- package/dist/plugin-slots/DesktopMainMenuSlot/images/desktop_main_menu_modify_items.png +0 -0
- package/dist/plugin-slots/DesktopMainMenuSlot/index.js +0 -20
- package/dist/plugin-slots/DesktopMainMenuSlot/index.js.map +0 -1
- package/dist/plugin-slots/DesktopSecondaryMenuSlot/README.md +0 -132
- package/dist/plugin-slots/DesktopSecondaryMenuSlot/images/desktop_secondary_menu_custom_component.png +0 -0
- package/dist/plugin-slots/DesktopSecondaryMenuSlot/images/desktop_secondary_menu_custom_components_before_after.png +0 -0
- package/dist/plugin-slots/DesktopSecondaryMenuSlot/images/desktop_secondary_menu_modify_items.png +0 -0
- package/dist/plugin-slots/DesktopSecondaryMenuSlot/index.js +0 -20
- package/dist/plugin-slots/DesktopSecondaryMenuSlot/index.js.map +0 -1
- package/dist/plugin-slots/DesktopUserMenuSlot/README.md +0 -144
- package/dist/plugin-slots/DesktopUserMenuSlot/images/desktop_user_menu_custom_component.png +0 -0
- package/dist/plugin-slots/DesktopUserMenuSlot/images/desktop_user_menu_custom_components_before_after.png +0 -0
- package/dist/plugin-slots/DesktopUserMenuSlot/images/desktop_user_menu_modify_items.png +0 -0
- package/dist/plugin-slots/DesktopUserMenuSlot/index.js +0 -20
- package/dist/plugin-slots/DesktopUserMenuSlot/index.js.map +0 -1
- package/dist/plugin-slots/DesktopUserMenuToggleSlot/README.md +0 -74
- package/dist/plugin-slots/DesktopUserMenuToggleSlot/images/desktop_user_menu_custom_component.png +0 -0
- package/dist/plugin-slots/DesktopUserMenuToggleSlot/images/desktop_user_menu_modified_toggle.png +0 -0
- package/dist/plugin-slots/DesktopUserMenuToggleSlot/index.js +0 -19
- package/dist/plugin-slots/DesktopUserMenuToggleSlot/index.js.map +0 -1
- package/dist/plugin-slots/LearningHelpSlot/README.md +0 -44
- package/dist/plugin-slots/LearningHelpSlot/images/learning_help_custom_component.png +0 -0
- package/dist/plugin-slots/LearningHelpSlot/index.js +0 -11
- package/dist/plugin-slots/LearningHelpSlot/index.js.map +0 -1
- package/dist/plugin-slots/LearningLoggedOutItemsSlot/README.md +0 -135
- package/dist/plugin-slots/LearningLoggedOutItemsSlot/images/learning_logged_out_items_custom_component.png +0 -0
- package/dist/plugin-slots/LearningLoggedOutItemsSlot/images/learning_logged_out_items_custom_components_before_after.png +0 -0
- package/dist/plugin-slots/LearningLoggedOutItemsSlot/images/learning_logged_out_items_modified_items.png +0 -0
- package/dist/plugin-slots/LearningLoggedOutItemsSlot/index.js +0 -18
- package/dist/plugin-slots/LearningLoggedOutItemsSlot/index.js.map +0 -1
- package/dist/plugin-slots/LearningUserMenuSlot/README.md +0 -133
- package/dist/plugin-slots/LearningUserMenuSlot/images/learning_user_menu_custom_component.png +0 -0
- package/dist/plugin-slots/LearningUserMenuSlot/images/learning_user_menu_custom_components_before_after.png +0 -0
- package/dist/plugin-slots/LearningUserMenuSlot/images/learning_user_menu_modified_items.png +0 -0
- package/dist/plugin-slots/LearningUserMenuSlot/index.js +0 -18
- package/dist/plugin-slots/LearningUserMenuSlot/index.js.map +0 -1
- package/dist/plugin-slots/LearningUserMenuToggleSlot/README.md +0 -74
- package/dist/plugin-slots/LearningUserMenuToggleSlot/images/learning_user_menu_toggle_custom_component.png +0 -0
- package/dist/plugin-slots/LearningUserMenuToggleSlot/images/learning_user_menu_toggle_modified_items.png +0 -0
- package/dist/plugin-slots/LearningUserMenuToggleSlot/index.js +0 -19
- package/dist/plugin-slots/LearningUserMenuToggleSlot/index.js.map +0 -1
- package/dist/plugin-slots/LogoSlot/README.md +0 -72
- package/dist/plugin-slots/LogoSlot/index.js +0 -27
- package/dist/plugin-slots/LogoSlot/index.js.map +0 -1
- package/dist/plugin-slots/MobileHeaderSlot/README.md +0 -44
- package/dist/plugin-slots/MobileHeaderSlot/images/mobile_header_custom_component.png +0 -0
- package/dist/plugin-slots/MobileHeaderSlot/index.js +0 -16
- package/dist/plugin-slots/MobileHeaderSlot/index.js.map +0 -1
- package/dist/plugin-slots/MobileLoggedOutItemsSlot/README.md +0 -136
- package/dist/plugin-slots/MobileLoggedOutItemsSlot/images/mobile_logged_out_items_custom_component.png +0 -0
- package/dist/plugin-slots/MobileLoggedOutItemsSlot/images/mobile_logged_out_items_custom_components_before_after.png +0 -0
- package/dist/plugin-slots/MobileLoggedOutItemsSlot/images/mobile_logged_out_items_modify_items.png +0 -0
- package/dist/plugin-slots/MobileLoggedOutItemsSlot/index.js +0 -20
- package/dist/plugin-slots/MobileLoggedOutItemsSlot/index.js.map +0 -1
- package/dist/plugin-slots/MobileMainMenuSlot/README.md +0 -136
- package/dist/plugin-slots/MobileMainMenuSlot/images/mobile_main_menu_custom_component.png +0 -0
- package/dist/plugin-slots/MobileMainMenuSlot/images/mobile_main_menu_custom_components_before_after.png +0 -0
- package/dist/plugin-slots/MobileMainMenuSlot/images/mobile_main_menu_modify_items.png +0 -0
- package/dist/plugin-slots/MobileMainMenuSlot/index.js +0 -20
- package/dist/plugin-slots/MobileMainMenuSlot/index.js.map +0 -1
- package/dist/plugin-slots/MobileUserMenuSlot/README.md +0 -144
- package/dist/plugin-slots/MobileUserMenuSlot/images/mobile_user_menu_custom_component.png +0 -0
- package/dist/plugin-slots/MobileUserMenuSlot/images/mobile_user_menu_custom_components_before_after.png +0 -0
- package/dist/plugin-slots/MobileUserMenuSlot/images/mobile_user_menu_modify_items.png +0 -0
- package/dist/plugin-slots/MobileUserMenuSlot/index.js +0 -20
- package/dist/plugin-slots/MobileUserMenuSlot/index.js.map +0 -1
- package/dist/plugin-slots/MobileUserMenuToggleSlot/README.md +0 -74
- package/dist/plugin-slots/MobileUserMenuToggleSlot/images/mobile_user_menu_toggle_custom_component.png +0 -0
- package/dist/plugin-slots/MobileUserMenuToggleSlot/images/mobile_user_menu_toggle_modified_items.png +0 -0
- package/dist/plugin-slots/MobileUserMenuToggleSlot/index.js +0 -19
- package/dist/plugin-slots/MobileUserMenuToggleSlot/index.js.map +0 -1
- package/dist/plugin-slots/README.md +0 -26
- package/dist/studio-header/BrandNav.test.tsx +0 -40
- package/dist/studio-header/BrandNav.tsx +0 -25
- package/dist/studio-header/CourseLockUp.test.tsx +0 -59
- package/dist/studio-header/CourseLockUp.tsx +0 -56
- package/dist/studio-header/HeaderBody.test.tsx +0 -102
- package/dist/studio-header/HeaderBody.tsx +0 -196
- package/dist/studio-header/MobileHeader.tsx +0 -74
- package/dist/studio-header/MobileMenu.test.tsx +0 -81
- package/dist/studio-header/MobileMenu.tsx +0 -50
- package/dist/studio-header/NavDropdownMenu.test.tsx +0 -67
- package/dist/studio-header/NavDropdownMenu.tsx +0 -42
- package/dist/studio-header/StudioHeader.test.tsx +0 -220
- package/dist/studio-header/StudioHeader.tsx +0 -84
- package/dist/studio-header/UserMenu.tsx +0 -69
- package/dist/studio-header/utils.ts +0 -37
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
# Course Info Slot
|
|
2
|
-
|
|
3
|
-
### Slot ID: `org.openedx.frontend.layout.header_learning_course_info.v1`
|
|
4
|
-
|
|
5
|
-
### Slot ID Aliases
|
|
6
|
-
* `course_info_slot`
|
|
7
|
-
|
|
8
|
-
## Description
|
|
9
|
-
|
|
10
|
-
This slot is used to replace/modify/hide the course info.
|
|
11
|
-
|
|
12
|
-
## Examples
|
|
13
|
-
|
|
14
|
-
### Replace Course Title
|
|
15
|
-
|
|
16
|
-
The following `env.config.jsx` will replace the course title.
|
|
17
|
-
|
|
18
|
-

|
|
19
|
-
|
|
20
|
-
```jsx
|
|
21
|
-
import { PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
|
|
22
|
-
|
|
23
|
-
const replaceCourseTitle = ( widget ) => {
|
|
24
|
-
widget.content.courseTitle = "Custom Course Title";
|
|
25
|
-
return widget;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const config = {
|
|
29
|
-
pluginSlots: {
|
|
30
|
-
'org.openedx.frontend.layout.header_learning_course_info.v1': {
|
|
31
|
-
keepDefault: true,
|
|
32
|
-
plugins: [
|
|
33
|
-
{
|
|
34
|
-
op: PLUGIN_OPERATIONS.Modify,
|
|
35
|
-
widgetId: 'default_contents',
|
|
36
|
-
fn: replaceCourseTitle,
|
|
37
|
-
},
|
|
38
|
-
]
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export default config;
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### Replace Course Info with Custom Component
|
|
47
|
-
|
|
48
|
-
The following `env.config.jsx` will replace the course info entirely (in this case with a centered 🗺️ `h1`)
|
|
49
|
-
|
|
50
|
-

|
|
51
|
-
|
|
52
|
-
```jsx
|
|
53
|
-
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
|
|
54
|
-
|
|
55
|
-
const config = {
|
|
56
|
-
pluginSlots: {
|
|
57
|
-
'org.openedx.frontend.layout.header_learning_course_info.v1': {
|
|
58
|
-
keepDefault: false,
|
|
59
|
-
plugins: [
|
|
60
|
-
{
|
|
61
|
-
op: PLUGIN_OPERATIONS.Insert,
|
|
62
|
-
widget: {
|
|
63
|
-
id: 'custom_course_info_component',
|
|
64
|
-
type: DIRECT_PLUGIN,
|
|
65
|
-
RenderWidget: () => (
|
|
66
|
-
<h1 style={{textAlign: 'center'}}>🗺️</h1>
|
|
67
|
-
),
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export default config;
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### Add Custom Components before and after Course Info
|
|
79
|
-
|
|
80
|
-
The following `env.config.jsx` will place custom components before and after the course info (in this case centered `h1`s with 🌜 and 🌛).
|
|
81
|
-
|
|
82
|
-

|
|
83
|
-
|
|
84
|
-
```jsx
|
|
85
|
-
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
|
|
86
|
-
|
|
87
|
-
const config = {
|
|
88
|
-
pluginSlots: {
|
|
89
|
-
'org.openedx.frontend.layout.header_learning_course_info.v1': {
|
|
90
|
-
keepDefault: true,
|
|
91
|
-
plugins: [
|
|
92
|
-
{
|
|
93
|
-
op: PLUGIN_OPERATIONS.Insert,
|
|
94
|
-
widget: {
|
|
95
|
-
id: 'custom_before_course_info_component',
|
|
96
|
-
type: DIRECT_PLUGIN,
|
|
97
|
-
priority: 10,
|
|
98
|
-
RenderWidget: () => (
|
|
99
|
-
<h3 style={{
|
|
100
|
-
marginTop: 'auto',
|
|
101
|
-
marginBottom: 'auto',
|
|
102
|
-
marginRight: '0.5rem',
|
|
103
|
-
}}>🌜</h3>
|
|
104
|
-
),
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
op: PLUGIN_OPERATIONS.Insert,
|
|
109
|
-
widget: {
|
|
110
|
-
id: 'custom_after_course_info_component',
|
|
111
|
-
type: DIRECT_PLUGIN,
|
|
112
|
-
priority: 90,
|
|
113
|
-
RenderWidget: () => (
|
|
114
|
-
<h3 style={{
|
|
115
|
-
marginTop: 'auto',
|
|
116
|
-
marginBottom: 'auto',
|
|
117
|
-
marginLeft: '0.5rem',
|
|
118
|
-
}}>🌛</h3>
|
|
119
|
-
),
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
]
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export default config;
|
|
128
|
-
```
|
|
Binary file
|
package/dist/plugin-slots/CourseInfoSlot/images/replace_course_info_with_custom_component.png
DELETED
|
Binary file
|
|
Binary file
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
var _excluded = ["courseOrg", "courseNumber", "courseTitle"];
|
|
2
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { PluginSlot } from '@openedx/frontend-plugin-framework';
|
|
7
|
-
import LearningHeaderCourseInfo, { courseInfoDataShape } from '../../learning-header/LearningHeaderCourseInfo';
|
|
8
|
-
var CourseInfoSlot = function CourseInfoSlot(_ref) {
|
|
9
|
-
var courseOrg = _ref.courseOrg,
|
|
10
|
-
courseNumber = _ref.courseNumber,
|
|
11
|
-
courseTitle = _ref.courseTitle,
|
|
12
|
-
attributes = _objectWithoutProperties(_ref, _excluded);
|
|
13
|
-
return /*#__PURE__*/React.createElement(PluginSlot, {
|
|
14
|
-
id: "org.openedx.frontend.layout.header_learning_course_info.v1",
|
|
15
|
-
idAliases: ['course_info_slot'],
|
|
16
|
-
slotOptions: {
|
|
17
|
-
mergeProps: true
|
|
18
|
-
},
|
|
19
|
-
pluginProps: {
|
|
20
|
-
courseOrg: courseOrg,
|
|
21
|
-
courseNumber: courseNumber,
|
|
22
|
-
courseTitle: courseTitle
|
|
23
|
-
}
|
|
24
|
-
}, /*#__PURE__*/React.createElement(LearningHeaderCourseInfo, _extends({
|
|
25
|
-
courseOrg: courseOrg,
|
|
26
|
-
courseNumber: courseNumber,
|
|
27
|
-
courseTitle: courseTitle
|
|
28
|
-
}, attributes)));
|
|
29
|
-
};
|
|
30
|
-
CourseInfoSlot.propTypes = courseInfoDataShape;
|
|
31
|
-
export default CourseInfoSlot;
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PluginSlot","LearningHeaderCourseInfo","courseInfoDataShape","CourseInfoSlot","_ref","courseOrg","courseNumber","courseTitle","attributes","_objectWithoutProperties","_excluded","createElement","id","idAliases","slotOptions","mergeProps","pluginProps","_extends","propTypes"],"sources":["../../../src/plugin-slots/CourseInfoSlot/index.jsx"],"sourcesContent":["import React from 'react';\nimport { PluginSlot } from '@openedx/frontend-plugin-framework';\nimport LearningHeaderCourseInfo, { courseInfoDataShape } from '../../learning-header/LearningHeaderCourseInfo';\n\nconst CourseInfoSlot = ({\n courseOrg,\n courseNumber,\n courseTitle,\n ...attributes\n}) => (\n <PluginSlot\n id=\"org.openedx.frontend.layout.header_learning_course_info.v1\"\n idAliases={['course_info_slot']}\n slotOptions={{\n mergeProps: true,\n }}\n pluginProps={{\n courseOrg,\n courseNumber,\n courseTitle,\n }}\n >\n <LearningHeaderCourseInfo\n courseOrg={courseOrg}\n courseNumber={courseNumber}\n courseTitle={courseTitle}\n {...attributes}\n />\n </PluginSlot>\n);\n\nCourseInfoSlot.propTypes = courseInfoDataShape;\n\nexport default CourseInfoSlot;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,oCAAoC;AAC/D,OAAOC,wBAAwB,IAAIC,mBAAmB,QAAQ,gDAAgD;AAE9G,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAAC,IAAA;EAAA,IAClBC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,YAAY,GAAAF,IAAA,CAAZE,YAAY;IACZC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACRC,UAAU,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;EAAA,oBAEbX,KAAA,CAAAY,aAAA,CAACX,UAAU;IACTY,EAAE,EAAC,4DAA4D;IAC/DC,SAAS,EAAE,CAAC,kBAAkB,CAAE;IAChCC,WAAW,EAAE;MACXC,UAAU,EAAE;IACd,CAAE;IACFC,WAAW,EAAE;MACXX,SAAS,EAATA,SAAS;MACTC,YAAY,EAAZA,YAAY;MACZC,WAAW,EAAXA;IACF;EAAE,gBAEFR,KAAA,CAAAY,aAAA,CAACV,wBAAwB,EAAAgB,QAAA;IACvBZ,SAAS,EAAEA,SAAU;IACrBC,YAAY,EAAEA,YAAa;IAC3BC,WAAW,EAAEA;EAAY,GACrBC,UAAU,CACf,CACS,CAAC;AAAA,CACd;AAEDL,cAAc,CAACe,SAAS,GAAGhB,mBAAmB;AAE9C,eAAeC,cAAc","ignoreList":[]}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Desktop Header Slot
|
|
2
|
-
|
|
3
|
-
### Slot ID: `org.openedx.frontend.layout.header_desktop.v1`
|
|
4
|
-
|
|
5
|
-
### Slot ID Aliases
|
|
6
|
-
* `desktop_header_slot`
|
|
7
|
-
|
|
8
|
-
## Description
|
|
9
|
-
|
|
10
|
-
This slot is used to replace/modify/hide the entire desktop header.
|
|
11
|
-
|
|
12
|
-
## Examples
|
|
13
|
-
|
|
14
|
-
### Custom Component
|
|
15
|
-
|
|
16
|
-
The following `env.config.jsx` will replace the desktop header entirely (in this case with a centered 🗺️ `h1`)
|
|
17
|
-
|
|
18
|
-

|
|
19
|
-
|
|
20
|
-
```jsx
|
|
21
|
-
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
|
|
22
|
-
|
|
23
|
-
const config = {
|
|
24
|
-
pluginSlots: {
|
|
25
|
-
'org.openedx.frontend.layout.header_desktop.v1': {
|
|
26
|
-
keepDefault: false,
|
|
27
|
-
plugins: [
|
|
28
|
-
{
|
|
29
|
-
op: PLUGIN_OPERATIONS.Insert,
|
|
30
|
-
widget: {
|
|
31
|
-
id: 'custom_desktop_header_component',
|
|
32
|
-
type: DIRECT_PLUGIN,
|
|
33
|
-
RenderWidget: () => (
|
|
34
|
-
<h1 style={{textAlign: 'center'}}>🗺️</h1>
|
|
35
|
-
),
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export default config;
|
|
44
|
-
```
|
|
Binary file
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PluginSlot } from '@openedx/frontend-plugin-framework';
|
|
3
|
-
import DesktopHeader, { desktopHeaderDataShape } from '../../desktop-header/DesktopHeader';
|
|
4
|
-
var DesktopHeaderSlot = function DesktopHeaderSlot(_ref) {
|
|
5
|
-
var props = _ref.props;
|
|
6
|
-
return /*#__PURE__*/React.createElement(PluginSlot, {
|
|
7
|
-
id: "org.openedx.frontend.layout.header_desktop.v1",
|
|
8
|
-
idAliases: ['desktop_header_slot'],
|
|
9
|
-
slotOptions: {
|
|
10
|
-
mergeProps: true
|
|
11
|
-
}
|
|
12
|
-
}, /*#__PURE__*/React.createElement(DesktopHeader, props));
|
|
13
|
-
};
|
|
14
|
-
DesktopHeaderSlot.propTypes = desktopHeaderDataShape;
|
|
15
|
-
export default DesktopHeaderSlot;
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PluginSlot","DesktopHeader","desktopHeaderDataShape","DesktopHeaderSlot","_ref","props","createElement","id","idAliases","slotOptions","mergeProps","propTypes"],"sources":["../../../src/plugin-slots/DesktopHeaderSlot/index.jsx"],"sourcesContent":["import React from 'react';\nimport { PluginSlot } from '@openedx/frontend-plugin-framework';\nimport DesktopHeader, { desktopHeaderDataShape } from '../../desktop-header/DesktopHeader';\n\nconst DesktopHeaderSlot = ({\n props,\n}) => (\n <PluginSlot\n id=\"org.openedx.frontend.layout.header_desktop.v1\"\n idAliases={['desktop_header_slot']}\n slotOptions={{\n mergeProps: true,\n }}\n >\n <DesktopHeader {...props} />\n </PluginSlot>\n);\n\nDesktopHeaderSlot.propTypes = desktopHeaderDataShape;\n\nexport default DesktopHeaderSlot;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,oCAAoC;AAC/D,OAAOC,aAAa,IAAIC,sBAAsB,QAAQ,oCAAoC;AAE1F,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA;EAAA,IACrBC,KAAK,GAAAD,IAAA,CAALC,KAAK;EAAA,oBAELN,KAAA,CAAAO,aAAA,CAACN,UAAU;IACTO,EAAE,EAAC,+CAA+C;IAClDC,SAAS,EAAE,CAAC,qBAAqB,CAAE;IACnCC,WAAW,EAAE;MACXC,UAAU,EAAE;IACd;EAAE,gBAEFX,KAAA,CAAAO,aAAA,CAACL,aAAa,EAAKI,KAAQ,CACjB,CAAC;AAAA,CACd;AAEDF,iBAAiB,CAACQ,SAAS,GAAGT,sBAAsB;AAEpD,eAAeC,iBAAiB","ignoreList":[]}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
# Desktop Logged Out Items Slot
|
|
2
|
-
|
|
3
|
-
### Slot ID: `org.openedx.frontend.layout.header_desktop_logged_out_items.v1`
|
|
4
|
-
|
|
5
|
-
### Slot ID Aliases
|
|
6
|
-
* `desktop_logged_out_items_slot`
|
|
7
|
-
|
|
8
|
-
## Description
|
|
9
|
-
|
|
10
|
-
This slot is used to replace/modify/hide the items shown on desktop when the user is logged out.
|
|
11
|
-
|
|
12
|
-
## Examples
|
|
13
|
-
|
|
14
|
-
### Modify Items
|
|
15
|
-
|
|
16
|
-
The following `env.config.jsx` will modify the items shown on desktop when the user is logged out.
|
|
17
|
-
|
|
18
|
-

|
|
19
|
-
|
|
20
|
-
```jsx
|
|
21
|
-
import { PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
|
|
22
|
-
|
|
23
|
-
const modifyLoggedOutItems = ( widget ) => {
|
|
24
|
-
widget.content.items = [
|
|
25
|
-
{
|
|
26
|
-
type: 'item',
|
|
27
|
-
href: 'https://openedx.org/',
|
|
28
|
-
content: 'openedx.org',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
type: 'item',
|
|
32
|
-
href: 'https://docs.openedx.org/en/latest/',
|
|
33
|
-
content: 'Documentation',
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
type: 'item',
|
|
37
|
-
href: 'https://discuss.openedx.org/',
|
|
38
|
-
content: 'Forums',
|
|
39
|
-
}
|
|
40
|
-
];
|
|
41
|
-
return widget;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const config = {
|
|
45
|
-
pluginSlots: {
|
|
46
|
-
'org.openedx.frontend.layout.header_desktop_logged_out_items.v1': {
|
|
47
|
-
keepDefault: true,
|
|
48
|
-
plugins: [
|
|
49
|
-
{
|
|
50
|
-
op: PLUGIN_OPERATIONS.Modify,
|
|
51
|
-
widgetId: 'default_contents',
|
|
52
|
-
fn: modifyLoggedOutItems,
|
|
53
|
-
},
|
|
54
|
-
]
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export default config;
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### Replace with Custom Component
|
|
63
|
-
|
|
64
|
-
The following `env.config.jsx` will replace the items shown on desktop when the user is logged out entirely (in this case with a centered 🗺️ `h1`)
|
|
65
|
-
|
|
66
|
-

|
|
67
|
-
|
|
68
|
-
```jsx
|
|
69
|
-
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
|
|
70
|
-
|
|
71
|
-
const config = {
|
|
72
|
-
pluginSlots: {
|
|
73
|
-
'org.openedx.frontend.layout.header_desktop_logged_out_items.v1': {
|
|
74
|
-
keepDefault: false,
|
|
75
|
-
plugins: [
|
|
76
|
-
{
|
|
77
|
-
op: PLUGIN_OPERATIONS.Insert,
|
|
78
|
-
widget: {
|
|
79
|
-
id: 'custom_logged_out_items_component',
|
|
80
|
-
type: DIRECT_PLUGIN,
|
|
81
|
-
RenderWidget: () => (
|
|
82
|
-
<h1 style={{textAlign: 'center'}}>🗺️</h1>
|
|
83
|
-
),
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
]
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export default config;
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### Add Custom Components before and after
|
|
95
|
-
|
|
96
|
-
The following `env.config.jsx` will place custom components before and after the items shown on desktop when the user is logged out (in this case centered `h1`s with 🌜 and 🌛).
|
|
97
|
-
|
|
98
|
-

|
|
99
|
-
|
|
100
|
-
```jsx
|
|
101
|
-
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
|
|
102
|
-
|
|
103
|
-
const config = {
|
|
104
|
-
pluginSlots: {
|
|
105
|
-
'org.openedx.frontend.layout.header_desktop_logged_out_items.v1': {
|
|
106
|
-
keepDefault: true,
|
|
107
|
-
plugins: [
|
|
108
|
-
{
|
|
109
|
-
op: PLUGIN_OPERATIONS.Insert,
|
|
110
|
-
widget: {
|
|
111
|
-
id: 'custom_before_logged_out_items_component',
|
|
112
|
-
type: DIRECT_PLUGIN,
|
|
113
|
-
priority: 10,
|
|
114
|
-
RenderWidget: () => (
|
|
115
|
-
<h1 style={{textAlign: 'center'}}>🌜</h1>
|
|
116
|
-
),
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
op: PLUGIN_OPERATIONS.Insert,
|
|
121
|
-
widget: {
|
|
122
|
-
id: 'custom_after_logged_out_items_component',
|
|
123
|
-
type: DIRECT_PLUGIN,
|
|
124
|
-
priority: 90,
|
|
125
|
-
RenderWidget: () => (
|
|
126
|
-
<h1 style={{textAlign: 'center'}}>🌛</h1>
|
|
127
|
-
),
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
]
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export default config;
|
|
136
|
-
```
|
|
137
|
-
|
|
Binary file
|
|
Binary file
|
package/dist/plugin-slots/DesktopLoggedOutItemsSlot/images/desktop_logged_out_items_modify_items.png
DELETED
|
Binary file
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PluginSlot } from '@openedx/frontend-plugin-framework';
|
|
3
|
-
import DesktopLoggedOutItems, { desktopLoggedOutItemsDataShape } from '../../desktop-header/DesktopLoggedOutItems';
|
|
4
|
-
var DesktopLoggedOutItemsSlot = function DesktopLoggedOutItemsSlot(_ref) {
|
|
5
|
-
var items = _ref.items;
|
|
6
|
-
return /*#__PURE__*/React.createElement(PluginSlot, {
|
|
7
|
-
id: "org.openedx.frontend.layout.header_desktop_logged_out_items.v1",
|
|
8
|
-
idAliases: ['desktop_logged_out_items_slot'],
|
|
9
|
-
slotOptions: {
|
|
10
|
-
mergeProps: true
|
|
11
|
-
}
|
|
12
|
-
}, /*#__PURE__*/React.createElement(DesktopLoggedOutItems, {
|
|
13
|
-
items: items
|
|
14
|
-
}));
|
|
15
|
-
};
|
|
16
|
-
DesktopLoggedOutItemsSlot.propTypes = {
|
|
17
|
-
items: desktopLoggedOutItemsDataShape
|
|
18
|
-
};
|
|
19
|
-
export default DesktopLoggedOutItemsSlot;
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PluginSlot","DesktopLoggedOutItems","desktopLoggedOutItemsDataShape","DesktopLoggedOutItemsSlot","_ref","items","createElement","id","idAliases","slotOptions","mergeProps","propTypes"],"sources":["../../../src/plugin-slots/DesktopLoggedOutItemsSlot/index.jsx"],"sourcesContent":["import React from 'react';\nimport { PluginSlot } from '@openedx/frontend-plugin-framework';\nimport DesktopLoggedOutItems, { desktopLoggedOutItemsDataShape } from '../../desktop-header/DesktopLoggedOutItems';\n\nconst DesktopLoggedOutItemsSlot = ({\n items,\n}) => (\n <PluginSlot\n id=\"org.openedx.frontend.layout.header_desktop_logged_out_items.v1\"\n idAliases={['desktop_logged_out_items_slot']}\n slotOptions={{\n mergeProps: true,\n }}\n >\n <DesktopLoggedOutItems items={items} />\n </PluginSlot>\n);\n\nDesktopLoggedOutItemsSlot.propTypes = {\n items: desktopLoggedOutItemsDataShape,\n};\n\nexport default DesktopLoggedOutItemsSlot;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,oCAAoC;AAC/D,OAAOC,qBAAqB,IAAIC,8BAA8B,QAAQ,4CAA4C;AAElH,IAAMC,yBAAyB,GAAG,SAA5BA,yBAAyBA,CAAAC,IAAA;EAAA,IAC7BC,KAAK,GAAAD,IAAA,CAALC,KAAK;EAAA,oBAELN,KAAA,CAAAO,aAAA,CAACN,UAAU;IACTO,EAAE,EAAC,gEAAgE;IACnEC,SAAS,EAAE,CAAC,+BAA+B,CAAE;IAC7CC,WAAW,EAAE;MACXC,UAAU,EAAE;IACd;EAAE,gBAEFX,KAAA,CAAAO,aAAA,CAACL,qBAAqB;IAACI,KAAK,EAAEA;EAAM,CAAE,CAC5B,CAAC;AAAA,CACd;AAEDF,yBAAyB,CAACQ,SAAS,GAAG;EACpCN,KAAK,EAAEH;AACT,CAAC;AAED,eAAeC,yBAAyB","ignoreList":[]}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
# Desktop Main Menu Slot
|
|
2
|
-
|
|
3
|
-
### Slot ID: `org.openedx.frontend.layout.header_desktop_main_menu.v1`
|
|
4
|
-
|
|
5
|
-
### Slot ID Aliases
|
|
6
|
-
* `desktop_main_menu_slot`
|
|
7
|
-
|
|
8
|
-
## Description
|
|
9
|
-
|
|
10
|
-
This slot is used to replace/modify/hide the desktop main menu.
|
|
11
|
-
|
|
12
|
-
## Examples
|
|
13
|
-
|
|
14
|
-
### Modify Items
|
|
15
|
-
|
|
16
|
-
The following `env.config.jsx` will modify the items in the desktop main menu.
|
|
17
|
-
|
|
18
|
-

|
|
19
|
-
|
|
20
|
-
```jsx
|
|
21
|
-
import { PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
|
|
22
|
-
|
|
23
|
-
const modifyMainMenu = ( widget ) => {
|
|
24
|
-
widget.content.menu = [
|
|
25
|
-
{
|
|
26
|
-
type: 'item',
|
|
27
|
-
href: 'https://openedx.org/',
|
|
28
|
-
content: 'openedx.org',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
type: 'item',
|
|
32
|
-
href: 'https://docs.openedx.org/en/latest/',
|
|
33
|
-
content: 'Documentation',
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
type: 'item',
|
|
37
|
-
href: 'https://discuss.openedx.org/',
|
|
38
|
-
content: 'Forums',
|
|
39
|
-
}
|
|
40
|
-
];
|
|
41
|
-
return widget;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const config = {
|
|
45
|
-
pluginSlots: {
|
|
46
|
-
'org.openedx.frontend.layout.header_desktop_main_menu.v1': {
|
|
47
|
-
keepDefault: true,
|
|
48
|
-
plugins: [
|
|
49
|
-
{
|
|
50
|
-
op: PLUGIN_OPERATIONS.Modify,
|
|
51
|
-
widgetId: 'default_contents',
|
|
52
|
-
fn: modifyMainMenu,
|
|
53
|
-
},
|
|
54
|
-
]
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export default config;
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### Replace Menu with Custom Component
|
|
63
|
-
|
|
64
|
-
The following `env.config.jsx` will replace the desktop main menu entirely (in this case with a centered 🗺️ `h1`)
|
|
65
|
-
|
|
66
|
-

|
|
67
|
-
|
|
68
|
-
```jsx
|
|
69
|
-
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
|
|
70
|
-
|
|
71
|
-
const config = {
|
|
72
|
-
pluginSlots: {
|
|
73
|
-
'org.openedx.frontend.layout.header_desktop_main_menu.v1': {
|
|
74
|
-
keepDefault: false,
|
|
75
|
-
plugins: [
|
|
76
|
-
{
|
|
77
|
-
op: PLUGIN_OPERATIONS.Insert,
|
|
78
|
-
widget: {
|
|
79
|
-
id: 'custom_main_menu_component',
|
|
80
|
-
type: DIRECT_PLUGIN,
|
|
81
|
-
RenderWidget: () => (
|
|
82
|
-
<h1 style={{textAlign: 'center'}}>🗺️</h1>
|
|
83
|
-
),
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
]
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export default config;
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### Add Custom Components before and after Menu
|
|
95
|
-
|
|
96
|
-
The following `env.config.jsx` will place custom components before and after the desktop main menu (in this case centered `h1`s with 🌜 and 🌛).
|
|
97
|
-
|
|
98
|
-

|
|
99
|
-
|
|
100
|
-
```jsx
|
|
101
|
-
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
|
|
102
|
-
|
|
103
|
-
const config = {
|
|
104
|
-
pluginSlots: {
|
|
105
|
-
'org.openedx.frontend.layout.header_desktop_main_menu.v1': {
|
|
106
|
-
keepDefault: true,
|
|
107
|
-
plugins: [
|
|
108
|
-
{
|
|
109
|
-
op: PLUGIN_OPERATIONS.Insert,
|
|
110
|
-
widget: {
|
|
111
|
-
id: 'custom_before_main_menu_component',
|
|
112
|
-
type: DIRECT_PLUGIN,
|
|
113
|
-
priority: 10,
|
|
114
|
-
RenderWidget: () => (
|
|
115
|
-
<h1 style={{textAlign: 'center'}}>🌜</h1>
|
|
116
|
-
),
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
op: PLUGIN_OPERATIONS.Insert,
|
|
121
|
-
widget: {
|
|
122
|
-
id: 'custom_after_main_menu_component',
|
|
123
|
-
type: DIRECT_PLUGIN,
|
|
124
|
-
priority: 90,
|
|
125
|
-
RenderWidget: () => (
|
|
126
|
-
<h1 style={{textAlign: 'center'}}>🌛</h1>
|
|
127
|
-
),
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
]
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export default config;
|
|
136
|
-
```
|
|
137
|
-
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PluginSlot } from '@openedx/frontend-plugin-framework';
|
|
3
|
-
import DesktopHeaderMainOrSecondaryMenu, { desktopHeaderMainOrSecondaryMenuDataShape } from '../../desktop-header/DesktopHeaderMainOrSecondaryMenu';
|
|
4
|
-
var DesktopMainMenuSlot = function DesktopMainMenuSlot(_ref) {
|
|
5
|
-
var menu = _ref.menu;
|
|
6
|
-
return /*#__PURE__*/React.createElement(PluginSlot, {
|
|
7
|
-
id: "org.openedx.frontend.layout.header_desktop_main_menu.v1",
|
|
8
|
-
idAliases: ['desktop_main_menu_slot'],
|
|
9
|
-
slotOptions: {
|
|
10
|
-
mergeProps: true
|
|
11
|
-
}
|
|
12
|
-
}, /*#__PURE__*/React.createElement(DesktopHeaderMainOrSecondaryMenu, {
|
|
13
|
-
menu: menu
|
|
14
|
-
}));
|
|
15
|
-
};
|
|
16
|
-
DesktopMainMenuSlot.propTypes = {
|
|
17
|
-
menu: desktopHeaderMainOrSecondaryMenuDataShape
|
|
18
|
-
};
|
|
19
|
-
export default DesktopMainMenuSlot;
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PluginSlot","DesktopHeaderMainOrSecondaryMenu","desktopHeaderMainOrSecondaryMenuDataShape","DesktopMainMenuSlot","_ref","menu","createElement","id","idAliases","slotOptions","mergeProps","propTypes"],"sources":["../../../src/plugin-slots/DesktopMainMenuSlot/index.jsx"],"sourcesContent":["import React from 'react';\nimport { PluginSlot } from '@openedx/frontend-plugin-framework';\nimport DesktopHeaderMainOrSecondaryMenu, { desktopHeaderMainOrSecondaryMenuDataShape } from '../../desktop-header/DesktopHeaderMainOrSecondaryMenu';\n\nconst DesktopMainMenuSlot = ({\n menu,\n}) => (\n <PluginSlot\n id=\"org.openedx.frontend.layout.header_desktop_main_menu.v1\"\n idAliases={['desktop_main_menu_slot']}\n slotOptions={{\n mergeProps: true,\n }}\n >\n <DesktopHeaderMainOrSecondaryMenu menu={menu} />\n </PluginSlot>\n);\n\nDesktopMainMenuSlot.propTypes = {\n menu: desktopHeaderMainOrSecondaryMenuDataShape,\n};\n\nexport default DesktopMainMenuSlot;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,oCAAoC;AAC/D,OAAOC,gCAAgC,IAAIC,yCAAyC,QAAQ,uDAAuD;AAEnJ,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA;EAAA,IACvBC,IAAI,GAAAD,IAAA,CAAJC,IAAI;EAAA,oBAEJN,KAAA,CAAAO,aAAA,CAACN,UAAU;IACTO,EAAE,EAAC,yDAAyD;IAC5DC,SAAS,EAAE,CAAC,wBAAwB,CAAE;IACtCC,WAAW,EAAE;MACXC,UAAU,EAAE;IACd;EAAE,gBAEFX,KAAA,CAAAO,aAAA,CAACL,gCAAgC;IAACI,IAAI,EAAEA;EAAK,CAAE,CACrC,CAAC;AAAA,CACd;AAEDF,mBAAmB,CAACQ,SAAS,GAAG;EAC9BN,IAAI,EAAEH;AACR,CAAC;AAED,eAAeC,mBAAmB","ignoreList":[]}
|