@ndla/ui 24.2.2 → 25.0.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/es/CompetenceGoals/CompetenceGoalsDialog.js +15 -23
- package/es/CompetenceGoals/index.js +1 -4
- package/es/Filter/FilterButtons.js +10 -11
- package/es/Filter/FilterList.js +82 -152
- package/es/Filter/FilterListPhone.js +180 -271
- package/es/Filter/ToggleItem.js +6 -25
- package/es/Frontpage/FrontpageAllSubjects.js +8 -9
- package/es/Frontpage/FrontpageSearch.js +3 -4
- package/es/Masthead/Masthead.js +65 -41
- package/es/Masthead/MastheadSearchModal.js +4 -5
- package/es/Masthead/SkipToMainContent.js +24 -0
- package/es/Masthead/index.js +2 -1
- package/es/SearchTypeResult/PopupFilter.js +8 -9
- package/es/SearchTypeResult/SearchFilterContent.js +3 -4
- package/es/SectionHeading/SectionHeading.js +24 -17
- package/es/Subject/index.js +0 -1
- package/es/all.css +1 -1
- package/es/index-javascript.js +1 -4
- package/es/index.js +5 -2
- package/lib/CompetenceGoals/CompetenceGoalsDialog.d.ts +19 -0
- package/lib/CompetenceGoals/CompetenceGoalsDialog.js +13 -24
- package/lib/CompetenceGoals/index.d.ts +1 -0
- package/lib/CompetenceGoals/index.js +1 -33
- package/lib/Filter/FilterButtons.js +9 -9
- package/lib/Filter/FilterList.d.ts +25 -0
- package/lib/Filter/FilterList.js +85 -155
- package/lib/Filter/FilterListPhone.d.ts +32 -0
- package/lib/Filter/FilterListPhone.js +176 -269
- package/lib/Filter/ToggleItem.d.ts +15 -0
- package/lib/Filter/ToggleItem.js +6 -32
- package/lib/Filter/filterClasses.d.ts +2 -0
- package/lib/Filter/index.d.ts +12 -0
- package/lib/Frontpage/FrontpageAllSubjects.js +7 -7
- package/lib/Frontpage/FrontpageSearch.js +2 -3
- package/lib/Masthead/Masthead.d.ts +4 -8
- package/lib/Masthead/Masthead.js +65 -49
- package/lib/Masthead/MastheadSearchModal.js +3 -4
- package/lib/Masthead/SkipToMainContent.d.ts +6 -0
- package/lib/Masthead/SkipToMainContent.js +38 -0
- package/lib/Masthead/index.d.ts +2 -1
- package/lib/Masthead/index.js +10 -0
- package/lib/SearchTypeResult/PopupFilter.js +7 -7
- package/lib/SearchTypeResult/SearchFilterContent.js +2 -2
- package/lib/SectionHeading/SectionHeading.d.ts +1 -13
- package/lib/SectionHeading/SectionHeading.js +23 -19
- package/lib/Subject/index.d.ts +0 -1
- package/lib/Subject/index.js +0 -8
- package/lib/all.css +1 -1
- package/lib/index-javascript.js +1 -63
- package/lib/index.d.ts +5 -2
- package/lib/index.js +48 -7
- package/package.json +11 -11
- package/src/CompetenceGoals/{CompetenceGoalsDialog.jsx → CompetenceGoalsDialog.tsx} +34 -26
- package/src/CompetenceGoals/index.ts +1 -0
- package/src/Filter/FilterButtons.tsx +0 -1
- package/src/Filter/FilterList.tsx +135 -0
- package/src/Filter/FilterListPhone.tsx +275 -0
- package/src/Filter/ToggleItem.tsx +58 -0
- package/src/Filter/{filterClasses.js → filterClasses.ts} +0 -0
- package/src/Filter/{index.js → index.ts} +0 -0
- package/src/Frontpage/FrontpageAllSubjects.tsx +0 -1
- package/src/Frontpage/FrontpageSearch.tsx +0 -1
- package/src/Masthead/Masthead.tsx +85 -45
- package/src/Masthead/MastheadSearchModal.tsx +0 -1
- package/src/Masthead/SkipToMainContent.tsx +48 -0
- package/src/Masthead/index.ts +2 -1
- package/src/SearchTypeResult/PopupFilter.tsx +0 -1
- package/src/SearchTypeResult/SearchFilterContent.tsx +0 -1
- package/src/SectionHeading/SectionHeading.tsx +29 -16
- package/src/Subject/index.ts +0 -1
- package/src/index-javascript.js +0 -10
- package/src/index.ts +7 -2
- package/src/main.scss +0 -3
- package/es/CompetenceGoals/CompetenceGoalList.js +0 -58
- package/es/CompetenceGoals/CompetenceGoals.js +0 -159
- package/es/Subject/SubjectFilter.js +0 -42
- package/lib/CompetenceGoals/CompetenceGoalList.js +0 -78
- package/lib/CompetenceGoals/CompetenceGoals.js +0 -184
- package/lib/Subject/SubjectFilter.d.ts +0 -27
- package/lib/Subject/SubjectFilter.js +0 -58
- package/src/.DS_Store +0 -0
- package/src/CompetenceGoals/CompetenceGoalList.jsx +0 -51
- package/src/CompetenceGoals/CompetenceGoals.jsx +0 -152
- package/src/CompetenceGoals/component.competence-goals.scss +0 -161
- package/src/CompetenceGoals/index.js +0 -6
- package/src/Filter/FilterList.jsx +0 -167
- package/src/Filter/FilterListPhone.jsx +0 -328
- package/src/Filter/ToggleItem.jsx +0 -71
- package/src/Masthead/component.masthead.scss +0 -146
- package/src/SectionHeading/component.section-heading.scss +0 -17
- package/src/Subject/SubjectFilter.tsx +0 -48
package/src/index-javascript.js
CHANGED
|
@@ -6,14 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
export { FilterList, FilterListPhone, FilterButtons } from './Filter';
|
|
10
|
-
|
|
11
|
-
export { default as TopicIntroductionList } from './TopicIntroductionList';
|
|
12
9
|
export { default as TopicMenu, TopicMenuButton } from './TopicMenu';
|
|
13
|
-
export {
|
|
14
|
-
default as CompetenceGoals,
|
|
15
|
-
CompetenceGoalList,
|
|
16
|
-
CompetenceGoalListHeading,
|
|
17
|
-
CompetenceGoal,
|
|
18
|
-
CompetenceGoalsDialog,
|
|
19
|
-
} from './CompetenceGoals';
|
package/src/index.ts
CHANGED
|
@@ -25,6 +25,10 @@ export {
|
|
|
25
25
|
ArticleFavoritesButton,
|
|
26
26
|
} from './Article';
|
|
27
27
|
|
|
28
|
+
export { CompetenceGoalsDialog } from './CompetenceGoals';
|
|
29
|
+
|
|
30
|
+
export { default as TopicIntroductionList } from './TopicIntroductionList';
|
|
31
|
+
|
|
28
32
|
export { default as Table } from './Table';
|
|
29
33
|
|
|
30
34
|
export { default as ResourcesWrapper, ResourcesTitle, ResourcesTopicTitle } from './ResourcesWrapper';
|
|
@@ -33,7 +37,7 @@ export { createUniversalPortal } from './utils/createUniversalPortal';
|
|
|
33
37
|
|
|
34
38
|
export { default as NoContentBox } from './NoContentBox';
|
|
35
39
|
|
|
36
|
-
export { default as Masthead, MastheadItem, getMastheadHeight, useMastheadHeight } from './Masthead';
|
|
40
|
+
export { default as Masthead, MastheadItem, getMastheadHeight, useMastheadHeight, SkipToMainContent } from './Masthead';
|
|
37
41
|
|
|
38
42
|
export { default as Portrait } from './Portrait';
|
|
39
43
|
|
|
@@ -81,6 +85,8 @@ export {
|
|
|
81
85
|
NdlaFilmHero,
|
|
82
86
|
} from './Hero';
|
|
83
87
|
|
|
88
|
+
export { FilterList, FilterListPhone, FilterButtons } from './Filter';
|
|
89
|
+
|
|
84
90
|
export { Footer, EditorName, FooterText, FooterAuth } from './Footer';
|
|
85
91
|
|
|
86
92
|
export {
|
|
@@ -208,7 +214,6 @@ export {
|
|
|
208
214
|
SubjectCarousel,
|
|
209
215
|
SubjectChildContent,
|
|
210
216
|
SubjectContent,
|
|
211
|
-
SubjectFilter,
|
|
212
217
|
SubjectFlexChild,
|
|
213
218
|
SubjectFlexWrapper,
|
|
214
219
|
SubjectHeader,
|
package/src/main.scss
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// COMPONENTS
|
|
4
4
|
@import 'Logo/component.logo';
|
|
5
5
|
@import 'Hero/component.hero';
|
|
6
|
-
@import 'Masthead/component.masthead';
|
|
7
6
|
@import 'Article/component.article';
|
|
8
7
|
@import 'Article/component.article-author-popup';
|
|
9
8
|
|
|
@@ -29,7 +28,5 @@
|
|
|
29
28
|
@import 'Translation/component.translation-box';
|
|
30
29
|
@import 'Search/component.search';
|
|
31
30
|
@import 'Subject/component.subject';
|
|
32
|
-
@import 'CompetenceGoals/component.competence-goals';
|
|
33
31
|
@import 'Carousel/component.carousel';
|
|
34
|
-
@import 'SectionHeading/component.section-heading';
|
|
35
32
|
@import 'NDLAFilm/component.film-movielist';
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import _styled from "@emotion/styled-base";
|
|
2
|
-
|
|
3
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
-
|
|
5
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
|
-
|
|
7
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
8
|
-
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
import { mq, breakpoints, fonts, spacing } from '@ndla/core';
|
|
12
|
-
import SafeLink from '@ndla/safelink';
|
|
13
|
-
import { classes } from './CompetenceGoals';
|
|
14
|
-
import { CompetenceGoalShape } from '../shapes';
|
|
15
|
-
import { jsx as ___EmotionJSX } from "@emotion/core";
|
|
16
|
-
export var CompetenceGoalListHeading = /*#__PURE__*/_styled('p', {
|
|
17
|
-
target: "e1qui3t80",
|
|
18
|
-
label: "CompetenceGoalListHeading"
|
|
19
|
-
})("font-weight:", fonts.weight.semibold, ";margin-bottom:", spacing.small, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbXBldGVuY2VHb2FsTGlzdC5qc3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUW9EIiwi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PC9TYWZlTGluaz4gOiBnb2FsLm5hbWU7XG5cbiAgcmV0dXJuIDxTdHlsZWRMaXN0SXRlbSB7Li4uY2xhc3NlcygndG9waWMtaXRlbScpfT57Y29udGVudH08L1N0eWxlZExpc3RJdGVtPjtcbn07XG5cbkNvbXBldGVuY2VHb2FsLnByb3BUeXBlcyA9IHtcbiAgZ29hbDogQ29tcGV0ZW5jZUdvYWxTaGFwZSxcbn07XG5cbmNvbnN0IFN0eWxlZExpc3QgPSBzdHlsZWQoJ3VsJylgXG4gIG1hcmdpbjogMCAwICR7c3BhY2luZy5sYXJnZX0gJHtzcGFjaW5nLm5vcm1hbH07XG4gIHBhZGRpbmc6IDA7XG4gIG1heC13aWR0aDogNjUwcHg7XG5gO1xuXG5leHBvcnQgY29uc3QgQ29tcGV0ZW5jZUdvYWxMaXN0ID0gKHsgZ29hbHMsIC4uLnJlc3QgfSkgPT4gKFxuICA8U3R5bGVkTGlzdCB7Li4uY2xhc3NlcygndG9waWMtbGlzdCcpfSB7Li4ucmVzdH0+XG4gICAge2dvYWxzLm1hcCgoZ29hbCkgPT4gKFxuICAgICAgPENvbXBldGVuY2VHb2FsIGtleT17Z29hbC5pZH0gZ29hbD17Z29hbH0gLz5cbiAgICApKX1cbiAgPC9TdHlsZWRMaXN0PlxuKTtcbkNvbXBldGVuY2VHb2FsTGlzdC5wcm9wVHlwZXMgPSB7XG4gIGdvYWxzOiBQcm9wVHlwZXMuYXJyYXlPZihDb21wZXRlbmNlR29hbFNoYXBlKS5pc1JlcXVpcmVkLFxufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29tcGV0ZW5jZUdvYWxMaXN0O1xuIl19 */"));
|
|
20
|
-
|
|
21
|
-
var StyledListItem = /*#__PURE__*/_styled('li', {
|
|
22
|
-
target: "e1qui3t81",
|
|
23
|
-
label: "StyledListItem"
|
|
24
|
-
})("line-height:", spacing.normal, ";", mq.range({
|
|
25
|
-
until: breakpoints.tablet
|
|
26
|
-
}), "{", fonts.sizes(16, 1.5), ";}&:last-child{margin-bottom:0;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbXBldGVuY2VHb2FsTGlzdC5qc3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBYW1DIiwiZmlsZSI6IkNvbXBldGVuY2VHb2FsTGlzdC5qc3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuaW1wb3J0IFByb3BUeXBlcyBmcm9tICdwcm9wLXR5cGVzJztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IG1xLCBicmVha3BvaW50cywgZm9udHMsIHNwYWNpbmcgfSBmcm9tICdAbmRsYS9jb3JlJztcbmltcG9ydCBTYWZlTGluayBmcm9tICdAbmRsYS9zYWZlbGluayc7XG5pbXBvcnQgeyBjbGFzc2VzIH0gZnJvbSAnLi9Db21wZXRlbmNlR29hbHMnO1xuaW1wb3J0IHsgQ29tcGV0ZW5jZUdvYWxTaGFwZSB9IGZyb20gJy4uL3NoYXBlcyc7XG5cbmV4cG9ydCBjb25zdCBDb21wZXRlbmNlR29hbExpc3RIZWFkaW5nID0gc3R5bGVkKCdwJylgXG4gIGZvbnQtd2VpZ2h0OiAke2ZvbnRzLndlaWdodC5zZW1pYm9sZH07XG4gIG1hcmdpbi1ib3R0b206ICR7c3BhY2luZy5zbWFsbH07XG5gO1xuXG5jb25zdCBTdHlsZWRMaXN0SXRlbSA9IHN0eWxlZCgnbGknKWBcbiAgbGluZS1oZWlnaHQ6ICR7c3BhY2luZy5ub3JtYWx9O1xuICAke21xLnJhbmdlKHsgdW50aWw6IGJyZWFrcG9pbnRzLnRhYmxldCB9KX0ge1xuICAgICR7Zm9udHMuc2l6ZXMoMTYsIDEuNSl9O1xuICB9XG4gICY6bGFzdC1jaGlsZCB7X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MaXN0O1xuIl19 */"));
|
|
27
|
-
|
|
28
|
-
export var CompetenceGoal = function CompetenceGoal(_ref) {
|
|
29
|
-
var goal = _ref.goal;
|
|
30
|
-
var content = goal.url ? ___EmotionJSX(SafeLink, {
|
|
31
|
-
to: goal.url
|
|
32
|
-
}, goal.name) : goal.name;
|
|
33
|
-
return ___EmotionJSX(StyledListItem, classes('topic-item'), content);
|
|
34
|
-
};
|
|
35
|
-
CompetenceGoal.propTypes = {
|
|
36
|
-
goal: CompetenceGoalShape
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
var StyledList = /*#__PURE__*/_styled('ul', {
|
|
40
|
-
target: "e1qui3t82",
|
|
41
|
-
label: "StyledList"
|
|
42
|
-
})("margin:0 0 ", spacing.large, " ", spacing.normal, ";padding:0;max-width:650px;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbXBldGVuY2VHb2FsTGlzdC5qc3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBaUMrQiIsImZpbGUiOiJDb21wZXRlbmNlR29hbExpc3QuanN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBtcSwgYnJlYWtwb2ludHMsIGZvbnRzLCBzcGFjaW5nIH0gZnJvbSAnQG5kbGEvY29yZSc7XG5pbXBvcnQgU2FmZUxpbmsgZnJvbSAnQG5kbGEvc2FmZWxpbmsnO1xuaW1wb3J0IHsgY2xhc3NlcyB9IGZyb20gJy4vQ29tcGV0ZW5jZUdvYWxzJztcbmltcG9ydCB7IENvbXBldGVuY2VHb2FsU2hhcGUgfSBmcm9tICcuLi9zaGFwZXMnO1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AuLi5yZXN0IH0pID0+IChcbiAgPFN0eWxlZExpc3Qgey4uLmNsYXNzZXMoJ3RvcGljLWxpc3QnKX0gey4uLnJlc3R9PlxuICAgIHtnb2Fscy5tYXAoKGdvYWwpID0+IChcbiAgICAgIDxDb21wZXRlbmNlR29hbCBrZXk9e2dvYWwuaWR9IGdvYWw9e2dvYWx9IC8+XG4gICAgKSl9XG4gIDwvU3R5bGVkTGlzdD5cbik7XG5Db21wZXRlbmNlR29hbExpc3QucHJvcFR5cGVzID0ge1xuICBnb2FsczogUHJvcFR5cGVzLmFycmF5T2YoQ29tcGV0ZW5jZUdvYWxTaGFwZSkuaXNSZXF1aXJlZCxcbn07XG5cbmV4cG9ydCBkZWZhdWx0IENvbXBldGVuY2VHb2FsTGlzdDtcbiJdfQ== */"));
|
|
43
|
-
|
|
44
|
-
export var CompetenceGoalList = function CompetenceGoalList(_ref2) {
|
|
45
|
-
var goals = _ref2.goals,
|
|
46
|
-
rest = _objectWithoutProperties(_ref2, ["goals"]);
|
|
47
|
-
|
|
48
|
-
return ___EmotionJSX(StyledList, _extends({}, classes('topic-list'), rest), goals.map(function (goal) {
|
|
49
|
-
return ___EmotionJSX(CompetenceGoal, {
|
|
50
|
-
key: goal.id,
|
|
51
|
-
goal: goal
|
|
52
|
-
});
|
|
53
|
-
}));
|
|
54
|
-
};
|
|
55
|
-
CompetenceGoalList.propTypes = {
|
|
56
|
-
goals: PropTypes.arrayOf(CompetenceGoalShape).isRequired
|
|
57
|
-
};
|
|
58
|
-
export default CompetenceGoalList;
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2
|
-
|
|
3
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
-
|
|
5
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
-
|
|
7
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
8
|
-
|
|
9
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10
|
-
|
|
11
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
12
|
-
|
|
13
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
14
|
-
|
|
15
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
16
|
-
|
|
17
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
18
|
-
|
|
19
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
20
|
-
|
|
21
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
22
|
-
|
|
23
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
24
|
-
|
|
25
|
-
import React, { Component, Fragment } from 'react';
|
|
26
|
-
import PropTypes from 'prop-types';
|
|
27
|
-
import BEMHelper from 'react-bem-helper';
|
|
28
|
-
import { ChevronRight, ChevronDown } from '@ndla/icons/common';
|
|
29
|
-
import { withTranslation } from 'react-i18next';
|
|
30
|
-
import { FilterListPhone } from '../Filter';
|
|
31
|
-
import CompetenceGoalList from './CompetenceGoalList';
|
|
32
|
-
import { jsx as ___EmotionJSX } from "@emotion/core";
|
|
33
|
-
export var classes = new BEMHelper({
|
|
34
|
-
name: 'competence-goals',
|
|
35
|
-
prefix: 'c-'
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
var CompetenceGoals = /*#__PURE__*/function (_Component) {
|
|
39
|
-
_inherits(CompetenceGoals, _Component);
|
|
40
|
-
|
|
41
|
-
var _super = _createSuper(CompetenceGoals);
|
|
42
|
-
|
|
43
|
-
function CompetenceGoals(props) {
|
|
44
|
-
var _this;
|
|
45
|
-
|
|
46
|
-
_classCallCheck(this, CompetenceGoals);
|
|
47
|
-
|
|
48
|
-
_this = _super.call(this, props);
|
|
49
|
-
_this.state = {
|
|
50
|
-
expanded: null
|
|
51
|
-
};
|
|
52
|
-
return _this;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
_createClass(CompetenceGoals, [{
|
|
56
|
-
key: "render",
|
|
57
|
-
value: function render() {
|
|
58
|
-
var _this2 = this;
|
|
59
|
-
|
|
60
|
-
var _this$props = this.props,
|
|
61
|
-
messages = _this$props.messages,
|
|
62
|
-
headingId = _this$props.headingId,
|
|
63
|
-
topics = _this$props.topics,
|
|
64
|
-
id = _this$props.id,
|
|
65
|
-
menu = _this$props.menu,
|
|
66
|
-
search = _this$props.search,
|
|
67
|
-
subjectName = _this$props.subjectName,
|
|
68
|
-
filterOptions = _this$props.filterOptions,
|
|
69
|
-
filterValues = _this$props.filterValues,
|
|
70
|
-
onFilterClick = _this$props.onFilterClick,
|
|
71
|
-
description = _this$props.description,
|
|
72
|
-
t = _this$props.t;
|
|
73
|
-
return ___EmotionJSX("div", classes('', {
|
|
74
|
-
menu: menu,
|
|
75
|
-
search: search
|
|
76
|
-
}), !menu && !search ? ___EmotionJSX(Fragment, null, ___EmotionJSX("h1", {
|
|
77
|
-
id: headingId
|
|
78
|
-
}, messages.heading), ___EmotionJSX("hr", null), ___EmotionJSX("p", null, description), ___EmotionJSX("p", null, messages.listDescription), ___EmotionJSX("div", classes('topic'), ___EmotionJSX(CompetenceGoalList, {
|
|
79
|
-
goals: topics[0].items
|
|
80
|
-
}))) : ___EmotionJSX(Fragment, null, ___EmotionJSX("h1", classes('subject-heading'), subjectName), ___EmotionJSX("h2", _extends({
|
|
81
|
-
id: headingId
|
|
82
|
-
}, classes('heading')), messages.heading), ___EmotionJSX("p", classes('description'), messages.listDescription), filterOptions && filterOptions.length > 0 && ___EmotionJSX(Fragment, null, ___EmotionJSX(FilterListPhone, {
|
|
83
|
-
preid: "competence",
|
|
84
|
-
label: "Filtrer kompetansem\xE5l",
|
|
85
|
-
options: filterOptions,
|
|
86
|
-
alignedGroup: true,
|
|
87
|
-
values: filterValues,
|
|
88
|
-
onChange: onFilterClick,
|
|
89
|
-
messages: {
|
|
90
|
-
openFilter: t('competenceGoals.openCompentenceGoalsFilter'),
|
|
91
|
-
useFilter: t('competenceGoals.useCompentenceGoalsFilter'),
|
|
92
|
-
closeFilter: t('competenceGoals.closeCompentenceGoalsFilter')
|
|
93
|
-
}
|
|
94
|
-
})), topics.map(function (topic) {
|
|
95
|
-
return ___EmotionJSX("div", _extends({}, classes('topic', {
|
|
96
|
-
expandable: true,
|
|
97
|
-
expanded: _this2.state.expanded === topic.heading
|
|
98
|
-
}), {
|
|
99
|
-
key: topic.heading
|
|
100
|
-
}), ___EmotionJSX("h3", classes('topic-heading'), ___EmotionJSX("button", _extends({}, classes('topic-heading-button'), {
|
|
101
|
-
type: "button",
|
|
102
|
-
"aria-expanded": _this2.state.expanded === topic.heading,
|
|
103
|
-
"aria-controls": id,
|
|
104
|
-
onClick: function onClick() {
|
|
105
|
-
_this2.setState(function (prevState) {
|
|
106
|
-
var expanded = null;
|
|
107
|
-
|
|
108
|
-
if (prevState.expanded !== topic.heading) {
|
|
109
|
-
expanded = topic.heading;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
return {
|
|
113
|
-
expanded: expanded
|
|
114
|
-
};
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
}), _this2.state.expanded === topic.heading ? ___EmotionJSX(ChevronDown, null) : ___EmotionJSX(ChevronRight, null), topic.heading)), ___EmotionJSX(CompetenceGoalList, {
|
|
118
|
-
id: id,
|
|
119
|
-
"aria-hidden": _this2.state.expanded !== topic.heading,
|
|
120
|
-
goals: topic.items
|
|
121
|
-
}));
|
|
122
|
-
})));
|
|
123
|
-
}
|
|
124
|
-
}]);
|
|
125
|
-
|
|
126
|
-
return CompetenceGoals;
|
|
127
|
-
}(Component);
|
|
128
|
-
|
|
129
|
-
CompetenceGoals.propTypes = {
|
|
130
|
-
id: PropTypes.string,
|
|
131
|
-
headingId: PropTypes.string,
|
|
132
|
-
menu: PropTypes.bool,
|
|
133
|
-
search: PropTypes.bool,
|
|
134
|
-
description: PropTypes.string.isRequired,
|
|
135
|
-
messages: PropTypes.shape({
|
|
136
|
-
heading: PropTypes.string.isRequired,
|
|
137
|
-
listDescription: PropTypes.string.isRequired
|
|
138
|
-
}).isRequired,
|
|
139
|
-
subjectName: PropTypes.string,
|
|
140
|
-
filterOptions: PropTypes.arrayOf(PropTypes.shape({
|
|
141
|
-
title: PropTypes.string.isRequired,
|
|
142
|
-
value: PropTypes.string.isRequired
|
|
143
|
-
})),
|
|
144
|
-
filterValues: PropTypes.arrayOf(PropTypes.string),
|
|
145
|
-
onFilterClick: PropTypes.func.isRequired,
|
|
146
|
-
topics: PropTypes.arrayOf(PropTypes.shape({
|
|
147
|
-
heading: PropTypes.string,
|
|
148
|
-
items: PropTypes.arrayOf(PropTypes.shape({
|
|
149
|
-
text: PropTypes.string.isRequired,
|
|
150
|
-
url: PropTypes.string
|
|
151
|
-
}))
|
|
152
|
-
}))
|
|
153
|
-
};
|
|
154
|
-
CompetenceGoals.defaultProps = {
|
|
155
|
-
headingId: null,
|
|
156
|
-
menu: false,
|
|
157
|
-
search: false
|
|
158
|
-
};
|
|
159
|
-
export default withTranslation()(CompetenceGoals);
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import BEMHelper from 'react-bem-helper';
|
|
3
|
-
import PropTypes from 'prop-types'; // @ts-ignore
|
|
4
|
-
|
|
5
|
-
import FilterList from '../Filter/FilterList';
|
|
6
|
-
import { jsx as ___EmotionJSX } from "@emotion/core";
|
|
7
|
-
var searchFilterClasses = BEMHelper({
|
|
8
|
-
prefix: 'c-',
|
|
9
|
-
name: 'filter',
|
|
10
|
-
outputIsString: true
|
|
11
|
-
});
|
|
12
|
-
var valueShape = PropTypes.oneOfType([PropTypes.string, PropTypes.number]);
|
|
13
|
-
|
|
14
|
-
var SubjectFilter = function SubjectFilter(_ref) {
|
|
15
|
-
var label = _ref.label,
|
|
16
|
-
options = _ref.options,
|
|
17
|
-
values = _ref.values,
|
|
18
|
-
onChange = _ref.onChange;
|
|
19
|
-
return ___EmotionJSX("div", {
|
|
20
|
-
className: searchFilterClasses('', ['subject', 'background'])
|
|
21
|
-
}, ___EmotionJSX(FilterList, {
|
|
22
|
-
onChange: onChange,
|
|
23
|
-
labelNotVisible: true,
|
|
24
|
-
options: options,
|
|
25
|
-
label: label,
|
|
26
|
-
values: values
|
|
27
|
-
}));
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
SubjectFilter.propTypes = {
|
|
31
|
-
label: PropTypes.string.isRequired,
|
|
32
|
-
onChange: PropTypes.func.isRequired,
|
|
33
|
-
options: PropTypes.arrayOf(PropTypes.shape({
|
|
34
|
-
value: valueShape.isRequired,
|
|
35
|
-
title: PropTypes.string.isRequired
|
|
36
|
-
})).isRequired,
|
|
37
|
-
values: PropTypes.arrayOf(valueShape)
|
|
38
|
-
};
|
|
39
|
-
SubjectFilter.defaultProps = {
|
|
40
|
-
values: []
|
|
41
|
-
};
|
|
42
|
-
export default SubjectFilter;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = exports.CompetenceGoalList = exports.CompetenceGoal = exports.CompetenceGoalListHeading = void 0;
|
|
7
|
-
|
|
8
|
-
var _styledBase = _interopRequireDefault(require("@emotion/styled-base"));
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
|
-
var _core = require("@ndla/core");
|
|
15
|
-
|
|
16
|
-
var _safelink = _interopRequireDefault(require("@ndla/safelink"));
|
|
17
|
-
|
|
18
|
-
var _CompetenceGoals = require("./CompetenceGoals");
|
|
19
|
-
|
|
20
|
-
var _shapes = require("../shapes");
|
|
21
|
-
|
|
22
|
-
var _core2 = require("@emotion/core");
|
|
23
|
-
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
-
|
|
26
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
27
|
-
|
|
28
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
29
|
-
|
|
30
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
31
|
-
|
|
32
|
-
var CompetenceGoalListHeading = ( /*#__PURE__*/0, _styledBase["default"])('p', {
|
|
33
|
-
target: "e1qui3t80",
|
|
34
|
-
label: "CompetenceGoalListHeading"
|
|
35
|
-
})("font-weight:", _core.fonts.weight.semibold, ";margin-bottom:", _core.spacing.small, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbXBldGVuY2VHb2FsTGlzdC5qc3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUW9EIiwiZmlsZSI6IkNvbXBldGVuY2VHb2FsTGlzdC5qc3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuaW1wb3J0IFByb3BUeXBlcyBmcm9tICdwcm9wLXR5cGVzJztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IG1xLCBicmVha3BvaW50cywgZm9udHMsIHNwY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0eWxlZExpc3QgPSBzdHlsZWQoJ3VsJylgXG4gIG1hcmdpbjogMCAwICR7c3BhY2luZy5sYXJnZX0gJHtzcGFjaW5nLm5vcm1hbH07XG4gIHBhZGRpbmc6IDA7XG4gIG1heC13aWR0aDogNjUwcHg7XG5gO1xuXG5leHBvcnQgY29uc3QgQ29tcGV0ZW5jZUdvYWxMaXN0ID0gKHsgZ29hbHMsIC4uLnJlc3QgfSkgPT4gKFxuICA8U3R5bGVkTGlzdCB7Li4uY2xhc3NlcygndG9waWMtbGlzdCcpfSB7Li4ucmVzdH0+XG4gICAge2dvYWxzLm1hcCgoZ29hbCkgPT4gKFxuICAgICAgPENvbXBldGVuY2VHb2FsIGtleT17Z29hbC5pZH0gZ29hbD17Z29hbH0gLz5cbiAgICApKX1cbiAgPC9TdHlsZWRMaXN0PlxuKTtcbkNvbXBldGVuY2VHb2FsTGlzdC5wcm9wVHlwZXMgPSB7XG4gIGdvYWxzOiBQcm9wVHlwZXMuYXJyYXlPZihDb21wZXRlbmNlR29hbFNoYXBlKS5pc1JlcXVpcmVkLFxufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29tcGV0ZW5jZUdvYWxMaXN0O1xuIl19 */"));
|
|
36
|
-
exports.CompetenceGoalListHeading = CompetenceGoalListHeading;
|
|
37
|
-
var StyledListItem = ( /*#__PURE__*/0, _styledBase["default"])('li', {
|
|
38
|
-
target: "e1qui3t81",
|
|
39
|
-
label: "StyledListItem"
|
|
40
|
-
})("line-height:", _core.spacing.normal, ";", _core.mq.range({
|
|
41
|
-
until: _core.breakpoints.tablet
|
|
42
|
-
}), "{", _core.fonts.sizes(16, 1.5), ";}&:last-child{margin-bottom:0;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbXBldGVuY2VHb2FsTGlzdC5qc3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBYW1DIiwiZ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C9TYWZlTGluaz4gOiBnb2FsLm5hbWU7XG5cbiAgcmV0dXJuIDxTdHlsZWRMaXN0SXRlbSB7Li4uY2xhc3NlcygndG9waWMtaXRlbScpfT57Y29udGVudH08L1N0eWxlZExpc3RJdGVtPjtcbn07XG5cbkNvbXBldGVuY2VHb2FsLnByb3BUeXBlcyA9IHtcbiAgZ29hbDogQ29tcGV0ZW5jZUdvYWxTaGFwZSxcbn07XG5cbmNvbnN0IFN0eWxlZExpc3QgPSBzdHlsZWQoJ3VsJylgXG4gIG1hcmdpbjogMCAwICR7c3BhY2luZy5sYXJnZX0gJHtzcGFjaW5nLm5vcm1hbH07XG4gIHBhZGRpbmc6IDA7XG4gIG1heC13aWR0aDogNjUwcHg7XG5gO1xuXG5leHBvcnQgY29uc3QgQ29tcGV0ZW5jZUdvYWxMaXN0ID0gKHsgZ29hbHMsIC4uLnJlc3QgfSkgPT4gKFxuICA8U3R5bGVkTGlzdCB7Li4uY2xhc3NlcygndG9waWMtbGlzdCcpfSB7Li4ucmVzdH0+XG4gICAge2dvYWxzLm1hcCgoZ29hbCkgPT4gKFxuICAgICAgPENvbXBldGVuY2VHb2FsIGtleT17Z29hbC5pZH0gZ29hbD17Z29hbH0gLz5cbiAgICApKX1cbiAgPC9TdHlsZWRMaXN0PlxuKTtcbkNvbXBldGVuY2VHb2FsTGlzdC5wcm9wVHlwZXMgPSB7XG4gIGdvYWxzOiBQcm9wVHlwZXMuYXJyYXlPZihDb21wZXRlbmNlR29hbFNoYXBlKS5pc1JlcXVpcmVkLFxufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29tcGV0ZW5jZUdvYWxMaXN0O1xuIl19 */"));
|
|
43
|
-
|
|
44
|
-
var CompetenceGoal = function CompetenceGoal(_ref) {
|
|
45
|
-
var goal = _ref.goal;
|
|
46
|
-
var content = goal.url ? (0, _core2.jsx)(_safelink["default"], {
|
|
47
|
-
to: goal.url
|
|
48
|
-
}, goal.name) : goal.name;
|
|
49
|
-
return (0, _core2.jsx)(StyledListItem, (0, _CompetenceGoals.classes)('topic-item'), content);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
exports.CompetenceGoal = CompetenceGoal;
|
|
53
|
-
CompetenceGoal.propTypes = {
|
|
54
|
-
goal: _shapes.CompetenceGoalShape
|
|
55
|
-
};
|
|
56
|
-
var StyledList = ( /*#__PURE__*/0, _styledBase["default"])('ul', {
|
|
57
|
-
target: "e1qui3t82",
|
|
58
|
-
label: "StyledList"
|
|
59
|
-
})("margin:0 0 ", _core.spacing.large, " ", _core.spacing.normal, ";padding:0;max-width:650px;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbXBldGVuY2VHb2FsTGlzdC5qc3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBaUMrQiIsImZpbGUiOiJDb21wZXRlbmNlR29hbExpc3QuanN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBtcSwgYnJlYWtwb2ludHMsIGZvbnRzLCBzcGFjaW5nIH0gZnJvbSAnQG5kbGEvY29yZSc7XG5pbXBvcnQgU2FmZUxpbmsgZnJvbSAnQG5kbGEvc2FmZWxpbmsnO1xuaW1wb3J0IHsgY2xhc3NlcyB9IGZyb20gJy4vQ29tcGV0ZW5jZUdvYWxzJztcbmltcG9ydCB7IENvbXBldGVuY2VHb2FsU2hhcGUgfSBmcm9tICcuLi9zaGFwZXMnO1xuXG5leHBvcnQgY29uc3QgQ29tcGV0ZW5jZUdvYWxMaXN0SGVhZGluZyA9IHN0eWxlZCgncCcpYFxuICBmb250LXdlaWdodDogJHtmb250cy53ZWlnaHQuc2Vta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YWwpID0+IChcbiAgICAgIDxDb21wZXRlbmNlR29hbCBrZXk9e2dvYWwuaWR9IGdvYWw9e2dvYWx9IC8+XG4gICAgKSl9XG4gIDwvU3R5bGVkTGlzdD5cbik7XG5Db21wZXRlbmNlR29hbExpc3QucHJvcFR5cGVzID0ge1xuICBnb2FsczogUHJvcFR5cGVzLmFycmF5T2YoQ29tcGV0ZW5jZUdvYWxTaGFwZSkuaXNSZXF1aXJlZCxcbn07XG5cbmV4cG9ydCBkZWZhdWx0IENvbXBldGVuY2VHb2FsTGlzdDtcbiJdfQ== */"));
|
|
60
|
-
|
|
61
|
-
var CompetenceGoalList = function CompetenceGoalList(_ref2) {
|
|
62
|
-
var goals = _ref2.goals,
|
|
63
|
-
rest = _objectWithoutProperties(_ref2, ["goals"]);
|
|
64
|
-
|
|
65
|
-
return (0, _core2.jsx)(StyledList, _extends({}, (0, _CompetenceGoals.classes)('topic-list'), rest), goals.map(function (goal) {
|
|
66
|
-
return (0, _core2.jsx)(CompetenceGoal, {
|
|
67
|
-
key: goal.id,
|
|
68
|
-
goal: goal
|
|
69
|
-
});
|
|
70
|
-
}));
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
exports.CompetenceGoalList = CompetenceGoalList;
|
|
74
|
-
CompetenceGoalList.propTypes = {
|
|
75
|
-
goals: _propTypes["default"].arrayOf(_shapes.CompetenceGoalShape).isRequired
|
|
76
|
-
};
|
|
77
|
-
var _default = CompetenceGoalList;
|
|
78
|
-
exports["default"] = _default;
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = exports.classes = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
|
-
var _reactBemHelper = _interopRequireDefault(require("react-bem-helper"));
|
|
13
|
-
|
|
14
|
-
var _common = require("@ndla/icons/common");
|
|
15
|
-
|
|
16
|
-
var _reactI18next = require("react-i18next");
|
|
17
|
-
|
|
18
|
-
var _Filter = require("../Filter");
|
|
19
|
-
|
|
20
|
-
var _CompetenceGoalList = _interopRequireDefault(require("./CompetenceGoalList"));
|
|
21
|
-
|
|
22
|
-
var _core = require("@emotion/core");
|
|
23
|
-
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
-
|
|
26
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
27
|
-
|
|
28
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
-
|
|
30
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
31
|
-
|
|
32
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
33
|
-
|
|
34
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
35
|
-
|
|
36
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
37
|
-
|
|
38
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
39
|
-
|
|
40
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
41
|
-
|
|
42
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
43
|
-
|
|
44
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
45
|
-
|
|
46
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
47
|
-
|
|
48
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
49
|
-
|
|
50
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
51
|
-
|
|
52
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
53
|
-
|
|
54
|
-
var classes = new _reactBemHelper["default"]({
|
|
55
|
-
name: 'competence-goals',
|
|
56
|
-
prefix: 'c-'
|
|
57
|
-
});
|
|
58
|
-
exports.classes = classes;
|
|
59
|
-
|
|
60
|
-
var CompetenceGoals = /*#__PURE__*/function (_Component) {
|
|
61
|
-
_inherits(CompetenceGoals, _Component);
|
|
62
|
-
|
|
63
|
-
var _super = _createSuper(CompetenceGoals);
|
|
64
|
-
|
|
65
|
-
function CompetenceGoals(props) {
|
|
66
|
-
var _this;
|
|
67
|
-
|
|
68
|
-
_classCallCheck(this, CompetenceGoals);
|
|
69
|
-
|
|
70
|
-
_this = _super.call(this, props);
|
|
71
|
-
_this.state = {
|
|
72
|
-
expanded: null
|
|
73
|
-
};
|
|
74
|
-
return _this;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
_createClass(CompetenceGoals, [{
|
|
78
|
-
key: "render",
|
|
79
|
-
value: function render() {
|
|
80
|
-
var _this2 = this;
|
|
81
|
-
|
|
82
|
-
var _this$props = this.props,
|
|
83
|
-
messages = _this$props.messages,
|
|
84
|
-
headingId = _this$props.headingId,
|
|
85
|
-
topics = _this$props.topics,
|
|
86
|
-
id = _this$props.id,
|
|
87
|
-
menu = _this$props.menu,
|
|
88
|
-
search = _this$props.search,
|
|
89
|
-
subjectName = _this$props.subjectName,
|
|
90
|
-
filterOptions = _this$props.filterOptions,
|
|
91
|
-
filterValues = _this$props.filterValues,
|
|
92
|
-
onFilterClick = _this$props.onFilterClick,
|
|
93
|
-
description = _this$props.description,
|
|
94
|
-
t = _this$props.t;
|
|
95
|
-
return (0, _core.jsx)("div", classes('', {
|
|
96
|
-
menu: menu,
|
|
97
|
-
search: search
|
|
98
|
-
}), !menu && !search ? (0, _core.jsx)(_react.Fragment, null, (0, _core.jsx)("h1", {
|
|
99
|
-
id: headingId
|
|
100
|
-
}, messages.heading), (0, _core.jsx)("hr", null), (0, _core.jsx)("p", null, description), (0, _core.jsx)("p", null, messages.listDescription), (0, _core.jsx)("div", classes('topic'), (0, _core.jsx)(_CompetenceGoalList["default"], {
|
|
101
|
-
goals: topics[0].items
|
|
102
|
-
}))) : (0, _core.jsx)(_react.Fragment, null, (0, _core.jsx)("h1", classes('subject-heading'), subjectName), (0, _core.jsx)("h2", _extends({
|
|
103
|
-
id: headingId
|
|
104
|
-
}, classes('heading')), messages.heading), (0, _core.jsx)("p", classes('description'), messages.listDescription), filterOptions && filterOptions.length > 0 && (0, _core.jsx)(_react.Fragment, null, (0, _core.jsx)(_Filter.FilterListPhone, {
|
|
105
|
-
preid: "competence",
|
|
106
|
-
label: "Filtrer kompetansem\xE5l",
|
|
107
|
-
options: filterOptions,
|
|
108
|
-
alignedGroup: true,
|
|
109
|
-
values: filterValues,
|
|
110
|
-
onChange: onFilterClick,
|
|
111
|
-
messages: {
|
|
112
|
-
openFilter: t('competenceGoals.openCompentenceGoalsFilter'),
|
|
113
|
-
useFilter: t('competenceGoals.useCompentenceGoalsFilter'),
|
|
114
|
-
closeFilter: t('competenceGoals.closeCompentenceGoalsFilter')
|
|
115
|
-
}
|
|
116
|
-
})), topics.map(function (topic) {
|
|
117
|
-
return (0, _core.jsx)("div", _extends({}, classes('topic', {
|
|
118
|
-
expandable: true,
|
|
119
|
-
expanded: _this2.state.expanded === topic.heading
|
|
120
|
-
}), {
|
|
121
|
-
key: topic.heading
|
|
122
|
-
}), (0, _core.jsx)("h3", classes('topic-heading'), (0, _core.jsx)("button", _extends({}, classes('topic-heading-button'), {
|
|
123
|
-
type: "button",
|
|
124
|
-
"aria-expanded": _this2.state.expanded === topic.heading,
|
|
125
|
-
"aria-controls": id,
|
|
126
|
-
onClick: function onClick() {
|
|
127
|
-
_this2.setState(function (prevState) {
|
|
128
|
-
var expanded = null;
|
|
129
|
-
|
|
130
|
-
if (prevState.expanded !== topic.heading) {
|
|
131
|
-
expanded = topic.heading;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
return {
|
|
135
|
-
expanded: expanded
|
|
136
|
-
};
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
}), _this2.state.expanded === topic.heading ? (0, _core.jsx)(_common.ChevronDown, null) : (0, _core.jsx)(_common.ChevronRight, null), topic.heading)), (0, _core.jsx)(_CompetenceGoalList["default"], {
|
|
140
|
-
id: id,
|
|
141
|
-
"aria-hidden": _this2.state.expanded !== topic.heading,
|
|
142
|
-
goals: topic.items
|
|
143
|
-
}));
|
|
144
|
-
})));
|
|
145
|
-
}
|
|
146
|
-
}]);
|
|
147
|
-
|
|
148
|
-
return CompetenceGoals;
|
|
149
|
-
}(_react.Component);
|
|
150
|
-
|
|
151
|
-
CompetenceGoals.propTypes = {
|
|
152
|
-
id: _propTypes["default"].string,
|
|
153
|
-
headingId: _propTypes["default"].string,
|
|
154
|
-
menu: _propTypes["default"].bool,
|
|
155
|
-
search: _propTypes["default"].bool,
|
|
156
|
-
description: _propTypes["default"].string.isRequired,
|
|
157
|
-
messages: _propTypes["default"].shape({
|
|
158
|
-
heading: _propTypes["default"].string.isRequired,
|
|
159
|
-
listDescription: _propTypes["default"].string.isRequired
|
|
160
|
-
}).isRequired,
|
|
161
|
-
subjectName: _propTypes["default"].string,
|
|
162
|
-
filterOptions: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
|
163
|
-
title: _propTypes["default"].string.isRequired,
|
|
164
|
-
value: _propTypes["default"].string.isRequired
|
|
165
|
-
})),
|
|
166
|
-
filterValues: _propTypes["default"].arrayOf(_propTypes["default"].string),
|
|
167
|
-
onFilterClick: _propTypes["default"].func.isRequired,
|
|
168
|
-
topics: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
|
169
|
-
heading: _propTypes["default"].string,
|
|
170
|
-
items: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
|
171
|
-
text: _propTypes["default"].string.isRequired,
|
|
172
|
-
url: _propTypes["default"].string
|
|
173
|
-
}))
|
|
174
|
-
}))
|
|
175
|
-
};
|
|
176
|
-
CompetenceGoals.defaultProps = {
|
|
177
|
-
headingId: null,
|
|
178
|
-
menu: false,
|
|
179
|
-
search: false
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
var _default = (0, _reactI18next.withTranslation)()(CompetenceGoals);
|
|
183
|
-
|
|
184
|
-
exports["default"] = _default;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ChangeEvent } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
interface Props {
|
|
4
|
-
label: string;
|
|
5
|
-
onChange: (evt: ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
-
options: {
|
|
7
|
-
value: string | number;
|
|
8
|
-
title: string;
|
|
9
|
-
}[];
|
|
10
|
-
values: (string | number)[];
|
|
11
|
-
}
|
|
12
|
-
declare const SubjectFilter: {
|
|
13
|
-
({ label, options, values, onChange }: Props): JSX.Element;
|
|
14
|
-
propTypes: {
|
|
15
|
-
label: PropTypes.Validator<string>;
|
|
16
|
-
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
17
|
-
options: PropTypes.Validator<(PropTypes.InferProps<{
|
|
18
|
-
value: PropTypes.Validator<string | number>;
|
|
19
|
-
title: PropTypes.Validator<string>;
|
|
20
|
-
}> | null | undefined)[]>;
|
|
21
|
-
values: PropTypes.Requireable<(string | number | null | undefined)[]>;
|
|
22
|
-
};
|
|
23
|
-
defaultProps: {
|
|
24
|
-
values: never[];
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export default SubjectFilter;
|