moved www.spee.ch components into repo

This commit is contained in:
bill bittner 2018-07-31 16:01:16 -07:00
parent 54dcd84529
commit dc558e9b9c
196 changed files with 5438 additions and 10275 deletions

19
.gitignore vendored
View file

@ -1,6 +1,19 @@
node_modules
.DS_Store
*.log
.idea/
/devConfig/sequelizeCliConfig.js
/devConfig/testingConfig.js
node_modules
client/build
client_custom/build
devConfig/sequelizeCliConfig.js
devConfig/testingConfig.js
config/mysqlConfig.json
config/siteConfig.json
public/bundle/bundle.js
public/bundle/bundle.js.map

181
cli/configure.js Normal file
View file

@ -0,0 +1,181 @@
const inquirer = require('inquirer');
const fs = require('fs');
const Path = require('path');
const axios = require('axios');
const mysqlQuestions = require(Path.resolve(__dirname, 'questions/mysqlQuestions.js'));
const siteQuestions = require(Path.resolve(__dirname, 'questions/siteQuestions.js'));
let primaryClaimAddress = '';
let thumbnailChannelDefault = '@thumbnails';
let thumbnailChannel = '';
let thumbnailChannelId = '';
let mysqlConfig;
try {
mysqlConfig = require('../config/mysqlConfig.json');
} catch (error) {
mysqlConfig = require('./defaults/mysqlConfig.json');
}
const { database: mysqlDatabase, username: mysqlUsername, password: mysqlPassword } = mysqlConfig;
let siteConfig;
try {
siteConfig = require('../config/siteConfig.json');
} catch (error) {
siteConfig = require('./defaults/siteConfig.json');
}
const {
details: {
port,
title,
host,
},
publishing: {
uploadDirectory,
},
} = siteConfig;
inquirer
.prompt(mysqlQuestions(mysqlDatabase, mysqlUsername, mysqlPassword))
.then(results => {
console.log('\nCreating mysql config file...');
const fileLocation = Path.resolve(__dirname, '../config/mysqlConfig.json');
const fileContents = JSON.stringify(results, null, 2);
fs.writeFileSync(fileLocation, fileContents, 'utf-8');
console.log('Successfully created /config/mysqlConfig.json!\n');
})
.then(() => {
// check for lbrynet connection & retrieve a default address
console.log('\nRetrieving your primary claim address from LBRY...');
return axios
.post('http://localhost:5279', {
method: 'wallet_list',
})
.then(response => {
if (response.data) {
if (response.data.error) {
throw new Error(response.data.error.message);
}
primaryClaimAddress = response.data.result[0];
console.log('Primary claim address:', primaryClaimAddress, '!\n');
siteConfig['publishing']['primaryClaimAddress'] = primaryClaimAddress;
return;
}
throw new Error('No data received from lbrynet');
}).catch(error => {
throw error;
});
})
.then(() => {
console.log('\nChecking to see if a LBRY channel exists for thumbnails...');
// see if a channel name already exists in the configs
const { publishing } = siteConfig;
thumbnailChannel = publishing.thumbnailChannel;
thumbnailChannelId = publishing.thumbnailChannelId;
console.log(`Thumbnail channel in configs: ${thumbnailChannel}#${thumbnailChannelId}.`);
// see if channel exists in the wallet
return axios
.post('http://localhost:5279', {
method: 'channel_list',
})
.then(response => {
if (response.data) {
if (response.data.error) {
throw new Error(response.data.error.message);
}
const channelList = response.data.result || [];
console.log('channels in this wallet:', channelList.length);
for (let i = 0; i < channelList.length; i++) {
if (channelList[i].name === thumbnailChannelDefault) {
const foundChannel = channelList[i];
console.log(`Found a thumbnail channel in wallet.`);
if (foundChannel.is_mine === false) {
console.log('Channel was not mine');
continue;
}
console.log('name:', foundChannel.name);
console.log('claim_id:', foundChannel.claim_id);
if (foundChannel.name === thumbnailChannel && foundChannel.claim_id === thumbnailChannelId) {
console.log('No update to existing thumbnail config required\n');
} else {
console.log(`Replacing thumbnail channel in config...`);
siteConfig['publishing']['thumbnailChannel'] = foundChannel.name;
siteConfig['publishing']['thumbnailChannelId'] = foundChannel.claim_id;
console.log(`Successfully replaced channel in config.\n`);
}
return true;
}
}
console.log(`Did not find a thumbnail channel that is mine in wallet.\n`);
return false;
}
throw new Error('No data received from lbrynet');
}).catch(error => {
throw error;
});
})
.then((thumbnailChannelAlreadyExists) => {
// exit if a channel already exists, skip this step
if (thumbnailChannelAlreadyExists) {
return;
}
// create thumbnail address
console.log('\nCreating a LBRY channel to publish your thumbnails to...');
return axios
.post('http://localhost:5279', {
method: 'channel_new',
params: {
channel_name: thumbnailChannelDefault,
amount : 0.1,
},
})
.then(response => {
if (response.data) {
if (response.data.error) {
throw new Error(response.data.error.message);
}
thumbnailChannel = thumbnailChannelDefault;
thumbnailChannelId = response.data.result.claim_id;
siteConfig['publishing']['thumbnailChannel'] = thumbnailChannel;
siteConfig['publishing']['thumbnailChannelId'] = thumbnailChannelId;
console.log(`Created channel: ${thumbnailChannel}#${thumbnailChannelId}\n`);
return;
}
throw new Error('No data received from lbrynet');
}).catch(error => {
throw error;
});
})
.then(() => {
return inquirer.prompt(siteQuestions(port, title, host, uploadDirectory));
})
.then(results => {
console.log('\nCreating site config file...');
siteConfig['details']['port'] = results.port;
siteConfig['details']['title'] = results.title;
siteConfig['details']['host'] = results.host;
siteConfig['publishing']['uploadDirectory'] = results.uploadDirectory;
const fileLocation = Path.resolve(__dirname, '../config/siteConfig.json');
const fileContents = JSON.stringify(siteConfig, null, 2);
fs.writeFileSync(fileLocation, fileContents, 'utf-8');
console.log('Successfully created /config/siteConfig.json\n');
})
.then(() => {
console.log('\nYou\'re all done!');
console.log('Next step: run "npm run start:dev" to start your server!');
console.log('If you want to change any settings, you can edit the files in the "/config" folder.');
process.exit(0);
})
.catch(error => {
if (error.code === 'ECONNREFUSED') {
console.log('Error: could not connect to LBRY. Please make sure lbrynet daemon is running.');
process.exit(1);
} else {
console.log(error);
process.exit(1);
}
});

View file

@ -0,0 +1,5 @@
{
"database": "lbry",
"username": "root",
"password": ""
}

View file

@ -0,0 +1,34 @@
{
"analytics": {
"googleId": null
},
"assetDefaults": {
"title": "Default Content Title",
"description": "Default Content Description",
"thumbnail": "https://spee.ch/0e5d4e8f4086e13f5b9ca3f9648f518e5f524402/speechflag.png"
},
"auth": {
"sessionKey": "mysecretkeyword",
"masterPassword": "myMasterPassword"
},
"details": {
"port": 3000,
"title": "My Site",
"host": "https://www.example.com",
"description": "A decentralized hosting platform built on LBRY",
"twitter": false
},
"publishing": {
"primaryClaimAddress": null,
"uploadDirectory": "/home/lbry/Uploads",
"thumbnailChannel": null,
"thumbnailChannelId": null,
"additionalClaimAddresses": [],
"disabled": false,
"disabledMessage": "Default publishing disabled message"
},
"startup": {
"performChecks": true,
"performUpdates": true
}
}

View file

@ -0,0 +1,34 @@
const database = (defaultAnswer) => {
return {
type : 'input',
message: 'What is the name of the MySQL DATABASE to be used?',
default: defaultAnswer,
name : 'database',
};
};
const username = (defaultAnswer) => {
return {
type : 'input',
message: 'What is the USER NAME for your MySQL database?',
default: defaultAnswer,
name : 'username',
};
};
const password = (defaultAnswer) => {
return {
type : 'input',
message: 'What is the PASSWORD for your MySQL database?',
default: defaultAnswer,
name : 'password',
};
};
module.exports = (defaultDatabase, defaultUsername, defaultPassword) => {
return [
database(defaultDatabase),
username(defaultUsername),
password(defaultPassword),
];
};

View file

@ -0,0 +1,59 @@
const makeDir = require('make-dir');
const port = (defaultAnswer) => {
return {
type : 'input',
message: 'Enter a PORT for your server to run on.',
default: defaultAnswer,
name : 'port',
};
};
const title = (defaultAnswer) => {
return {
type : 'input',
message: 'Enter a title for your site.',
default: defaultAnswer,
name : 'title',
};
};
const host = (defaultAnswer) => {
return {
type : 'input',
message: 'Enter your site\'s domain.',
default: defaultAnswer,
name : 'host',
};
};
const uploadDirectory = (defaultAnswer) => {
return {
type : 'input',
message: 'Enter a directory where uploads should be stored.',
default: defaultAnswer,
name : 'uploadDirectory',
validate (input) {
// make sure the directory exists
return new Promise((resolve, reject) => {
console.log('\n\nCreating directory', input, '...');
try {
const dirPath = makeDir.sync(input);
console.log('Successfully created directory at', dirPath, '\n');
} catch (error) {
console.log('Failed to create directory, please create directory manually.\n');
}
resolve(true);
});
},
};
};
module.exports = (defaultPort, defaultTitle, defaultHost, defaultUploadDirectory) => {
return [
port(defaultPort),
title(defaultTitle),
host(defaultHost),
uploadDirectory(defaultUploadDirectory),
];
};

View file

@ -1,36 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.updateLoggedInChannel = updateLoggedInChannel;
exports.checkForLoggedInChannel = checkForLoggedInChannel;
exports.logOutChannel = logOutChannel;
var actions = _interopRequireWildcard(require("../constants/channel_action_types"));
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
// export action creators
function updateLoggedInChannel(name, shortId, longId) {
return {
type: actions.CHANNEL_UPDATE,
data: {
name: name,
shortId: shortId,
longId: longId
}
};
}
function checkForLoggedInChannel() {
return {
type: actions.CHANNEL_LOGIN_CHECK
};
}
function logOutChannel() {
return {
type: actions.CHANNEL_LOGOUT
};
}

View file

@ -1,55 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.updateChannelCreateName = updateChannelCreateName;
exports.updateChannelCreatePassword = updateChannelCreatePassword;
exports.updateChannelCreateStatus = updateChannelCreateStatus;
exports.updateChannelAvailability = updateChannelAvailability;
exports.createChannel = createChannel;
var actions = _interopRequireWildcard(require("../constants/channel_create_action_types"));
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
// export action creators
function updateChannelCreateName(name, value) {
return {
type: actions.CHANNEL_CREATE_UPDATE_NAME,
data: {
name: name,
value: value
}
};
}
function updateChannelCreatePassword(name, value) {
return {
type: actions.CHANNEL_CREATE_UPDATE_PASSWORD,
data: {
name: name,
value: value
}
};
}
function updateChannelCreateStatus(status) {
return {
type: actions.CHANNEL_CREATE_UPDATE_STATUS,
data: status
};
}
function updateChannelAvailability(channel) {
return {
type: actions.CHANNEL_AVAILABILITY,
data: channel
};
}
function createChannel() {
return {
type: actions.CHANNEL_CREATE
};
}

View file

@ -1,15 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _show = require("./show");
// import { } from './channel';
// import { } from './publish';
var _default = {
onHandleShowPageUri: _show.onHandleShowPageUri
};
exports.default = _default;

View file

@ -1,118 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.selectFile = selectFile;
exports.clearFile = clearFile;
exports.updateMetadata = updateMetadata;
exports.updateClaim = updateClaim;
exports.setPublishInChannel = setPublishInChannel;
exports.updatePublishStatus = updatePublishStatus;
exports.updateError = updateError;
exports.updateSelectedChannel = updateSelectedChannel;
exports.toggleMetadataInputs = toggleMetadataInputs;
exports.onNewThumbnail = onNewThumbnail;
exports.startPublish = startPublish;
exports.validateClaim = validateClaim;
var actions = _interopRequireWildcard(require("../constants/publish_action_types"));
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
// export action creators
function selectFile(file) {
return {
type: actions.FILE_SELECTED,
data: file
};
}
function clearFile() {
return {
type: actions.FILE_CLEAR
};
}
function updateMetadata(name, value) {
return {
type: actions.METADATA_UPDATE,
data: {
name: name,
value: value
}
};
}
function updateClaim(value) {
return {
type: actions.CLAIM_UPDATE,
data: value
};
}
;
function setPublishInChannel(channel) {
return {
type: actions.SET_PUBLISH_IN_CHANNEL,
channel: channel
};
}
function updatePublishStatus(status, message) {
return {
type: actions.PUBLISH_STATUS_UPDATE,
data: {
status: status,
message: message
}
};
}
function updateError(name, value) {
return {
type: actions.ERROR_UPDATE,
data: {
name: name,
value: value
}
};
}
function updateSelectedChannel(channelName) {
return {
type: actions.SELECTED_CHANNEL_UPDATE,
data: channelName
};
}
function toggleMetadataInputs(showMetadataInputs) {
return {
type: actions.TOGGLE_METADATA_INPUTS,
data: showMetadataInputs
};
}
function onNewThumbnail(file) {
return {
type: actions.THUMBNAIL_NEW,
data: file
};
}
function startPublish(history) {
return {
type: actions.PUBLISH_START,
data: {
history: history
}
};
}
function validateClaim(claim) {
return {
type: actions.CLAIM_AVAILABILITY,
data: claim
};
}

View file

