+`;
+
+exports[`LicenseBlurb snapshots snapshots: renders as expected when details.attribution and details.noncommercial equal true 1`] = `
+
+
+
+
+
+
+
+
+`;
+
+exports[`LicenseBlurb snapshots snapshots: renders as expected when details.attribution and details.shareAlike equal true 1`] = `
+
+
+
+
+
+
+
+
+`;
+
+exports[`LicenseBlurb snapshots snapshots: renders as expected when details.attribution equal true 1`] = `
+
+
+
+
+
+
+
+`;
+
+exports[`LicenseBlurb snapshots snapshots: renders as expected with default props 1`] = `
+
+
+
+
+
+
+`;
+
+exports[`LicenseBlurb snapshots snapshots: renders as expected with license equal to Creative Commons 1`] = `
+
+
+
+
+
+
+`;
diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/__snapshots__/LicenseDetails.test.jsx.snap b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/__snapshots__/LicenseDetails.test.jsx.snap
new file mode 100644
index 000000000..4ac890f39
--- /dev/null
+++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/__snapshots__/LicenseDetails.test.jsx.snap
@@ -0,0 +1,179 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`LicenseDetails snapshots snapshots: renders as expected with default props 1`] = `""`;
+
+exports[`LicenseDetails snapshots snapshots: renders as expected with level set to block and license set to Creative Commons 1`] = `
+
+
+
+
+
+
+
+
+ }
+ title={
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+ }
+ title={
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+ }
+ title={
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+ }
+ title={
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+`;
+
+exports[`LicenseDetails snapshots snapshots: renders as expected with level set to block and license set to all rights reserved 1`] = `
+
+
+
+
+
+
+
+
+
+
+`;
+
+exports[`LicenseDetails snapshots snapshots: renders as expected with level set to block and license set to select 1`] = `""`;
+
+exports[`LicenseDetails snapshots snapshots: renders as expected with level set to library 1`] = `""`;
diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/__snapshots__/LicenseDisplay.test.jsx.snap b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/__snapshots__/LicenseDisplay.test.jsx.snap
new file mode 100644
index 000000000..0b292b989
--- /dev/null
+++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/__snapshots__/LicenseDisplay.test.jsx.snap
@@ -0,0 +1,145 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`LicenseDisplay snapshots snapshots: renders as expected with default props 1`] = `
+
+
+
+
+ }
+ />
+
+ FormattedMessage component with license description
+
+
+
+`;
+
+exports[`LicenseDisplay snapshots snapshots: renders as expected with level set to block 1`] = `
+
+
+
+
+ }
+ />
+
+ FormattedMessage component with license description
+
+
+
+
+
+
+`;
+
+exports[`LicenseDisplay snapshots snapshots: renders as expected with level set to block and license set to Creative Commons 1`] = `
+
+
+
+
+ }
+ />
+
+ FormattedMessage component with license description
+
+
+
+
+
+
+`;
+
+exports[`LicenseDisplay snapshots snapshots: renders as expected with level set to block and license set to select 1`] = `""`;
+
+exports[`LicenseDisplay snapshots snapshots: renders as expected with level set to library 1`] = `
+
+
+
+
+ }
+ />
+
+ FormattedMessage component with license description
+
+
+
+
+
+
+`;
diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/__snapshots__/LicenseSelector.test.jsx.snap b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/__snapshots__/LicenseSelector.test.jsx.snap
new file mode 100644
index 000000000..838820b4d
--- /dev/null
+++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/__snapshots__/LicenseSelector.test.jsx.snap
@@ -0,0 +1,177 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`LicenseSelector snapshots snapshots: renders as expected with block level 1`] = `
+
+
+
+
+
+
+
+
+ }
+ tooltipPlacement="top"
+ />
+
+
+
+
+
+`;
+
+exports[`LicenseSelector snapshots snapshots: renders as expected with default props 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+`;
+
+exports[`LicenseSelector snapshots snapshots: renders as expected with library level 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+`;
+
+exports[`LicenseSelector snapshots snapshots: renders as expected with no license 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/__snapshots__/index.test.jsx.snap b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/__snapshots__/index.test.jsx.snap
new file mode 100644
index 000000000..265b62223
--- /dev/null
+++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/__snapshots__/index.test.jsx.snap
@@ -0,0 +1,155 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`LicenseWidget snapshots snapshots: renders as expected with default props 1`] = `
+
+
+
+
+
+
+ }
+ title="License"
+>
+
+
+
+
+ }
+ />
+
+
+
+
+`;
+
+exports[`LicenseWidget snapshots snapshots: renders as expected with isLibrary true 1`] = `
+
+
+
+
+
+
+ }
+ title="License"
+>
+
+
+
+
+ }
+ />
+
+
+`;
+
+exports[`LicenseWidget snapshots snapshots: renders as expected with licenseType defined 1`] = `
+
+
+
+
+
+
+ }
+ title="License"
+>
+
+
+
+
+ }
+ />
+
+
+`;
diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/hooks.jsx b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/hooks.jsx
new file mode 100644
index 000000000..87f64fd54
--- /dev/null
+++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/hooks.jsx
@@ -0,0 +1,84 @@
+import { FormattedMessage } from '@edx/frontend-platform/i18n';
+import messages from './messages';
+import { actions } from '../../../../../../data/redux';
+import { LicenseLevel, LicenseTypes } from '../../../../../../data/constants/licenses';
+
+export const determineLicense = ({
+ isLibrary,
+ licenseType,
+ licenseDetails,
+ courseLicenseType,
+ courseLicenseDetails,
+}) => {
+ let level = LicenseLevel.course;
+ if (licenseType) {
+ if (isLibrary) {
+ level = LicenseLevel.library;
+ } else {
+ level = LicenseLevel.block;
+ }
+ }
+
+ return {
+ license: licenseType || courseLicenseType,
+ details: licenseType ? licenseDetails : courseLicenseDetails,
+ level,
+ };
+};
+
+export const determineText = ({ level }) => {
+ let levelDescription = '';
+ let licenseDescription = '';
+ switch (level) {
+ case LicenseLevel.course:
+ levelDescription = ;
+ licenseDescription = ;
+ break;
+ case LicenseLevel.library:
+ levelDescription = ;
+ licenseDescription = ;
+ break;
+ default: // default to block
+ levelDescription = ;
+ licenseDescription = ;
+ break;
+ }
+
+ return {
+ levelDescription,
+ licenseDescription,
+ };
+};
+
+export const onSelectLicense = ({
+ dispatch,
+}) => (license) => {
+ switch (license) {
+ case LicenseTypes.allRightsReserved:
+ dispatch(actions.video.updateField({
+ licenseType: LicenseTypes.allRightsReserved,
+ licenseDetails: {},
+ }));
+ break;
+ case LicenseTypes.creativeCommons:
+ dispatch(actions.video.updateField({
+ licenseType: LicenseTypes.creativeCommons,
+ licenseDetails: {
+ attribution: true,
+ noncommercial: true,
+ noDerivatives: true,
+ shareAlike: false,
+ },
+ }));
+ break;
+ default:
+ dispatch(actions.video.updateField({ licenseType: LicenseTypes.select }));
+ break;
+ }
+};
+
+export default {
+ determineLicense,
+ determineText,
+ onSelectLicense,
+};
diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/hooks.test.jsx b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/hooks.test.jsx
new file mode 100644
index 000000000..09efff5c6
--- /dev/null
+++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/hooks.test.jsx
@@ -0,0 +1,131 @@
+import { FormattedMessage } from '@edx/frontend-platform/i18n';
+import { actions } from '../../../../../../data/redux';
+import { LicenseTypes } from '../../../../../../data/constants/licenses';
+import * as module from './hooks';
+import { messages } from './messages';
+
+jest.mock('../../../../../../data/redux', () => ({
+ actions: {
+ video: {
+ updateField: jest.fn(args => ({ updateField: args })).mockName('actions.video.updateField'),
+ },
+ },
+}));
+
+describe('VideoEditorTranscript hooks', () => {
+ describe('determineLicense', () => {
+ const courseLicenseProps = {
+ isLibrary: false,
+ licenseType: '',
+ licenseDetails: {},
+ courseLicenseType: 'sOMEliCENse',
+ courseLicenseDetails: {},
+ };
+ const libraryLicenseProps = {
+ isLibrary: true,
+ licenseType: 'sOMEliCENse',
+ licenseDetails: {},
+ courseLicenseType: '',
+ courseLicenseDetails: {},
+ };
+ const blockLicenseProps = {
+ isLibrary: false,
+ licenseType: 'sOMEliCENse',
+ licenseDetails: {},
+ courseLicenseType: '',
+ courseLicenseDetails: {},
+ };
+ it('returns expected license, details and level for course set license', () => {
+ expect(module.determineLicense(courseLicenseProps)).toEqual({
+ license: 'sOMEliCENse',
+ details: {},
+ level: 'course',
+ });
+ });
+ it('returns expected license, details and level for library set license', () => {
+ expect(module.determineLicense(libraryLicenseProps)).toEqual({
+ license: 'sOMEliCENse',
+ details: {},
+ level: 'library',
+ });
+ });
+ it('returns expected license, details and level for block set license', () => {
+ expect(module.determineLicense(blockLicenseProps)).toEqual({
+ license: 'sOMEliCENse',
+ details: {},
+ level: 'block',
+ });
+ });
+ });
+ describe('determineText', () => {
+ it('returns expected level and license description for course level', () => {
+ expect(module.determineText({ level: 'course' })).toEqual({
+ levelDescription: ,
+ licenseDescription: ,
+ });
+ });
+ it('returns expected level and license description for library level', () => {
+ expect(module.determineText({ level: 'library' })).toEqual({
+ levelDescription: ,
+ licenseDescription: ,
+ });
+ });
+ it('returns expected level and license description for library level', () => {
+ expect(module.determineText({ level: 'default' })).toEqual({
+ levelDescription: ,
+ licenseDescription: ,
+ });
+ });
+ });
+ describe('onSelectLicense', () => {
+ // const mockEvent = { target: { value: mockLangValue } };
+ const mockDispatch = jest.fn();
+ test('it dispatches the correct thunk for all rights reserved', () => {
+ const mockLicenseValue = 'all-rights-reserved';
+ const callBack = module.onSelectLicense({ dispatch: mockDispatch });
+ callBack(mockLicenseValue);
+ expect(actions.video.updateField).toHaveBeenCalledWith({
+ licenseType: LicenseTypes.allRightsReserved,
+ licenseDetails: {},
+ });
+ expect(mockDispatch).toHaveBeenCalledWith({
+ updateField: {
+ licenseType: LicenseTypes.allRightsReserved,
+ licenseDetails: {},
+ },
+ });
+ });
+ test('it dispatches the correct thunk for creative commons', () => {
+ const mockLicenseValue = 'creative-commons';
+ const callBack = module.onSelectLicense({ dispatch: mockDispatch });
+ callBack(mockLicenseValue);
+ expect(actions.video.updateField).toHaveBeenCalledWith({
+ licenseType: LicenseTypes.creativeCommons,
+ licenseDetails: {
+ attribution: true,
+ noncommercial: true,
+ noDerivatives: true,
+ shareAlike: false,
+ },
+ });
+ expect(mockDispatch).toHaveBeenCalledWith({
+ updateField: {
+ licenseType: LicenseTypes.creativeCommons,
+ licenseDetails: {
+ attribution: true,
+ noncommercial: true,
+ noDerivatives: true,
+ shareAlike: false,
+ },
+ },
+ });
+ });
+ test('it dispatches the correct thunk for no license type', () => {
+ const mockLicenseValue = 'sOMEliCENse';
+ const callBack = module.onSelectLicense({ dispatch: mockDispatch });
+ callBack(mockLicenseValue);
+ expect(actions.video.updateField).toHaveBeenCalledWith({ licenseType: LicenseTypes.select });
+ expect(mockDispatch).toHaveBeenCalledWith({ updateField: { licenseType: LicenseTypes.select } });
+ });
+ });
+});
diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/index.jsx b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/index.jsx
new file mode 100644
index 000000000..065433e38
--- /dev/null
+++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/index.jsx
@@ -0,0 +1,112 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import {
+ FormattedMessage,
+ injectIntl,
+ intlShape,
+} from '@edx/frontend-platform/i18n';
+import {
+ Button,
+ Form,
+ Stack,
+} from '@edx/paragon';
+import { Add } from '@edx/paragon/icons';
+
+import { actions, selectors } from '../../../../../../data/redux';
+import hooks from './hooks';
+import messages from './messages';
+import CollapsibleFormWidget from '../CollapsibleFormWidget';
+import LicenseBlurb from './LicenseBlurb';
+import LicenseSelector from './LicenseSelector';
+import LicenseDetails from './LicenseDetails';
+import LicenseDisplay from './LicenseDisplay';
+
+/**
+ * Collapsible Form widget controlling video license type and details
+ */
+export const LicenseWidget = ({
+ // injected
+ intl,
+ // redux
+ isLibrary,
+ licenseType,
+ licenseDetails,
+ courseLicenseType,
+ courseLicenseDetails,
+ updateField,
+}) => {
+ const { license, details, level } = hooks.determineLicense({
+ isLibrary,
+ licenseType,
+ licenseDetails,
+ courseLicenseType,
+ courseLicenseDetails,
+ });
+ const { licenseDescription, levelDescription } = hooks.determineText({ level });
+ return (
+
+
+ {levelDescription}
+
+ )}
+ title={intl.formatMessage(messages.title)}
+ >
+
+
+ {license ? (
+ <>
+
+
+
+ >
+ ) : null }
+ {!licenseType ? (
+ <>
+
+
+ >
+ ) : null }
+
+
+ );
+};
+
+LicenseWidget.propTypes = {
+ // injected
+ intl: intlShape.isRequired,
+ // redux
+ isLibrary: PropTypes.bool.isRequired,
+ licenseType: PropTypes.string.isRequired,
+ licenseDetails: PropTypes.shape({}).isRequired,
+ courseLicenseType: PropTypes.string.isRequired,
+ courseLicenseDetails: PropTypes.shape({}).isRequired,
+ updateField: PropTypes.func.isRequired,
+};
+
+export const mapStateToProps = (state) => ({
+ isLibrary: selectors.app.isLibrary(state),
+ licenseType: selectors.video.licenseType(state),
+ licenseDetails: selectors.video.licenseDetails(state),
+ courseLicenseType: selectors.video.courseLicenseType(state),
+ courseLicenseDetails: selectors.video.courseLicenseDetails(state),
+});
+
+export const mapDispatchToProps = (dispatch) => ({
+ updateField: (stateUpdate) => dispatch(actions.video.updateField(stateUpdate)),
+});
+
+export default injectIntl(connect(mapStateToProps, mapDispatchToProps)(LicenseWidget));
diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/index.test.jsx b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/index.test.jsx
new file mode 100644
index 000000000..41fdeb9ef
--- /dev/null
+++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/index.test.jsx
@@ -0,0 +1,111 @@
+import React from 'react';
+import { shallow } from 'enzyme';
+
+import { formatMessage } from '../../../../../../../testUtils';
+import { actions, selectors } from '../../../../../../data/redux';
+import { LicenseWidget, mapStateToProps, mapDispatchToProps } from '.';
+
+jest.mock('react', () => {
+ const updateState = jest.fn();
+ return {
+ ...jest.requireActual('react'),
+ updateState,
+ useContext: jest.fn(() => ({ license: ['error.license', jest.fn().mockName('error.setLicense')] })),
+ };
+});
+
+jest.mock('../../../../../../data/redux', () => ({
+ actions: {
+ video: {
+ updateField: jest.fn().mockName('actions.video.updateField'),
+ },
+ },
+ selectors: {
+ app: {
+ isLibrary: jest.fn(state => ({ isLibrary: state })),
+ },
+ video: {
+ licenseType: jest.fn(state => ({ licenseType: state })),
+ licenseDetails: jest.fn(state => ({ licenseDetails: state })),
+ courseLicenseType: jest.fn(state => ({ courseLicenseType: state })),
+ courseLicenseDetails: jest.fn(state => ({ courseLicenseDetails: state })),
+ },
+ },
+}));
+
+describe('LicenseWidget', () => {
+ const props = {
+ error: {},
+ subtitle: 'SuBTItle',
+ title: 'tiTLE',
+ intl: { formatMessage },
+ isLibrary: false,
+ licenseType: null,
+ licenseDetails: {},
+ courseLicenseType: 'all-rights-reserved',
+ courseLicenseDetails: {},
+ updateField: jest.fn().mockName('args.updateField'),
+ };
+
+ describe('snapshots', () => {
+ // determineLicense.mockReturnValue({
+ // license: false,
+ // details: jest.fn().mockName('modal.openModal'),
+ // level: 'course',
+ // });
+ // determineText.mockReturnValue({
+ // isSourceCodeOpen: false,
+ // openSourceCodeModal: jest.fn().mockName('modal.openModal'),
+ // closeSourceCodeModal: jest.fn().mockName('modal.closeModal'),
+ // });
+ test('snapshots: renders as expected with default props', () => {
+ expect(
+ shallow(),
+ ).toMatchSnapshot();
+ });
+ test('snapshots: renders as expected with isLibrary true', () => {
+ expect(
+ shallow(),
+ ).toMatchSnapshot();
+ });
+ test('snapshots: renders as expected with licenseType defined', () => {
+ expect(
+ shallow(),
+ ).toMatchSnapshot();
+ });
+ });
+ describe('mapStateToProps', () => {
+ const testState = { A: 'pple', B: 'anana', C: 'ucumber' };
+ test('isLibrary from app.isLibrary', () => {
+ expect(
+ mapStateToProps(testState).isLibrary,
+ ).toEqual(selectors.app.isLibrary(testState));
+ });
+ test('licenseType from video.licenseType', () => {
+ expect(
+ mapStateToProps(testState).licenseType,
+ ).toEqual(selectors.video.licenseType(testState));
+ });
+ test('licenseDetails from video.licenseDetails', () => {
+ expect(
+ mapStateToProps(testState).licenseDetails,
+ ).toEqual(selectors.video.licenseDetails(testState));
+ });
+ test('courseLicenseType from video.courseLicenseType', () => {
+ expect(
+ mapStateToProps(testState).courseLicenseType,
+ ).toEqual(selectors.video.courseLicenseType(testState));
+ });
+ test('courseLicenseDetails from video.courseLicenseDetails', () => {
+ expect(
+ mapStateToProps(testState).courseLicenseDetails,
+ ).toEqual(selectors.video.courseLicenseDetails(testState));
+ });
+ });
+ describe('mapDispatchToProps', () => {
+ const dispatch = jest.fn();
+ test('updateField from actions.video.updateField', () => {
+ expect(mapDispatchToProps.updateField).toEqual(dispatch(actions.video.updateField));
+ });
+ });
+});
diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/messages.js b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/messages.js
new file mode 100644
index 000000000..af08c2c7f
--- /dev/null
+++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/messages.js
@@ -0,0 +1,124 @@
+export const messages = {
+ title: {
+ id: 'authoring.videoeditor.license.title',
+ defaultMessage: 'License',
+ description: 'Title for license widget',
+ },
+ licenseTypeLabel: {
+ id: 'authoring.videoeditor.license.licenseType.label',
+ defaultMessage: 'License Type',
+ description: 'Label for license type selection field',
+ },
+ detailsSubsectionTitle: {
+ id: 'authoring.videoeditor.license.detailsSubsection.title',
+ defaultMessage: 'License Details',
+ description: 'Title for license detatils subsection',
+ },
+ displaySubsectionTitle: {
+ id: 'authoring.videoeditor.license.displaySubsection.title',
+ defaultMessage: 'License Display',
+ description: 'Title for license display subsection',
+ },
+ addLicenseButtonLabel: {
+ id: 'authoring.videoeditor.license.add.label',
+ defaultMessage: 'Add a license for this video',
+ description: 'Label for add license button',
+ },
+ deleteLicenseSelection: {
+ id: 'authoring.videoeditor.license.deleteLicenseSelection',
+ defaultMessage: 'Delete',
+ description: 'Message presented to user for action to delete license selection',
+ },
+ allRightsReservedIconsLabel: {
+ id: 'authoring.videoeditor.license.allRightsReservedIcons.label',
+ defaultMessage: 'All Rights Reserved',
+ description: 'Label for row of all rights reserved icons',
+ },
+ creativeCommonsIconsLabel: {
+ id: 'authoring.videoeditor.license.creativeCommonsIcons.label',
+ defaultMessage: 'Some Rights Reserved',
+ description: 'Label for row of creative common icons',
+ },
+ viewLicenseDetailsLabel: {
+ id: 'authoring.videoeditor.license.viewLicenseDetailsLabel.label',
+ defaultMessage: 'View license details',
+ description: 'Label for view license details button',
+ },
+ courseLevelDescription: {
+ id: 'authoring.videoeditor.license.courseLevelDescription.helperText',
+ defaultMessage: 'This license currently set at the course level',
+ description: 'Helper text for license type when using course license',
+ },
+ courseLicenseDescription: {
+ id: 'authoring.videoeditor.license.courseLicenseDescription.message',
+ defaultMessage: 'Licenses set at the course level appear at the bottom of courseware pages within your course.',
+ description: 'Message explaining where course level licenses are set',
+ },
+ libraryLevelDescription: {
+ id: 'authoring.videoeditor.license.libraryLevelDescription.helperText',
+ defaultMessage: 'This license currently set at the library level',
+ description: 'Helper text for license type when using library license',
+ },
+ libraryLicenseDescription: {
+ id: 'authoring.videoeditor.license.libraryLicenseDescription.message',
+ defaultMessage: 'Licenses set at the library level appear at the specific library video.',
+ description: 'Message explaining where library level licenses are set',
+ },
+ defaultLevelDescription: {
+ id: 'authoring.videoeditor.license.defaultLevelDescription.helperText',
+ defaultMessage: 'This license is set specifically for this video',
+ description: 'Helper text for license type when choosing for a spcific video',
+ },
+ defaultLicenseDescription: {
+ id: 'authoring.videoeditor.license.defaultLicenseDescription.message',
+ defaultMessage: 'When a video has a different license than the course as a whole, learners see the license at the bottom right of the video player.',
+ description: 'Message explaining where video specific licenses are seen by users',
+ },
+ attributionCheckboxLabel: {
+ id: 'authoring.videoeditor.license.attributionCheckboxLabel',
+ defaultMessage: 'Attribution',
+ description: 'Label for attribution checkbox',
+ },
+ attributionSectionDescription: {
+ id: 'authoring.videoeditor.license.attributionSectionDescription',
+ defaultMessage: 'Allow others to copy, distribute, display and perform your copyrighted work but only if they give credit the way you request. Currently, this option is required.',
+ description: 'Attribution card section defining attribution license',
+ },
+ noncommercialCheckboxLabel: {
+ id: 'authoring.videoeditor.license.noncommercialCheckboxLabel',
+ defaultMessage: 'Noncommercial',
+ description: 'Label for noncommercial checkbox',
+ },
+ noncommercialSectionDescription: {
+ id: 'authoring.videoeditor.license.noncommercialSectionDescription',
+ defaultMessage: 'Allow others to copy, distribute, display and perform your work - and derivative works based upon it - but for noncommercial purposes only.',
+ description: 'Noncommercial card section defining noncommercial license',
+ },
+ noDerivativesCheckboxLabel: {
+ id: 'authoring.videoeditor.license.noDerivativesCheckboxLabel',
+ defaultMessage: 'No Derivatives',
+ description: 'Label for No Derivatives checkbox',
+ },
+ noDerivativesSectionDescription: {
+ id: 'authoring.videoeditor.license.noDerivativesSectionDescription',
+ defaultMessage: 'Allow others to copy, distribute, display and perform only verbatim copies of your work, not derivative works based upon it. This option is incompatible with "Share Alike".',
+ description: 'No Derivatives card section defining no derivatives license',
+ },
+ shareAlikeCheckboxLabel: {
+ id: 'authoring.videoeditor.license.shareAlikeCheckboxLabel',
+ defaultMessage: 'Share Alike',
+ description: 'Label for Share Alike checkbox',
+ },
+ shareAlikeSectionDescription: {
+ id: 'authoring.videoeditor.license.shareAlikeSectionDescription',
+ defaultMessage: 'Allow others to distribute derivative works only under a license identical to the license that governs your work. This option is incompatible with "No Derivatives".',
+ description: 'Share Alike card section defining no derivatives license',
+ },
+ allRightsReservedSectionMessage: {
+ id: 'authoring.videoeditor.license.allRightsReservedSectionMessage',
+ defaultMessage: 'You reserve all rights for your work.',
+ description: 'All Rights Reserved section message',
+ },
+};
+
+export default messages;
diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/VideoSourceWidget/hooks.jsx b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/VideoSourceWidget/hooks.js
similarity index 100%
rename from src/editors/containers/VideoEditor/components/VideoSettingsModal/components/VideoSourceWidget/hooks.jsx
rename to src/editors/containers/VideoEditor/components/VideoSettingsModal/components/VideoSourceWidget/hooks.js
diff --git a/src/editors/containers/VideoEditor/index.jsx b/src/editors/containers/VideoEditor/index.jsx
index 3696884f5..d11c1543e 100644
--- a/src/editors/containers/VideoEditor/index.jsx
+++ b/src/editors/containers/VideoEditor/index.jsx
@@ -2,12 +2,25 @@ import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
+import {
+ Spinner,
+} from '@edx/paragon';
+import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
+
+import { selectors } from '../../data/redux';
+import { RequestKeys } from '../../data/constants/requests';
+
import EditorContainer from '../EditorContainer';
import VideoEditorModal from './components/VideoEditorModal';
import { ErrorContext, errorsHook, fetchVideoContent } from './hooks';
+import { messages } from './messages';
export const VideoEditor = ({
onClose,
+ // injected
+ intl,
+ // redux
+ studioViewFinished,
}) => {
const {
error,
@@ -20,9 +33,17 @@ export const VideoEditor = ({
onClose={onClose}
validateEntry={validateEntry}
>
-