@ndla/ui 3.3.11 → 3.3.15
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/Figure/Figure.js +3 -1
- package/es/Filter/FilterButtons.js +11 -13
- package/es/Frontpage/FrontpageAllSubjects.js +7 -7
- package/es/Frontpage/FrontpageSearch.js +2 -4
- package/es/LearningPaths/LearningPathMenu.js +4 -5
- package/es/LearningPaths/LearningPathMobileHeader.js +4 -5
- package/es/NDLAFilm/AboutNdlaFilm.js +6 -17
- package/es/NDLAFilm/AllMoviesAlphabetically.js +11 -11
- package/es/NDLAFilm/CategorySelect.js +17 -18
- package/es/NDLAFilm/FilmContentCard.js +8 -22
- package/es/NDLAFilm/FilmContentCardTags.js +4 -8
- package/es/NDLAFilm/FilmMovieList.js +6 -21
- package/es/NDLAFilm/FilmMovieSearch.js +18 -26
- package/es/NDLAFilm/MovieGrid.js +10 -19
- package/es/NDLAFilm/VisualElement.js +22 -29
- package/es/Search/SearchResultSleeve.js +12 -15
- package/es/SearchTypeResult/SearchFieldHeader.js +5 -5
- package/es/SearchTypeResult/SearchHeader.js +9 -9
- package/es/SearchTypeResult/SearchItem.js +19 -19
- package/es/SearchTypeResult/SearchNotionItem.js +12 -12
- package/es/TopicIntroductionList/TopicIntroduction.js +14 -33
- package/es/TopicIntroductionList/TopicIntroductionList.js +6 -23
- package/es/TopicIntroductionList/TopicIntroductionShortcuts.js +71 -110
- package/es/TopicIntroductionList/TopicShortcutItem.js +0 -9
- package/es/all.css +1 -4
- package/es/index-javascript.js +1 -5
- package/es/index.js +4 -0
- package/es/shapes.js +0 -6
- package/lib/Figure/Figure.js +3 -1
- package/lib/Filter/FilterButtons.js +9 -9
- package/lib/Frontpage/FrontpageAllSubjects.d.ts +1 -1
- package/lib/Frontpage/FrontpageAllSubjects.js +7 -7
- package/lib/Frontpage/FrontpageSearch.d.ts +3 -5
- package/lib/Frontpage/FrontpageSearch.js +2 -4
- package/lib/LearningPaths/LearningPathMenu.js +3 -3
- package/lib/LearningPaths/LearningPathMobileHeader.js +4 -5
- package/lib/NDLAFilm/AboutNdlaFilm.d.ts +15 -0
- package/lib/NDLAFilm/AboutNdlaFilm.js +6 -18
- package/lib/NDLAFilm/AllMoviesAlphabetically.d.ts +2 -2
- package/lib/NDLAFilm/AllMoviesAlphabetically.js +11 -11
- package/lib/NDLAFilm/CategorySelect.d.ts +11 -0
- package/lib/NDLAFilm/CategorySelect.js +20 -19
- package/lib/NDLAFilm/FilmContentCard.d.ts +11 -0
- package/lib/NDLAFilm/FilmContentCard.js +8 -23
- package/lib/NDLAFilm/FilmContentCardTags.d.ts +7 -0
- package/lib/NDLAFilm/FilmContentCardTags.js +4 -9
- package/lib/NDLAFilm/FilmMovieList.d.ts +19 -0
- package/lib/NDLAFilm/FilmMovieList.js +5 -21
- package/lib/NDLAFilm/FilmMovieSearch.d.ts +21 -0
- package/lib/NDLAFilm/FilmMovieSearch.js +25 -30
- package/lib/NDLAFilm/FilmSlideshow.d.ts +5 -5
- package/lib/NDLAFilm/MovieGrid.d.ts +13 -0
- package/lib/NDLAFilm/MovieGrid.js +9 -21
- package/lib/NDLAFilm/SlideshowIndicator.d.ts +2 -2
- package/lib/NDLAFilm/VisualElement.d.ts +16 -0
- package/lib/NDLAFilm/VisualElement.js +22 -30
- package/lib/NDLAFilm/index.d.ts +14 -0
- package/lib/NDLAFilm/types.d.ts +6 -4
- package/lib/Search/SearchResultSleeve.d.ts +4 -6
- package/lib/Search/SearchResultSleeve.js +10 -11
- package/lib/SearchTypeResult/SearchFieldHeader.d.ts +3 -3
- package/lib/SearchTypeResult/SearchFieldHeader.js +5 -5
- package/lib/SearchTypeResult/SearchHeader.d.ts +3 -3
- package/lib/SearchTypeResult/SearchHeader.js +9 -9
- package/lib/SearchTypeResult/SearchItem.d.ts +2 -3
- package/lib/SearchTypeResult/SearchItem.js +19 -19
- package/lib/SearchTypeResult/SearchNotionItem.d.ts +1 -1
- package/lib/SearchTypeResult/SearchNotionItem.js +12 -12
- package/lib/SearchTypeResult/index.d.ts +1 -0
- package/lib/TopicIntroductionList/TopicIntroduction.d.ts +21 -0
- package/lib/TopicIntroductionList/TopicIntroduction.js +16 -36
- package/lib/TopicIntroductionList/TopicIntroductionList.d.ts +35 -0
- package/lib/TopicIntroductionList/TopicIntroductionList.js +6 -25
- package/lib/TopicIntroductionList/TopicIntroductionShortcuts.d.ts +8 -0
- package/lib/TopicIntroductionList/TopicIntroductionShortcuts.js +72 -110
- package/lib/TopicIntroductionList/TopicShortcutItem.d.ts +6 -0
- package/lib/TopicIntroductionList/TopicShortcutItem.js +0 -11
- package/lib/TopicIntroductionList/index.d.ts +9 -0
- package/lib/all.css +1 -4
- package/lib/index-javascript.js +3 -137
- package/lib/index.d.ts +4 -0
- package/lib/index.js +155 -0
- package/lib/shapes.js +1 -10
- package/lib/types.d.ts +2 -2
- package/package.json +10 -10
- package/src/Figure/Figure.tsx +2 -1
- package/src/Figure/component.figure.scss +37 -3
- package/src/Filter/FilterButtons.tsx +0 -2
- package/src/Frontpage/FrontpageAllSubjects.tsx +2 -2
- package/src/Frontpage/FrontpageSearch.tsx +3 -7
- package/src/LearningPaths/LearningPathMenu.tsx +0 -1
- package/src/LearningPaths/LearningPathMobileHeader.tsx +1 -2
- package/src/NDLAFilm/{AboutNdlaFilm.jsx → AboutNdlaFilm.tsx} +19 -18
- package/src/NDLAFilm/AllMoviesAlphabetically.tsx +3 -3
- package/src/NDLAFilm/{CategorySelect.jsx → CategorySelect.tsx} +23 -20
- package/src/NDLAFilm/{FilmContentCard.jsx → FilmContentCard.tsx} +21 -21
- package/src/NDLAFilm/{FilmContentCardTags.jsx → FilmContentCardTags.tsx} +7 -7
- package/src/NDLAFilm/{FilmMovieList.jsx → FilmMovieList.tsx} +17 -27
- package/src/NDLAFilm/FilmMovieSearch.tsx +71 -0
- package/src/NDLAFilm/FilmSlideshow.tsx +6 -6
- package/src/NDLAFilm/MovieGrid.tsx +76 -0
- package/src/NDLAFilm/SlideshowIndicator.tsx +2 -2
- package/src/NDLAFilm/VisualElement.tsx +40 -0
- package/src/NDLAFilm/{index.js → index.ts} +0 -0
- package/src/NDLAFilm/types.ts +7 -4
- package/src/Search/SearchResultSleeve.tsx +7 -19
- package/src/SearchTypeResult/SearchFieldHeader.tsx +3 -3
- package/src/SearchTypeResult/SearchHeader.tsx +3 -3
- package/src/SearchTypeResult/SearchItem.tsx +4 -5
- package/src/SearchTypeResult/SearchNotionItem.tsx +1 -1
- package/src/SearchTypeResult/index.ts +2 -0
- package/src/TopicIntroductionList/{TopicIntroduction.jsx → TopicIntroduction.tsx} +22 -35
- package/src/TopicIntroductionList/{TopicIntroductionList.jsx → TopicIntroductionList.tsx} +32 -26
- package/src/TopicIntroductionList/TopicIntroductionShortcuts.tsx +71 -0
- package/src/TopicIntroductionList/{TopicShortcutItem.jsx → TopicShortcutItem.tsx} +5 -13
- package/src/TopicIntroductionList/{index.js → index.ts} +0 -0
- package/src/index-javascript.js +0 -30
- package/src/index.ts +31 -0
- package/src/shapes.js +0 -7
- package/src/types.ts +2 -2
- package/es/NDLAFilm/interfaces.js +0 -0
- package/es/NDLAFilm/shapes.js +0 -15
- package/lib/NDLAFilm/interfaces.d.ts +0 -10
- package/lib/NDLAFilm/interfaces.js +0 -1
- package/lib/NDLAFilm/shapes.d.ts +0 -15
- package/lib/NDLAFilm/shapes.js +0 -30
- package/src/NDLAFilm/FilmMovieSearch.jsx +0 -66
- package/src/NDLAFilm/MovieGrid.jsx +0 -75
- package/src/NDLAFilm/VisualElement.jsx +0 -48
- package/src/NDLAFilm/interfaces.ts +0 -10
- package/src/NDLAFilm/shapes.ts +0 -17
- package/src/TopicIntroductionList/TopicIntroductionShortcuts.jsx +0 -92
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { MovieType } from './types';
|
|
9
9
|
interface Props {
|
|
10
|
-
slideshow:
|
|
10
|
+
slideshow: MovieType[];
|
|
11
11
|
activeSlide: number;
|
|
12
12
|
gotoSlide: (indexTarget: number, useAnimation: boolean) => void;
|
|
13
13
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2019-present, NDLA.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
interface Props {
|
|
9
|
+
visualElement: {
|
|
10
|
+
alt?: string;
|
|
11
|
+
url: string;
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
declare const VisualElement: ({ visualElement }: Props) => JSX.Element | null;
|
|
16
|
+
export default VisualElement;
|
|
@@ -9,9 +9,7 @@ var _styledBase = _interopRequireDefault(require("@emotion/styled-base"));
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _ui = require("@ndla/ui");
|
|
12
|
+
var _Image = _interopRequireDefault(require("../Image"));
|
|
15
13
|
|
|
16
14
|
var _core = require("@emotion/core");
|
|
17
15
|
|
|
@@ -20,7 +18,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
20
18
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
21
19
|
|
|
22
20
|
var StylediFrame = (0, _styledBase["default"])("iframe", {
|
|
23
|
-
target: "
|
|
21
|
+
target: "evqj21c0",
|
|
24
22
|
label: "StylediFrame"
|
|
25
23
|
})(process.env.NODE_ENV === "production" ? {
|
|
26
24
|
name: "j04t3l",
|
|
@@ -28,39 +26,33 @@ var StylediFrame = (0, _styledBase["default"])("iframe", {
|
|
|
28
26
|
} : {
|
|
29
27
|
name: "j04t3l",
|
|
30
28
|
styles: "height:100%;width:100%;border:0;margin:0;padding:0;",
|
|
31
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
29
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlZpc3VhbEVsZW1lbnQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVlrQyIsImZpbGUiOiJWaXN1YWxFbGVtZW50LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSAyMDE5LXByZXNlbnQsIE5ETEEuXG4gKlxuICogVGhpcyBzb3VyY2UgY29kZSBpcyBsaWNlbnNlZCB1bmRlciB0aGUgR1BMdjMgbGljZW5zZSBmb3VuZCBpbiB0aGVcbiAqIExJQ0VOU0UgZmlsZSBpbiB0aGUgcm9vdCBkaXJlY3Rvcnkgb2YgdGhpcyBzb3VyY2UgdHJlZS5cbiAqXG4gKi9cblxuaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCBJbWFnZSBmcm9tICcuLi9JbWFnZSc7XG5cbmNvbnN0IFN0eWxlZGlGcmFtZSA9IHN0eWxlZC5pZnJhbWVgXG4gIGhlaWdodDogMTAwJTtcbiAgd2lkdGg6IDEwMCU7XG4gIGJvcmRlcjogMDtcbiAgbWFyZ2luOiAwO1xuICBwYWRkaW5nOiAwO1xuYDtcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgdmlzdWFsRWxlbWVudDoge1xuICAgIGFsdD86IHN0cmluZztcbiAgICB1cmw6IHN0cmluZztcbiAgICB0eXBlOiBzdHJpbmc7XG4gIH07XG59XG5jb25zdCBWaXN1YWxFbGVtZW50ID0gKHsgdmlzdWFsRWxlbWVudCB9OiBQcm9wcykgPT4ge1xuICBjb25zdCB7IHR5cGUsIHVybCwgYWx0IH0gPSB2aXN1YWxFbGVtZW50O1xuICBpZiAodHlwZSA9PT0gJ2ltYWdlJykge1xuICAgIHJldHVybiA8SW1hZ2Ugc3JjPXt1cmx9IGFsdD17YWx0ID8/ICcnfSAvPjtcbiAgfSBlbHNlIGlmICh0eXBlID09PSAnYnJpZ2h0Y292ZScpIHtcbiAgICAvL0B0cy1pZ25vcmUgcmVhY3QgZG9lcyBub3QgcmVjb2duaXplIGZ1bGxzY3JlZW4gcHJvcGVydGllcy5cbiAgICByZXR1cm4gPFN0eWxlZGlGcmFtZSBhbGxvd2Z1bGxzY3JlZW49XCJ0cnVlXCIgd2Via2l0YWxsb3dmdWxsc2NyZWVuPVwidHJ1ZVwiIG1vemFsbG93ZnVsbHNjcmVlbj1cInRydWVcIiBzcmM9e3VybH0gLz47XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIG51bGw7XG4gIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IFZpc3VhbEVsZW1lbnQ7XG4iXX0= */",
|
|
32
30
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
33
31
|
});
|
|
34
32
|
|
|
35
33
|
var VisualElement = function VisualElement(_ref) {
|
|
36
34
|
var visualElement = _ref.visualElement;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
35
|
+
var type = visualElement.type,
|
|
36
|
+
url = visualElement.url,
|
|
37
|
+
alt = visualElement.alt;
|
|
38
|
+
|
|
39
|
+
if (type === 'image') {
|
|
40
|
+
return (0, _core.jsx)(_Image["default"], {
|
|
41
|
+
src: url,
|
|
42
|
+
alt: alt !== null && alt !== void 0 ? alt : ''
|
|
43
|
+
});
|
|
44
|
+
} else if (type === 'brightcove') {
|
|
45
|
+
//@ts-ignore react does not recognize fullscreen properties.
|
|
46
|
+
return (0, _core.jsx)(StylediFrame, {
|
|
47
|
+
allowfullscreen: "true",
|
|
48
|
+
webkitallowfullscreen: "true",
|
|
49
|
+
mozallowfullscreen: "true",
|
|
50
|
+
src: url
|
|
51
|
+
});
|
|
52
|
+
} else {
|
|
53
|
+
return null;
|
|
55
54
|
}
|
|
56
55
|
};
|
|
57
56
|
|
|
58
|
-
VisualElement.propTypes = {
|
|
59
|
-
visualElement: _propTypes["default"].shape({
|
|
60
|
-
url: _propTypes["default"].string,
|
|
61
|
-
alt: _propTypes["default"].string,
|
|
62
|
-
type: _propTypes["default"].string
|
|
63
|
-
}).isRequired
|
|
64
|
-
};
|
|
65
57
|
var _default = VisualElement;
|
|
66
58
|
exports["default"] = _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2018-present, NDLA.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import FilmSlideshow from './FilmSlideshow';
|
|
9
|
+
import MovieGrid from './MovieGrid';
|
|
10
|
+
import AboutNdlaFilm from './AboutNdlaFilm';
|
|
11
|
+
import FilmMovieSearch from './FilmMovieSearch';
|
|
12
|
+
import FilmMovieList from './FilmMovieList';
|
|
13
|
+
import AllMoviesAlphabetically from './AllMoviesAlphabetically';
|
|
14
|
+
export { FilmSlideshow, MovieGrid, AboutNdlaFilm, FilmMovieSearch, FilmMovieList, AllMoviesAlphabetically };
|
package/lib/NDLAFilm/types.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface MovieType {
|
|
2
2
|
id: string;
|
|
3
3
|
metaDescription: string;
|
|
4
|
+
resourceTypes: MovieResourceType[];
|
|
4
5
|
metaImage: {
|
|
5
6
|
alt: string;
|
|
6
7
|
url: string;
|
|
7
8
|
};
|
|
8
|
-
movieTypes: {
|
|
9
|
-
[key: string]: boolean;
|
|
10
|
-
};
|
|
11
9
|
path: string;
|
|
12
10
|
title: string;
|
|
13
11
|
}
|
|
12
|
+
export interface MovieResourceType {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { History } from 'history';
|
|
3
2
|
import { ContentTypeResultType, Resource } from '../types';
|
|
4
3
|
declare type Props = {
|
|
5
4
|
result: Array<ContentTypeResultType>;
|
|
@@ -8,14 +7,13 @@ declare type Props = {
|
|
|
8
7
|
to: string;
|
|
9
8
|
};
|
|
10
9
|
onNavigate?: VoidFunction;
|
|
11
|
-
infoText
|
|
12
|
-
ignoreContentTypeBadge
|
|
10
|
+
infoText?: string;
|
|
11
|
+
ignoreContentTypeBadge?: boolean;
|
|
13
12
|
searchString: string;
|
|
14
13
|
loading: boolean;
|
|
15
14
|
frontpage?: boolean;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
suggestionUrl: string;
|
|
15
|
+
suggestion?: string;
|
|
16
|
+
suggestionUrl?: string;
|
|
19
17
|
};
|
|
20
18
|
declare const SearchResultSleeve: React.FC<Props>;
|
|
21
19
|
export default SearchResultSleeve;
|