@ -1,170 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.onHandleShowPageUri = onHandleShowPageUri;
exports.onRequestError = onRequestError;
exports.onNewChannelRequest = onNewChannelRequest;
exports.onNewAssetRequest = onNewAssetRequest;
exports.onRequestUpdate = onRequestUpdate;
exports.addRequestToRequestList = addRequestToRequestList;
exports.addAssetToAssetList = addAssetToAssetList;
exports.addNewChannelToChannelList = addNewChannelToChannelList;
exports.onUpdateChannelClaims = onUpdateChannelClaims;
exports.updateChannelClaims = updateChannelClaims;
exports.fileRequested = fileRequested;
exports.updateFileAvailability = updateFileAvailability;
exports.updateDisplayAssetError = updateDisplayAssetError;
var actions = _interopRequireWildcard(require("../constants/show_action_types"));
var _show_request_types = require("../constants/show_request_types");
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
// basic request parsing
function onHandleShowPageUri(params) {
return {
type: actions.HANDLE_SHOW_URI,
data: params
};
}
function onRequestError(error) {
return {
type: actions.REQUEST_ERROR,
data: error
};
}
function onNewChannelRequest(channelName, channelId) {
var requestType = _show_request_types.CHANNEL;
var requestId = "cr#".concat(channelName, "#").concat(channelId);
return {
type: actions.CHANNEL_REQUEST_NEW,
data: {
requestType: requestType,
requestId: requestId,
channelName: channelName,
channelId: channelId
}
};
}
function onNewAssetRequest(name, id, channelName, channelId, extension) {
var requestType = extension ? _show_request_types.ASSET_LITE : _show_request_types.ASSET_DETAILS;
var requestId = "ar#".concat(name, "#").concat(id, "#").concat(channelName, "#").concat(channelId);
return {
type: actions.ASSET_REQUEST_NEW,
data: {
requestType: requestType,
requestId: requestId,
name: name,
modifier: {
id: id,
channel: {
name: channelName,
id: channelId
}
}
}
};
}
function onRequestUpdate(requestType, requestId) {
return {
type: actions.REQUEST_UPDATE,
data: {
requestType: requestType,
requestId: requestId
}
};
}
function addRequestToRequestList(id, error, key) {
return {
type: actions.REQUEST_LIST_ADD,
data: {
id: id,
error: error,
key: key
}
};
} // asset actions
function addAssetToAssetList(id, error, name, claimId, shortId, claimData) {
return {
type: actions.ASSET_ADD,
data: {
id: id,
error: error,
name: name,
claimId: claimId,
shortId: shortId,
claimData: claimData
}
};
} // channel actions
function addNewChannelToChannelList(id, name, shortId, longId, claimsData) {
return {
type: actions.CHANNEL_ADD,
data: {
id: id,
name: name,
shortId: shortId,
longId: longId,
claimsData: claimsData
}
};
}
function onUpdateChannelClaims(channelKey, name, longId, page) {
return {
type: actions.CHANNEL_CLAIMS_UPDATE_ASYNC,
data: {
channelKey: channelKey,
name: name,
longId: longId,
page: page
}
};
}
function updateChannelClaims(channelListId, claimsData) {
return {
type: actions.CHANNEL_CLAIMS_UPDATE_SUCCESS,
data: {
channelListId: channelListId,
claimsData: claimsData
}
};
} // display a file
function fileRequested(name, claimId) {
return {
type: actions.FILE_REQUESTED,
data: {
name: name,
claimId: claimId
}
};
}
function updateFileAvailability(status) {
return {
type: actions.FILE_AVAILABILITY_UPDATE,
data: status
};
}
function updateDisplayAssetError(error) {
return {
type: actions.DISPLAY_ASSET_ERROR,
data: error
};
}

View file

