@ndla/video-search 2.1.21 → 2.1.22
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/PreviewVideo.js +3 -3
- package/es/VideoLoadMoreButton.js +2 -2
- package/es/VideoSearchForm.js +3 -3
- package/es/VideoSearchResultBrightcove.js +4 -4
- package/es/VideoSearchResultYouTube.js +4 -4
- package/lib/PreviewVideo.js +3 -3
- package/lib/VideoLoadMoreButton.js +2 -2
- package/lib/VideoSearchForm.js +3 -3
- package/lib/VideoSearchResultBrightcove.js +4 -4
- package/lib/VideoSearchResultYouTube.js +4 -4
- package/package.json +3 -3
package/es/PreviewVideo.js
CHANGED
|
@@ -12,7 +12,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import PropTypes from 'prop-types';
|
|
14
14
|
import BEMHelper from 'react-bem-helper';
|
|
15
|
-
import
|
|
15
|
+
import { ButtonV2 } from '@ndla/button';
|
|
16
16
|
import { Cross } from '@ndla/icons/action';
|
|
17
17
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
18
18
|
import { jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
@@ -24,8 +24,8 @@ export default function PreviewVideo(_ref) {
|
|
|
24
24
|
var onVideoPreview = _ref.onVideoPreview,
|
|
25
25
|
children = _ref.children;
|
|
26
26
|
return _jsxs("div", _objectSpread(_objectSpread({}, classes()), {}, {
|
|
27
|
-
children: [_jsx(
|
|
28
|
-
|
|
27
|
+
children: [_jsx(ButtonV2, _objectSpread(_objectSpread({}, classes('close')), {}, {
|
|
28
|
+
variant: "stripped",
|
|
29
29
|
onClick: function onClick() {
|
|
30
30
|
return onVideoPreview(undefined);
|
|
31
31
|
},
|
|
@@ -12,7 +12,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import PropTypes from 'prop-types';
|
|
14
14
|
import BEMHelper from 'react-bem-helper';
|
|
15
|
-
import
|
|
15
|
+
import { ButtonV2 } from '@ndla/button';
|
|
16
16
|
import { BrightcoveShape, YouTubeShape } from './shapes';
|
|
17
17
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
18
18
|
var classes = new BEMHelper({
|
|
@@ -29,7 +29,7 @@ var VideoLoadMoreButton = function VideoLoadMoreButton(props) {
|
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
31
|
return _jsx("div", _objectSpread(_objectSpread({}, classes('load-videos')), {}, {
|
|
32
|
-
children: _jsx(
|
|
32
|
+
children: _jsx(ButtonV2, {
|
|
33
33
|
disabled: searching,
|
|
34
34
|
onClick: loadMoreVideos,
|
|
35
35
|
children: searching ? _jsx("div", _objectSpread({}, classes('spinner'))) : translations.loadMoreVideos
|
package/es/VideoSearchForm.js
CHANGED
|
@@ -22,7 +22,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
22
22
|
|
|
23
23
|
import React, { Component } from 'react';
|
|
24
24
|
import PropTypes from 'prop-types';
|
|
25
|
-
import
|
|
25
|
+
import { ButtonV2 } from '@ndla/button';
|
|
26
26
|
import BEMHelper from 'react-bem-helper';
|
|
27
27
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
28
28
|
import { jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
@@ -78,9 +78,9 @@ var SearchForm = /*#__PURE__*/function (_Component) {
|
|
|
78
78
|
onKeyPress: this.onKeyPress,
|
|
79
79
|
value: this.state.query,
|
|
80
80
|
placeholder: translations.searchPlaceholder
|
|
81
|
-
})), _jsx(
|
|
81
|
+
})), _jsx(ButtonV2, _objectSpread(_objectSpread({}, classes('form-button')), {}, {
|
|
82
82
|
onClick: this.handleSubmit,
|
|
83
|
-
|
|
83
|
+
disabled: searching,
|
|
84
84
|
children: translations.searchButtonTitle
|
|
85
85
|
}))]
|
|
86
86
|
}));
|
|
@@ -11,7 +11,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
11
11
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import PropTypes from 'prop-types';
|
|
14
|
-
import
|
|
14
|
+
import { ButtonV2 } from '@ndla/button';
|
|
15
15
|
import { getLicenseByNBTitle } from '@ndla/licenses';
|
|
16
16
|
import { LicenseByline } from '@ndla/notion';
|
|
17
17
|
import { PanoramaPhotosphere } from '@ndla/icons/common';
|
|
@@ -51,13 +51,13 @@ export default function VideoSearchResultBrightcove(_ref) {
|
|
|
51
51
|
licenseRights: license.rights,
|
|
52
52
|
locale: locale
|
|
53
53
|
}) : license
|
|
54
|
-
})), _jsx(
|
|
55
|
-
|
|
54
|
+
})), _jsx(ButtonV2, _objectSpread(_objectSpread({}, classes('button')), {}, {
|
|
55
|
+
variant: "outline",
|
|
56
56
|
onClick: function onClick() {
|
|
57
57
|
return onVideoPreview(video);
|
|
58
58
|
},
|
|
59
59
|
children: translations.previewVideo
|
|
60
|
-
})), _jsx(
|
|
60
|
+
})), _jsx(ButtonV2, _objectSpread(_objectSpread({
|
|
61
61
|
"data-cy": "use-video"
|
|
62
62
|
}, classes('button')), {}, {
|
|
63
63
|
onClick: function onClick() {
|
|
@@ -11,7 +11,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
11
11
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import PropTypes from 'prop-types';
|
|
14
|
-
import
|
|
14
|
+
import { ButtonV2 } from '@ndla/button';
|
|
15
15
|
import BEMHelper from 'react-bem-helper';
|
|
16
16
|
import PreviewVideo from './PreviewVideo';
|
|
17
17
|
import { YouTubeShape } from './shapes';
|
|
@@ -50,13 +50,13 @@ export default function VideoSearchResultYouTube(_ref) {
|
|
|
50
50
|
children: "".concat(translations.interactioncount, ": ").concat(videoData.interactioncount)
|
|
51
51
|
}), _jsx("div", {
|
|
52
52
|
children: videoData.description
|
|
53
|
-
}), _jsx(
|
|
54
|
-
|
|
53
|
+
}), _jsx(ButtonV2, _objectSpread(_objectSpread({}, classes('button')), {}, {
|
|
54
|
+
variant: "outline",
|
|
55
55
|
onClick: function onClick() {
|
|
56
56
|
return onVideoPreview(video);
|
|
57
57
|
},
|
|
58
58
|
children: translations.previewVideo
|
|
59
|
-
})), _jsx(
|
|
59
|
+
})), _jsx(ButtonV2, _objectSpread(_objectSpread({
|
|
60
60
|
"data-cy": "use-video"
|
|
61
61
|
}, classes('button')), {}, {
|
|
62
62
|
onClick: function onClick() {
|
package/lib/PreviewVideo.js
CHANGED
|
@@ -7,7 +7,7 @@ exports["default"] = PreviewVideo;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _reactBemHelper = _interopRequireDefault(require("react-bem-helper"));
|
|
10
|
-
var _button =
|
|
10
|
+
var _button = require("@ndla/button");
|
|
11
11
|
var _action = require("@ndla/icons/action");
|
|
12
12
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -22,8 +22,8 @@ function PreviewVideo(_ref) {
|
|
|
22
22
|
var onVideoPreview = _ref.onVideoPreview,
|
|
23
23
|
children = _ref.children;
|
|
24
24
|
return (0, _jsxRuntime.jsxs)("div", _objectSpread(_objectSpread({}, classes()), {}, {
|
|
25
|
-
children: [(0, _jsxRuntime.jsx)(_button
|
|
26
|
-
|
|
25
|
+
children: [(0, _jsxRuntime.jsx)(_button.ButtonV2, _objectSpread(_objectSpread({}, classes('close')), {}, {
|
|
26
|
+
variant: "stripped",
|
|
27
27
|
onClick: function onClick() {
|
|
28
28
|
return onVideoPreview(undefined);
|
|
29
29
|
},
|
|
@@ -7,7 +7,7 @@ exports["default"] = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _reactBemHelper = _interopRequireDefault(require("react-bem-helper"));
|
|
10
|
-
var _button =
|
|
10
|
+
var _button = require("@ndla/button");
|
|
11
11
|
var _shapes = require("./shapes");
|
|
12
12
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -28,7 +28,7 @@ var VideoLoadMoreButton = function VideoLoadMoreButton(props) {
|
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
30
30
|
return (0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({}, classes('load-videos')), {}, {
|
|
31
|
-
children: (0, _jsxRuntime.jsx)(_button
|
|
31
|
+
children: (0, _jsxRuntime.jsx)(_button.ButtonV2, {
|
|
32
32
|
disabled: searching,
|
|
33
33
|
onClick: loadMoreVideos,
|
|
34
34
|
children: searching ? (0, _jsxRuntime.jsx)("div", _objectSpread({}, classes('spinner'))) : translations.loadMoreVideos
|
package/lib/VideoSearchForm.js
CHANGED
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
-
var _button =
|
|
10
|
+
var _button = require("@ndla/button");
|
|
11
11
|
var _reactBemHelper = _interopRequireDefault(require("react-bem-helper"));
|
|
12
12
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -78,9 +78,9 @@ var SearchForm = /*#__PURE__*/function (_Component) {
|
|
|
78
78
|
onKeyPress: this.onKeyPress,
|
|
79
79
|
value: this.state.query,
|
|
80
80
|
placeholder: translations.searchPlaceholder
|
|
81
|
-
})), (0, _jsxRuntime.jsx)(_button
|
|
81
|
+
})), (0, _jsxRuntime.jsx)(_button.ButtonV2, _objectSpread(_objectSpread({}, classes('form-button')), {}, {
|
|
82
82
|
onClick: this.handleSubmit,
|
|
83
|
-
|
|
83
|
+
disabled: searching,
|
|
84
84
|
children: translations.searchButtonTitle
|
|
85
85
|
}))]
|
|
86
86
|
}));
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = VideoSearchResultBrightcove;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var _button =
|
|
9
|
+
var _button = require("@ndla/button");
|
|
10
10
|
var _licenses = require("@ndla/licenses");
|
|
11
11
|
var _notion = require("@ndla/notion");
|
|
12
12
|
var _common = require("@ndla/icons/common");
|
|
@@ -49,13 +49,13 @@ function VideoSearchResultBrightcove(_ref) {
|
|
|
49
49
|
licenseRights: license.rights,
|
|
50
50
|
locale: locale
|
|
51
51
|
}) : license
|
|
52
|
-
})), (0, _jsxRuntime.jsx)(_button
|
|
53
|
-
|
|
52
|
+
})), (0, _jsxRuntime.jsx)(_button.ButtonV2, _objectSpread(_objectSpread({}, classes('button')), {}, {
|
|
53
|
+
variant: "outline",
|
|
54
54
|
onClick: function onClick() {
|
|
55
55
|
return onVideoPreview(video);
|
|
56
56
|
},
|
|
57
57
|
children: translations.previewVideo
|
|
58
|
-
})), (0, _jsxRuntime.jsx)(_button
|
|
58
|
+
})), (0, _jsxRuntime.jsx)(_button.ButtonV2, _objectSpread(_objectSpread({
|
|
59
59
|
"data-cy": "use-video"
|
|
60
60
|
}, classes('button')), {}, {
|
|
61
61
|
onClick: function onClick() {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = VideoSearchResultYouTube;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var _button =
|
|
9
|
+
var _button = require("@ndla/button");
|
|
10
10
|
var _reactBemHelper = _interopRequireDefault(require("react-bem-helper"));
|
|
11
11
|
var _PreviewVideo = _interopRequireDefault(require("./PreviewVideo"));
|
|
12
12
|
var _shapes = require("./shapes");
|
|
@@ -48,13 +48,13 @@ function VideoSearchResultYouTube(_ref) {
|
|
|
48
48
|
children: "".concat(translations.interactioncount, ": ").concat(videoData.interactioncount)
|
|
49
49
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
50
50
|
children: videoData.description
|
|
51
|
-
}), (0, _jsxRuntime.jsx)(_button
|
|
52
|
-
|
|
51
|
+
}), (0, _jsxRuntime.jsx)(_button.ButtonV2, _objectSpread(_objectSpread({}, classes('button')), {}, {
|
|
52
|
+
variant: "outline",
|
|
53
53
|
onClick: function onClick() {
|
|
54
54
|
return onVideoPreview(video);
|
|
55
55
|
},
|
|
56
56
|
children: translations.previewVideo
|
|
57
|
-
})), (0, _jsxRuntime.jsx)(_button
|
|
57
|
+
})), (0, _jsxRuntime.jsx)(_button.ButtonV2, _objectSpread(_objectSpread({
|
|
58
58
|
"data-cy": "use-video"
|
|
59
59
|
}, classes('button')), {}, {
|
|
60
60
|
onClick: function onClick() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/video-search",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.22",
|
|
4
4
|
"description": "A simple library for searching NDLA videos",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"@ndla/licenses": "^7.0.1",
|
|
34
34
|
"@ndla/notion": "^4.2.4",
|
|
35
35
|
"@ndla/pager": "^2.1.18",
|
|
36
|
-
"@ndla/tabs": "^2.1.
|
|
36
|
+
"@ndla/tabs": "^2.1.8",
|
|
37
37
|
"react-bem-helper": "^1.4.1"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "22850ec146bbc6fe00fe4e29801109edc0acc975"
|
|
43
43
|
}
|