@ndla/ui 16.2.0 → 18.0.1

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.
Files changed (121) hide show
  1. package/es/Article/Article.js +3 -3
  2. package/es/Article/ArticleFavoritesButton.js +4 -3
  3. package/es/Breadcrumblist/Breadcrumblist.js +7 -7
  4. package/es/Frontpage/FrontpageAllSubjects.js +8 -8
  5. package/es/Masthead/Masthead.js +2 -3
  6. package/es/Masthead/MastheadAuthModal.js +8 -3
  7. package/es/Messages/MessageBanner.js +75 -0
  8. package/es/Messages/MessageBox.js +123 -0
  9. package/es/{MessageBox → Messages}/MessageBoxTag.js +1 -1
  10. package/es/{MessageBox → Messages}/index.js +3 -3
  11. package/es/MyNdla/Resource/Folder.js +7 -7
  12. package/es/MyNdla/index.js +1 -2
  13. package/es/Programme/Programme.js +6 -6
  14. package/es/Programme/ProgrammeSubjects.js +2 -2
  15. package/es/Resource/ListResource.js +6 -6
  16. package/es/Resource/resourceComponents.js +8 -8
  17. package/es/TagSelector/SuggestionInput.js +111 -56
  18. package/es/TagSelector/Suggestions.js +19 -15
  19. package/es/TagSelector/TagSelector.js +8 -7
  20. package/es/Topic/Topic.js +22 -24
  21. package/es/TopicMenu/TopicMenu.js +2 -4
  22. package/es/TreeStructure/FolderItem.js +5 -5
  23. package/es/TreeStructure/FolderItems.js +3 -3
  24. package/es/TreeStructure/TreeStructure.js +51 -73
  25. package/es/TreeStructure/keyboardNavigation/keyboardNavigation.js +23 -11
  26. package/es/index.js +2 -2
  27. package/es/locale/messages-en.js +9 -1
  28. package/es/locale/messages-nb.js +10 -2
  29. package/es/locale/messages-nn.js +11 -3
  30. package/es/locale/messages-se.js +10 -2
  31. package/es/locale/messages-sma.js +10 -2
  32. package/lib/Article/Article.js +3 -3
  33. package/lib/Article/ArticleFavoritesButton.js +4 -3
  34. package/lib/Breadcrumblist/Breadcrumblist.js +7 -7
  35. package/lib/Frontpage/FrontpageAllSubjects.js +9 -9
  36. package/lib/Masthead/Masthead.js +2 -3
  37. package/lib/Masthead/MastheadAuthModal.js +14 -7
  38. package/lib/Messages/MessageBanner.d.ts +16 -0
  39. package/lib/Messages/MessageBanner.js +78 -0
  40. package/lib/{MessageBox → Messages}/MessageBox.d.ts +6 -14
  41. package/lib/Messages/MessageBox.js +128 -0
  42. package/lib/{MessageBox → Messages}/MessageBoxTag.d.ts +0 -0
  43. package/lib/{MessageBox → Messages}/MessageBoxTag.js +1 -1
  44. package/lib/{MessageBox → Messages}/index.d.ts +3 -3
  45. package/lib/Messages/index.js +31 -0
  46. package/lib/MyNdla/Resource/Folder.js +7 -7
  47. package/lib/MyNdla/index.d.ts +1 -2
  48. package/lib/MyNdla/index.js +0 -8
  49. package/lib/Programme/Programme.js +6 -6
  50. package/lib/Programme/ProgrammeSubjects.js +3 -3
  51. package/lib/Resource/ListResource.js +6 -6
  52. package/lib/Resource/resourceComponents.js +8 -8
  53. package/lib/TagSelector/SuggestionInput.js +111 -57
  54. package/lib/TagSelector/Suggestions.js +26 -23
  55. package/lib/TagSelector/TagSelector.js +8 -7
  56. package/lib/Topic/Topic.js +22 -24
  57. package/lib/TopicMenu/TopicMenu.js +2 -4
  58. package/lib/TreeStructure/FolderItem.js +5 -5
  59. package/lib/TreeStructure/FolderItems.js +3 -3
  60. package/lib/TreeStructure/TreeStructure.js +52 -73
  61. package/lib/TreeStructure/TreeStructure.types.d.ts +2 -2
  62. package/lib/TreeStructure/keyboardNavigation/keyboardNavigation.js +23 -11
  63. package/lib/TreeStructure/keyboardNavigation/keyboardNavigation.types.d.ts +1 -1
  64. package/lib/index.d.ts +2 -2
  65. package/lib/index.js +6 -13
  66. package/lib/locale/messages-en.d.ts +8 -0
  67. package/lib/locale/messages-en.js +9 -1
  68. package/lib/locale/messages-nb.d.ts +8 -0
  69. package/lib/locale/messages-nb.js +10 -2
  70. package/lib/locale/messages-nn.d.ts +8 -0
  71. package/lib/locale/messages-nn.js +11 -3
  72. package/lib/locale/messages-se.d.ts +8 -0
  73. package/lib/locale/messages-se.js +10 -2
  74. package/lib/locale/messages-sma.d.ts +8 -0
  75. package/lib/locale/messages-sma.js +10 -2
  76. package/package.json +13 -13
  77. package/src/Article/Article.tsx +1 -1
  78. package/src/Article/ArticleFavoritesButton.tsx +4 -3
  79. package/src/Breadcrumblist/Breadcrumblist.tsx +1 -1
  80. package/src/Frontpage/FrontpageAllSubjects.tsx +1 -1
  81. package/src/Masthead/Masthead.tsx +3 -6
  82. package/src/Masthead/MastheadAuthModal.tsx +9 -0
  83. package/src/Messages/MessageBanner.tsx +66 -0
  84. package/src/Messages/MessageBox.tsx +156 -0
  85. package/src/{MessageBox → Messages}/MessageBoxTag.tsx +0 -0
  86. package/src/{MessageBox → Messages}/index.ts +3 -3
  87. package/src/MyNdla/Resource/Folder.tsx +2 -2
  88. package/src/MyNdla/index.ts +1 -2
  89. package/src/Programme/Programme.tsx +1 -1
  90. package/src/Programme/ProgrammeSubjects.tsx +1 -1
  91. package/src/Resource/ListResource.tsx +1 -1
  92. package/src/Resource/resourceComponents.tsx +3 -0
  93. package/src/TagSelector/SuggestionInput.tsx +90 -24
  94. package/src/TagSelector/Suggestions.tsx +14 -0
  95. package/src/TagSelector/TagSelector.tsx +6 -4
  96. package/src/Topic/Topic.tsx +2 -2
  97. package/src/TopicMenu/TopicMenu.jsx +2 -2
  98. package/src/TreeStructure/FolderItem.tsx +5 -2
  99. package/src/TreeStructure/FolderItems.tsx +1 -1
  100. package/src/TreeStructure/TreeStructure.tsx +33 -35
  101. package/src/TreeStructure/TreeStructure.types.ts +2 -2
  102. package/src/TreeStructure/keyboardNavigation/keyboardNavigation.ts +7 -7
  103. package/src/TreeStructure/keyboardNavigation/keyboardNavigation.types.ts +1 -1
  104. package/src/index.ts +2 -2
  105. package/src/locale/messages-en.ts +10 -1
  106. package/src/locale/messages-nb.ts +10 -2
  107. package/src/locale/messages-nn.ts +11 -3
  108. package/src/locale/messages-se.ts +10 -2
  109. package/src/locale/messages-sma.ts +10 -2
  110. package/es/MessageBox/MessageBox.js +0 -220
  111. package/es/MyNdla/Navigation/VerticalNavigation.js +0 -51
  112. package/es/MyNdla/Navigation/index.js +0 -2
  113. package/lib/MessageBox/MessageBox.js +0 -234
  114. package/lib/MessageBox/index.js +0 -35
  115. package/lib/MyNdla/Navigation/VerticalNavigation.d.ts +0 -10
  116. package/lib/MyNdla/Navigation/VerticalNavigation.js +0 -61
  117. package/lib/MyNdla/Navigation/index.d.ts +0 -2
  118. package/lib/MyNdla/Navigation/index.js +0 -15
  119. package/src/MessageBox/MessageBox.tsx +0 -201
  120. package/src/MyNdla/Navigation/VerticalNavigation.tsx +0 -93
  121. package/src/MyNdla/Navigation/index.ts +0 -2
