@ndla/ui 4.1.1 → 4.1.4

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.
@@ -56,7 +56,7 @@ var messages = _objectSpread(_objectSpread({
56
56
  embed: 'Embed',
57
57
  notSupported: 'It did not work to auto-insert the content. You can copy the source code and add it to your content.'
58
58
  },
59
- subjectCategories: (_subjectCategories = {}, _defineProperty(_subjectCategories, subjectCategories.ACTIVE_SUBJECTS, 'Active'), _defineProperty(_subjectCategories, subjectCategories.ARCHIVE_SUBJECTS, 'Expired'), _defineProperty(_subjectCategories, subjectCategories.BETA_SUBJECTS, 'Coming'), _defineProperty(_subjectCategories, subjectCategories.COMMON_SUBJECTS, 'Common core subj.'), _defineProperty(_subjectCategories, subjectCategories.PROGRAMME_SUBJECTS, 'Programme subj. SF'), _defineProperty(_subjectCategories, subjectCategories.SPECIALIZED_SUBJECTS, 'Programme subj. YF'), _subjectCategories),
59
+ subjectCategories: (_subjectCategories = {}, _defineProperty(_subjectCategories, subjectCategories.ACTIVE_SUBJECTS, 'Active'), _defineProperty(_subjectCategories, subjectCategories.ARCHIVE_SUBJECTS, 'Expired'), _defineProperty(_subjectCategories, subjectCategories.BETA_SUBJECTS, 'Revised'), _defineProperty(_subjectCategories, subjectCategories.COMMON_SUBJECTS, 'Common core subj.'), _defineProperty(_subjectCategories, subjectCategories.PROGRAMME_SUBJECTS, 'Programme subj. SF'), _defineProperty(_subjectCategories, subjectCategories.SPECIALIZED_SUBJECTS, 'Programme subj. YF'), _subjectCategories),
60
60
  searchPage: {
61
61
  noHits: 'Your search - {{query}} - did not match any articles. ',
62
62
  noHitsShort: 'No results for search: {{query}}',
@@ -298,7 +298,7 @@ var messages = _objectSpread(_objectSpread({
298
298
  beta: 'This course is in beta.',
299
299
  outdatedSubject: 'This topic is part of a course that is not updated to the current curriculum.',
300
300
  newVersion: 'This learning resource is not updated to the current curriculum. You can find an updated version here: ',
301
- frontPageBeta: 'Beta versions of subjects are subjects we are still working on. We hope, however, that the learning resources available by now may come in useful already.',
301
+ frontPageBeta: 'Revised subjects have been revised in accordance with the new curriculum that will be put into effect from August 2022. Beta versions of subjects are subjects we are still working on. We hope, however, that the learning resources available by now may come in useful already.',
302
302
  frontPageExpired: 'Expired subjects are not being taught any longer, but it may still be possible to take exams in these subjects.',
303
303
  frontPageRevised: 'Revised subjects have been revised in accordance with the new curriculum that will be put into effect from August 2022.'
304
304
  },
@@ -568,6 +568,9 @@ var messages = _objectSpread(_objectSpread({
568
568
  openFilter: 'Filter',
569
569
  closeFilter: 'Close filter',
570
570
  heading: 'Filter'
571
+ },
572
+ alphabet: {
573
+ letterFilter: 'Filter content by the letter {{letter}}.'
571
574
  }
572
575
  },
573
576
  relatedLinks: {
@@ -737,7 +740,7 @@ var messages = _objectSpread(_objectSpread({
737
740
  },
738
741
  frontpageMultidisciplinarySubject: {
739
742
  heading: 'Interdisciplinary topics',
740
- text: 'The three interdisciplinary subjects in the curriculum are based on current societal challenges that require the involvement and efforts of individuals and the community in the local community, nationally and globally.',
743
+ text: 'The three interdisciplinary topics in the curriculum are based on current societal challenges that require the involvement and efforts of individuals and the community in the local community, nationally and globally.',
741
744
  linkText: 'See cases for multidisciplinary topics',
742
745
  publicHealthTopic: 'Public health and life management',
743
746
  democracyTopic: 'Democracy and citizenship',
@@ -760,6 +763,10 @@ var messages = _objectSpread(_objectSpread({
760
763
  multidisciplinarySubject: {
761
764
  subjectsLinksDescription: 'Case in'
762
765
  },
766
+ multibutton: {
767
+ open: 'Open menu',
768
+ close: 'Close menu'
769
+ },
763
770
  close: 'Close',
764
771
  title: 'Title',
765
772
  image: {
@@ -846,7 +853,11 @@ var messages = _objectSpread(_objectSpread({
846
853
  accessDenied: 'We are sorry, but this resource is only available to teachers who are logged in with Feide.'
847
854
  }
848
855
  },
849
- checkOutNewFeature: 'New feature'
856
+ checkOutNewFeature: 'New feature',
857
+ slateBlockMenu: {
858
+ open: 'Open menu',
859
+ close: 'Close menu'
860
+ }
850
861
  });
851
862
 
852
863
  var _default = messages;
@@ -35,6 +35,10 @@ declare const messages: {
35
35
  };
36
36
  };
37
37
  checkOutNewFeature: string;
38
+ slateBlockMenu: {
39
+ open: string;
40
+ close: string;
41
+ };
38
42
  htmlTitles: {
39
43
  titleTemplate: string;
40
44
  welcomePage: string;
@@ -609,6 +613,9 @@ declare const messages: {
609
613
  closeFilter: string;
610
614
  heading: string;
611
615
  };
616
+ alphabet: {
617
+ letterFilter: string;
618
+ };
612
619
  };
613
620
  relatedLinks: {
614
621
  label: string;
@@ -800,6 +807,10 @@ declare const messages: {
800
807
  multidisciplinarySubject: {
801
808
  subjectsLinksDescription: string;
802
809
  };
810
+ multibutton: {
811
+ open: string;
812
+ close: string;
813
+ };
803
814
  close: string;
804
815
  title: string;
805
816
  image: {
@@ -298,7 +298,7 @@ var messages = _objectSpread(_objectSpread({
298
298
  beta: 'Dette faget er i betaversjon.',
299
299
  outdatedSubject: 'Dette emnet hører til et fag som ikke er oppdatert etter gjeldende læreplan.',
300
300
  newVersion: 'Denne læringsressursen er ikke oppdatert etter gjeldende læreplan. Du finner en oppdatert versjon her: ',
301
- frontPageBeta: 'Betafag er fag under arbeid. Vi håper likevel at læringsressursene i betafaga kan være nyttige allerede nå.',
301
+ frontPageBeta: 'Kommende fag er tilpassa ny læreplan som gjelder fra høsten 2022. Betafag er fag under arbeid. Vi håper likevel at læringsressursene i betafaga kan være nyttige allerede nå.',
302
302
  frontPageExpired: 'Utgåtte fag undervises det ikke i lenger, men det kan fortsatt være mulig å ta eksamen i faga som privatist.',
303
303
  frontPageRevised: 'Kommende fag er tilpassa ny læreplan som gjelder fra høsten 2022.'
304
304
  },
@@ -568,6 +568,9 @@ var messages = _objectSpread(_objectSpread({
568
568
  openFilter: 'Filtrer',
569
569
  closeFilter: 'Lukk filter',
570
570
  heading: 'Filter'
571
+ },
572
+ alphabet: {
573
+ letterFilter: 'Vis innhald på (bokstaven) {{letter}}.'
571
574
  }
572
575
  },
573
576
  relatedLinks: {
@@ -760,6 +763,10 @@ var messages = _objectSpread(_objectSpread({
760
763
  multidisciplinarySubject: {
761
764
  subjectsLinksDescription: 'Case innen'
762
765
  },
766
+ multibutton: {
767
+ open: 'Åpne meny',
768
+ close: 'Lukk meny'
769
+ },
763
770
  close: 'Lukk',
764
771
  title: 'Tittel',
765
772
  image: {
@@ -846,7 +853,11 @@ var messages = _objectSpread(_objectSpread({
846
853
  accessDenied: 'Vi beklager, men denne ressursen er bare for lærere innlogget med Feide.'
847
854
  }
848
855
  },
849
- checkOutNewFeature: 'Sjekk ut ny funksjonalitet'
856
+ checkOutNewFeature: 'Sjekk ut ny funksjonalitet',
857
+ slateBlockMenu: {
858
+ open: 'Åpne meny',
859
+ close: 'Lukk meny'
860
+ }
850
861
  });
851
862
 
852
863
  var _default = messages;
@@ -35,6 +35,10 @@ declare const messages: {
35
35
  };
36
36
  };
37
37
  checkOutNewFeature: string;
38
+ slateBlockMenu: {
39
+ open: string;
40
+ close: string;
41
+ };
38
42
  htmlTitles: {
39
43
  titleTemplate: string;
40
44
  welcomePage: string;
@@ -609,6 +613,9 @@ declare const messages: {
609
613
  closeFilter: string;
610
614
  heading: string;
611
615
  };
616
+ alphabet: {
617
+ letterFilter: string;
618
+ };
612
619
  };
613
620
  relatedLinks: {
614
621
  label: string;
@@ -800,6 +807,10 @@ declare const messages: {
800
807
  multidisciplinarySubject: {
801
808
  subjectsLinksDescription: string;
802
809
  };
810
+ multibutton: {
811
+ open: string;
812
+ close: string;
813
+ };
803
814
  close: string;
804
815
  title: string;
805
816
  image: {
@@ -298,7 +298,7 @@ var messages = _objectSpread(_objectSpread({
298
298
  beta: 'Dette faget er i betaversjon.',
299
299
  outdatedSubject: 'Dette emnet høyrer til eit fag som ikkje er oppdatert etter gjeldande læreplan.',
300
300
  newVersion: 'Denne læringsressursen er ikkje oppdatert etter gjeldande læreplan. Du finn ein oppdatert versjon her: ',
301
- frontPageBeta: 'Betafag er fag under arbeid. Vi håper likevel at læringsressursane i betafaga kan vere nyttige allereie no.',
301
+ frontPageBeta: 'Kommande fag er tilpassa ny læreplan som gjeld fra hausten 2022. Betafag er fag under arbeid. Vi håper likevel at læringsressursane i betafaga kan vere nyttige allereie no.',
302
302
  frontPageExpired: 'Utgåtte fag blir det ikkje undervist i lenger, men det kan framleis vere mogleg å ta eksamen i faget som privatist.',
303
303
  frontPageRevised: 'Kommande fag er tilpassa ny læreplan som gjeld frå hausten 2022.'
304
304
  },
@@ -568,6 +568,9 @@ var messages = _objectSpread(_objectSpread({
568
568
  openFilter: 'Filtrer',
569
569
  closeFilter: 'Lukk filter',
570
570
  heading: 'Filter'
571
+ },
572
+ alphabet: {
573
+ letterFilter: 'Vis innhold på {{letter}}.'
571
574
  }
572
575
  },
573
576
  relatedLinks: {
@@ -760,6 +763,10 @@ var messages = _objectSpread(_objectSpread({
760
763
  multidisciplinarySubject: {
761
764
  subjectsLinksDescription: 'Case innan'
762
765
  },
766
+ multibutton: {
767
+ open: 'Åpne meny',
768
+ close: 'Lukk meny'
769
+ },
763
770
  close: 'Lukk',
764
771
  title: 'Tittel',
765
772
  image: {
@@ -846,7 +853,11 @@ var messages = _objectSpread(_objectSpread({
846
853
  accessDenied: 'Vi beklagar, men denne ressursen er berre for lærarar innlogga med Feide.'
847
854
  }
848
855
  },
849
- checkOutNewFeature: 'Sjekk ut ny funksjonalitet'
856
+ checkOutNewFeature: 'Sjekk ut ny funksjonalitet',
857
+ slateBlockMenu: {
858
+ open: 'Åpne meny',
859
+ close: 'Lukk meny'
860
+ }
850
861
  });
851
862
 
852
863
  var _default = messages;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/ui",
3
- "version": "4.1.1",
3
+ "version": "4.1.4",
4
4
  "description": "UI component library for NDLA.",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -31,40 +31,32 @@
31
31
  "types"
32
32
  ],
33
33
  "dependencies": {
34
- "@ndla/button": "^1.1.9",
35
- "@ndla/carousel": "^1.1.5",
34
+ "@ndla/button": "^1.1.10",
35
+ "@ndla/carousel": "^1.1.6",
36
36
  "@ndla/core": "^0.7.3",
37
37
  "@ndla/hooks": "^1.0.8",
38
38
  "@ndla/icons": "^1.5.0",
39
- "@ndla/licenses": "^2.1.0",
40
- "@ndla/modal": "^1.1.25",
41
- "@ndla/safelink": "^1.0.13",
39
+ "@ndla/licenses": "^2.1.1",
40
+ "@ndla/modal": "^1.1.26",
41
+ "@ndla/safelink": "^1.0.14",
42
42
  "@ndla/switch": "^0.0.34",
43
- "@ndla/tabs": "^1.0.18",
44
- "@ndla/tooltip": "^0.2.51",
43
+ "@ndla/tabs": "^1.0.19",
44
+ "@ndla/tooltip": "^0.2.52",
45
45
  "@ndla/util": "^2.0.2",
46
46
  "@reach/menu-button": "^0.12.1",
47
47
  "@reach/slider": "^0.12.1",
48
- "@types/hoist-non-react-statics": "^3.3.1",
49
- "@types/react-syntax-highlighter": "^13.5.2",
50
- "classnames": "2.2.6",
51
- "focus-trap": "^4.0.2",
52
48
  "focus-trap-react": "^6.0.0",
53
- "hoist-non-react-statics": "^3.3.0",
54
49
  "html-react-parser": "^0.10.3",
55
50
  "i18next-browser-languagedetector": "^6.1.1",
56
51
  "intl-format-cache": "^4.3.1",
57
52
  "intl-messageformat": "5.4.3",
58
53
  "invariant": "^2.2.3",
59
- "jump.js": "^1.0.2",
60
54
  "lodash": "^4.17.20",
61
55
  "react-bem-helper": "1.4.1",
62
56
  "react-device-detect": "^2.1.2",
63
57
  "react-facebook": "^6.0.15",
64
- "react-prop-types": "0.4.0",
65
58
  "react-sticky-el": "^2.0.6",
66
59
  "react-swipeable": "^6.2.0",
67
- "react-syntax-highlighter": "^15.4.4",
68
60
  "react-transition-group": "^2.5.3",
69
61
  "shave": "^2.5.10"
70
62
  },
@@ -82,8 +74,6 @@
82
74
  "@types/react-sticky-el": "^1.0.2",
83
75
  "@types/react-transition-group": "^4.4.2",
84
76
  "css-loader": "^2.1.0",
85
- "enzyme": "^3.8.0",
86
- "enzyme-adapter-react-16": "^1.9.1",
87
77
  "mini-css-extract-plugin": "^0.5.0",
88
78
  "sass-loader": "^7.1.0",
89
79
  "webpack": "^4.44.1",
@@ -92,5 +82,5 @@
92
82
  "publishConfig": {
93
83
  "access": "public"
94
84
  },
95
- "gitHead": "21b02c53640dba75be16857b4b7ba5771d83d55b"
85
+ "gitHead": "45290b8379a458b8f1cc1bd0f5fe436494c75e1d"
96
86
  }
@@ -88,7 +88,6 @@ type Props = {
88
88
  programItems: ItemProps[];
89
89
  subjectCategories: subjectsProps['categories'];
90
90
  showBetaCursor?: boolean;
91
- messageBox: boolean;
92
91
  };
93
92
 
94
93
  const FrontpageProgramMenu = ({ programItems, subjectCategories, showBetaCursor }: Props) => {
@@ -7,8 +7,6 @@
7
7
  */
8
8
 
9
9
  import React, { ReactNode } from 'react';
10
- //@ts-ignore
11
- import classNames from 'classnames';
12
10
  import BEMHelper from 'react-bem-helper';
13
11
  import { WithTranslation, withTranslation } from 'react-i18next';
14
12
  import { DisplayOnPageYOffset } from '../Animation';
@@ -25,11 +23,8 @@ interface MastheadItemProps {
25
23
  left?: boolean;
26
24
  }
27
25
  export const MastheadItem = ({ children, className, left = false, right = false }: MastheadItemProps) => {
28
- const itemClassNames = classNames(
29
- { [classes('left').className]: left },
30
- { [classes('right').className]: right },
31
- className,
32
- );
26
+ const itemClassName = left ? 'left' : right ? 'right' : undefined;
27
+ const itemClassNames = itemClassName ? classes(itemClassName).className : undefined;
33
28
 
34
29
  return <div className={itemClassNames}>{children}</div>;
35
30
  };
@@ -48,7 +48,7 @@ const messages = {
48
48
  subjectCategories: {
49
49
  [subjectCategories.ACTIVE_SUBJECTS]: 'Active',
50
50
  [subjectCategories.ARCHIVE_SUBJECTS]: 'Expired',
51
- [subjectCategories.BETA_SUBJECTS]: 'Coming',
51
+ [subjectCategories.BETA_SUBJECTS]: 'Revised',
52
52
  [subjectCategories.COMMON_SUBJECTS]: 'Common core subj.',
53
53
  [subjectCategories.PROGRAMME_SUBJECTS]: 'Programme subj. SF',
54
54
  [subjectCategories.SPECIALIZED_SUBJECTS]: 'Programme subj. YF',
@@ -328,7 +328,7 @@ const messages = {
328
328
  newVersion:
329
329
  'This learning resource is not updated to the current curriculum. You can find an updated version here: ',
330
330
  frontPageBeta:
331
- 'Beta versions of subjects are subjects we are still working on. We hope, however, that the learning resources available by now may come in useful already.',
331
+ 'Revised subjects have been revised in accordance with the new curriculum that will be put into effect from August 2022. Beta versions of subjects are subjects we are still working on. We hope, however, that the learning resources available by now may come in useful already.',
332
332
  frontPageExpired:
333
333
  'Expired subjects are not being taught any longer, but it may still be possible to take exams in these subjects.',
334
334
  frontPageRevised:
@@ -601,6 +601,9 @@ const messages = {
601
601
  closeFilter: 'Close filter',
602
602
  heading: 'Filter',
603
603
  },
604
+ alphabet: {
605
+ letterFilter: 'Filter content by the letter {{letter}}.',
606
+ },
604
607
  },
605
608
  relatedLinks: {
606
609
  label: 'Related articles',
@@ -774,7 +777,7 @@ const messages = {
774
777
  },
775
778
  frontpageMultidisciplinarySubject: {
776
779
  heading: 'Interdisciplinary topics',
777
- text: 'The three interdisciplinary subjects in the curriculum are based on current societal challenges that require the involvement and efforts of individuals and the community in the local community, nationally and globally.',
780
+ text: 'The three interdisciplinary topics in the curriculum are based on current societal challenges that require the involvement and efforts of individuals and the community in the local community, nationally and globally.',
778
781
  linkText: 'See cases for multidisciplinary topics',
779
782
  publicHealthTopic: 'Public health and life management',
780
783
  democracyTopic: 'Democracy and citizenship',
@@ -797,6 +800,10 @@ const messages = {
797
800
  multidisciplinarySubject: {
798
801
  subjectsLinksDescription: 'Case in',
799
802
  },
803
+ multibutton: {
804
+ open: 'Open menu',
805
+ close: 'Close menu',
806
+ },
800
807
  close: 'Close',
801
808
  title: 'Title',
802
809
  image: {
@@ -884,6 +891,10 @@ const messages = {
884
891
  },
885
892
  },
886
893
  checkOutNewFeature: 'New feature',
894
+ slateBlockMenu: {
895
+ open: 'Open menu',
896
+ close: 'Close menu',
897
+ },
887
898
  };
888
899
 
889
900
  export default messages;
@@ -327,7 +327,7 @@ const messages = {
327
327
  newVersion:
328
328
  'Denne læringsressursen er ikke oppdatert etter gjeldende læreplan. Du finner en oppdatert versjon her: ',
329
329
  frontPageBeta:
330
- 'Betafag er fag under arbeid. Vi håper likevel at læringsressursene i betafaga kan være nyttige allerede nå.',
330
+ 'Kommende fag er tilpassa ny læreplan som gjelder fra høsten 2022. Betafag er fag under arbeid. Vi håper likevel at læringsressursene i betafaga kan være nyttige allerede nå.',
331
331
  frontPageExpired:
332
332
  'Utgåtte fag undervises det ikke i lenger, men det kan fortsatt være mulig å ta eksamen i faga som privatist.',
333
333
  frontPageRevised: 'Kommende fag er tilpassa ny læreplan som gjelder fra høsten 2022.',
@@ -599,6 +599,9 @@ const messages = {
599
599
  closeFilter: 'Lukk filter',
600
600
  heading: 'Filter',
601
601
  },
602
+ alphabet: {
603
+ letterFilter: 'Vis innhald på (bokstaven) {{letter}}.',
604
+ },
602
605
  },
603
606
  relatedLinks: {
604
607
  label: 'Tilknyttede artikler',
@@ -795,6 +798,10 @@ const messages = {
795
798
  multidisciplinarySubject: {
796
799
  subjectsLinksDescription: 'Case innen',
797
800
  },
801
+ multibutton: {
802
+ open: 'Åpne meny',
803
+ close: 'Lukk meny',
804
+ },
798
805
  close: 'Lukk',
799
806
  title: 'Tittel',
800
807
  image: {
@@ -882,6 +889,10 @@ const messages = {
882
889
  },
883
890
  },
884
891
  checkOutNewFeature: 'Sjekk ut ny funksjonalitet',
892
+ slateBlockMenu: {
893
+ open: 'Åpne meny',
894
+ close: 'Lukk meny',
895
+ },
885
896
  };
886
897
 
887
898
  export default messages;
@@ -328,7 +328,7 @@ const messages = {
328
328
  newVersion:
329
329
  'Denne læringsressursen er ikkje oppdatert etter gjeldande læreplan. Du finn ein oppdatert versjon her: ',
330
330
  frontPageBeta:
331
- 'Betafag er fag under arbeid. Vi håper likevel at læringsressursane i betafaga kan vere nyttige allereie no.',
331
+ 'Kommande fag er tilpassa ny læreplan som gjeld fra hausten 2022. Betafag er fag under arbeid. Vi håper likevel at læringsressursane i betafaga kan vere nyttige allereie no.',
332
332
  frontPageExpired:
333
333
  'Utgåtte fag blir det ikkje undervist i lenger, men det kan framleis vere mogleg å ta eksamen i faget som privatist.',
334
334
  frontPageRevised: 'Kommande fag er tilpassa ny læreplan som gjeld frå hausten 2022.',
@@ -600,6 +600,9 @@ const messages = {
600
600
  closeFilter: 'Lukk filter',
601
601
  heading: 'Filter',
602
602
  },
603
+ alphabet: {
604
+ letterFilter: 'Vis innhold på {{letter}}.',
605
+ },
603
606
  },
604
607
  relatedLinks: {
605
608
  label: 'Tilknytta artiklar',
@@ -796,6 +799,10 @@ const messages = {
796
799
  multidisciplinarySubject: {
797
800
  subjectsLinksDescription: 'Case innan',
798
801
  },
802
+ multibutton: {
803
+ open: 'Åpne meny',
804
+ close: 'Lukk meny',
805
+ },
799
806
  close: 'Lukk',
800
807
  title: 'Tittel',
801
808
  image: {
@@ -883,6 +890,10 @@ const messages = {
883
890
  },
884
891
  },
885
892
  checkOutNewFeature: 'Sjekk ut ny funksjonalitet',
893
+ slateBlockMenu: {
894
+ open: 'Åpne meny',
895
+ close: 'Lukk meny',
896
+ },
886
897
  };
887
898
 
888
899
  export default messages;