@ndla/ui 36.0.2 → 37.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.
- package/es/Article/Article.js +7 -13
- package/es/Article/ArticleByline.js +79 -123
- package/es/Article/ArticleFootNotes.js +16 -11
- package/es/AudioPlayer/AudioPlayer.js +33 -35
- package/es/AudioPlayer/initAudioPlayers.js +6 -1
- package/es/ContentTypeBadge/ContentTypeBadge.js +27 -6
- package/es/Embed/AudioEmbed.js +44 -188
- package/es/Embed/BrightcoveEmbed.js +32 -127
- package/es/Embed/ConceptEmbed.js +53 -75
- package/es/Embed/EmbedErrorPlaceholder.js +41 -0
- package/es/Embed/ExternalEmbed.js +5 -12
- package/es/Embed/H5pEmbed.js +5 -15
- package/es/Embed/IframeEmbed.js +4 -4
- package/es/Embed/ImageEmbed.js +41 -153
- package/es/Embed/RelatedContentEmbed.js +3 -3
- package/es/Embed/conceptComponents.js +62 -228
- package/es/Embed/types.js +1 -0
- package/es/KeyFigure/KeyFigure.js +57 -0
- package/es/{KeyPerformanceIndicator → KeyFigure}/index.js +1 -1
- package/es/LicenseByline/EmbedByline.js +33 -8
- package/es/LicenseByline/LicenseDescription.js +16 -14
- package/es/List/OrderedList.js +48 -0
- package/es/List/UnOrderedList.js +36 -0
- package/es/List/index.js +10 -0
- package/es/Navigation/NavigationBox.js +41 -48
- package/es/Navigation/NavigationHeading.js +18 -29
- package/es/Notion/Notion.js +5 -5
- package/es/Resource/ListResource.js +9 -9
- package/es/Resource/resourceComponents.js +12 -11
- package/es/Typography/Heading.js +38 -0
- package/es/Typography/index.js +9 -0
- package/es/all.css +1 -1
- package/es/index.js +4 -2
- package/es/locale/messages-en.js +6 -2
- package/es/locale/messages-nb.js +6 -2
- package/es/locale/messages-nn.js +6 -2
- package/es/locale/messages-se.js +6 -2
- package/es/locale/messages-sma.js +6 -2
- package/es/model/ContentType.js +7 -1
- package/lib/Article/Article.d.ts +1 -3
- package/lib/Article/Article.js +7 -13
- package/lib/Article/ArticleByline.d.ts +3 -5
- package/lib/Article/ArticleByline.js +83 -126
- package/lib/Article/ArticleFootNotes.js +16 -11
- package/lib/AudioPlayer/AudioPlayer.d.ts +1 -2
- package/lib/AudioPlayer/AudioPlayer.js +33 -36
- package/lib/AudioPlayer/initAudioPlayers.d.ts +1 -0
- package/lib/AudioPlayer/initAudioPlayers.js +9 -3
- package/lib/ContentTypeBadge/ContentTypeBadge.js +27 -6
- package/lib/Embed/AudioEmbed.d.ts +3 -2
- package/lib/Embed/AudioEmbed.js +53 -192
- package/lib/Embed/BrightcoveEmbed.d.ts +3 -1
- package/lib/Embed/BrightcoveEmbed.js +32 -126
- package/lib/Embed/ConceptEmbed.d.ts +7 -2
- package/lib/Embed/ConceptEmbed.js +51 -73
- package/lib/Embed/EmbedErrorPlaceholder.d.ts +17 -0
- package/lib/Embed/EmbedErrorPlaceholder.js +48 -0
- package/lib/Embed/ExternalEmbed.js +5 -11
- package/lib/Embed/H5pEmbed.js +5 -14
- package/lib/Embed/IframeEmbed.d.ts +2 -2
- package/lib/Embed/IframeEmbed.js +4 -4
- package/lib/Embed/ImageEmbed.d.ts +3 -10
- package/lib/Embed/ImageEmbed.js +48 -161
- package/lib/Embed/RelatedContentEmbed.js +3 -3
- package/lib/Embed/conceptComponents.d.ts +4 -2
- package/lib/Embed/conceptComponents.js +67 -231
- package/lib/Embed/index.d.ts +1 -0
- package/lib/Embed/types.d.ts +14 -0
- package/lib/Embed/types.js +5 -0
- package/lib/KeyFigure/KeyFigure.d.ts +10 -0
- package/lib/KeyFigure/KeyFigure.js +62 -0
- package/lib/KeyFigure/index.d.ts +1 -0
- package/lib/KeyFigure/index.js +13 -0
- package/lib/LicenseByline/EmbedByline.d.ts +10 -2
- package/lib/LicenseByline/EmbedByline.js +32 -7
- package/lib/LicenseByline/LicenseDescription.d.ts +3 -1
- package/lib/LicenseByline/LicenseDescription.js +14 -13
- package/lib/List/OrderedList.d.ts +15 -0
- package/lib/List/OrderedList.js +56 -0
- package/lib/List/UnOrderedList.d.ts +10 -0
- package/lib/List/UnOrderedList.js +43 -0
- package/lib/List/index.d.ts +9 -0
- package/lib/List/index.js +20 -0
- package/lib/Navigation/NavigationBox.js +40 -47
- package/lib/Navigation/NavigationHeading.js +17 -28
- package/lib/Notion/Notion.js +5 -5
- package/lib/Resource/ListResource.js +8 -8
- package/lib/Resource/resourceComponents.js +12 -11
- package/lib/Typography/Heading.d.ts +26 -0
- package/lib/Typography/Heading.js +45 -0
- package/lib/Typography/index.d.ts +8 -0
- package/lib/Typography/index.js +13 -0
- package/lib/all.css +1 -1
- package/lib/index.d.ts +4 -1
- package/lib/index.js +23 -3
- package/lib/locale/messages-en.d.ts +4 -0
- package/lib/locale/messages-en.js +6 -2
- package/lib/locale/messages-nb.d.ts +4 -0
- package/lib/locale/messages-nb.js +6 -2
- package/lib/locale/messages-nn.d.ts +4 -0
- package/lib/locale/messages-nn.js +6 -2
- package/lib/locale/messages-se.d.ts +4 -0
- package/lib/locale/messages-se.js +6 -2
- package/lib/locale/messages-sma.d.ts +4 -0
- package/lib/locale/messages-sma.js +6 -2
- package/lib/model/ContentType.d.ts +1 -0
- package/lib/model/ContentType.js +9 -2
- package/package.json +15 -15
- package/src/Article/Article.tsx +1 -8
- package/src/Article/ArticleByline.tsx +78 -127
- package/src/Article/ArticleFootNotes.tsx +33 -10
- package/src/Article/component.article.scss +1 -52
- package/src/Article/component.footnotes.scss +2 -2
- package/src/Aside/component.aside.scss +3 -3
- package/src/AudioPlayer/AudioPlayer.tsx +11 -24
- package/src/AudioPlayer/initAudioPlayers.tsx +7 -2
- package/src/ContentTypeBadge/ContentTypeBadge.tsx +29 -6
- package/src/ContentTypeBadge/component.content-type-badge.scss +9 -3
- package/src/Dialog/component.dialog.scss +4 -5
- package/src/Embed/AudioEmbed.stories.tsx +5 -3
- package/src/Embed/AudioEmbed.tsx +45 -192
- package/src/Embed/BrightcoveEmbed.stories.tsx +5 -1
- package/src/Embed/BrightcoveEmbed.tsx +24 -98
- package/src/Embed/ConceptEmbed.stories.tsx +5 -0
- package/src/Embed/ConceptEmbed.tsx +43 -54
- package/src/Embed/EmbedErrorPlaceholder.tsx +59 -0
- package/src/Embed/ExternalEmbed.stories.tsx +86 -0
- package/src/Embed/ExternalEmbed.tsx +3 -8
- package/src/Embed/H5pEmbed.stories.tsx +92 -0
- package/src/Embed/H5pEmbed.tsx +3 -11
- package/src/Embed/IframeEmbed.stories.tsx +130 -0
- package/src/Embed/IframeEmbed.tsx +3 -3
- package/src/Embed/ImageEmbed.stories.tsx +3 -1
- package/src/Embed/ImageEmbed.tsx +21 -116
- package/src/Embed/RelatedContentEmbed.tsx +3 -1
- package/src/Embed/conceptComponents.tsx +67 -257
- package/src/Embed/index.ts +1 -0
- package/src/Embed/types.ts +12 -0
- package/src/FactBox/component.factbox.scss +3 -3
- package/src/Figure/component.figure-license.scss +4 -4
- package/src/Figure/component.figure.scss +1 -1
- package/src/KeyFigure/KeyFigure.stories.tsx +36 -0
- package/src/{KeyPerformanceIndicator/KeyPerformanceIndicator.tsx → KeyFigure/KeyFigure.tsx} +9 -7
- package/src/{KeyPerformanceIndicator → KeyFigure}/index.ts +1 -1
- package/src/LicenseByline/EmbedByline.stories.tsx +1 -0
- package/src/LicenseByline/EmbedByline.tsx +57 -9
- package/src/LicenseByline/LicenseDescription.tsx +9 -3
- package/src/List/OrderedList.tsx +115 -0
- package/src/List/UnOrderedList.tsx +49 -0
- package/src/List/index.ts +10 -0
- package/src/MediaList/component.medialist.scss +2 -2
- package/src/Navigation/NavigationBox.tsx +10 -14
- package/src/Navigation/NavigationHeading.tsx +15 -24
- package/src/Notion/Notion.tsx +1 -1
- package/src/RelatedArticleList/component.related-articles.scss +3 -13
- package/src/Resource/ListResource.tsx +6 -2
- package/src/Resource/resourceComponents.tsx +4 -2
- package/src/Table/component.tables.scss +0 -46
- package/src/Translation/component.translation.scss +3 -5
- package/src/Typography/Heading.tsx +96 -0
- package/src/Typography/index.ts +9 -0
- package/src/index.ts +5 -1
- package/src/locale/messages-en.ts +4 -0
- package/src/locale/messages-nb.ts +4 -0
- package/src/locale/messages-nn.ts +4 -0
- package/src/locale/messages-se.ts +4 -0
- package/src/locale/messages-sma.ts +4 -0
- package/src/model/ContentType.ts +7 -0
- package/es/KeyPerformanceIndicator/KeyPerformanceIndicator.js +0 -57
- package/lib/KeyPerformanceIndicator/KeyPerformanceIndicator.d.ts +0 -8
- package/lib/KeyPerformanceIndicator/KeyPerformanceIndicator.js +0 -62
- package/lib/KeyPerformanceIndicator/index.d.ts +0 -1
- package/lib/KeyPerformanceIndicator/index.js +0 -13
- package/src/KeyPerformanceIndicator/KeyPerformanceIndicator.stories.tsx +0 -79
package/lib/index.d.ts
CHANGED
|
@@ -96,6 +96,9 @@ export { TreeStructure } from './TreeStructure';
|
|
|
96
96
|
export type { TreeStructureProps } from './TreeStructure';
|
|
97
97
|
export { SearchField, SearchResultList, SearchResultItem, ActiveFilters, ToggleSearchButton } from './Search';
|
|
98
98
|
export { default as LetterFilter } from './LetterFilter';
|
|
99
|
+
export { OrderedList, UnOrderedList } from './List';
|
|
99
100
|
export { BlogPostV2 } from './BlogPost';
|
|
100
|
-
export {
|
|
101
|
+
export { KeyFigure } from './KeyFigure';
|
|
101
102
|
export { default as ContactBlock } from './ContactBlock';
|
|
103
|
+
export type { HeartButtonType } from './Embed';
|
|
104
|
+
export { CampaignBlock } from './CampaignBlock';
|
package/lib/index.js
CHANGED
|
@@ -178,6 +178,12 @@ Object.defineProperty(exports, "BrightcoveEmbed", {
|
|
|
178
178
|
return _Embed.BrightcoveEmbed;
|
|
179
179
|
}
|
|
180
180
|
});
|
|
181
|
+
Object.defineProperty(exports, "CampaignBlock", {
|
|
182
|
+
enumerable: true,
|
|
183
|
+
get: function get() {
|
|
184
|
+
return _CampaignBlock.CampaignBlock;
|
|
185
|
+
}
|
|
186
|
+
});
|
|
181
187
|
Object.defineProperty(exports, "CompetenceGoalTab", {
|
|
182
188
|
enumerable: true,
|
|
183
189
|
get: function get() {
|
|
@@ -592,10 +598,10 @@ Object.defineProperty(exports, "InfoWidget", {
|
|
|
592
598
|
return _InfoWidget["default"];
|
|
593
599
|
}
|
|
594
600
|
});
|
|
595
|
-
Object.defineProperty(exports, "
|
|
601
|
+
Object.defineProperty(exports, "KeyFigure", {
|
|
596
602
|
enumerable: true,
|
|
597
603
|
get: function get() {
|
|
598
|
-
return
|
|
604
|
+
return _KeyFigure.KeyFigure;
|
|
599
605
|
}
|
|
600
606
|
});
|
|
601
607
|
Object.defineProperty(exports, "LanguageSelector", {
|
|
@@ -832,6 +838,12 @@ Object.defineProperty(exports, "OneColumn", {
|
|
|
832
838
|
return _Layout.OneColumn;
|
|
833
839
|
}
|
|
834
840
|
});
|
|
841
|
+
Object.defineProperty(exports, "OrderedList", {
|
|
842
|
+
enumerable: true,
|
|
843
|
+
get: function get() {
|
|
844
|
+
return _List.OrderedList;
|
|
845
|
+
}
|
|
846
|
+
});
|
|
835
847
|
Object.defineProperty(exports, "PageContainer", {
|
|
836
848
|
enumerable: true,
|
|
837
849
|
get: function get() {
|
|
@@ -1174,6 +1186,12 @@ Object.defineProperty(exports, "TreeStructure", {
|
|
|
1174
1186
|
return _TreeStructure.TreeStructure;
|
|
1175
1187
|
}
|
|
1176
1188
|
});
|
|
1189
|
+
Object.defineProperty(exports, "UnOrderedList", {
|
|
1190
|
+
enumerable: true,
|
|
1191
|
+
get: function get() {
|
|
1192
|
+
return _List.UnOrderedList;
|
|
1193
|
+
}
|
|
1194
|
+
});
|
|
1177
1195
|
Object.defineProperty(exports, "UnknownEmbed", {
|
|
1178
1196
|
enumerable: true,
|
|
1179
1197
|
get: function get() {
|
|
@@ -1354,9 +1372,11 @@ var _InfoBlock = require("./InfoBlock");
|
|
|
1354
1372
|
var _TreeStructure = require("./TreeStructure");
|
|
1355
1373
|
var _Search = require("./Search");
|
|
1356
1374
|
var _LetterFilter = _interopRequireDefault(require("./LetterFilter"));
|
|
1375
|
+
var _List = require("./List");
|
|
1357
1376
|
var _BlogPost = require("./BlogPost");
|
|
1358
|
-
var
|
|
1377
|
+
var _KeyFigure = require("./KeyFigure");
|
|
1359
1378
|
var _ContactBlock = _interopRequireDefault(require("./ContactBlock"));
|
|
1379
|
+
var _CampaignBlock = require("./CampaignBlock");
|
|
1360
1380
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
1361
1381
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
|
|
1362
1382
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -269,12 +269,15 @@ declare const messages: {
|
|
|
269
269
|
conceptListError: string;
|
|
270
270
|
linkError: string;
|
|
271
271
|
unsupported: string;
|
|
272
|
+
embedError: string;
|
|
272
273
|
type: {
|
|
273
274
|
image: string;
|
|
274
275
|
video: string;
|
|
275
276
|
audio: string;
|
|
276
277
|
podcast: string;
|
|
277
278
|
concept: string;
|
|
279
|
+
h5p: string;
|
|
280
|
+
external: string;
|
|
278
281
|
};
|
|
279
282
|
};
|
|
280
283
|
common: {
|
|
@@ -1236,6 +1239,7 @@ declare const messages: {
|
|
|
1236
1239
|
close: string;
|
|
1237
1240
|
};
|
|
1238
1241
|
readMoreDescriptionLabel: string;
|
|
1242
|
+
readLessDescriptionLabel: string;
|
|
1239
1243
|
};
|
|
1240
1244
|
h5p: {
|
|
1241
1245
|
reuse: string;
|
|
@@ -967,7 +967,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
967
967
|
heading: 'Text version',
|
|
968
968
|
close: 'Close text version'
|
|
969
969
|
},
|
|
970
|
-
readMoreDescriptionLabel: 'show more'
|
|
970
|
+
readMoreDescriptionLabel: 'show more',
|
|
971
|
+
readLessDescriptionLabel: 'show less'
|
|
971
972
|
},
|
|
972
973
|
h5p: {
|
|
973
974
|
reuse: 'Use H5P',
|
|
@@ -1257,12 +1258,15 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1257
1258
|
conceptListError: 'Failed to show concept list',
|
|
1258
1259
|
linkError: 'Failed to show link.',
|
|
1259
1260
|
unsupported: "Embed {{type}} not supported.",
|
|
1261
|
+
embedError: "An error occurred while loading the {{type}}. Try reloading the page.",
|
|
1260
1262
|
type: {
|
|
1261
1263
|
image: 'Image',
|
|
1262
1264
|
video: 'Video',
|
|
1263
1265
|
audio: 'Audio',
|
|
1264
1266
|
podcast: 'Podcast',
|
|
1265
|
-
concept: 'Concept'
|
|
1267
|
+
concept: 'Concept',
|
|
1268
|
+
h5p: 'H5P',
|
|
1269
|
+
external: 'External resource'
|
|
1266
1270
|
}
|
|
1267
1271
|
}
|
|
1268
1272
|
});
|
|
@@ -269,12 +269,15 @@ declare const messages: {
|
|
|
269
269
|
conceptListError: string;
|
|
270
270
|
linkError: string;
|
|
271
271
|
unsupported: string;
|
|
272
|
+
embedError: string;
|
|
272
273
|
type: {
|
|
273
274
|
image: string;
|
|
274
275
|
video: string;
|
|
275
276
|
audio: string;
|
|
276
277
|
podcast: string;
|
|
277
278
|
concept: string;
|
|
279
|
+
h5p: string;
|
|
280
|
+
external: string;
|
|
278
281
|
};
|
|
279
282
|
};
|
|
280
283
|
common: {
|
|
@@ -1236,6 +1239,7 @@ declare const messages: {
|
|
|
1236
1239
|
close: string;
|
|
1237
1240
|
};
|
|
1238
1241
|
readMoreDescriptionLabel: string;
|
|
1242
|
+
readLessDescriptionLabel: string;
|
|
1239
1243
|
};
|
|
1240
1244
|
h5p: {
|
|
1241
1245
|
reuse: string;
|
|
@@ -967,7 +967,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
967
967
|
heading: 'Tekstversjon',
|
|
968
968
|
close: 'Lukk tekstversjon'
|
|
969
969
|
},
|
|
970
|
-
readMoreDescriptionLabel: 'vis mer'
|
|
970
|
+
readMoreDescriptionLabel: 'vis mer',
|
|
971
|
+
readLessDescriptionLabel: 'vis mindre'
|
|
971
972
|
},
|
|
972
973
|
h5p: {
|
|
973
974
|
reuse: 'Bruk H5P',
|
|
@@ -1257,12 +1258,15 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1257
1258
|
conceptListError: 'Klarte ikke å vise forklaringsliste',
|
|
1258
1259
|
linkError: 'Klarte ikke å vise lenke.',
|
|
1259
1260
|
unsupported: "Embed {{type}} er ikke st\xF8ttet.",
|
|
1261
|
+
embedError: "Beklager, en feil oppstod ved lasting av {{type}}. Pr\xF8v \xE5 laste inn siden p\xE5 nytt.",
|
|
1260
1262
|
type: {
|
|
1261
1263
|
image: 'Bilde',
|
|
1262
1264
|
video: 'Video',
|
|
1263
1265
|
audio: 'Lyd',
|
|
1264
1266
|
podcast: 'Podkast',
|
|
1265
|
-
concept: 'Forklaring'
|
|
1267
|
+
concept: 'Forklaring',
|
|
1268
|
+
h5p: 'H5P',
|
|
1269
|
+
external: 'Ekstern ressurs'
|
|
1266
1270
|
}
|
|
1267
1271
|
}
|
|
1268
1272
|
});
|
|
@@ -269,12 +269,15 @@ declare const messages: {
|
|
|
269
269
|
conceptListError: string;
|
|
270
270
|
linkError: string;
|
|
271
271
|
unsupported: string;
|
|
272
|
+
embedError: string;
|
|
272
273
|
type: {
|
|
273
274
|
image: string;
|
|
274
275
|
video: string;
|
|
275
276
|
audio: string;
|
|
276
277
|
podcast: string;
|
|
277
278
|
concept: string;
|
|
279
|
+
h5p: string;
|
|
280
|
+
external: string;
|
|
278
281
|
};
|
|
279
282
|
};
|
|
280
283
|
common: {
|
|
@@ -1236,6 +1239,7 @@ declare const messages: {
|
|
|
1236
1239
|
close: string;
|
|
1237
1240
|
};
|
|
1238
1241
|
readMoreDescriptionLabel: string;
|
|
1242
|
+
readLessDescriptionLabel: string;
|
|
1239
1243
|
};
|
|
1240
1244
|
h5p: {
|
|
1241
1245
|
reuse: string;
|
|
@@ -967,7 +967,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
967
967
|
heading: 'Tekstversjon',
|
|
968
968
|
close: 'Lukk tekstversjon'
|
|
969
969
|
},
|
|
970
|
-
readMoreDescriptionLabel: 'vis meir'
|
|
970
|
+
readMoreDescriptionLabel: 'vis meir',
|
|
971
|
+
readLessDescriptionLabel: 'vis mindre'
|
|
971
972
|
},
|
|
972
973
|
h5p: {
|
|
973
974
|
reuse: 'Bruk H5P',
|
|
@@ -1257,12 +1258,15 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1257
1258
|
conceptListError: 'Klarte ikkje å vise forklaringsliste',
|
|
1258
1259
|
linkError: 'Klarte ikkje å vise lenke.',
|
|
1259
1260
|
unsupported: "Embed {{type}} er ikkje st\xF8tta.",
|
|
1261
|
+
embedError: "Orsak, ein feil oppstod ved lasting av {{type}}. Pr\xF8v \xE5 laste inn sida p\xE5 nytt.",
|
|
1260
1262
|
type: {
|
|
1261
1263
|
image: 'Bilde',
|
|
1262
1264
|
video: 'Video',
|
|
1263
1265
|
audio: 'Lyd',
|
|
1264
1266
|
podcast: 'Podkast',
|
|
1265
|
-
concept: 'Forklaring'
|
|
1267
|
+
concept: 'Forklaring',
|
|
1268
|
+
h5p: 'H5P',
|
|
1269
|
+
external: 'Ekstern ressurs'
|
|
1266
1270
|
}
|
|
1267
1271
|
}
|
|
1268
1272
|
});
|
|
@@ -269,12 +269,15 @@ declare const messages: {
|
|
|
269
269
|
conceptListError: string;
|
|
270
270
|
linkError: string;
|
|
271
271
|
unsupported: string;
|
|
272
|
+
embedError: string;
|
|
272
273
|
type: {
|
|
273
274
|
image: string;
|
|
274
275
|
video: string;
|
|
275
276
|
audio: string;
|
|
276
277
|
podcast: string;
|
|
277
278
|
concept: string;
|
|
279
|
+
h5p: string;
|
|
280
|
+
external: string;
|
|
278
281
|
};
|
|
279
282
|
};
|
|
280
283
|
common: {
|
|
@@ -1236,6 +1239,7 @@ declare const messages: {
|
|
|
1236
1239
|
close: string;
|
|
1237
1240
|
};
|
|
1238
1241
|
readMoreDescriptionLabel: string;
|
|
1242
|
+
readLessDescriptionLabel: string;
|
|
1239
1243
|
};
|
|
1240
1244
|
h5p: {
|
|
1241
1245
|
reuse: string;
|
|
@@ -967,7 +967,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
967
967
|
heading: 'Teakstavearšuvdna',
|
|
968
968
|
close: 'Govčča teakstavearšuvnna'
|
|
969
969
|
},
|
|
970
|
-
readMoreDescriptionLabel: 'Čájet eanet'
|
|
970
|
+
readMoreDescriptionLabel: 'Čájet eanet',
|
|
971
|
+
readLessDescriptionLabel: 'vis mindre'
|
|
971
972
|
},
|
|
972
973
|
h5p: {
|
|
973
974
|
reuse: 'Geavat H5P',
|
|
@@ -1257,12 +1258,15 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1257
1258
|
conceptListError: 'Ii sáhttán čájehit čilgehuslisttu',
|
|
1258
1259
|
linkError: 'Ii sáhttán čájehit liŋkka.',
|
|
1259
1260
|
unsupported: "Embed {{type}} ii dorjojuvvo.",
|
|
1261
|
+
embedError: "Orsak, ein feil oppstod ved lasting av {{type}}. Pr\xF8v \xE5 laste inn sida p\xE5 nytt.",
|
|
1260
1262
|
type: {
|
|
1261
1263
|
image: 'Bilde',
|
|
1262
1264
|
video: 'Video',
|
|
1263
1265
|
audio: 'Lyd',
|
|
1264
1266
|
podcast: 'Podkast',
|
|
1265
|
-
concept: 'Forklaring'
|
|
1267
|
+
concept: 'Forklaring',
|
|
1268
|
+
h5p: 'H5P',
|
|
1269
|
+
external: 'Ekstern ressurs'
|
|
1266
1270
|
}
|
|
1267
1271
|
}
|
|
1268
1272
|
});
|
|
@@ -269,12 +269,15 @@ declare const messages: {
|
|
|
269
269
|
conceptListError: string;
|
|
270
270
|
linkError: string;
|
|
271
271
|
unsupported: string;
|
|
272
|
+
embedError: string;
|
|
272
273
|
type: {
|
|
273
274
|
image: string;
|
|
274
275
|
video: string;
|
|
275
276
|
audio: string;
|
|
276
277
|
podcast: string;
|
|
277
278
|
concept: string;
|
|
279
|
+
h5p: string;
|
|
280
|
+
external: string;
|
|
278
281
|
};
|
|
279
282
|
};
|
|
280
283
|
common: {
|
|
@@ -1236,6 +1239,7 @@ declare const messages: {
|
|
|
1236
1239
|
close: string;
|
|
1237
1240
|
};
|
|
1238
1241
|
readMoreDescriptionLabel: string;
|
|
1242
|
+
readLessDescriptionLabel: string;
|
|
1239
1243
|
};
|
|
1240
1244
|
h5p: {
|
|
1241
1245
|
reuse: string;
|
|
@@ -967,7 +967,8 @@ var messages = _objectSpread(_objectSpread({
|
|
|
967
967
|
heading: 'Teeksteversjovne',
|
|
968
968
|
close: 'Dahph teeksteversjovnem'
|
|
969
969
|
},
|
|
970
|
-
readMoreDescriptionLabel: 'vis mer'
|
|
970
|
+
readMoreDescriptionLabel: 'vis mer',
|
|
971
|
+
readLessDescriptionLabel: 'vis mindre'
|
|
971
972
|
},
|
|
972
973
|
h5p: {
|
|
973
974
|
reuse: 'Bruk H5P',
|
|
@@ -1257,12 +1258,15 @@ var messages = _objectSpread(_objectSpread({
|
|
|
1257
1258
|
conceptListError: 'Klarte ikkje å vise forklaringsliste',
|
|
1258
1259
|
linkError: 'Klarte ikkje å vise lenke.',
|
|
1259
1260
|
unsupported: "Embed {{type}} er ikkje st\xF8tta.",
|
|
1261
|
+
embedError: "Orsak, ein feil oppstod ved lasting av {{type}}. Pr\xF8v \xE5 laste inn sida p\xE5 nytt.",
|
|
1260
1262
|
type: {
|
|
1261
1263
|
image: 'Bilde',
|
|
1262
1264
|
video: 'Video',
|
|
1263
1265
|
audio: 'Lyd',
|
|
1264
1266
|
podcast: 'Podkast',
|
|
1265
|
-
concept: 'Forklaring'
|
|
1267
|
+
concept: 'Forklaring',
|
|
1268
|
+
h5p: 'H5P',
|
|
1269
|
+
external: 'Ekstern ressurs'
|
|
1266
1270
|
}
|
|
1267
1271
|
}
|
|
1268
1272
|
});
|
|
@@ -33,3 +33,4 @@ export declare const RESOURCE_TYPE_EXTERNAL_LEARNING_RESOURCES = "urn:resourcety
|
|
|
33
33
|
export declare const RESOURCE_TYPE_SOURCE_MATERIAL = "urn:resourcetype:SourceMaterial";
|
|
34
34
|
export declare const ListOfContentTypes: string[];
|
|
35
35
|
export declare const contentTypeMapping: Record<string, string>;
|
|
36
|
+
export declare const resourceTypeMapping: Record<string, string>;
|
package/lib/model/ContentType.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.contentTypes = exports.contentTypeMapping = exports.TOPIC = exports.TASKS_AND_ACTIVITIES = exports.SUBJECT_MATERIAL = exports.SUBJECT = exports.SOURCE_MATERIAL = exports.RESOURCE_TYPE_TASKS_AND_ACTIVITIES = exports.RESOURCE_TYPE_SUBJECT_MATERIAL = exports.RESOURCE_TYPE_SOURCE_MATERIAL = exports.RESOURCE_TYPE_LEARNING_PATH = exports.RESOURCE_TYPE_EXTERNAL_LEARNING_RESOURCES = exports.RESOURCE_TYPE_ASSESSMENT_RESOURCES = exports.MULTIDISCIPLINARY_TOPIC = exports.ListOfContentTypes = exports.LEARNING_PATH = exports.EXTERNAL_LEARNING_RESOURCES = exports.ASSESSMENT_RESOURCES = void 0;
|
|
6
|
+
exports.resourceTypeMapping = exports.contentTypes = exports.contentTypeMapping = exports.TOPIC = exports.TASKS_AND_ACTIVITIES = exports.SUBJECT_MATERIAL = exports.SUBJECT = exports.SOURCE_MATERIAL = exports.RESOURCE_TYPE_TASKS_AND_ACTIVITIES = exports.RESOURCE_TYPE_SUBJECT_MATERIAL = exports.RESOURCE_TYPE_SOURCE_MATERIAL = exports.RESOURCE_TYPE_LEARNING_PATH = exports.RESOURCE_TYPE_EXTERNAL_LEARNING_RESOURCES = exports.RESOURCE_TYPE_ASSESSMENT_RESOURCES = exports.MULTIDISCIPLINARY_TOPIC = exports.ListOfContentTypes = exports.LEARNING_PATH = exports.EXTERNAL_LEARNING_RESOURCES = exports.ASSESSMENT_RESOURCES = void 0;
|
|
7
7
|
var _contentTypeMapping;
|
|
8
8
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
9
9
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -62,4 +62,11 @@ exports.RESOURCE_TYPE_SOURCE_MATERIAL = RESOURCE_TYPE_SOURCE_MATERIAL;
|
|
|
62
62
|
var ListOfContentTypes = ['SUBJECT_MATERIAL', 'TASKS_AND_ACTIVITIES', 'ASSESSMENT_RESOURCES', 'SUBJECT', 'EXTERNAL_LEARNING_RESOURCES', 'SOURCE_MATERIAL', 'LEARNING_PATH', 'TOPIC', 'MULTIDISIPLINARY_TOPIC'];
|
|
63
63
|
exports.ListOfContentTypes = ListOfContentTypes;
|
|
64
64
|
var contentTypeMapping = (_contentTypeMapping = {}, _defineProperty(_contentTypeMapping, RESOURCE_TYPE_LEARNING_PATH, LEARNING_PATH), _defineProperty(_contentTypeMapping, RESOURCE_TYPE_SUBJECT_MATERIAL, SUBJECT_MATERIAL), _defineProperty(_contentTypeMapping, RESOURCE_TYPE_TASKS_AND_ACTIVITIES, TASKS_AND_ACTIVITIES), _defineProperty(_contentTypeMapping, RESOURCE_TYPE_ASSESSMENT_RESOURCES, ASSESSMENT_RESOURCES), _defineProperty(_contentTypeMapping, RESOURCE_TYPE_EXTERNAL_LEARNING_RESOURCES, EXTERNAL_LEARNING_RESOURCES), _defineProperty(_contentTypeMapping, RESOURCE_TYPE_SOURCE_MATERIAL, SOURCE_MATERIAL), _defineProperty(_contentTypeMapping, "default", SUBJECT_MATERIAL), _contentTypeMapping);
|
|
65
|
-
exports.contentTypeMapping = contentTypeMapping;
|
|
65
|
+
exports.contentTypeMapping = contentTypeMapping;
|
|
66
|
+
var resourceTypeMapping = {
|
|
67
|
+
image: 'image',
|
|
68
|
+
video: 'video',
|
|
69
|
+
concept: 'concept',
|
|
70
|
+
audio: 'audio'
|
|
71
|
+
};
|
|
72
|
+
exports.resourceTypeMapping = resourceTypeMapping;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "37.0.1",
|
|
4
4
|
"description": "UI component library for NDLA.",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -31,22 +31,22 @@
|
|
|
31
31
|
"types"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
+
"@ndla/accordion": "^2.2.0",
|
|
34
35
|
"@ndla/article-scripts": "^3.0.17",
|
|
35
|
-
"@ndla/button": "^10.0
|
|
36
|
-
"@ndla/carousel": "^3.0
|
|
37
|
-
"@ndla/core": "^
|
|
38
|
-
"@ndla/forms": "^4.
|
|
36
|
+
"@ndla/button": "^10.1.0",
|
|
37
|
+
"@ndla/carousel": "^3.1.0",
|
|
38
|
+
"@ndla/core": "^4.0.0",
|
|
39
|
+
"@ndla/forms": "^4.3.0",
|
|
39
40
|
"@ndla/hooks": "^2.0.4",
|
|
40
|
-
"@ndla/icons": "^2.
|
|
41
|
+
"@ndla/icons": "^2.3.0",
|
|
41
42
|
"@ndla/licenses": "^7.0.4",
|
|
42
|
-
"@ndla/modal": "^2.
|
|
43
|
-
"@ndla/notion": "^4.
|
|
44
|
-
"@ndla/safelink": "^4.0
|
|
45
|
-
"@ndla/switch": "^1.0
|
|
46
|
-
"@ndla/tabs": "^2.
|
|
47
|
-
"@ndla/tooltip": "^4.0
|
|
43
|
+
"@ndla/modal": "^2.3.0",
|
|
44
|
+
"@ndla/notion": "^4.3.0",
|
|
45
|
+
"@ndla/safelink": "^4.1.0",
|
|
46
|
+
"@ndla/switch": "^1.1.0",
|
|
47
|
+
"@ndla/tabs": "^2.2.0",
|
|
48
|
+
"@ndla/tooltip": "^4.1.0",
|
|
48
49
|
"@ndla/util": "^3.1.12",
|
|
49
|
-
"@radix-ui/react-accordion": "1.1.0",
|
|
50
50
|
"@radix-ui/react-dropdown-menu": "2.0.2",
|
|
51
51
|
"@radix-ui/react-popover": "^1.0.3",
|
|
52
52
|
"@reach/menu-button": "^0.16.2",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@babel/plugin-proposal-optional-chaining": "^7.11.0",
|
|
77
77
|
"@ndla/types-backend": "^0.2.5",
|
|
78
|
-
"@ndla/types-embed": "^
|
|
78
|
+
"@ndla/types-embed": "^2.0.1",
|
|
79
79
|
"@types/reach__dialog": "^0.1.0",
|
|
80
80
|
"css-loader": "^6.7.3",
|
|
81
81
|
"mini-css-extract-plugin": "^2.7.5",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "38258e7be60bc71be478fe407775f43bfa505d7b"
|
|
90
90
|
}
|
package/src/Article/Article.tsx
CHANGED
|
@@ -16,7 +16,6 @@ import { useIntersectionObserver } from '@ndla/hooks';
|
|
|
16
16
|
import { resizeObserver } from '@ndla/util';
|
|
17
17
|
import { spacing, spacingUnit, mq, breakpoints } from '@ndla/core';
|
|
18
18
|
import { Article as ArticleType, Locale } from '../types';
|
|
19
|
-
import ArticleFootNotes from './ArticleFootNotes';
|
|
20
19
|
import ArticleContent from './ArticleContent';
|
|
21
20
|
import ArticleByline from './ArticleByline';
|
|
22
21
|
import LayoutItem from '../Layout';
|
|
@@ -126,14 +125,12 @@ type Props = {
|
|
|
126
125
|
contentTransformed?: boolean;
|
|
127
126
|
locale: Locale;
|
|
128
127
|
messageBoxLinks?: [];
|
|
129
|
-
copyText?: string;
|
|
130
128
|
competenceGoals?:
|
|
131
129
|
| ((inp: { Dialog: ComponentType; dialogProps: { isOpen: boolean; onClose: () => void } }) => ReactNode)
|
|
132
130
|
| ReactNode
|
|
133
131
|
| null;
|
|
134
132
|
id: string;
|
|
135
133
|
renderMarkdown: (text: string) => string;
|
|
136
|
-
printUrl?: string;
|
|
137
134
|
notions?: { list: ConceptNotionType[]; related: NotionRelatedContent[] };
|
|
138
135
|
accessMessage?: string;
|
|
139
136
|
};
|
|
@@ -165,11 +162,9 @@ export const Article = ({
|
|
|
165
162
|
id,
|
|
166
163
|
locale,
|
|
167
164
|
notions,
|
|
168
|
-
printUrl,
|
|
169
165
|
renderMarkdown,
|
|
170
166
|
accessMessage,
|
|
171
167
|
heartButton,
|
|
172
|
-
copyText,
|
|
173
168
|
contentTransformed,
|
|
174
169
|
}: Props) => {
|
|
175
170
|
const articleRef = useRef<HTMLDivElement>(null);
|
|
@@ -241,15 +236,13 @@ export const Article = ({
|
|
|
241
236
|
</LayoutItem>
|
|
242
237
|
|
|
243
238
|
<LayoutItem layout="center">
|
|
244
|
-
{footNotes && footNotes.length > 0 && <ArticleFootNotes footNotes={footNotes} />}
|
|
245
239
|
<ArticleByline
|
|
246
|
-
|
|
240
|
+
footnotes={footNotes}
|
|
247
241
|
authors={authors}
|
|
248
242
|
suppliers={rightsholders}
|
|
249
243
|
published={published}
|
|
250
244
|
license={licenseObj?.license ?? ''}
|
|
251
245
|
licenseBox={licenseBox}
|
|
252
|
-
printUrl={printUrl}
|
|
253
246
|
/>
|
|
254
247
|
</LayoutItem>
|
|
255
248
|
<LayoutItem layout="extend">{children}</LayoutItem>
|