@ -1,60 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getLongClaimId = getLongClaimId;
exports.getShortId = getShortId;
exports.getClaimData = getClaimData;
exports.checkClaimAvailability = checkClaimAvailability;
var _request = _interopRequireDefault(require("../utils/request"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function getLongClaimId(host, name, modifier) {
var body = {}; // create request params
if (modifier) {
if (modifier.id) {
body['claimId'] = modifier.id;
} else {
body['channelName'] = modifier.channel.name;
body['channelClaimId'] = modifier.channel.id;
}
}
body['claimName'] = name;
var params = {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(body)
}; // create url
var url = "".concat(host, "/api/claim/long-id"); // return the request promise
return (0, _request.default)(url, params);
}
;
function getShortId(host, name, claimId) {
var url = "".concat(host, "/api/claim/short-id/").concat(claimId, "/").concat(name);
return (0, _request.default)(url);
}
;
function getClaimData(host, name, claimId) {
var url = "".concat(host, "/api/claim/data/").concat(name, "/").concat(claimId);
return (0, _request.default)(url);
}
;
function checkClaimAvailability(claim) {
var url = "/api/claim/availability/".concat(claim);
return (0, _request.default)(url);
}

View file

@ -1,27 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.checkForLoggedInChannelApi = checkForLoggedInChannelApi;
exports.channelLogoutApi = channelLogoutApi;
var _request = _interopRequireDefault(require("../utils/request"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function checkForLoggedInChannelApi() {
var url = "/user";
var params = {
credentials: 'include'
};
return (0, _request.default)(url, params);
}
function channelLogoutApi() {
var url = "/logout";
var params = {
credentials: 'include'
};
return (0, _request.default)(url, params);
}

View file

@ -1,45 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getChannelData = getChannelData;
exports.getChannelClaims = getChannelClaims;
exports.checkChannelAvailability = checkChannelAvailability;
exports.makeCreateChannelRequest = makeCreateChannelRequest;
var _request = _interopRequireDefault(require("../utils/request"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function getChannelData(host, name, id) {
if (!id) id = 'none';
var url = "".concat(host, "/api/channel/data/").concat(name, "/").concat(id);
return (0, _request.default)(url);
}
function getChannelClaims(host, name, longId, page) {
if (!page) page = 1;
var url = "".concat(host, "/api/channel/claims/").concat(name, "/").concat(longId, "/").concat(page);
return (0, _request.default)(url);
}
function checkChannelAvailability(channel) {
var url = "/api/channel/availability/".concat(channel);
return (0, _request.default)(url);
}
function makeCreateChannelRequest(username, password) {
var params = {
method: 'POST',
body: JSON.stringify({
username: username,
password: password
}),
headers: new Headers({
'Content-Type': 'application/json'
}),
credentials: 'include'
};
return (0, _request.default)('/signup', params);
}

View file

@ -1,21 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.checkFileAvailability = checkFileAvailability;
exports.triggerClaimGet = triggerClaimGet;
var _request = _interopRequireDefault(require("../utils/request"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function checkFileAvailability(claimId, host, name) {
var url = "".concat(host, "/api/file/availability/").concat(name, "/").concat(claimId);
return (0, _request.default)(url);
}
function triggerClaimGet(claimId, host, name) {
var url = "".concat(host, "/api/claim/get/").concat(name, "/").concat(claimId);
return (0, _request.default)(url);
}

View file

@ -1,57 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactRouterDom = require("react-router-dom");
var _HomePage = _interopRequireDefault(require("@pages/HomePage"));
var _AboutPage = _interopRequireDefault(require("@pages/AboutPage"));
var _LoginPage = _interopRequireDefault(require("@pages/LoginPage"));
var _ContentPageWrapper = _interopRequireDefault(require("@pages/ContentPageWrapper"));
var _FourOhFourPage = _interopRequireDefault(require("@pages/FourOhFourPage"));
var _MultisitePage = _interopRequireDefault(require("@pages/MultisitePage"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var App = function App() {
return _react.default.createElement(_reactRouterDom.Switch, null, _react.default.createElement(_reactRouterDom.Route, {
exact: true,
path: "/",
component: _HomePage.default
}), _react.default.createElement(_reactRouterDom.Route, {
exact: true,
path: "/about",
component: _AboutPage.default
}), _react.default.createElement(_reactRouterDom.Route, {
exact: true,
path: "/login",
component: _LoginPage.default
}), _react.default.createElement(_reactRouterDom.Route, {
exact: true,
path: "/multisite",
component: _MultisitePage.default
}), _react.default.createElement(_reactRouterDom.Route, {
exact: true,
path: "/:identifier/:claim",
component: _ContentPageWrapper.default
}), _react.default.createElement(_reactRouterDom.Route, {
exact: true,
path: "/:claim",
component: _ContentPageWrapper.default
}), _react.default.createElement(_reactRouterDom.Route, {
component: _FourOhFourPage.default
}));
};
var _default = App;
exports.default = _default;

View file

@ -1,72 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.makePublishRequestChannel = void 0;
var _reduxSaga = require("redux-saga");
var makePublishRequestChannel = function makePublishRequestChannel(fd) {
return (0, _reduxSaga.eventChannel)(function (emitter) {
var uri = '/api/claim/publish';
var xhr = new XMLHttpRequest(); // add event listeners
var onLoadStart = function onLoadStart() {
emitter({
loadStart: true
});
};
var onProgress = function onProgress(event) {
if (event.lengthComputable) {
var percentage = Math.round(event.loaded * 100 / event.total);
emitter({
progress: percentage
});
}
};
var onLoad = function onLoad() {
emitter({
load: true
});
};
xhr.upload.addEventListener('loadstart', onLoadStart);
xhr.upload.addEventListener('progress', onProgress);
xhr.upload.addEventListener('load', onLoad); // set state change handler
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
var response = JSON.parse(xhr.response);
if (xhr.status === 200 && response.success) {
emitter({
success: response
});
emitter(_reduxSaga.END);
} else {
emitter({
error: new Error(response.message)
});
emitter(_reduxSaga.END);
}
}
}; // open and send
xhr.open('POST', uri, true);
xhr.send(fd); // clean up
return function () {
xhr.upload.removeEventListener('loadstart', onLoadStart);
xhr.upload.removeEventListener('progress', onProgress);
xhr.upload.removeEventListener('load', onLoad);
xhr.onreadystatechange = null;
xhr.abort();
};
}, _reduxSaga.buffers.sliding(2));
};
exports.makePublishRequestChannel = makePublishRequestChannel;

View file

@ -1,27 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ChannelAbout = function ChannelAbout() {
return _react.default.createElement("div", null, _react.default.createElement("p", {
className: 'large'
}, "Channels allow you to publish and group content under an identity. You can create a channel for yourself, or share one with like-minded friends. You can create 1 channel, or 100, so whether you're ", _react.default.createElement("a", {
className: "link--primary",
target: "_blank",
href: "/@catalonia2017:43dcf47163caa21d8404d9fe9b30f78ef3e146a8"
}, "documenting important events"), ", or making a public repository for ", _react.default.createElement("a", {
className: "link--primary",
target: "_blank",
href: "/@catGifs"
}, "cat gifs"), " (password: '1234'), try creating a channel for it!"));
};
var _default = ChannelAbout;
exports.default = _default;

View file

@ -1,42 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _Row = _interopRequireDefault(require("@components/Row"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var AboutSpeechDetails = function AboutSpeechDetails() {
return _react.default.createElement("div", null, _react.default.createElement(_Row.default, null, _react.default.createElement("p", {
className: 'text--large'
}, "Spee.ch is a media-hosting site that reads from and publishes content to the ", _react.default.createElement("a", {
className: "link--primary",
href: "https://lbry.io"
}, "LBRY"), " blockchain."), _react.default.createElement("p", {
className: 'text--large'
}, "Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the ", _react.default.createElement("a", {
className: "link--primary",
href: "https://lbry.io/get"
}, "LBRY"), " network. This means that your images are stored in multiple locations without a single point of failure.")), _react.default.createElement(_Row.default, null, _react.default.createElement("h3", null, "Contribute"), _react.default.createElement("p", {
className: 'text--large'
}, "If you have an idea for your own spee.ch-like site on top of LBRY, fork our ", _react.default.createElement("a", {
className: "link--primary",
href: "https://github.com/lbryio/spee.ch"
}, "github repo"), " and go to town!"), _react.default.createElement("p", {
className: 'text--large'
}, "If you want to improve spee.ch, join our ", _react.default.createElement("a", {
className: "link--primary",
href: "https://chat.lbry.io"
}, "discord channel"), " or solve one of our ", _react.default.createElement("a", {
className: "link--primary",
href: "https://github.com/lbryio/spee.ch/issues"
}, "github issues"), ".")));
};
var _default = AboutSpeechDetails;
exports.default = _default;

View file

@ -1,45 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _Row = _interopRequireDefault(require("@components/Row"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var AboutSpeechOverview = function AboutSpeechOverview() {
return _react.default.createElement("div", null, _react.default.createElement(_Row.default, null, _react.default.createElement("p", {
className: 'text--extra-large'
}, "Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.")), _react.default.createElement(_Row.default, null, _react.default.createElement("p", {
className: 'text--large'
}, _react.default.createElement("a", {
className: "link--primary",
target: "_blank",
href: "https://twitter.com/spee_ch"
}, "TWITTER")), _react.default.createElement("p", {
className: 'text--large'
}, _react.default.createElement("a", {
className: "link--primary",
target: "_blank",
href: "https://github.com/lbryio/spee.ch"
}, "GITHUB")), _react.default.createElement("p", {
className: 'text--large'
}, _react.default.createElement("a", {
className: "link--primary",
target: "_blank",
href: "https://discord.gg/YjYbwhS"
}, "DISCORD CHANNEL")), _react.default.createElement("p", {
className: 'text--large'
}, _react.default.createElement("a", {
className: "link--primary",
target: "_blank",
href: "https://github.com/lbryio/spee.ch/blob/master/README.md"
}, "DOCUMENTATION"))));
};
var _default = AboutSpeechOverview;
exports.default = _default;

View file

@ -1,19 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ActiveStatusBar = function ActiveStatusBar() {
return _react.default.createElement("span", {
className: "progress-bar--active"
}, "| ");
};
var _default = ActiveStatusBar;
exports.default = _default;

View file

@ -1,52 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactRouterDom = require("react-router-dom");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var AssetPreview = function AssetPreview(_ref) {
var defaultThumbnail = _ref.defaultThumbnail,
_ref$claimData = _ref.claimData,
name = _ref$claimData.name,
claimId = _ref$claimData.claimId,
fileExt = _ref$claimData.fileExt,
contentType = _ref$claimData.contentType,
thumbnail = _ref$claimData.thumbnail;
var embedUrl = "/".concat(claimId, "/").concat(name, ".").concat(fileExt);
var showUrl = "/".concat(claimId, "/").concat(name);
return _react.default.createElement(_reactRouterDom.Link, {
to: showUrl
}, function () {
switch (contentType) {
case 'image/jpeg':
case 'image/jpg':
case 'image/png':
case 'image/gif':
return _react.default.createElement("img", {
className: 'asset-preview-image',
src: embedUrl,
alt: name
});
case 'video/mp4':
return _react.default.createElement("img", {
className: 'asset-preview-video',
src: thumbnail || defaultThumbnail,
alt: name
});
default:
return _react.default.createElement("p", null, "unsupported file type");
}
}());
};
var _default = AssetPreview;
exports.default = _default;

View file

@ -1,38 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _SpaceBetween = _interopRequireDefault(require("@components/SpaceBetween"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var AssetShareButtons = function AssetShareButtons(_ref) {
var host = _ref.host,
name = _ref.name,
shortId = _ref.shortId;
return _react.default.createElement(_SpaceBetween.default, null, _react.default.createElement("a", {
className: "link--primary",
target: "_blank",
href: "https://twitter.com/intent/tweet?text=".concat(host, "/").concat(shortId, "/").concat(name)
}, "twitter"), _react.default.createElement("a", {
className: "link--primary",
target: "_blank",
href: "https://www.facebook.com/sharer/sharer.php?u=".concat(host, "/").concat(shortId, "/").concat(name)
}, "facebook"), _react.default.createElement("a", {
className: "link--primary",
target: "_blank",
href: "http://tumblr.com/widgets/share/tool?canonicalUrl=".concat(host, "/").concat(shortId, "/").concat(name)
}, "tumblr"), _react.default.createElement("a", {
className: "link--primary",
target: "_blank",
href: "https://www.reddit.com/submit?url=".concat(host, "/").concat(shortId, "/").concat(name, "&title=").concat(name)
}, "reddit"));
};
var _default = AssetShareButtons;
exports.default = _default;

View file

@ -1,22 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ButtonPrimary = function ButtonPrimary(_ref) {
var value = _ref.value,
onClickHandler = _ref.onClickHandler;
return _react.default.createElement("button", {
className: 'button button-primary',
onClick: onClickHandler
}, value);
};
var _default = ButtonPrimary;
exports.default = _default;

View file

@ -1,22 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ButtonPrimaryJumbo = function ButtonPrimaryJumbo(_ref) {
var value = _ref.value,
onClickHandler = _ref.onClickHandler;
return _react.default.createElement("button", {
className: 'button button-primary button-primary--jumbo',
onClick: onClickHandler
}, value);
};
var _default = ButtonPrimaryJumbo;
exports.default = _default;

View file

@ -1,22 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ButtonPrimary = function ButtonPrimary(_ref) {
var value = _ref.value,
onClickHandler = _ref.onClickHandler;
return _react.default.createElement("button", {
className: 'button button--secondary',
onClick: onClickHandler
}, value);
};
var _default = ButtonPrimary;
exports.default = _default;

View file

@ -1,22 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ButtonTertiary = function ButtonTertiary(_ref) {
var value = _ref.value,
onClickHandler = _ref.onClickHandler;
return _react.default.createElement("button", {
className: 'button button--tertiary',
onClick: onClickHandler
}, value);
};
var _default = ButtonTertiary;
exports.default = _default;

View file

@ -1,27 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ChannelAbout = function ChannelAbout() {
return _react.default.createElement("div", null, _react.default.createElement("p", {
className: 'text--large'
}, "Channels allow you to publish and group content under an identity. You can create a channel for yourself, or share one with like-minded friends. You can create 1 channel, or 100, so whether you're ", _react.default.createElement("a", {
className: "link--primary",
target: "_blank",
href: "/@catalonia2017:43dcf47163caa21d8404d9fe9b30f78ef3e146a8"
}, "documenting important events"), ", or making a public repository for ", _react.default.createElement("a", {
className: "link--primary",
target: "_blank",
href: "/@catGifs"
}, "cat gifs"), " (password: '1234'), try creating a channel for it!"));
};
var _default = ChannelAbout;
exports.default = _default;

View file

@ -1,42 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _Label = _interopRequireDefault(require("@components/Label"));
var _RowLabeled = _interopRequireDefault(require("@components/RowLabeled"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ChannelCreateNameInput = function ChannelCreateNameInput(_ref) {
var value = _ref.value,
error = _ref.error,
handleNameInput = _ref.handleNameInput;
return _react.default.createElement(_RowLabeled.default, {
label: _react.default.createElement(_Label.default, {
value: 'Name:'
}),
content: _react.default.createElement("div", {
className: "input-area"
}, _react.default.createElement("span", null, "@"), _react.default.createElement("input", {
type: "text",
name: "channel",
className: "input-text",
placeholder: "exampleChannelName",
value: value,
onChange: handleNameInput
}), value && !error && _react.default.createElement("span", {
className: "info-message--success span--absolute"
}, "\u2713"), error && _react.default.createElement("span", {
className: "info-message--failure span--absolute"
}, "\u2716"))
});
};
var _default = ChannelCreateNameInput;
exports.default = _default;

View file

@ -1,37 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _Label = _interopRequireDefault(require("@components/Label"));
var _RowLabeled = _interopRequireDefault(require("@components/RowLabeled"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ChannelCreatePasswordInput = function ChannelCreatePasswordInput(_ref) {
var value = _ref.value,
handlePasswordInput = _ref.handlePasswordInput;
return _react.default.createElement(_RowLabeled.default, {
label: _react.default.createElement(_Label.default, {
value: 'Password:'
}),
content: _react.default.createElement("div", {
className: "input-area"
}, _react.default.createElement("input", {
type: "password",
name: "password",
className: "input-text",
placeholder: "",
value: value,
onChange: handlePasswordInput
}))
});
};
var _default = ChannelCreatePasswordInput;
exports.default = _default;

View file

@ -1,24 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ChannelInfoDisplay = function ChannelInfoDisplay(_ref) {
var name = _ref.name,
longId = _ref.longId,
shortId = _ref.shortId;
return _react.default.createElement("div", null, _react.default.createElement("h2", null, "channel name: ", name), _react.default.createElement("p", {
className: 'text--secondary'
}, "full channel id: ", longId), _react.default.createElement("p", {
className: 'text--secondary'
}, "short channel id: ", shortId));
};
var _default = ChannelInfoDisplay;
exports.default = _default;

View file

@ -1,38 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _RowLabeled = _interopRequireDefault(require("@components/RowLabeled"));
var _Label = _interopRequireDefault(require("@components/Label"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ChannelLoginNameInput = function ChannelLoginNameInput(_ref) {
var channelName = _ref.channelName,
handleInput = _ref.handleInput;
return _react.default.createElement(_RowLabeled.default, {
label: _react.default.createElement(_Label.default, {
value: 'Name:'
}),
content: _react.default.createElement("div", {
className: "input-area"
}, _react.default.createElement("span", null, "@"), _react.default.createElement("input", {
type: "text",
id: "channel-login-name-input",
className: "input-text",
name: "name",
placeholder: "Your Channel Name",
value: channelName,
onChange: handleInput
}))
});
};
var _default = ChannelLoginNameInput;
exports.default = _default;

View file

@ -1,38 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _RowLabeled = _interopRequireDefault(require("@components/RowLabeled"));
var _Label = _interopRequireDefault(require("@components/Label"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ChannelLoginPasswordInput = function ChannelLoginPasswordInput(_ref) {
var channelPassword = _ref.channelPassword,
handleInput = _ref.handleInput;
return _react.default.createElement(_RowLabeled.default, {
label: _react.default.createElement(_Label.default, {
value: 'Password:'
}),
content: _react.default.createElement("div", {
className: "input-area"
}, _react.default.createElement("input", {
type: "password",
id: "channel-login-password-input",
name: "password",
className: "input-text",
placeholder: "",
value: channelPassword,
onChange: handleInput
}))
});
};
var _default = ChannelLoginPasswordInput;
exports.default = _default;

View file

@ -1,33 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _publish_channel_select_states = require("../../constants/publish_channel_select_states");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ChannelSelectDropdown = function ChannelSelectDropdown(_ref) {
var selectedChannel = _ref.selectedChannel,
handleSelection = _ref.handleSelection,
loggedInChannelName = _ref.loggedInChannelName;
return _react.default.createElement("select", {
id: "channel-name-select",
className: "select select--arrow",
value: selectedChannel,
onChange: handleSelection
}, loggedInChannelName && _react.default.createElement("option", {
value: loggedInChannelName
}, loggedInChannelName), _react.default.createElement("option", {
value: _publish_channel_select_states.LOGIN
}, "Existing"), _react.default.createElement("option", {
value: _publish_channel_select_states.CREATE
}, "New"));
};
var _default = ChannelSelectDropdown;
exports.default = _default;

View file

@ -1,23 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _ChannelLoginForm = _interopRequireDefault(require("@containers/ChannelLoginForm"));
var _ChannelCreateForm = _interopRequireDefault(require("@containers/ChannelCreateForm"));
var _Row = _interopRequireDefault(require("@components/Row"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ChannelTools = function ChannelTools() {
return _react.default.createElement("div", null, _react.default.createElement(_Row.default, null, _react.default.createElement("h3", null, "Log in to an existing channel:"), _react.default.createElement(_ChannelLoginForm.default, null)), _react.default.createElement(_Row.default, null, _react.default.createElement("h3", null, "Create a brand new channel:"), _react.default.createElement(_ChannelCreateForm.default, null)));
};
var _default = ChannelTools;
exports.default = _default;

View file

@ -1,30 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ChooseAnonymousPublishRadio = function ChooseAnonymousPublishRadio(_ref) {
var publishInChannel = _ref.publishInChannel,
toggleAnonymousPublish = _ref.toggleAnonymousPublish;
return _react.default.createElement("div", null, _react.default.createElement("input", {
type: "radio",
name: "anonymous-or-channel",
id: "anonymous-radio",
className: "input-radio",
value: "anonymous",
checked: !publishInChannel,
onChange: toggleAnonymousPublish
}), _react.default.createElement("label", {
className: "label-radio",
htmlFor: "anonymous-radio"
}, "Anonymous"));
};
var _default = ChooseAnonymousPublishRadio;
exports.default = _default;

View file

@ -1,30 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ChooseChannelPublishRadio = function ChooseChannelPublishRadio(_ref) {
var publishInChannel = _ref.publishInChannel,
toggleAnonymousPublish = _ref.toggleAnonymousPublish;
return _react.default.createElement("div", null, _react.default.createElement("input", {
type: "radio",
name: "anonymous-or-channel",
id: "channel-radio",
className: "input-radio",
value: "in a channel",
checked: publishInChannel,
onChange: toggleAnonymousPublish
}), _react.default.createElement("label", {
className: "label-radio",
htmlFor: "channel-radio"
}, "In a channel"));
};
var _default = ChooseChannelPublishRadio;
exports.default = _default;

View file

@ -1,82 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
var ClickToCopy =
/*#__PURE__*/
function (_React$Component) {
function ClickToCopy(props) {
var _this;
_classCallCheck(this, ClickToCopy);
_this = _possibleConstructorReturn(this, _getPrototypeOf(ClickToCopy).call(this, props));
_this.copyToClipboard = _this.copyToClipboard.bind(_assertThisInitialized(_assertThisInitialized(_this)));
return _this;
}
_createClass(ClickToCopy, [{
key: "copyToClipboard",
value: function copyToClipboard(event) {
var elementToCopy = event.target.id;
var element = document.getElementById(elementToCopy);
element.select();
try {
document.execCommand('copy');
} catch (err) {
this.setState({
error: 'Oops, unable to copy'
});
}
}
}, {
key: "render",
value: function render() {
var _this$props = this.props,
id = _this$props.id,
value = _this$props.value;
return _react.default.createElement("input", {
id: id,
value: value,
onClick: this.copyToClipboard,
type: "text",
className: "click-to-copy",
readOnly: true,
spellCheck: "false"
});
}
}]);
_inherits(ClickToCopy, _React$Component);
return ClickToCopy;
}(_react.default.Component);
var _default = ClickToCopy;
exports.default = _default;

View file

@ -1,54 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var Column =
/*#__PURE__*/
function (_React$Component) {
function Column() {
_classCallCheck(this, Column);
return _possibleConstructorReturn(this, _getPrototypeOf(Column).apply(this, arguments));
}
_createClass(Column, [{
key: "render",
value: function render() {
return _react.default.createElement("div", {
className: 'column'
}, this.props.children);
}
}]);
_inherits(Column, _React$Component);
return Column;
}(_react.default.Component);
var _default = Column;
exports.default = _default;

View file

@ -1,21 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var DropzoneDropItDisplay = function DropzoneDropItDisplay() {
return _react.default.createElement("div", {
className: 'dropzone-dropit-display'
}, _react.default.createElement("p", {
className: 'text--interactive'
}, "Drop it."));
};
var _default = DropzoneDropItDisplay;
exports.default = _default;

View file

@ -1,35 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _FormFeedbackDisplay = _interopRequireDefault(require("@components/FormFeedbackDisplay"));
var _Row = _interopRequireDefault(require("@components/Row"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var DropzoneInstructionsDisplay = function DropzoneInstructionsDisplay(_ref) {
var fileError = _ref.fileError;
return _react.default.createElement("div", {
className: 'dropzone-instructions-display'
}, _react.default.createElement(_Row.default, null, _react.default.createElement("p", {
className: 'text--large'
}, "Drag & drop image or video here to publish")), _react.default.createElement(_Row.default, null, _react.default.createElement("p", {
className: 'text--small'
}, "OR")), fileError ? _react.default.createElement("div", null, _react.default.createElement(_Row.default, null, _react.default.createElement("p", {
className: 'text--large text--underline'
}, "CHOOSE FILE")), _react.default.createElement(_FormFeedbackDisplay.default, {
errorMessage: fileError,
defaultMessage: false
})) : _react.default.createElement("p", {
className: 'text--large text--underline'
}, "CHOOSE FILE"));
};
var _default = DropzoneInstructionsDisplay;
exports.default = _default;

View file

@ -1,122 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var PublishPreview =
/*#__PURE__*/
function (_React$Component) {
function PublishPreview(props) {
var _this;
_classCallCheck(this, PublishPreview);
_this = _possibleConstructorReturn(this, _getPrototypeOf(PublishPreview).call(this, props));
_this.state = {
imgSource: '',
defaultThumbnail: '/assets/img/video_thumb_default.png'
};
return _this;
}
_createClass(PublishPreview, [{
key: "componentDidMount",
value: function componentDidMount() {
this.setPreviewImageSource(this.props.file);
}
}, {
key: "componentWillReceiveProps",
value: function componentWillReceiveProps(newProps) {
if (newProps.file !== this.props.file) {
this.setPreviewImageSource(newProps.file);
}
if (newProps.thumbnail !== this.props.thumbnail) {
if (newProps.thumbnail) {
this.setPreviewImageSourceFromFile(newProps.thumbnail);
} else {
this.setState({
imgSource: this.state.defaultThumbnail
});
}
}
}
}, {
key: "setPreviewImageSourceFromFile",
value: function setPreviewImageSourceFromFile(file) {
var _this2 = this;
var previewReader = new FileReader();
previewReader.readAsDataURL(file);
previewReader.onloadend = function () {
_this2.setState({
imgSource: previewReader.result
});
};
}
}, {
key: "setPreviewImageSource",
value: function setPreviewImageSource(file) {
if (file.type !== 'video/mp4') {
this.setPreviewImageSourceFromFile(file);
} else {
if (this.props.thumbnail) {
this.setPreviewImageSourceFromFile(this.props.thumbnail);
}
this.setState({
imgSource: this.state.defaultThumbnail
});
}
}
}, {
key: "render",
value: function render() {
return _react.default.createElement("img", {
src: this.state.imgSource,
className: 'dropzone-preview-image ' + (this.props.dimPreview ? 'publish-preview-dim' : ''),
alt: "publish preview"
});
}
}]);
_inherits(PublishPreview, _React$Component);
return PublishPreview;
}(_react.default.Component);
;
PublishPreview.propTypes = {
dimPreview: _propTypes.default.bool.isRequired,
file: _propTypes.default.object.isRequired,
thumbnail: _propTypes.default.object
};
var _default = PublishPreview;
exports.default = _default;

View file

@ -1,94 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireWildcard(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
var ExpandingTextarea =
/*#__PURE__*/
function (_Component) {
function ExpandingTextarea(props) {
var _this;
_classCallCheck(this, ExpandingTextarea);
_this = _possibleConstructorReturn(this, _getPrototypeOf(ExpandingTextarea).call(this, props));
_this._handleChange = _this._handleChange.bind(_assertThisInitialized(_assertThisInitialized(_this)));
return _this;
}
_createClass(ExpandingTextarea, [{
key: "componentDidMount",
value: function componentDidMount() {
this.adjustTextarea({});
}
}, {
key: "_handleChange",
value: function _handleChange(event) {
var onChange = this.props.onChange;
if (onChange) onChange(event);
this.adjustTextarea(event);
}
}, {
key: "adjustTextarea",
value: function adjustTextarea(_ref) {
var _ref$target = _ref.target,
target = _ref$target === void 0 ? this.el : _ref$target;
target.style.height = 0;
target.style.height = "".concat(target.scrollHeight, "px");
}
}, {
key: "render",
value: function render() {
var _this2 = this;
var rest = _extends({}, this.props);
return _react.default.createElement("textarea", _extends({}, rest, {
ref: function ref(x) {
return _this2.el = x;
},
onChange: this._handleChange
}));
}
}]);
_inherits(ExpandingTextarea, _Component);
return ExpandingTextarea;
}(_react.Component);
ExpandingTextarea.propTypes = {
onChange: _propTypes.default.func
};
var _default = ExpandingTextarea;
exports.default = _default;

View file

@ -1,27 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var FormFeedbackDisplay = function FormFeedbackDisplay(_ref) {
var errorMessage = _ref.errorMessage,
defaultMessage = _ref.defaultMessage;
return _react.default.createElement("div", {
className: 'form-feedback'
}, errorMessage ? _react.default.createElement("p", {
className: 'text--small text--failure'
}, errorMessage) : _react.default.createElement("div", null, defaultMessage ? _react.default.createElement("p", {
className: 'text--small text--secondary'
}, defaultMessage) : _react.default.createElement("p", {
className: 'text--small'
}, "\xA0")));
};
var _default = FormFeedbackDisplay;
exports.default = _default;

View file

@ -1,86 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactGa = _interopRequireDefault(require("react-ga"));
var _reactRouterDom = require("react-router-dom");
var _siteConfig = _interopRequireDefault(require("@config/siteConfig.json"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var googleId = null;
if (_siteConfig.default && _siteConfig.default.analytics) {
googleId = _siteConfig.default.analytics.googleId;
}
if (googleId) {
_reactGa.default.initialize(googleId);
}
var GAListener =
/*#__PURE__*/
function (_React$Component) {
function GAListener() {
_classCallCheck(this, GAListener);
return _possibleConstructorReturn(this, _getPrototypeOf(GAListener).apply(this, arguments));
}
_createClass(GAListener, [{
key: "componentDidMount",
value: function componentDidMount() {
this.sendPageView(this.props.history.location);
this.props.history.listen(this.sendPageView);
}
}, {
key: "sendPageView",
value: function sendPageView(location) {
if (googleId) {
_reactGa.default.set({
page: location.pathname
});
_reactGa.default.pageview(location.pathname);
}
}
}, {
key: "render",
value: function render() {
return this.props.children;
}
}]);
_inherits(GAListener, _React$Component);
return GAListener;
}(_react.default.Component);
var _default = (0, _reactRouterDom.withRouter)(GAListener);
exports.default = _default;

View file

@ -1,68 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _Row = _interopRequireDefault(require("@components/Row"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var HorizontalTriSplit =
/*#__PURE__*/
function (_React$Component) {
function HorizontalTriSplit() {
_classCallCheck(this, HorizontalTriSplit);
return _possibleConstructorReturn(this, _getPrototypeOf(HorizontalTriSplit).apply(this, arguments));
}
_createClass(HorizontalTriSplit, [{
key: "render",
value: function render() {
return _react.default.createElement("div", {
className: 'horizontal-quad-split'
}, _react.default.createElement("div", {
className: 'left-side'
}, _react.default.createElement("div", {
className: 'column-a'
}, _react.default.createElement(_Row.default, null, this.props.columnA)), _react.default.createElement("div", {
className: 'column-b'
}, _react.default.createElement(_Row.default, null, this.props.columnB))), _react.default.createElement("div", {
className: 'right-side'
}, _react.default.createElement("div", {
className: 'column-c'
}, _react.default.createElement(_Row.default, null, this.props.columnC)), _react.default.createElement("div", {
className: 'column-d'
}, _react.default.createElement(_Row.default, null, this.props.columnD))));
}
}]);
_inherits(HorizontalTriSplit, _React$Component);
return HorizontalTriSplit;
}(_react.default.Component);
var _default = HorizontalTriSplit;
exports.default = _default;

View file

@ -1,58 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var HorizontalSplit =
/*#__PURE__*/
function (_React$Component) {
function HorizontalSplit() {
_classCallCheck(this, HorizontalSplit);
return _possibleConstructorReturn(this, _getPrototypeOf(HorizontalSplit).apply(this, arguments));
}
_createClass(HorizontalSplit, [{
key: "render",
value: function render() {
return _react.default.createElement("div", {
className: 'horizontal-split'
}, _react.default.createElement("div", {
className: 'column'
}, this.props.leftSide), _react.default.createElement("div", {
className: 'column'
}, this.props.rightSide));
}
}]);
_inherits(HorizontalSplit, _React$Component);
return HorizontalSplit;
}(_react.default.Component);
var _default = HorizontalSplit;
exports.default = _default;

View file

@ -1,19 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var InactiveStatusBar = function InactiveStatusBar() {
return _react.default.createElement("span", {
className: "progress-bar--inactive"
}, "| ");
};
var _default = InactiveStatusBar;
exports.default = _default;

View file

@ -1,20 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var Label = function Label(_ref) {
var value = _ref.value;
return _react.default.createElement("label", {
className: "label"
}, value);
};
var _default = Label;
exports.default = _default;

View file

@ -1,81 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactRouterDom = require("react-router-dom");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function Logo() {
return _react.default.createElement("svg", {
version: "1.1",
id: "Layer_1",
x: "0px",
y: "0px",
height: "24px",
viewBox: "0 0 80 31",
enableBackground: "new 0 0 80 31",
className: "nav-bar-logo"
}, _react.default.createElement(_reactRouterDom.Link, {
to: "/"
}, _react.default.createElement("title", null, "Logo"), _react.default.createElement("desc", null, "Spee.ch logo"), _react.default.createElement("g", {
id: "About"
}, _react.default.createElement("g", {
id: "Publish-Form-V2-_x28_filled_x29_",
transform: "translate(-42.000000, -23.000000)"
}, _react.default.createElement("g", {
id: "Group-17",
transform: "translate(42.000000, 22.000000)"
}, _react.default.createElement("text", {
transform: "matrix(1 0 0 1 0 20)",
fontSize: "25",
fontFamily: "Roboto"
}, "Spee<h"), _react.default.createElement("g", {
id: "Group-16",
transform: "translate(0.000000, 30.000000)"
}, _react.default.createElement("path", {
id: "Line-8",
fill: "none",
stroke: "#09F911",
strokeWidth: "1",
strokeLinecap: "square",
d: "M0.5,1.5h15"
}), _react.default.createElement("path", {
id: "Line-8-Copy",
fill: "none",
stroke: "#029D74",
strokeWidth: "1",
strokeLinecap: "square",
d: "M16.5,1.5h15"
}), _react.default.createElement("path", {
id: "Line-8-Copy-2",
fill: "none",
stroke: "#E35BD8",
strokeWidth: "1",
strokeLinecap: "square",
d: "M32.5,1.5h15"
}), _react.default.createElement("path", {
id: "Line-8-Copy-3",
fill: "none",
stroke: "#4156C5",
strokeWidth: "1",
strokeLinecap: "square",
d: "M48.5,1.5h15"
}), _react.default.createElement("path", {
id: "Line-8-Copy-4",
fill: "none",
stroke: "#635688",
strokeWidth: "1",
strokeLinecap: "square",
d: "M64.5,1.5h15"
})))))));
}
;
var _default = Logo;
exports.default = _default;

View file

@ -1,62 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _SpaceBetween = _interopRequireDefault(require("@components/SpaceBetween"));
var _Logo = _interopRequireDefault(require("@components/Logo"));
var _SiteDescription = _interopRequireDefault(require("@containers/SiteDescription"));
var _NavigationLinks = _interopRequireDefault(require("@containers/NavigationLinks"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var NavBar =
/*#__PURE__*/
function (_React$Component) {
function NavBar() {
_classCallCheck(this, NavBar);
return _possibleConstructorReturn(this, _getPrototypeOf(NavBar).apply(this, arguments));
}
_createClass(NavBar, [{
key: "render",
value: function render() {
return _react.default.createElement("div", {
className: 'nav-bar'
}, _react.default.createElement(_SpaceBetween.default, null, _react.default.createElement(_Logo.default, null), _react.default.createElement(_SiteDescription.default, null), _react.default.createElement(_NavigationLinks.default, null)));
}
}]);
_inherits(NavBar, _React$Component);
return NavBar;
}(_react.default.Component);
var _default = NavBar;
exports.default = _default;

View file

@ -1,36 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function NavBarChannelDropdown(_ref) {
var channelName = _ref.channelName,
handleSelection = _ref.handleSelection,
defaultSelection = _ref.defaultSelection,
VIEW = _ref.VIEW,
LOGOUT = _ref.LOGOUT;
return _react.default.createElement("div", {
className: 'nav-bar-link link--nav'
}, _react.default.createElement("select", {
type: "text",
id: "nav-bar-channel-select",
className: "select select--arrow",
onChange: handleSelection,
value: defaultSelection
}, _react.default.createElement("option", {
id: "nav-bar-channel-select-channel-option"
}, channelName), _react.default.createElement("option", {
value: VIEW
}, "View"), _react.default.createElement("option", {
value: LOGOUT
}, "Logout")));
}
var _default = NavBarChannelDropdown;
exports.default = _default;

View file

@ -1,59 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var PageContent =
/*#__PURE__*/
function (_React$Component) {
function PageContent() {
_classCallCheck(this, PageContent);
return _possibleConstructorReturn(this, _getPrototypeOf(PageContent).apply(this, arguments));
}
_createClass(PageContent, [{
key: "shouldComponentUpdate",
value: function shouldComponentUpdate() {
return false;
}
}, {
key: "render",
value: function render() {
return _react.default.createElement("div", {
className: 'page-content'
}, this.props.children);
}
}]);
_inherits(PageContent, _React$Component);
return PageContent;
}(_react.default.Component);
var _default = PageContent;
exports.default = _default;

View file

@ -1,65 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _SEO = _interopRequireDefault(require("@containers/SEO"));
var _NavBar = _interopRequireDefault(require("@components/NavBar"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var PageLayout =
/*#__PURE__*/
function (_React$Component) {
function PageLayout() {
_classCallCheck(this, PageLayout);
return _possibleConstructorReturn(this, _getPrototypeOf(PageLayout).apply(this, arguments));
}
_createClass(PageLayout, [{
key: "render",
value: function render() {
return _react.default.createElement("div", {
className: 'page-layout'
}, _react.default.createElement(_SEO.default, {
pageTitle: this.props.pageTitle,
pageUri: this.props.pageUri,
asset: this.props.asset,
channel: this.props.channel
}), _react.default.createElement(_NavBar.default, null), _react.default.createElement("div", {
className: 'content'
}, this.props.children));
}
}]);
_inherits(PageLayout, _React$Component);
return PageLayout;
}(_react.default.Component);
var _default = PageLayout;
exports.default = _default;

View file

@ -1,10 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var style = {// backgroundColor: 'grey',
};
var _default = style;
exports.default = _default;

View file

@ -1,66 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _SEO = _interopRequireDefault(require("@containers/SEO"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var PageLayoutShowLite =
/*#__PURE__*/
function (_React$Component) {
function PageLayoutShowLite() {
_classCallCheck(this, PageLayoutShowLite);
return _possibleConstructorReturn(this, _getPrototypeOf(PageLayoutShowLite).apply(this, arguments));
}
_createClass(PageLayoutShowLite, [{
key: "shouldComponentUpdate",
value: function shouldComponentUpdate() {
return false;
}
}, {
key: "render",
value: function render() {
return _react.default.createElement("div", {
className: 'page-layout-show-lite'
}, _react.default.createElement(_SEO.default, {
pageTitle: this.props.pageTitle,
asset: this.props.asset
}), _react.default.createElement("div", {
className: 'content'
}, this.props.children));
}
}]);
_inherits(PageLayoutShowLite, _React$Component);
return PageLayoutShowLite;
}(_react.default.Component);
var _default = PageLayoutShowLite;
exports.default = _default;

View file

@ -1,145 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _ActiveStatusBar = _interopRequireDefault(require("../ActiveStatusBar"));
var _InactiveStatusBar = _interopRequireDefault(require("../InactiveStatusBar"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
var ProgressBar =
/*#__PURE__*/
function (_React$Component) {
function ProgressBar(props) {
var _this;
_classCallCheck(this, ProgressBar);
_this = _possibleConstructorReturn(this, _getPrototypeOf(ProgressBar).call(this, props));
_this.state = {
bars: [],
index: 0,
incrementer: 1
};
_this.createBars = _this.createBars.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.startProgressBar = _this.startProgressBar.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.updateProgressBar = _this.updateProgressBar.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.stopProgressBar = _this.stopProgressBar.bind(_assertThisInitialized(_assertThisInitialized(_this)));
return _this;
}
_createClass(ProgressBar, [{
key: "componentDidMount",
value: function componentDidMount() {
this.createBars();
this.startProgressBar();
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.stopProgressBar();
}
}, {
key: "createBars",
value: function createBars() {
var bars = [];
for (var i = 0; i <= this.props.size; i++) {
bars.push({
isActive: false
});
}
this.setState({
bars: bars
});
}
}, {
key: "startProgressBar",
value: function startProgressBar() {
this.updateInterval = setInterval(this.updateProgressBar.bind(this), 300);
}
}, {
key: "updateProgressBar",
value: function updateProgressBar() {
var index = this.state.index;
var incrementer = this.state.incrementer;
var bars = this.state.bars; // flip incrementer if necessary, to stay in bounds
if (index < 0 || index > this.props.size) {
incrementer = incrementer * -1;
index += incrementer;
} // update the indexed bar
if (incrementer > 0) {
bars[index].isActive = true;
} else {
bars[index].isActive = false;
}
; // increment index
index += incrementer; // update state
this.setState({
bars: bars,
incrementer: incrementer,
index: index
});
}
}, {
key: "stopProgressBar",
value: function stopProgressBar() {
clearInterval(this.updateInterval);
}
}, {
key: "render",
value: function render() {
return _react.default.createElement("div", null, this.state.bars.map(function (bar, index) {
return bar.isActive ? _react.default.createElement(_ActiveStatusBar.default, {
key: index
}) : _react.default.createElement(_InactiveStatusBar.default, {
key: index
});
}));
}
}]);
_inherits(ProgressBar, _React$Component);
return ProgressBar;
}(_react.default.Component);
;
ProgressBar.propTypes = {
size: _propTypes.default.number.isRequired
};
var _default = ProgressBar;
exports.default = _default;

View file

@ -1,42 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _RowLabeled = _interopRequireDefault(require("@components/RowLabeled"));
var _Label = _interopRequireDefault(require("@components/Label"));
var _ExpandingTextArea = _interopRequireDefault(require("@components/ExpandingTextArea"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var PublishDescriptionInput = function PublishDescriptionInput(_ref) {
var description = _ref.description,
handleInput = _ref.handleInput;
return _react.default.createElement(_RowLabeled.default, {
label: _react.default.createElement(_Label.default, {
value: 'Description:'
}),
content: _react.default.createElement(_ExpandingTextArea.default, {
id: "publish-description",
className: "textarea textarea--primary textarea--full-width",
rows: 1,
maxLength: 2000,
style: {
maxHeight: 200
},
name: "description",
placeholder: "Optional description",
value: description,
onChange: handleInput
})
});
};
var _default = PublishDescriptionInput;
exports.default = _default;

View file

@ -1,60 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _Row = _interopRequireDefault(require("@components/Row"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var RowLabeled =
/*#__PURE__*/
function (_React$Component) {
function RowLabeled() {
_classCallCheck(this, RowLabeled);
return _possibleConstructorReturn(this, _getPrototypeOf(RowLabeled).apply(this, arguments));
}
_createClass(RowLabeled, [{
key: "render",
value: function render() {
return _react.default.createElement(_Row.default, null, _react.default.createElement("div", {
className: 'publish-details-row'
}, _react.default.createElement("div", {
className: 'publish-details-label'
}, this.props.label), _react.default.createElement("div", {
className: 'publish-details-content'
}, this.props.content)));
}
}]);
_inherits(RowLabeled, _React$Component);
return RowLabeled;
}(_react.default.Component);
var _default = RowLabeled;
exports.default = _default;

View file

@ -1,23 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var PublishFinePrint = function PublishFinePrint() {
return _react.default.createElement("p", {
className: 'text--extra-small text--secondary'
}, "By clicking 'Publish', you affirm that you have the rights to publish this content to the LBRY network, and that you understand the properties of publishing it to a decentralized, user-controlled network. ", _react.default.createElement("a", {
className: "link--primary",
target: "_blank",
href: "https://lbry.io/learn"
}, "Read more."));
};
var _default = PublishFinePrint;
exports.default = _default;

View file

@ -1,39 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _RowLabeled = _interopRequireDefault(require("@components/RowLabeled"));
var _Label = _interopRequireDefault(require("@components/Label"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var PublishLicenseInput = function PublishLicenseInput(_ref) {
var handleSelect = _ref.handleSelect;
return _react.default.createElement(_RowLabeled.default, {
label: _react.default.createElement(_Label.default, {
value: 'License:'
}),
content: _react.default.createElement("select", {
type: "text",
name: "license",
id: "publish-license",
className: "select select--primary",
onChange: handleSelect
}, _react.default.createElement("option", {
value: " "
}, "Unspecified"), _react.default.createElement("option", {
value: "Public Domain"
}, "Public Domain"), _react.default.createElement("option", {
value: "Creative Commons"
}, "Creative Commons"))
});
};
var _default = PublishLicenseInput;
exports.default = _default;

View file

@ -1,35 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _RowLabeled = _interopRequireDefault(require("@components/RowLabeled"));
var _Label = _interopRequireDefault(require("@components/Label"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var PublishNsfwInput = function PublishNsfwInput(_ref) {
var nsfw = _ref.nsfw,
handleInput = _ref.handleInput;
return _react.default.createElement(_RowLabeled.default, {
label: _react.default.createElement(_Label.default, {
value: 'Mature:'
}),
content: _react.default.createElement("input", {
className: "input-checkbox",
type: "checkbox",
id: "publish-nsfw",
name: "nsfw",
value: nsfw,
onChange: handleInput
})
});
};
var _default = PublishNsfwInput;
exports.default = _default;

View file

@ -1,66 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _HorizontalSplit = _interopRequireDefault(require("@components/HorizontalSplit"));
var _Dropzone = _interopRequireDefault(require("@containers/Dropzone"));
var _PublishDetails = _interopRequireDefault(require("@containers/PublishDetails"));
var _PublishTitleInput = _interopRequireDefault(require("@containers/PublishTitleInput"));
var _Row = _interopRequireDefault(require("@components/Row"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var PublishPreview =
/*#__PURE__*/
function (_React$Component) {
function PublishPreview() {
_classCallCheck(this, PublishPreview);
return _possibleConstructorReturn(this, _getPrototypeOf(PublishPreview).apply(this, arguments));
}
_createClass(PublishPreview, [{
key: "render",
value: function render() {
return _react.default.createElement("div", null, _react.default.createElement(_Row.default, null, _react.default.createElement(_PublishTitleInput.default, null)), _react.default.createElement(_HorizontalSplit.default, {
leftSide: _react.default.createElement(_Dropzone.default, null),
rightSide: _react.default.createElement(_PublishDetails.default, null)
}));
}
}]);
_inherits(PublishPreview, _React$Component);
return PublishPreview;
}(_react.default.Component);
;
var _default = PublishPreview;
exports.default = _default;

View file

@ -1,50 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function UrlMiddle(_ref) {
var publishInChannel = _ref.publishInChannel,
selectedChannel = _ref.selectedChannel,
loggedInChannelName = _ref.loggedInChannelName,
loggedInChannelShortId = _ref.loggedInChannelShortId;
if (publishInChannel) {
if (selectedChannel === loggedInChannelName) {
return _react.default.createElement("span", {
id: "url-channel",
className: "publish-url-text"
}, loggedInChannelName, ":", loggedInChannelShortId, " /");
}
return _react.default.createElement("span", {
id: "url-channel-placeholder",
className: "publish-url-text tooltip"
}, "@channel", _react.default.createElement("span", {
className: "tooltip-text"
}, "Select a channel below"), " /");
}
return _react.default.createElement("span", {
id: "url-no-channel-placeholder",
className: "publish-url-text tooltip"
}, "xyz", _react.default.createElement("span", {
className: "tooltip-text"
}, "This will be a random id"), " /");
}
UrlMiddle.propTypes = {
publishInChannel: _propTypes.default.bool.isRequired,
loggedInChannelName: _propTypes.default.string,
loggedInChannelShortId: _propTypes.default.string
};
var _default = UrlMiddle;
exports.default = _default;

View file

@ -1,54 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var Row =
/*#__PURE__*/
function (_React$Component) {
function Row() {
_classCallCheck(this, Row);
return _possibleConstructorReturn(this, _getPrototypeOf(Row).apply(this, arguments));
}
_createClass(Row, [{
key: "render",
value: function render() {
return _react.default.createElement("div", {
className: 'row'
}, this.props.children);
}
}]);
_inherits(Row, _React$Component);
return Row;
}(_react.default.Component);
var _default = Row;
exports.default = _default;

View file

@ -1,58 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var RowLabeled =
/*#__PURE__*/
function (_React$Component) {
function RowLabeled() {
_classCallCheck(this, RowLabeled);
return _possibleConstructorReturn(this, _getPrototypeOf(RowLabeled).apply(this, arguments));
}
_createClass(RowLabeled, [{
key: "render",
value: function render() {
return _react.default.createElement("div", {
className: 'row-labeled'
}, _react.default.createElement("div", {
className: 'row-labeled-label'
}, this.props.label), _react.default.createElement("div", {
className: 'row-labeled-content'
}, this.props.content));
}
}]);
_inherits(RowLabeled, _React$Component);
return RowLabeled;
}(_react.default.Component);
var _default = RowLabeled;
exports.default = _default;

View file

@ -1,54 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var SpaceAround =
/*#__PURE__*/
function (_React$Component) {
function SpaceAround() {
_classCallCheck(this, SpaceAround);
return _possibleConstructorReturn(this, _getPrototypeOf(SpaceAround).apply(this, arguments));
}
_createClass(SpaceAround, [{
key: "render",
value: function render() {
return _react.default.createElement("div", {
className: 'space-around'
}, this.props.children);
}
}]);
_inherits(SpaceAround, _React$Component);
return SpaceAround;
}(_react.default.Component);
var _default = SpaceAround;
exports.default = _default;

View file

@ -1,54 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var SpaceBetween =
/*#__PURE__*/
function (_React$Component) {
function SpaceBetween() {
_classCallCheck(this, SpaceBetween);
return _possibleConstructorReturn(this, _getPrototypeOf(SpaceBetween).apply(this, arguments));
}
_createClass(SpaceBetween, [{
key: "render",
value: function render() {
return _react.default.createElement("div", {
className: 'space-between'
}, this.props.children);
}
}]);
_inherits(SpaceBetween, _React$Component);
return SpaceBetween;
}(_react.default.Component);
var _default = SpaceBetween;
exports.default = _default;

View file

@ -1,54 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var VerticalSplit =
/*#__PURE__*/
function (_React$Component) {
function VerticalSplit() {
_classCallCheck(this, VerticalSplit);
return _possibleConstructorReturn(this, _getPrototypeOf(VerticalSplit).apply(this, arguments));
}
_createClass(VerticalSplit, [{
key: "render",
value: function render() {
return _react.default.createElement("div", {
className: 'vertical-split'
}, this.props.top, this.props.bottom);
}
}]);
_inherits(VerticalSplit, _React$Component);
return VerticalSplit;
}(_react.default.Component);
var _default = VerticalSplit;
exports.default = _default;

View file

@ -1,14 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AVAILABLE = exports.ERROR = exports.UNAVAILABLE = exports.LOCAL_CHECK = void 0;
var LOCAL_CHECK = 'LOCAL_CHECK';
exports.LOCAL_CHECK = LOCAL_CHECK;
var UNAVAILABLE = 'UNAVAILABLE';
exports.UNAVAILABLE = UNAVAILABLE;
var ERROR = 'ERROR';
exports.ERROR = ERROR;
var AVAILABLE = 'AVAILABLE';
exports.AVAILABLE = AVAILABLE;

View file

@ -1,12 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CHANNEL_LOGOUT = exports.CHANNEL_LOGIN_CHECK = exports.CHANNEL_UPDATE = void 0;
var CHANNEL_UPDATE = 'CHANNEL_UPDATE';
exports.CHANNEL_UPDATE = CHANNEL_UPDATE;
var CHANNEL_LOGIN_CHECK = 'CHANNEL_LOGIN_CHECK';
exports.CHANNEL_LOGIN_CHECK = CHANNEL_LOGIN_CHECK;
var CHANNEL_LOGOUT = 'CHANNEL_LOGOUT';
exports.CHANNEL_LOGOUT = CHANNEL_LOGOUT;

View file

@ -1,16 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CHANNEL_CREATE = exports.CHANNEL_AVAILABILITY = exports.CHANNEL_CREATE_UPDATE_STATUS = exports.CHANNEL_CREATE_UPDATE_PASSWORD = exports.CHANNEL_CREATE_UPDATE_NAME = void 0;
var CHANNEL_CREATE_UPDATE_NAME = 'CHANNEL_CREATE_UPDATE_NAME';
exports.CHANNEL_CREATE_UPDATE_NAME = CHANNEL_CREATE_UPDATE_NAME;
var CHANNEL_CREATE_UPDATE_PASSWORD = 'CHANNEL_CREATE_UPDATE_PASSWORD';
exports.CHANNEL_CREATE_UPDATE_PASSWORD = CHANNEL_CREATE_UPDATE_PASSWORD;
var CHANNEL_CREATE_UPDATE_STATUS = 'CHANNEL_CREATE_UPDATE_STATUS';
exports.CHANNEL_CREATE_UPDATE_STATUS = CHANNEL_CREATE_UPDATE_STATUS;
var CHANNEL_AVAILABILITY = 'CHANNEL_AVAILABILITY';
exports.CHANNEL_AVAILABILITY = CHANNEL_AVAILABILITY;
var CHANNEL_CREATE = 'CHANNEL_CREATE';
exports.CHANNEL_CREATE = CHANNEL_CREATE;

View file

@ -1,30 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CLAIM_AVAILABILITY = exports.PUBLISH_START = exports.THUMBNAIL_NEW = exports.TOGGLE_METADATA_INPUTS = exports.SELECTED_CHANNEL_UPDATE = exports.ERROR_UPDATE = exports.PUBLISH_STATUS_UPDATE = exports.SET_PUBLISH_IN_CHANNEL = exports.CLAIM_UPDATE = exports.METADATA_UPDATE = exports.FILE_CLEAR = exports.FILE_SELECTED = void 0;
var FILE_SELECTED = 'FILE_SELECTED';
exports.FILE_SELECTED = FILE_SELECTED;
var FILE_CLEAR = 'FILE_CLEAR';
exports.FILE_CLEAR = FILE_CLEAR;
var METADATA_UPDATE = 'METADATA_UPDATE';
exports.METADATA_UPDATE = METADATA_UPDATE;
var CLAIM_UPDATE = 'CLAIM_UPDATE';
exports.CLAIM_UPDATE = CLAIM_UPDATE;
var SET_PUBLISH_IN_CHANNEL = 'SET_PUBLISH_IN_CHANNEL';
exports.SET_PUBLISH_IN_CHANNEL = SET_PUBLISH_IN_CHANNEL;
var PUBLISH_STATUS_UPDATE = 'PUBLISH_STATUS_UPDATE';
exports.PUBLISH_STATUS_UPDATE = PUBLISH_STATUS_UPDATE;
var ERROR_UPDATE = 'ERROR_UPDATE';
exports.ERROR_UPDATE = ERROR_UPDATE;
var SELECTED_CHANNEL_UPDATE = 'SELECTED_CHANNEL_UPDATE';
exports.SELECTED_CHANNEL_UPDATE = SELECTED_CHANNEL_UPDATE;
var TOGGLE_METADATA_INPUTS = 'TOGGLE_METADATA_INPUTS';
exports.TOGGLE_METADATA_INPUTS = TOGGLE_METADATA_INPUTS;
var THUMBNAIL_NEW = 'THUMBNAIL_NEW';
exports.THUMBNAIL_NEW = THUMBNAIL_NEW;
var PUBLISH_START = 'PUBLISH_START';
exports.PUBLISH_START = PUBLISH_START;
var CLAIM_AVAILABILITY = 'CLAIM_AVAILABILITY';
exports.CLAIM_AVAILABILITY = CLAIM_AVAILABILITY;

View file

@ -1,10 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CREATE = exports.LOGIN = void 0;
var LOGIN = 'Existing';
exports.LOGIN = LOGIN;
var CREATE = 'New';
exports.CREATE = CREATE;

View file

@ -1,16 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FAILED = exports.SUCCESS = exports.PUBLISHING = exports.LOADING = exports.LOAD_START = void 0;
var LOAD_START = 'LOAD_START';
exports.LOAD_START = LOAD_START;
var LOADING = 'LOADING';
exports.LOADING = LOADING;
var PUBLISHING = 'PUBLISHING';
exports.PUBLISHING = PUBLISHING;
var SUCCESS = 'SUCCESS';
exports.SUCCESS = SUCCESS;
var FAILED = 'FAILED';
exports.FAILED = FAILED;

View file

@ -1,36 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DISPLAY_ASSET_ERROR = exports.FILE_AVAILABILITY_UPDATE = exports.FILE_REQUESTED = exports.CHANNEL_CLAIMS_UPDATE_SUCCESS = exports.CHANNEL_CLAIMS_UPDATE_ASYNC = exports.CHANNEL_ADD = exports.ASSET_ADD = exports.REQUEST_LIST_ADD = exports.CHANNEL_REQUEST_NEW = exports.ASSET_REQUEST_NEW = exports.REQUEST_UPDATE = exports.REQUEST_ERROR = exports.HANDLE_SHOW_URI = void 0;
// request actions
var HANDLE_SHOW_URI = 'HANDLE_SHOW_URI';
exports.HANDLE_SHOW_URI = HANDLE_SHOW_URI;
var REQUEST_ERROR = 'REQUEST_ERROR';
exports.REQUEST_ERROR = REQUEST_ERROR;
var REQUEST_UPDATE = 'REQUEST_UPDATE';
exports.REQUEST_UPDATE = REQUEST_UPDATE;
var ASSET_REQUEST_NEW = 'ASSET_REQUEST_NEW';
exports.ASSET_REQUEST_NEW = ASSET_REQUEST_NEW;
var CHANNEL_REQUEST_NEW = 'CHANNEL_REQUEST_NEW';
exports.CHANNEL_REQUEST_NEW = CHANNEL_REQUEST_NEW;
var REQUEST_LIST_ADD = 'REQUEST_LIST_ADD'; // asset actions
exports.REQUEST_LIST_ADD = REQUEST_LIST_ADD;
var ASSET_ADD = "ASSET_ADD"; // channel actions
exports.ASSET_ADD = ASSET_ADD;
var CHANNEL_ADD = 'CHANNEL_ADD';
exports.CHANNEL_ADD = CHANNEL_ADD;
var CHANNEL_CLAIMS_UPDATE_ASYNC = 'CHANNEL_CLAIMS_UPDATE_ASYNC';
exports.CHANNEL_CLAIMS_UPDATE_ASYNC = CHANNEL_CLAIMS_UPDATE_ASYNC;
var CHANNEL_CLAIMS_UPDATE_SUCCESS = 'CHANNEL_CLAIMS_UPDATE_SUCCESS'; // asset/file display actions
exports.CHANNEL_CLAIMS_UPDATE_SUCCESS = CHANNEL_CLAIMS_UPDATE_SUCCESS;
var FILE_REQUESTED = 'FILE_REQUESTED';
exports.FILE_REQUESTED = FILE_REQUESTED;
var FILE_AVAILABILITY_UPDATE = 'FILE_AVAILABILITY_UPDATE';
exports.FILE_AVAILABILITY_UPDATE = FILE_AVAILABILITY_UPDATE;
var DISPLAY_ASSET_ERROR = 'DISPLAY_ASSET_ERROR';
exports.DISPLAY_ASSET_ERROR = DISPLAY_ASSET_ERROR;

View file

@ -1,12 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ASSET_DETAILS = exports.ASSET_LITE = exports.CHANNEL = void 0;
var CHANNEL = 'CHANNEL';
exports.CHANNEL = CHANNEL;
var ASSET_LITE = 'ASSET_LITE';
exports.ASSET_LITE = ASSET_LITE;
var ASSET_DETAILS = 'ASSET_DETAILS';
exports.ASSET_DETAILS = ASSET_DETAILS;

View file

@ -1,43 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactRedux = require("react-redux");
var _view = _interopRequireDefault(require("./view"));
var _show = require("../../actions/show");
var _show2 = require("../../selectors/show");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var mapStateToProps = function mapStateToProps(_ref) {
var show = _ref.show;
// select error and status
var error = show.displayAsset.error;
var status = show.displayAsset.status; // select asset
var asset = (0, _show2.selectAsset)(show); // return props
return {
error: error,
status: status,
asset: asset
};
};
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
return {
onFileRequest: function onFileRequest(name, claimId) {
dispatch((0, _show.fileRequested)(name, claimId));
}
};
};
var _default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view.default);
exports.default = _default;

View file

@ -1,113 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _ProgressBar = _interopRequireDefault(require("@components/ProgressBar"));
var _asset_display_states = require("../../constants/asset_display_states");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var AssetDisplay =
/*#__PURE__*/
function (_React$Component) {
function AssetDisplay() {
_classCallCheck(this, AssetDisplay);
return _possibleConstructorReturn(this, _getPrototypeOf(AssetDisplay).apply(this, arguments));
}
_createClass(AssetDisplay, [{
key: "componentDidMount",
value: function componentDidMount() {
var _this$props$asset$cla = this.props.asset.claimData,
name = _this$props$asset$cla.name,
claimId = _this$props$asset$cla.claimId;
this.props.onFileRequest(name, claimId);
}
}, {
key: "render",
value: function render() {
var _this$props = this.props,
status = _this$props.status,
error = _this$props.error,
_this$props$asset$cla2 = _this$props.asset.claimData,
name = _this$props$asset$cla2.name,
claimId = _this$props$asset$cla2.claimId,
contentType = _this$props$asset$cla2.contentType,
fileExt = _this$props$asset$cla2.fileExt,
thumbnail = _this$props$asset$cla2.thumbnail;
var sourceUrl = "/".concat(claimId, "/").concat(name, ".").concat(fileExt);
return _react.default.createElement("div", {
className: 'asset-display'
}, status === _asset_display_states.LOCAL_CHECK && _react.default.createElement("div", null, _react.default.createElement("p", null, "Checking to see if Spee.ch has your asset locally...")), status === _asset_display_states.UNAVAILABLE && _react.default.createElement("div", null, _react.default.createElement("p", null, "Sit tight, we're searching the LBRY blockchain for your asset!"), _react.default.createElement(_ProgressBar.default, {
size: 12
}), _react.default.createElement("p", null, "Curious what magic is happening here? ", _react.default.createElement("a", {
className: "link--primary",
target: "blank",
href: "https://lbry.io/faq/what-is-lbry"
}, "Learn more."))), status === _asset_display_states.ERROR && _react.default.createElement("div", null, _react.default.createElement("p", null, "Unfortunately, we couldn't download your asset from LBRY. You can help us out by sharing the below error message in the ", _react.default.createElement("a", {
className: "link--primary",
href: "https://chat.lbry.io",
target: "_blank"
}, "LBRY discord"), "."), _react.default.createElement("i", null, _react.default.createElement("p", {
id: "error-message"
}, error))), status === _asset_display_states.AVAILABLE && function () {
switch (contentType) {
case 'image/jpeg':
case 'image/jpg':
case 'image/png':
case 'image/gif':
return _react.default.createElement("img", {
className: "asset-image",
src: sourceUrl,
alt: name
});
case 'video/mp4':
return _react.default.createElement("video", {
className: "asset-video",
controls: true,
poster: thumbnail
}, _react.default.createElement("source", {
src: sourceUrl
}), _react.default.createElement("p", null, "Your browser does not support the ", _react.default.createElement("code", null, "video"), " element."));
default:
return _react.default.createElement("p", null, "Unsupported content type");
}
}());
}
}]);
_inherits(AssetDisplay, _React$Component);
return AssetDisplay;
}(_react.default.Component);
;
var _default = AssetDisplay;
exports.default = _default;

View file

@ -1,28 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactRedux = require("react-redux");
var _view = _interopRequireDefault(require("./view"));
var _show = require("../../selectors/show");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var mapStateToProps = function mapStateToProps(_ref) {
var show = _ref.show;
// select asset
var asset = (0, _show.selectAsset)(show); // return props
return {
asset: asset
};
};
var _default = (0, _reactRedux.connect)(mapStateToProps, null)(_view.default);
exports.default = _default;

View file

@ -1,131 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactRouterDom = require("react-router-dom");
var _Label = _interopRequireDefault(require("@components/Label"));
var _RowLabeled = _interopRequireDefault(require("@components/RowLabeled"));
var _Row = _interopRequireDefault(require("@components/Row"));
var _SpaceBetween = _interopRequireDefault(require("@components/SpaceBetween"));
var _AssetShareButtons = _interopRequireDefault(require("@components/AssetShareButtons"));
var _ClickToCopy = _interopRequireDefault(require("@components/ClickToCopy"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var AssetInfo =
/*#__PURE__*/
function (_React$Component) {
function AssetInfo() {
_classCallCheck(this, AssetInfo);
return _possibleConstructorReturn(this, _getPrototypeOf(AssetInfo).apply(this, arguments));
}
_createClass(AssetInfo, [{
key: "render",
value: function render() {
var _this$props$asset = this.props.asset,
shortId = _this$props$asset.shortId,
_this$props$asset$cla = _this$props$asset.claimData,
channelName = _this$props$asset$cla.channelName,
certificateId = _this$props$asset$cla.certificateId,
description = _this$props$asset$cla.description,
name = _this$props$asset$cla.name,
claimId = _this$props$asset$cla.claimId,
fileExt = _this$props$asset$cla.fileExt,
contentType = _this$props$asset$cla.contentType,
thumbnail = _this$props$asset$cla.thumbnail,
host = _this$props$asset$cla.host;
return _react.default.createElement("div", null, channelName && _react.default.createElement(_Row.default, null, _react.default.createElement(_RowLabeled.default, {
label: _react.default.createElement(_Label.default, {
value: 'Channel:'
}),
content: _react.default.createElement("span", {
className: "text"
}, _react.default.createElement(_reactRouterDom.Link, {
to: "/".concat(channelName, ":").concat(certificateId)
}, channelName))
})), _react.default.createElement(_Row.default, null, _react.default.createElement(_RowLabeled.default, {
label: _react.default.createElement(_Label.default, {
value: 'Share:'
}),
content: _react.default.createElement(_AssetShareButtons.default, {
host: host,
name: name,
shortId: shortId
})
})), _react.default.createElement(_Row.default, null, _react.default.createElement(_RowLabeled.default, {
label: _react.default.createElement(_Label.default, {
value: 'Link:'
}),
content: _react.default.createElement(_ClickToCopy.default, {
id: 'short-link',
value: "".concat(host, "/").concat(shortId, "/").concat(name)
})
})), _react.default.createElement(_Row.default, null, _react.default.createElement(_RowLabeled.default, {
label: _react.default.createElement(_Label.default, {
value: 'Embed:'
}),
content: _react.default.createElement("div", null, contentType === 'video/mp4' ? _react.default.createElement(_ClickToCopy.default, {
id: 'embed-text-video',
value: "<video width=\"100%\" controls poster=\"".concat(thumbnail, "\" src=\"").concat(host, "/").concat(claimId, "/").concat(name, ".").concat(fileExt, "\"/></video>")
}) : _react.default.createElement(_ClickToCopy.default, {
id: 'embed-text-image',
value: "<img src=\"".concat(host, "/").concat(claimId, "/").concat(name, ".").concat(fileExt, "\"/>")
}))
})), _react.default.createElement(_Row.default, null, _react.default.createElement(_SpaceBetween.default, null, _react.default.createElement("a", {
className: "link--primary",
href: "".concat(host, "/").concat(claimId, "/").concat(name, ".").concat(fileExt)
}, "Direct Link"), _react.default.createElement("a", {
className: 'link--primary',
href: "".concat(host, "/").concat(claimId, "/").concat(name, ".").concat(fileExt),
download: name
}, "Download"), _react.default.createElement("a", {
className: 'link--primary',
target: "_blank",
href: "https://lbry.io/dmca"
}, "Report"))), description && _react.default.createElement(_Row.default, null, _react.default.createElement("p", null, description)), _react.default.createElement(_Row.default, null, _react.default.createElement("p", null, "Hosted via the ", _react.default.createElement("a", {
className: 'link--primary',
href: 'https://lbry.io/get',
target: '_blank'
}, "LBRY"), " blockchain")));
}
}]);
_inherits(AssetInfo, _React$Component);
return AssetInfo;
}(_react.default.Component);
;
var _default = AssetInfo;
exports.default = _default;

View file

@ -1,29 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactRedux = require("react-redux");
var _view = _interopRequireDefault(require("./view"));
var _show = require("../../selectors/show");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var mapStateToProps = function mapStateToProps(_ref) {
var show = _ref.show;
var _selectAsset = (0, _show.selectAsset)(show),
title = _selectAsset.claimData.title;
return {
title: title
};
};
var _default = (0, _reactRedux.connect)(mapStateToProps, null)(_view.default);
exports.default = _default;

View file

@ -1,20 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _Row = _interopRequireDefault(require("@components/Row"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var AssetTitle = function AssetTitle(_ref) {
var title = _ref.title;
return _react.default.createElement(_Row.default, null, _react.default.createElement("h3", null, title));
};
var _default = AssetTitle;
exports.default = _default;

View file

@ -1,38 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactRedux = require("react-redux");
var _show = require("../../actions/show");
var _view = _interopRequireDefault(require("./view"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var mapStateToProps = function mapStateToProps(_ref) {
var show = _ref.show,
defaultThumbnail = _ref.site.defaultThumbnail;
// select channel key
var request = show.requestList[show.request.id];
var channelKey = request.key; // select channel claims
var channel = show.channelList[channelKey] || null; // return props
return {
channelKey: channelKey,
channel: channel,
defaultThumbnail: defaultThumbnail
};
};
var mapDispatchToProps = {
onUpdateChannelClaims: _show.onUpdateChannelClaims
};
var _default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view.default);
exports.default = _default;

View file

@ -1,139 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _AssetPreview = _interopRequireDefault(require("@components/AssetPreview"));
var _HorizontalQuadSplit = _interopRequireDefault(require("@components/HorizontalQuadSplit"));
var _Row = _interopRequireDefault(require("@components/Row"));
var _ButtonSecondary = _interopRequireDefault(require("@components/ButtonSecondary"));
var _createGroupedList = require("../../utils/createGroupedList.js");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
var ChannelClaimsDisplay =
/*#__PURE__*/
function (_React$Component) {
function ChannelClaimsDisplay(props) {
var _this;
_classCallCheck(this, ChannelClaimsDisplay);
_this = _possibleConstructorReturn(this, _getPrototypeOf(ChannelClaimsDisplay).call(this, props));
_this.showNextResultsPage = _this.showNextResultsPage.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.showPreviousResultsPage = _this.showPreviousResultsPage.bind(_assertThisInitialized(_assertThisInitialized(_this)));
return _this;
}
_createClass(ChannelClaimsDisplay, [{
key: "showPreviousResultsPage",
value: function showPreviousResultsPage() {
var currentPage = this.props.channel.claimsData.currentPage;
var previousPage = parseInt(currentPage) - 1;
this.showNewPage(previousPage);
}
}, {
key: "showNextResultsPage",
value: function showNextResultsPage() {
var currentPage = this.props.channel.claimsData.currentPage;
var nextPage = parseInt(currentPage) + 1;
this.showNewPage(nextPage);
}
}, {
key: "showNewPage",
value: function showNewPage(page) {
var _this$props = this.props,
channelKey = _this$props.channelKey,
_this$props$channel = _this$props.channel,
name = _this$props$channel.name,
longId = _this$props$channel.longId;
this.props.onUpdateChannelClaims(channelKey, name, longId, page);
}
}, {
key: "render",
value: function render() {
var _this$props2 = this.props,
_this$props2$channel$ = _this$props2.channel.claimsData,
claims = _this$props2$channel$.claims,
currentPage = _this$props2$channel$.currentPage,
totalPages = _this$props2$channel$.totalPages,
defaultThumbnail = _this$props2.defaultThumbnail;
var groupedClaimsList = (0, _createGroupedList.createGroupedList)(claims, 4);
if (claims.length > 0) {
return _react.default.createElement("div", {
className: 'channel-claims-display'
}, _react.default.createElement("div", null, groupedClaimsList.map(function (group, index) {
var itemA = group[0];
var itemB = group[1];
var itemC = group[2];
var itemD = group[3];
return _react.default.createElement(_HorizontalQuadSplit.default, {
key: "claims-row-".concat(index),
columnA: itemA && _react.default.createElement(_AssetPreview.default, {
defaultThumbnail: defaultThumbnail,
claimData: itemA,
key: "".concat(itemA.name, "-").concat(itemA.id)
}),
columnB: itemB && _react.default.createElement(_AssetPreview.default, {
defaultThumbnail: defaultThumbnail,
claimData: itemB,
key: "".concat(itemB.name, "-").concat(itemB.id)
}),
columnC: itemC && _react.default.createElement(_AssetPreview.default, {
defaultThumbnail: defaultThumbnail,
claimData: itemC,
key: "".concat(itemC.name, "-").concat(itemC.id)
}),
columnD: itemD && _react.default.createElement(_AssetPreview.default, {
defaultThumbnail: defaultThumbnail,
claimData: itemD,
key: "".concat(itemD.name, "-").concat(itemD.id)
})
});
})), _react.default.createElement(_Row.default, null, currentPage > 1 && _react.default.createElement(_ButtonSecondary.default, {
value: 'Previous Page',
onClickHandler: this.showPreviousResultsPage
}), currentPage < totalPages && _react.default.createElement(_ButtonSecondary.default, {
value: 'Next Page',
onClickHandler: this.showNextResultsPage
})));
} else {
return _react.default.createElement("p", null, "There are no claims in this channel");
}
}
}]);
_inherits(ChannelClaimsDisplay, _React$Component);
return ChannelClaimsDisplay;
}(_react.default.Component);
var _default = ChannelClaimsDisplay;
exports.default = _default;

View file

@ -1,39 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactRedux = require("react-redux");
var _view = _interopRequireDefault(require("./view"));
var _channelCreate = require("../../actions/channelCreate");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var mapStateToProps = function mapStateToProps(_ref) {
var _ref$channelCreate = _ref.channelCreate,
name = _ref$channelCreate.name,
password = _ref$channelCreate.password,
error = _ref$channelCreate.error,
status = _ref$channelCreate.status;
return {
name: name,
password: password,
error: error,
status: status
};
};
var mapDispatchToProps = {
updateChannelAvailability: _channelCreate.updateChannelAvailability,
updateChannelCreateName: _channelCreate.updateChannelCreateName,
updateChannelCreatePassword: _channelCreate.updateChannelCreatePassword,
createChannel: _channelCreate.createChannel
};
var _default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view.default);
exports.default = _default;

View file

@ -1,152 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _ChannelCreateNameInput = _interopRequireDefault(require("@components/ChannelCreateNameInput"));
var _ChannelCreatePasswordInput = _interopRequireDefault(require("@components/ChannelCreatePasswordInput"));
var _ButtonPrimary = _interopRequireDefault(require("@components/ButtonPrimary"));
var _FormFeedbackDisplay = _interopRequireDefault(require("@components/FormFeedbackDisplay"));
var _ProgressBar = _interopRequireDefault(require("@components/ProgressBar"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
var ChannelCreateForm =
/*#__PURE__*/
function (_React$Component) {
function ChannelCreateForm(props) {
var _this;
_classCallCheck(this, ChannelCreateForm);
_this = _possibleConstructorReturn(this, _getPrototypeOf(ChannelCreateForm).call(this, props));
_this.handleNameInput = _this.handleNameInput.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.handlePasswordInput = _this.handlePasswordInput.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.handleSubmit = _this.handleSubmit.bind(_assertThisInitialized(_assertThisInitialized(_this)));
return _this;
}
_createClass(ChannelCreateForm, [{
key: "cleanseNameInput",
value: function cleanseNameInput(input) {
input = input.replace(/\s+/g, '-'); // replace spaces with dashes
input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'
return input;
}
}, {
key: "cleansePasswordInput",
value: function cleansePasswordInput(input) {
input = input.replace(/\s+/g, ''); // replace spaces
return input;
}
}, {
key: "handleNameInput",
value: function handleNameInput(event) {
var value = this.cleanseNameInput(event.target.value);
if (!value) {
this.props.updateChannelCreateName('error', 'Please enter a channel name');
} else {
this.props.updateChannelAvailability(value);
}
this.props.updateChannelCreateName('value', value);
}
}, {
key: "handlePasswordInput",
value: function handlePasswordInput(event) {
var value = this.cleansePasswordInput(event.target.value);
if (!value) {
this.props.updateChannelCreatePassword('error', 'Please enter a password');
} else {
this.props.updateChannelCreatePassword('error', null);
}
this.props.updateChannelCreatePassword('value', value);
}
}, {
key: "handleSubmit",
value: function handleSubmit(event) {
console.log('handling submit');
event.preventDefault();
this.props.createChannel();
}
}, {
key: "returnErrors",
value: function returnErrors() {
if (this.props.name.error) {
return this.props.name.error;
}
if (this.props.password.error) {
return this.props.password.error;
}
return null;
}
}, {
key: "render",
value: function render() {
var _this$props = this.props,
name = _this$props.name,
password = _this$props.password,
status = _this$props.status;
var formError = this.returnErrors();
return _react.default.createElement("div", null, !status ? _react.default.createElement("div", null, _react.default.createElement(_ChannelCreateNameInput.default, {
value: name.value,
error: name.error,
handleNameInput: this.handleNameInput
}), _react.default.createElement(_ChannelCreatePasswordInput.default, {
value: password.value,
handlePasswordInput: this.handlePasswordInput
}), _react.default.createElement(_FormFeedbackDisplay.default, {
errorMessage: formError,
defaultMessage: 'Choose a name and password for your channel'
}), _react.default.createElement(_ButtonPrimary.default, {
value: 'Create Channel',
onClickHandler: this.handleSubmit
})) : _react.default.createElement("div", null, _react.default.createElement("p", {
className: 'text--small text--secondary'
}, status), _react.default.createElement(_ProgressBar.default, {
size: 12
})));
}
}]);
_inherits(ChannelCreateForm, _React$Component);
return ChannelCreateForm;
}(_react.default.Component);
var _default = ChannelCreateForm;
exports.default = _default;

View file

@ -1,29 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactRedux = require("react-redux");
var _channel = require("../../actions/channel");
var _publish = require("../../actions/publish");
var _view = _interopRequireDefault(require("./view"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
return {
onChannelLogin: function onChannelLogin(name, shortId, longId) {
dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId));
dispatch((0, _publish.updateSelectedChannel)(name));
}
};
};
var _default = (0, _reactRedux.connect)(null, mapDispatchToProps)(_view.default);
exports.default = _default;

View file

@ -1,138 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _request = _interopRequireDefault(require("../../utils/request"));
var _FormFeedbackDisplay = _interopRequireDefault(require("@components/FormFeedbackDisplay"));
var _ChannelLoginNameInput = _interopRequireDefault(require("@components/ChannelLoginNameInput"));
var _ChannelLoginPasswordInput = _interopRequireDefault(require("@components/ChannelLoginPasswordInput"));
var _ButtonPrimary = _interopRequireDefault(require("@components/ButtonPrimary"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
var ChannelLoginForm =
/*#__PURE__*/
function (_React$Component) {
function ChannelLoginForm(props) {
var _this;
_classCallCheck(this, ChannelLoginForm);
_this = _possibleConstructorReturn(this, _getPrototypeOf(ChannelLoginForm).call(this, props));
_this.state = {
error: null,
name: '',
password: ''
};
_this.handleInput = _this.handleInput.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.loginToChannel = _this.loginToChannel.bind(_assertThisInitialized(_assertThisInitialized(_this)));
return _this;
}
_createClass(ChannelLoginForm, [{
key: "handleInput",
value: function handleInput(event) {
var name = event.target.name;
var value = event.target.value;
this.setState(_defineProperty({}, name, value));
}
}, {
key: "loginToChannel",
value: function loginToChannel(event) {
var _this2 = this;
event.preventDefault();
var params = {
method: 'POST',
body: JSON.stringify({
username: this.state.name,
password: this.state.password
}),
headers: new Headers({
'Content-Type': 'application/json'
}),
credentials: 'include'
};
(0, _request.default)('login', params).then(function (_ref) {
var success = _ref.success,
channelName = _ref.channelName,
shortChannelId = _ref.shortChannelId,
channelClaimId = _ref.channelClaimId,
message = _ref.message;
if (success) {
_this2.props.onChannelLogin(channelName, shortChannelId, channelClaimId);
} else {
_this2.setState({
'error': message
});
}
;
}).catch(function (error) {
if (error.message) {
_this2.setState({
'error': error.message
});
} else {
_this2.setState({
'error': error
});
}
});
}
}, {
key: "render",
value: function render() {
return _react.default.createElement("div", null, _react.default.createElement(_ChannelLoginNameInput.default, {
channelName: this.state.channelName,
handleInput: this.handleInput
}), _react.default.createElement(_ChannelLoginPasswordInput.default, {
channelPassword: this.state.channelPassword,
handleInput: this.handleInput
}), _react.default.createElement(_FormFeedbackDisplay.default, {
errorMessage: this.state.error,
defaultMessage: 'Enter the name and password for your channel'
}), _react.default.createElement(_ButtonPrimary.default, {
value: 'Authenticate',
onClickHandler: this.loginToChannel
}));
}
}]);
_inherits(ChannelLoginForm, _React$Component);
return ChannelLoginForm;
}(_react.default.Component);
var _default = ChannelLoginForm;
exports.default = _default;

View file

@ -1,42 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactRedux = require("react-redux");
var _publish = require("../../actions/publish");
var _view = _interopRequireDefault(require("./view"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var mapStateToProps = function mapStateToProps(_ref) {
var channel = _ref.channel,
publish = _ref.publish;
return {
loggedInChannelName: channel.loggedInChannel.name,
publishInChannel: publish.publishInChannel,
selectedChannel: publish.selectedChannel,
channelError: publish.error.channel
};
};
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
return {
onPublishInChannelChange: function onPublishInChannelChange(value) {
dispatch((0, _publish.updateError)('channel', null));
dispatch((0, _publish.setPublishInChannel)(value));
},
onChannelSelect: function onChannelSelect(value) {
dispatch((0, _publish.updateError)('channel', null));
dispatch((0, _publish.updateSelectedChannel)(value));
}
};
};
var _default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view.default);
exports.default = _default;

View file

@ -1,127 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _ChannelLoginForm = _interopRequireDefault(require("@containers/ChannelLoginForm"));
var _ChannelCreateForm = _interopRequireDefault(require("@containers/ChannelCreateForm"));
var _publish_channel_select_states = require("../../constants/publish_channel_select_states");
var _RowLabeled = _interopRequireDefault(require("@components/RowLabeled"));
var _ChooseAnonymousPublishRadio = _interopRequireDefault(require("@components/ChooseAnonymousPublishRadio"));
var _ChooseChannelPublishRadio = _interopRequireDefault(require("@components/ChooseChannelPublishRadio"));
var _FormFeedbackDisplay = _interopRequireDefault(require("@components/FormFeedbackDisplay"));
var _Label = _interopRequireDefault(require("@components/Label"));
var _ChannelSelectDropdown = _interopRequireDefault(require("@components/ChannelSelectDropdown"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
var ChannelSelect =
/*#__PURE__*/
function (_React$Component) {
function ChannelSelect(props) {
var _this;
_classCallCheck(this, ChannelSelect);
_this = _possibleConstructorReturn(this, _getPrototypeOf(ChannelSelect).call(this, props));
_this.toggleAnonymousPublish = _this.toggleAnonymousPublish.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.handleSelection = _this.handleSelection.bind(_assertThisInitialized(_assertThisInitialized(_this)));
return _this;
}
_createClass(ChannelSelect, [{
key: "componentWillMount",
value: function componentWillMount() {
var loggedInChannelName = this.props.loggedInChannelName;
if (loggedInChannelName) {
this.props.onChannelSelect(loggedInChannelName);
}
}
}, {
key: "toggleAnonymousPublish",
value: function toggleAnonymousPublish(event) {
var value = event.target.value;
if (value === 'anonymous') {
this.props.onPublishInChannelChange(false);
} else {
this.props.onPublishInChannelChange(true);
}
}
}, {
key: "handleSelection",
value: function handleSelection(event) {
var selectedOption = event.target.selectedOptions[0].value;
this.props.onChannelSelect(selectedOption);
}
}, {
key: "render",
value: function render() {
var _this$props = this.props,
publishInChannel = _this$props.publishInChannel,
channelError = _this$props.channelError,
selectedChannel = _this$props.selectedChannel,
loggedInChannelName = _this$props.loggedInChannelName;
return _react.default.createElement("div", null, _react.default.createElement(_RowLabeled.default, {
label: _react.default.createElement(_ChooseAnonymousPublishRadio.default, {
publishInChannel: publishInChannel,
toggleAnonymousPublish: this.toggleAnonymousPublish
}),
content: _react.default.createElement(_ChooseChannelPublishRadio.default, {
publishInChannel: publishInChannel,
toggleAnonymousPublish: this.toggleAnonymousPublish
})
}), _react.default.createElement(_FormFeedbackDisplay.default, {
errorMessage: channelError,
defaultMessage: 'Publish anonymously or in a channel'
}), this.props.publishInChannel && _react.default.createElement("div", null, _react.default.createElement(_RowLabeled.default, {
label: _react.default.createElement(_Label.default, {
value: 'Channel:'
}),
content: _react.default.createElement(_ChannelSelectDropdown.default, {
selectedChannel: selectedChannel,
handleSelection: this.handleSelection,
loggedInChannelName: loggedInChannelName
})
}), selectedChannel === _publish_channel_select_states.LOGIN && _react.default.createElement(_ChannelLoginForm.default, null), selectedChannel === _publish_channel_select_states.CREATE && _react.default.createElement(_ChannelCreateForm.default, null)));
}
}]);
_inherits(ChannelSelect, _React$Component);
return ChannelSelect;
}(_react.default.Component);
var _default = ChannelSelect;
exports.default = _default;

View file

@ -1,39 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactRedux = require("react-redux");
var _publish = require("../../actions/publish");
var _view = _interopRequireDefault(require("./view"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var mapStateToProps = function mapStateToProps(_ref) {
var publish = _ref.publish;
return {
file: publish.file,
thumbnail: publish.thumbnail,
fileError: publish.error.file
};
};
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
return {
selectFile: function selectFile(file) {
dispatch((0, _publish.selectFile)(file));
},
setFileError: function setFileError(value) {
dispatch((0, _publish.clearFile)());
dispatch((0, _publish.updateError)('file', value));
}
};
};
var _default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view.default);
exports.default = _default;

View file

@ -1,205 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _file = require("../../utils/file");
var _DropzonePreviewImage = _interopRequireDefault(require("@components/DropzonePreviewImage"));
var _DropzoneDropItDisplay = _interopRequireDefault(require("@components/DropzoneDropItDisplay"));
var _DropzoneInstructionsDisplay = _interopRequireDefault(require("@components/DropzoneInstructionsDisplay"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
var Dropzone =
/*#__PURE__*/
function (_React$Component) {
function Dropzone(props) {
var _this;
_classCallCheck(this, Dropzone);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Dropzone).call(this, props));
_this.state = {
dragOver: false,
mouseOver: false,
dimPreview: false
};
_this.handleDrop = _this.handleDrop.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.handleDragOver = _this.handleDragOver.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.handleDragEnd = _this.handleDragEnd.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.handleDragEnter = _this.handleDragEnter.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.handleDragLeave = _this.handleDragLeave.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.handleMouseEnter = _this.handleMouseEnter.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.handleMouseLeave = _this.handleMouseLeave.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.handleClick = _this.handleClick.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.handleFileInput = _this.handleFileInput.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.chooseFile = _this.chooseFile.bind(_assertThisInitialized(_assertThisInitialized(_this)));
return _this;
}
_createClass(Dropzone, [{
key: "handleDrop",
value: function handleDrop(event) {
event.preventDefault();
this.setState({
dragOver: false
}); // if dropped items aren't files, reject them
var dt = event.dataTransfer;
if (dt.items) {
if (dt.items[0].kind === 'file') {
var droppedFile = dt.items[0].getAsFile();
this.chooseFile(droppedFile);
}
}
}
}, {
key: "handleDragOver",
value: function handleDragOver(event) {
event.preventDefault();
}
}, {
key: "handleDragEnd",
value: function handleDragEnd(event) {
var dt = event.dataTransfer;
if (dt.items) {
for (var i = 0; i < dt.items.length; i++) {
dt.items.remove(i);
}
} else {
event.dataTransfer.clearData();
}
}
}, {
key: "handleDragEnter",
value: function handleDragEnter() {
this.setState({
dragOver: true,
dimPreview: true
});
}
}, {
key: "handleDragLeave",
value: function handleDragLeave() {
this.setState({
dragOver: false,
dimPreview: false
});
}
}, {
key: "handleMouseEnter",
value: function handleMouseEnter() {
this.setState({
mouseOver: true,
dimPreview: true
});
}
}, {
key: "handleMouseLeave",
value: function handleMouseLeave() {
this.setState({
mouseOver: false,
dimPreview: false
});
}
}, {
key: "handleClick",
value: function handleClick(event) {
event.preventDefault();
document.getElementById('file_input').click();
}
}, {
key: "handleFileInput",
value: function handleFileInput(event) {
event.preventDefault();
var fileList = event.target.files;
this.chooseFile(fileList[0]);
}
}, {
key: "chooseFile",
value: function chooseFile(file) {
if (file) {
try {
(0, _file.validateFile)(file); // validate the file's name, type, and size
} catch (error) {
return this.props.setFileError(error.message);
} // stage it so it will be ready when the publish button is clicked
this.props.selectFile(file);
}
}
}, {
key: "render",
value: function render() {
return _react.default.createElement("div", {
className: "dropzone-wrapper"
}, _react.default.createElement("form", null, _react.default.createElement("input", {
className: "input-file",
type: "file",
id: "file_input",
name: "file_input",
accept: "video/*,image/*",
onChange: this.handleFileInput,
encType: "multipart/form-data"
})), _react.default.createElement("div", {
className: 'dropzone' + (this.state.dragOver ? ' dropzone--drag-over' : ''),
onDrop: this.handleDrop,
onDragOver: this.handleDragOver,
onDragEnd: this.handleDragEnd,
onDragEnter: this.handleDragEnter,
onDragLeave: this.handleDragLeave,
onMouseEnter: this.handleMouseEnter,
onMouseLeave: this.handleMouseLeave,
onClick: this.handleClick
}, this.props.file ? _react.default.createElement("div", {
className: 'dropzone-preview-wrapper'
}, _react.default.createElement(_DropzonePreviewImage.default, {
dimPreview: this.state.dimPreview,
file: this.props.file,
thumbnail: this.props.thumbnail
}), _react.default.createElement("div", {
className: 'dropzone-preview-overlay'
}, this.state.dragOver ? _react.default.createElement(_DropzoneDropItDisplay.default, null) : null, this.state.mouseOver ? _react.default.createElement(_DropzoneInstructionsDisplay.default, {
fileError: this.props.fileError
}) : null)) : this.state.dragOver ? _react.default.createElement(_DropzoneDropItDisplay.default, null) : _react.default.createElement(_DropzoneInstructionsDisplay.default, {
fileError: this.props.fileError
})));
}
}]);
_inherits(Dropzone, _React$Component);
return Dropzone;
}(_react.default.Component);
;
var _default = Dropzone;
exports.default = _default;

View file

@ -1 +0,0 @@
"use strict";

View file

@ -1,35 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactRedux = require("react-redux");
var _channel = require("../../actions/channel");
var _view = _interopRequireDefault(require("./view"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var mapStateToProps = function mapStateToProps(_ref) {
var _ref$channel$loggedIn = _ref.channel.loggedInChannel,
name = _ref$channel$loggedIn.name,
shortId = _ref$channel$loggedIn.shortId,
longId = _ref$channel$loggedIn.longId;
return {
channelName: name,
channelShortId: shortId,
channelLongId: longId
};
};
var mapDispatchToProps = {
checkForLoggedInChannel: _channel.checkForLoggedInChannel,
logOutChannel: _channel.logOutChannel
};
var _default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view.default);
exports.default = _default;

View file

@ -1,110 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactRouterDom = require("react-router-dom");
var _NavBarChannelOptionsDropdown = _interopRequireDefault(require("@components/NavBarChannelOptionsDropdown"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
var VIEW = 'VIEW';
var LOGOUT = 'LOGOUT';
var NavigationLinks =
/*#__PURE__*/
function (_React$Component) {
function NavigationLinks(props) {
var _this;
_classCallCheck(this, NavigationLinks);
_this = _possibleConstructorReturn(this, _getPrototypeOf(NavigationLinks).call(this, props));
_this.handleSelection = _this.handleSelection.bind(_assertThisInitialized(_assertThisInitialized(_this)));
return _this;
}
_createClass(NavigationLinks, [{
key: "componentDidMount",
value: function componentDidMount() {
this.props.checkForLoggedInChannel();
}
}, {
key: "handleSelection",
value: function handleSelection(event) {
var value = event.target.selectedOptions[0].value;
switch (value) {
case LOGOUT:
this.props.logOutChannel();
break;
case VIEW:
// redirect to channel page
this.props.history.push("/".concat(this.props.channelName, ":").concat(this.props.channelLongId));
break;
default:
break;
}
}
}, {
key: "render",
value: function render() {
return _react.default.createElement("div", {
className: "navigation-links"
}, _react.default.createElement(_reactRouterDom.NavLink, {
className: "nav-bar-link link--nav",
activeClassName: "link--nav-active",
to: "/",
exact: true
}, "Publish"), _react.default.createElement(_reactRouterDom.NavLink, {
className: "nav-bar-link link--nav",
activeClassName: "link--nav-active",
to: "/about"
}, "About"), this.props.channelName ? _react.default.createElement(_NavBarChannelOptionsDropdown.default, {
channelName: this.props.channelName,
handleSelection: this.handleSelection,
defaultSelection: this.props.channelName,
VIEW: VIEW,
LOGOUT: LOGOUT
}) : _react.default.createElement(_reactRouterDom.NavLink, {
id: "nav-bar-login-link",
className: "nav-bar-link link--nav",
activeClassName: "link--nav-active",
to: "/login"
}, "Channel"));
}
}]);
_inherits(NavigationLinks, _React$Component);
return NavigationLinks;
}(_react.default.Component);
var _default = (0, _reactRouterDom.withRouter)(NavigationLinks);
exports.default = _default;

View file

@ -1,31 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactRedux = require("react-redux");
var _publish = require("../../actions/publish");
var _view = _interopRequireDefault(require("./view"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var mapStateToProps = function mapStateToProps(_ref) {
var channel = _ref.channel,
publish = _ref.publish;
return {
file: publish.file
};
};
var mapDispatchToProps = {
clearFile: _publish.clearFile,
startPublish: _publish.startPublish
};
var _default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view.default);
exports.default = _default;

View file

@ -1,90 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactRouterDom = require("react-router-dom");
var _PublishUrlInput = _interopRequireDefault(require("@containers/PublishUrlInput"));
var _PublishThumbnailInput = _interopRequireDefault(require("@containers/PublishThumbnailInput"));
var _PublishMetadataInputs = _interopRequireDefault(require("@containers/PublishMetadataInputs"));
var _ChannelSelect = _interopRequireDefault(require("@containers/ChannelSelect"));
var _Row = _interopRequireDefault(require("@components/Row"));
var _ButtonPrimaryJumbo = _interopRequireDefault(require("@components/ButtonPrimaryJumbo"));
var _ButtonTertiary = _interopRequireDefault(require("@components/ButtonTertiary"));
var _SpaceAround = _interopRequireDefault(require("@components/SpaceAround"));
var _PublishFinePrint = _interopRequireDefault(require("@components/PublishFinePrint"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
var PublishDetails =
/*#__PURE__*/
function (_React$Component) {
function PublishDetails(props) {
var _this;
_classCallCheck(this, PublishDetails);
_this = _possibleConstructorReturn(this, _getPrototypeOf(PublishDetails).call(this, props));
_this.onPublishSubmit = _this.onPublishSubmit.bind(_assertThisInitialized(_assertThisInitialized(_this)));
return _this;
}
_createClass(PublishDetails, [{
key: "onPublishSubmit",
value: function onPublishSubmit() {
this.props.startPublish(this.props.history);
}
}, {
key: "render",
value: function render() {
return _react.default.createElement("div", null, _react.default.createElement(_Row.default, null, _react.default.createElement(_PublishUrlInput.default, null)), _react.default.createElement(_Row.default, null, _react.default.createElement(_ChannelSelect.default, null)), this.props.file.type === 'video/mp4' && _react.default.createElement(_Row.default, null, _react.default.createElement(_PublishThumbnailInput.default, null)), _react.default.createElement(_Row.default, null, _react.default.createElement(_PublishMetadataInputs.default, null)), _react.default.createElement(_Row.default, null, _react.default.createElement(_ButtonPrimaryJumbo.default, {
value: 'Publish',
onClickHandler: this.onPublishSubmit
})), _react.default.createElement(_Row.default, null, _react.default.createElement(_SpaceAround.default, null, _react.default.createElement(_ButtonTertiary.default, {
value: 'Cancel',
onClickHandler: this.props.clearFile
}))), _react.default.createElement(_Row.default, null, _react.default.createElement(_PublishFinePrint.default, null)));
}
}]);
_inherits(PublishDetails, _React$Component);
return PublishDetails;
}(_react.default.Component);
;
var _default = (0, _reactRouterDom.withRouter)(PublishDetails);
exports.default = _default;

View file

@ -1,23 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactRedux = require("react-redux");
var _view = _interopRequireDefault(require("./view"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var mapStateToProps = function mapStateToProps(_ref) {
var publish = _ref.publish;
return {
message: publish.disabledMessage
};
};
var _default = (0, _reactRedux.connect)(mapStateToProps, null)(_view.default);
exports.default = _default;

View file

@ -1,61 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
var PublishDisabledMessage =
/*#__PURE__*/
function (_React$Component) {
function PublishDisabledMessage() {
_classCallCheck(this, PublishDisabledMessage);
return _possibleConstructorReturn(this, _getPrototypeOf(PublishDisabledMessage).apply(this, arguments));
}
_createClass(PublishDisabledMessage, [{
key: "render",
value: function render() {
var message = this.props.message;
return _react.default.createElement("div", {
className: 'publish-disabled-message'
}, _react.default.createElement("div", {
className: 'message'
}, _react.default.createElement("p", {
className: 'text--secondary'
}, "Publishing is currently disabled."), _react.default.createElement("p", {
className: 'text--secondary'
}, message)));
}
}]);
_inherits(PublishDisabledMessage, _React$Component);
return PublishDisabledMessage;
}(_react.default.Component);
var _default = PublishDisabledMessage;
exports.default = _default;

Some files were not shown because too many files have changed in this diff Show more