@@ -13,6 +13,7 @@ import Tooltip from '@ndla/tooltip';
13
13
  import { useTranslation } from 'react-i18next';
14
14
  import styled from '@emotion/styled';
15
15
  import { spacing, fonts } from '@ndla/core';
16
+ import { uniq } from 'lodash';
16
17
  import TreeStructureStyledWrapper from './TreeStructureWrapper';
17
18
  import FolderItems from './FolderItems';
18
19
  import { getIdPathsOfFolder, getPathOfFolder, getFolderName } from './helperFunctions';
@@ -44,18 +45,19 @@ const TreeStructure = ({
44
45
  }: TreeStructureProps) => {
45
46
  const { t } = useTranslation();
46
47
  const [newFolder, setNewFolder] = useState<NewFolderProps | undefined>();
47
- const [openFolders, setOpenFolders] = useState<Set<string>>(new Set(defaultOpenFolders || []));
48
+ const [openFolders, setOpenFolders] = useState<string[]>(defaultOpenFolders || []);
48
49
  const [focusedFolderId, setFocusedFolderId] = useState<string | undefined>();
49
- const [markedFolderId, setMarkedFolderId] = useState<string | undefined>(folderIdMarkedByDefault || data[0].id);
50
+ const [markedFolderId, setMarkedFolderId] = useState<string | undefined>(folderIdMarkedByDefault || data[0]?.id);
50
51
  const treestructureRef = useRef<HTMLDivElement>(null);
51
52
  const wrapperRef = useRef<HTMLDivElement>(null);
52
53
  const rootLevelId = useMemo(() => uuid(), []); // TODO: use useId hook when we update to React 18
53
54
 
54
55
  useEffect(() => {
55
- setOpenFolders((prev) => {
56
- defaultOpenFolders?.forEach((id) => prev.add(id));
57
- return new Set(prev);
58
- });
56
+ if (defaultOpenFolders) {
57
+ setOpenFolders((prev) => {
58
+ return uniq([...defaultOpenFolders, ...prev]);
59
+ });
60
+ }
59
61
  }, [defaultOpenFolders]);
60
62
 
61
63
  useEffect(() => {
@@ -65,48 +67,44 @@ const TreeStructure = ({
65
67
  }, [loading]);
66
68
 
67
69
  const onToggleOpen = (id: string) => {
68
- setOpenFolders((prev) => {
69
- if (prev.has(id)) {
70
- prev.delete(id);
71
- // Did we just closed a folder with a marked folder inside it?
72
- // If so, we need to mark the folder we just closed.
73
- if (markedFolderId) {
74
- const closingFolderPath = getPathOfFolder(data, id);
75
- const markedFolderPath = getPathOfFolder(data, markedFolderId);
76
- const markedFolderIsSubPath = closingFolderPath.every(
77
- (folderId, _index) => markedFolderPath[_index] === folderId,
78
- );
79
- if (markedFolderIsSubPath) {
80
- setMarkedFolderId(closingFolderPath[closingFolderPath.length - 1]);
81
- }
70
+ if (openFolders.includes(id)) {
71
+ // Did we just closed a folder with a marked folder inside it?
72
+ // If so, we need to mark the folder we just closed.
73
+ if (markedFolderId) {
74
+ const closingFolderPath = getPathOfFolder(data, id);
75
+ const markedFolderPath = getPathOfFolder(data, markedFolderId);
76
+ const markedFolderIsSubPath = closingFolderPath.every(
77
+ (folderId, _index) => markedFolderPath[_index] === folderId,
78
+ );
79
+ if (markedFolderIsSubPath) {
80
+ setMarkedFolderId(closingFolderPath[closingFolderPath.length - 1]);
82
81
  }
83
- } else {
84
- prev.add(id);
85
82
  }
86
- return new Set(prev);
87
- });
83
+ setOpenFolders(openFolders.filter((folder) => folder !== id));
84
+ } else {
85
+ setOpenFolders(uniq([...openFolders, id]));
86
+ }
88
87
  };
89
88
 
90
89
  const onCreateNewFolder = (props: { idPaths: number[]; parentId?: string }) => {
91
90
  setNewFolder(props);
92
91
  };
93
92
 
94
- const onSaveNewFolder = async (value: string) => {
93
+ const onSaveNewFolder = (value: string) => {
95
94
  if (newFolder) {
96
95
  // We would like to create a new folder with the name of value.
97
96
  // Its location in structure is based on newFolder object
98
- const newFolderId = await onNewFolder({ ...newFolder, value });
99
- if (newFolderId) {
100
- setMarkedFolderId(newFolderId);
101
- setFocusedFolderId(newFolderId);
102
- // Open current folder in case it was closed..
103
- setOpenFolders((prev) => {
97
+ onNewFolder({ ...newFolder, value }).then((newFolderId) => {
98
+ if (newFolderId) {
99
+ setMarkedFolderId(newFolderId);
100
+ setFocusedFolderId(newFolderId);
101
+ // Open current folder in case it was closed..
102
+
104
103
  if (newFolder.parentId) {
105
- prev.add(newFolder.parentId);
104
+ setOpenFolders(uniq([...openFolders, newFolder.parentId]));
106
105
  }
107
- return new Set(prev);
108
- });
109
- }
106
+ }
107
+ });
110
108
  }
111
109
  };
112
110
 
@@ -49,7 +49,7 @@ export type onCreateNewFolderProp = ({
49
49
  parentId: string | undefined;
50
50
  }) => void;
51
51
 
52
- export type SetOpenFolderProp = React.Dispatch<React.SetStateAction<Set<string>>>;
52
+ export type SetOpenFolderProp = React.Dispatch<React.SetStateAction<string[]>>;
53
53
  export type SetFocusedFolderId = React.Dispatch<React.SetStateAction<string | undefined>>;
54
54
 
55
55
  export type FolderChildFuncType = (id: string, tabIndex: number) => ReactNode;
@@ -60,7 +60,7 @@ export interface FolderItemsProps extends CommonFolderProps {
60
60
  onCancelNewFolder: () => void;
61
61
  onCreateNewFolder: onCreateNewFolderProp;
62
62
  newFolder: NewFolderProps | undefined;
63
- openFolders: Set<string>;
63
+ openFolders: string[];
64
64
  markedFolderId?: string;
65
65
  onMarkFolder: (id: string) => void;
66
66
  idPaths: number[];
@@ -66,7 +66,7 @@ const keyboardNavigation = ({
66
66
  if (dataId === id) {
67
67
  elementWithKeyFocus.paths = paths;
68
68
  elementWithKeyFocus.index = _index;
69
- elementWithKeyFocus.isOpen = openFolders.has(dataId) && childData && childData.length > 0;
69
+ elementWithKeyFocus.isOpen = openFolders.includes(dataId) && childData && childData.length > 0;
70
70
  elementWithKeyFocus.data = childData;
71
71
  elementWithKeyFocus.parent = parent;
72
72
  elementWithKeyFocus.parentId = parentId;
@@ -78,7 +78,7 @@ const keyboardNavigation = ({
78
78
  if (!updatePathToElementWithKeyFocus(data, [], data)) {
79
79
  // Couldn't find its location in the tree.
80
80
  // This should not happen, reset its value to root.
81
- setFocusedFolderId(e.key === 'ArrowDown' ? data[0].id : undefined);
81
+ setFocusedFolderId(e.key === 'ArrowDown' ? data[0]?.id : undefined);
82
82
  return;
83
83
  }
84
84
  e.preventDefault();
@@ -113,7 +113,7 @@ const keyboardNavigation = ({
113
113
  }
114
114
 
115
115
  if (!id && e.key === 'ArrowDown') {
116
- setFocusedFolderId(data[0].id);
116
+ setFocusedFolderId(data[0]?.id);
117
117
  return;
118
118
  }
119
119
  if (!id) {
@@ -124,7 +124,7 @@ const keyboardNavigation = ({
124
124
  if (elementWithKeyFocus.index > 0) {
125
125
  // Move upwards to the parent folder
126
126
  setFocusedFolderId(
127
- elementWithKeyFocus.parent ? elementWithKeyFocus.parent[elementWithKeyFocus.index - 1].id : undefined,
127
+ elementWithKeyFocus.parent ? elementWithKeyFocus.parent[elementWithKeyFocus.index - 1]?.id : undefined,
128
128
  );
129
129
  } else if (elementWithKeyFocus.paths.length > 0) {
130
130
  elementWithKeyFocus.paths.pop();
@@ -133,14 +133,14 @@ const keyboardNavigation = ({
133
133
  findParent = findParent[index].data as FolderStructureProps[];
134
134
  });
135
135
  const parentsCurrentIndex = findParent.findIndex(({ id }) => id === elementWithKeyFocus.parentId);
136
- setFocusedFolderId(findParent[parentsCurrentIndex].id);
136
+ setFocusedFolderId(findParent[parentsCurrentIndex]?.id);
137
137
  }
138
138
  return;
139
139
  }
140
140
 
141
141
  if (elementWithKeyFocus.isOpen) {
142
142
  if (elementWithKeyFocus.data?.length) {
143
- setFocusedFolderId(elementWithKeyFocus.data[0].id);
143
+ setFocusedFolderId(elementWithKeyFocus.data[0]?.id);
144
144
  } else {
145
145
  // move to next child of parent if any... need new traverse :-/
146
146
  traverseUpwards(data, setFocusedFolderId, elementWithKeyFocus.paths, elementWithKeyFocus.index);
@@ -150,7 +150,7 @@ const keyboardNavigation = ({
150
150
 
151
151
  if (elementWithKeyFocus.parent && elementWithKeyFocus.index < elementWithKeyFocus.parent?.length - 1) {
152
152
  // Move downwards to the next child
153
- setFocusedFolderId(elementWithKeyFocus.parent[elementWithKeyFocus.index + 1].id);
153
+ setFocusedFolderId(elementWithKeyFocus.parent[elementWithKeyFocus.index + 1]?.id);
154
154
  return;
155
155
  }
156
156
 
@@ -12,7 +12,7 @@ export interface KeyboardNavigationProps {
12
12
  e: React.KeyboardEvent<HTMLElement>;
13
13
  data: FolderStructureProps[];
14
14
  setFocusedFolderId: SetFocusedFolderId;
15
- openFolders: Set<string>;
15
+ openFolders: string[];
16
16
  onToggleOpen: (id: string) => void;
17
17
  focusedFolderId: string | undefined;
18
18
  }
package/src/index.ts CHANGED
@@ -127,7 +127,7 @@ export { default as CreatedBy } from './CreatedBy';
127
127
 
128
128
  export { default as Breadcrumblist } from './Breadcrumblist';
129
129
 
130
- export { MessageBox, MessageBoxTag, MessageBoxType } from './MessageBox';
130
+ export { MessageBox, MessageBoxTag, MessageBanner } from './Messages';
131
131
 
132
132
  export { ResourceBox } from './ResourceBox';
133
133
 
@@ -236,7 +236,7 @@ export { Notion, ConceptNotion } from './Notion';
236
236
  export type { NotionVisualElementType, ConceptNotionType } from './Notion';
237
237
 
238
238
  export { BannerCard } from './BannerCard';
239
- export { VerticalNavigation, Folder, FolderInput } from './MyNdla';
239
+ export { Folder, FolderInput } from './MyNdla';
240
240
  export { ListResource, BlockResource } from './Resource';
241
241
  export type { ListResourceProps } from './Resource';
242
242
  export type { TagType } from './TagSelector';
@@ -15,6 +15,10 @@ const titleTemplate = ' - NDLA';
15
15
 
16
16
  const messages = {
17
17
  treeStructure: {
18
+ folderChildOptions: {
19
+ edit: 'Edit foldername',
20
+ delete: 'Delete',
21
+ },
18
22
  createFolder: 'Create folder',
19
23
  newFolder: {
20
24
  placeholder: 'Add foldername',
@@ -22,7 +26,8 @@ const messages = {
22
26
  },
23
27
  },
24
28
  tagSelector: {
25
- placeholder: 'Add to tag',
29
+ label: 'Add tag',
30
+ placeholder: 'Enter tag name',
26
31
  removeTag: 'Remove tag {{name}}',
27
32
  hideAllTags: 'Hide all tags',
28
33
  showAllTags: 'Show all tags',
@@ -978,6 +983,7 @@ const messages = {
978
983
  close: 'Close fact box',
979
984
  },
980
985
  myNdla: {
986
+ myNDLA: 'My NDLA',
981
987
  resources: '{{count}} Resource',
982
988
  resources_plural: '{{count}} Resources',
983
989
  folders: '{{count}} Folder',
@@ -989,6 +995,8 @@ const messages = {
989
995
  newFolderUnder: 'Create new folder under {{folderName}}',
990
996
  myAccount: 'My account',
991
997
  favourites: 'Favourites',
998
+ addToFavourites: 'Add to my favourites',
999
+ alreadyFavourited: 'Already in my favourites',
992
1000
  help: 'Help',
993
1001
  more: 'More options',
994
1002
  listView: 'List view',
@@ -1007,6 +1015,7 @@ const messages = {
1007
1015
  terms: 'terms of use',
1008
1016
  feide: 'We have retrieved this information from Feide',
1009
1017
  newFavourite: 'Recently favourited',
1018
+
1010
1019
  storageInfo: {
1011
1020
  title: 'How to save your favourite resources from NDLA',
1012
1021
  text: 'When you wish to save a resource, you can do so by clicking the heart on the top right corner of the page. You will then get an option to store the resource in a folder',
@@ -15,6 +15,10 @@ const titleTemplate = ' - NDLA';
15
15
 
16
16
  const messages = {
17
17
  treeStructure: {
18
+ folderChildOptions: {
19
+ edit: 'Endre mappenavn',
20
+ delete: 'Slett',
21
+ },
18
22
  createFolder: 'Lag mappe',
19
23
  newFolder: {
20
24
  placeholder: 'Skriv navn på mappe',
@@ -22,8 +26,9 @@ const messages = {
22
26
  },
23
27
  },
24
28
  tagSelector: {
25
- placeholder: 'Tilknytt tag',
26
- removeTag: 'Ta vekk tilknytning til {{name}}',
29
+ label: 'Legg til tag',
30
+ placeholder: 'Skriv tag navn',
31
+ removeTag: 'Ta vekk {{name}}',
27
32
  hideAllTags: 'Skjul alle tagger',
28
33
  showAllTags: 'Vis alle tagger',
29
34
  },
@@ -976,6 +981,7 @@ const messages = {
976
981
  close: 'Lukk faktaboks',
977
982
  },
978
983
  myNdla: {
984
+ myNDLA: 'Min NDLA',
979
985
  resources: '{{count}} ressurs',
980
986
  resources_plural: '{{count}} ressurser',
981
987
  folders: '{{count}} mappe',
@@ -987,6 +993,8 @@ const messages = {
987
993
  newFolderUnder: 'Lag ny mappe under {{folderName}}',
988
994
  myAccount: 'Min konto',
989
995
  favourites: 'Favoritter',
996
+ addToFavourites: 'Legg til i mine favoritter',
997
+ alreadyFavourited: 'Allerede lagt til i mine favoritter',
990
998
  help: 'Hjelp',
991
999
  more: 'Flere valg',
992
1000
  listView: 'Listevisning',
@@ -15,15 +15,20 @@ const titleTemplate = ' - NDLA';
15
15
 
16
16
  const messages = {
17
17
  treeStructure: {
18
+ folderChildOptions: {
19
+ edit: 'Endre mappenamn',
20
+ delete: 'Slett',
21
+ },
18
22
  createFolder: 'Lag mappe',
19
23
  newFolder: {
20
- placeholder: 'Skriv navn på mappe',
24
+ placeholder: 'Skriv namn på mappe',
21
25
  defaultName: 'Ny mappe',
22
26
  },
23
27
  },
24
28
  tagSelector: {
25
- placeholder: 'Tilknytt tag',
26
- removeTag: 'Ta vekk tilknytninga til {{name}}',
29
+ label: 'Legg til tag',
30
+ placeholder: 'Skriv tag namn',
31
+ removeTag: 'Ta vekk {{name}}',
27
32
  hideAllTags: 'Skjul alle tagger',
28
33
  showAllTags: 'Vis alle tagger',
29
34
  },
@@ -977,6 +982,7 @@ const messages = {
977
982
  close: 'Lukk faktaboks',
978
983
  },
979
984
  myNdla: {
985
+ myNDLA: 'Min NDLA',
980
986
  resources: '{{count}} ressurs',
981
987
  resources_plural: '{{count}} ressursar',
982
988
  folders: '{{count}} mappe',
@@ -988,6 +994,8 @@ const messages = {
988
994
  newFolderUnder: 'Lag ny mappe under {{folderName}}',
989
995
  myAccount: 'Min konto',
990
996
  favourites: 'Favorittar',
997
+ addToFavourites: 'Legg til i mine favorittar',
998
+ alreadyFavourited: 'Allereie lagt til i mine favorittar',
991
999
  help: 'Hjelp',
992
1000
  more: 'Fleire val',
993
1001
  listView: 'Listevisning',
@@ -15,6 +15,10 @@ const titleTemplate = ' - NDLA';
15
15
 
16
16
  const messages = {
17
17
  treeStructure: {
18
+ folderChildOptions: {
19
+ edit: 'Endre mappenavn',
20
+ delete: 'Slett',
21
+ },
18
22
  createFolder: 'Lag mappe',
19
23
  newFolder: {
20
24
  placeholder: 'Skriv navn på mappe',
@@ -22,8 +26,9 @@ const messages = {
22
26
  },
23
27
  },
24
28
  tagSelector: {
25
- placeholder: 'Legg til tag',
26
- removeTag: 'Ta vekk tilknytninga til {{name}}',
29
+ label: 'Legg til tag',
30
+ placeholder: 'Skriv tag navn',
31
+ removeTag: 'Ta vekk {{name}}',
27
32
  hideAllTags: 'Skjul alla tags',
28
33
  showAllTags: 'Vis alla tags',
29
34
  },
@@ -976,6 +981,7 @@ const messages = {
976
981
  close: 'Lukk faktaboks',
977
982
  },
978
983
  myNdla: {
984
+ myNDLA: 'Min NDLA',
979
985
  resources: '{{count}} ressurs',
980
986
  resources_plural: '{{count}} ressurser',
981
987
  folders: '{{count}} mappe',
@@ -987,6 +993,8 @@ const messages = {
987
993
  newFolderUnder: 'Lag ny mappe under {{folderName}}',
988
994
  myAccount: 'Min konto',
989
995
  favourites: 'Favoritter',
996
+ addToFavourites: 'Legg til i mine favoritter',
997
+ alreadyFavourited: 'Allerede lagt til i mine favoritter',
990
998
  help: 'Hjelp',
991
999
  more: 'Flere valg',
992
1000
  listView: 'Listevisning',
@@ -15,6 +15,10 @@ const titleTemplate = ' - NDLA';
15
15
 
16
16
  const messages = {
17
17
  treeStructure: {
18
+ folderChildOptions: {
19
+ edit: 'Endre mappenavn',
20
+ delete: 'Slett',
21
+ },
18
22
  createFolder: 'Lag mappe',
19
23
  newFolder: {
20
24
  placeholder: 'Skriv navn på mappe',
@@ -22,8 +26,9 @@ const messages = {
22
26
  },
23
27
  },
24
28
  tagSelector: {
25
- placeholder: 'Tilknytt tag',
26
- removeTag: 'Ta vekk tilknytning til {{name}}',
29
+ label: 'Legg til tag',
30
+ placeholder: 'Skriv tag navn',
31
+ removeTag: 'Ta vekk {{name}}',
27
32
  hideAllTags: 'Skjul alle tagger',
28
33
  showAllTags: 'Vis alle tagger',
29
34
  },
@@ -976,6 +981,7 @@ const messages = {
976
981
  close: 'Lukk faktaboks',
977
982
  },
978
983
  myNdla: {
984
+ myNDLA: 'Min NDLA',
979
985
  resources: '{{count}} ressurs',
980
986
  resources_plural: '{{count}} ressurser',
981
987
  folders: '{{count}} mappe',
@@ -987,6 +993,8 @@ const messages = {
987
993
  newFolderUnder: 'Lag ny mappe under {{folderName}}',
988
994
  myAccount: 'Min konto',
989
995
  favourites: 'Favoritter',
996
+ addToFavourites: 'Legg til i mine favoritter',
997
+ alreadyFavourited: 'Allerede lagt til i mine favoritter',
990
998
  help: 'Hjelp',
991
999
  more: 'Flere valg',
992
1000
  listView: 'Listevisning',