From 285401950352633ecc899c301bc51945cba952ea Mon Sep 17 00:00:00 2001 From: Miina Sikk Date: Thu, 17 May 2018 09:46:21 +0300 Subject: [PATCH 01/18] Add skeleton for blocks. --- blocks/amp-timeago/index.js | 168 ------------------------------------ 1 file changed, 168 deletions(-) delete mode 100644 blocks/amp-timeago/index.js diff --git a/blocks/amp-timeago/index.js b/blocks/amp-timeago/index.js deleted file mode 100644 index 1bf40f852ae..00000000000 --- a/blocks/amp-timeago/index.js +++ /dev/null @@ -1,168 +0,0 @@ -/* global moment */ - -/** - * Internal block libraries. - */ -const { __ } = wp.i18n; -const { - registerBlockType, - InspectorControls, - BlockAlignmentToolbar, - BlockControls -} = wp.blocks; -const { - DateTimePicker, - PanelBody, - TextControl, - SelectControl -} = wp.components; -import timeago from 'timeago.js'; - -/** - * Register block. - */ -export default registerBlockType( - 'amp/amp-timeago', - { - title: __( 'AMP Timeago' ), - category: 'common', - icon: 'wordpress-alt', // @todo Needs an icon. - keywords: [ - __( 'Time difference' ), - __( 'Time ago' ), - __( 'Date' ) - ], - - attributes: { - align: { - type: 'string' - }, - cutoff: { - type: 'number' - }, - dateTime: { - type: 'string' - }, - ampLayout: { - type: 'string' - }, - width: { - type: 'number' - }, - height: { - type: 'number' - } - }, - - getEditWrapperProps( attributes ) { - const { align } = attributes; - if ( 'left' === align || 'right' === align || 'center' === align ) { - return { 'data-align': align }; - } - }, - - edit( { attributes, isSelected, setAttributes } ) { - const { align, ampLayout, cutoff, height, width } = attributes; - let timeAgo; - if ( attributes.dateTime ) { - if ( attributes.cutoff && attributes.cutoff < Math.abs( moment( attributes.dateTime ).diff( moment(), 'seconds' ) ) ) { - timeAgo = moment( attributes.dateTime ).format( 'dddd D MMMM HH:mm' ); - } else { - timeAgo = timeago().format( attributes.dateTime ); - } - } else { - timeAgo = timeago().format( new Date() ); - setAttributes( { dateTime: moment( moment(), moment.ISO_8601, true ).format() } ); - } - - const ampLayoutOptions = [ - { value: '', label: 'Responsive' }, // Default for amp-timeago. - { value: 'fixed', label: 'Fixed' }, - { value: 'fixed-height', label: 'Fixed height' } - ]; - - return [ - isSelected && ( - - - ( setAttributes( { dateTime: moment( value, moment.ISO_8601, true ).format() } ) ) } // eslint-disable-line - /> - ( setAttributes( { ampLayout: value } ) ) } - /> - ( setAttributes( { width: value } ) ) } - /> - ( setAttributes( { height: value } ) ) } - /> - ( setAttributes( { cutoff: value } ) ) } - /> - - - ), - - { - setAttributes( { align: nextAlign } ); - } } - controls={ [ 'left', 'center', 'right' ] } - /> - , - - ]; - }, - - save( { attributes } ) { - let timeagoProps = { - layout: 'responsive', - className: 'align' + ( attributes.align || 'none' ), - datetime: attributes.dateTime, - locale: 'en' - }; - if ( attributes.cutoff ) { - timeagoProps.cutoff = attributes.cutoff; - } - if ( attributes.ampLayout ) { - switch ( attributes.ampLayout ) { - case 'fixed-height': - if ( attributes.height ) { - timeagoProps.height = attributes.height; - timeagoProps.layout = attributes.ampLayout; - } - break; - case 'fixed': - if ( attributes.height && attributes.width ) { - timeagoProps.height = attributes.height; - timeagoProps.width = attributes.width; - timeagoProps.layout = attributes.ampLayout; - } - break; - } - } - return ( - { moment( attributes.dateTime ).format( 'dddd D MMMM HH:mm' ) } - ); - } - } -); From 3c8b126512f38e5073699152bbad5e6287f87c5e Mon Sep 17 00:00:00 2001 From: Miina Sikk Date: Thu, 17 May 2018 10:20:17 +0300 Subject: [PATCH 02/18] Start adding amp-o2-player. --- blocks/amp-o2-player/index.js | 158 ++++++++++++++++++++++++++++++++++ blocks/index.js | 2 +- package.json | 1 - 3 files changed, 159 insertions(+), 2 deletions(-) create mode 100644 blocks/amp-o2-player/index.js diff --git a/blocks/amp-o2-player/index.js b/blocks/amp-o2-player/index.js new file mode 100644 index 00000000000..c73c7896c2e --- /dev/null +++ b/blocks/amp-o2-player/index.js @@ -0,0 +1,158 @@ +/** + * Internal block libraries. + */ +const { __ } = wp.i18n; +const { + registerBlockType, + InspectorControls +} = wp.blocks; +const { + DateTimePicker, + PanelBody, + TextControl, + SelectControl +} = wp.components; + +/** + * Register block. + */ +export default registerBlockType( + 'amp/amp-o2-player', + { + title: __( 'AMP O2 Player' ), + category: 'common', + icon: 'backup', + keywords: [ + __( 'Embed' ), + __( 'AOL O2Player' ), + ], + + attributes: { + dataPid: { + type: 'string' + }, + dataVid: { + type: 'number' + }, + dataBcid: { + type: 'string' + }, + dataBid: { + type: 'string' + }, + layout: { + type: 'string', + default: 'fixed-height' + }, + width: { + type: 'number' + }, + height: { + type: 'number', + default: 400 + } + }, + + edit( { attributes, isSelected, setAttributes } ) { + const { dataPid, dataVid, dataBcid, dataBid, layout, height, width } = attributes; + const ampLayoutOptions = [ + { value: 'fixed-height', label: 'Fixed height' }, + { value: 'responsive', label: 'Responsive' }, + { value: 'fixed', label: 'Fixed' }, + { value: 'fill', label: 'Fill' }, + { value: 'flex-item', label: 'Flex-item' }, + { value: 'nodisplay', label: 'No Display' } + + ]; + + return [ + isSelected && ( + + + ( setAttributes( { dataPid: value } ) ) } + /> + ( setAttributes( { dataBcid: value } ) ) } + /> + ( setAttributes( { dataBid: value } ) ) } + /> + ( setAttributes( { dataVid: value } ) ) } + /> + ( setAttributes( { layout: value } ) ) } + /> + ( setAttributes( { width: value } ) ) } + /> + ( setAttributes( { height: value } ) ) } + /> + + + ), + + { + setAttributes( { align: nextAlign } ); + } } + controls={ [ 'left', 'center', 'right' ] } + /> + , + + ]; + }, + + save( { attributes } ) { + let timeagoProps = { + layout: 'responsive', + className: 'align' + ( attributes.align || 'none' ), + datetime: attributes.dateTime, + locale: 'en' + }; + if ( attributes.cutoff ) { + timeagoProps.cutoff = attributes.cutoff; + } + if ( attributes.ampLayout ) { + switch ( attributes.ampLayout ) { + case 'fixed-height': + if ( attributes.height ) { + timeagoProps.height = attributes.height; + timeagoProps.layout = attributes.ampLayout; + } + break; + case 'fixed': + if ( attributes.height && attributes.width ) { + timeagoProps.height = attributes.height; + timeagoProps.width = attributes.width; + timeagoProps.layout = attributes.ampLayout; + } + break; + } + } + return ( + { moment( attributes.dateTime ).format( 'dddd D MMMM HH:mm' ) } + ); + } + } +); \ No newline at end of file diff --git a/blocks/index.js b/blocks/index.js index 25c2c001982..cdd8f9aafb3 100644 --- a/blocks/index.js +++ b/blocks/index.js @@ -1,4 +1,4 @@ /** * Import blocks. */ -import './amp-timeago'; +import './amp-o2-player'; diff --git a/package.json b/package.json index 95c85bffae8..ed36c7b0271 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ "grunt-contrib-jshint": "^1.1.0", "grunt-shell": "^2.1.0", "grunt-wp-deploy": "^1.2.1", - "timeago.js": "3.0.2", "webpack": "^3.12.0" }, "main": "blocks/index.js", From 947fca8c73c1d2b603c45502da70d129093ee11e Mon Sep 17 00:00:00 2001 From: Miina Sikk Date: Thu, 17 May 2018 10:20:53 +0300 Subject: [PATCH 03/18] Add compiled jS. --- assets/js/amp-blocks-compiled.js | 81 ++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 assets/js/amp-blocks-compiled.js diff --git a/assets/js/amp-blocks-compiled.js b/assets/js/amp-blocks-compiled.js new file mode 100644 index 00000000000..bac738cfb96 --- /dev/null +++ b/assets/js/amp-blocks-compiled.js @@ -0,0 +1,81 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__amp_o2_player__ = __webpack_require__(1);\n/**\n * Import blocks.\n */\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9pbmRleC5qcz84MTkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW1wb3J0IGJsb2Nrcy5cbiAqL1xuaW1wb3J0ICcuL2FtcC1vMi1wbGF5ZXInO1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vYmxvY2tzL2luZGV4LmpzXG4vLyBtb2R1bGUgaWQgPSAwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///0\n"); + +/***/ }), +/* 1 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n DateTimePicker = _wp$components.DateTimePicker,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-o2-player', {\n\ttitle: __('AMP O2 Player'),\n\tcategory: 'common',\n\ticon: 'backup',\n\tkeywords: [__('Embed'), __('AOL O2Player')],\n\n\tattributes: {\n\t\tdataPid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataVid: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataBcid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataBid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed-height'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number'\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataPid = attributes.dataPid,\n\t\t dataVid = attributes.dataVid,\n\t\t dataBcid = attributes.dataBcid,\n\t\t dataBid = attributes.dataBid,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'fixed-height', label: 'Fixed height' }, { value: 'responsive', label: 'Responsive' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, { value: 'nodisplay', label: 'No Display' }];\n\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('O2 Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Buyer Company ID (bcid, required)'),\n\t\t\t\t\tvalue: dataBcid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBcid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Playlist ID'),\n\t\t\t\t\tvalue: dataBid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video ID'),\n\t\t\t\t\tvalue: dataVid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataVid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height !== undefined ? height : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), wp.element.createElement(\n\t\t\tBlockControls,\n\t\t\t{ key: 'controls' },\n\t\t\twp.element.createElement(BlockAlignmentToolbar, {\n\t\t\t\tvalue: align,\n\t\t\t\tonChange: function onChange(nextAlign) {\n\t\t\t\t\tsetAttributes({ align: nextAlign });\n\t\t\t\t},\n\t\t\t\tcontrols: ['left', 'center', 'right']\n\t\t\t})\n\t\t), wp.element.createElement(\n\t\t\t'time',\n\t\t\t{ key: 'timeago', dateTime: attributes.dateTime },\n\t\t\ttimeAgo\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar timeagoProps = {\n\t\t\tlayout: 'responsive',\n\t\t\tclassName: 'align' + (attributes.align || 'none'),\n\t\t\tdatetime: attributes.dateTime,\n\t\t\tlocale: 'en'\n\t\t};\n\t\tif (attributes.cutoff) {\n\t\t\ttimeagoProps.cutoff = attributes.cutoff;\n\t\t}\n\t\tif (attributes.ampLayout) {\n\t\t\tswitch (attributes.ampLayout) {\n\t\t\t\tcase 'fixed-height':\n\t\t\t\t\tif (attributes.height) {\n\t\t\t\t\t\ttimeagoProps.height = attributes.height;\n\t\t\t\t\t\ttimeagoProps.layout = attributes.ampLayout;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'fixed':\n\t\t\t\t\tif (attributes.height && attributes.width) {\n\t\t\t\t\t\ttimeagoProps.height = attributes.height;\n\t\t\t\t\t\ttimeagoProps.width = attributes.width;\n\t\t\t\t\t\ttimeagoProps.layout = attributes.ampLayout;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn wp.element.createElement(\n\t\t\t'amp-timeago',\n\t\t\ttimeagoProps,\n\t\t\tmoment(attributes.dateTime).format('dddd D MMMM HH:mm')\n\t\t);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtbzItcGxheWVyL2luZGV4LmpzPzIwMGYiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2NrcyxcbiAgICByZWdpc3RlckJsb2NrVHlwZSA9IF93cCRibG9ja3MucmVnaXN0ZXJCbG9ja1R5cGUsXG4gICAgSW5zcGVjdG9yQ29udHJvbHMgPSBfd3AkYmxvY2tzLkluc3BlY3RvckNvbnRyb2xzO1xudmFyIF93cCRjb21wb25lbnRzID0gd3AuY29tcG9uZW50cyxcbiAgICBEYXRlVGltZVBpY2tlciA9IF93cCRjb21wb25lbnRzLkRhdGVUaW1lUGlja2VyLFxuICAgIFBhbmVsQm9keSA9IF93cCRjb21wb25lbnRzLlBhbmVsQm9keSxcbiAgICBUZXh0Q29udHJvbCA9IF93cCRjb21wb25lbnRzLlRleHRDb250cm9sLFxuICAgIFNlbGVjdENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5TZWxlY3RDb250cm9sO1xuXG4vKipcbiAqIFJlZ2lzdGVyIGJsb2NrLlxuICovXG5cbmV4cG9ydCBkZWZhdWx0IH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FDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///1\n"); + +/***/ }) +/******/ ]); \ No newline at end of file From e12ca8e9d64e22aee62c9e32749a32360da2e31a Mon Sep 17 00:00:00 2001 From: Miina Sikk Date: Thu, 17 May 2018 11:07:31 +0300 Subject: [PATCH 04/18] Add AOL O2 player edit and save according to atts. --- assets/js/amp-blocks-compiled.js | 2 +- blocks/amp-o2-player/index.js | 90 +++++++++++++++++--------------- 2 files changed, 50 insertions(+), 42 deletions(-) diff --git a/assets/js/amp-blocks-compiled.js b/assets/js/amp-blocks-compiled.js index bac738cfb96..9002d4f12c2 100644 --- a/assets/js/amp-blocks-compiled.js +++ b/assets/js/amp-blocks-compiled.js @@ -75,7 +75,7 @@ eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true } /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n DateTimePicker = _wp$components.DateTimePicker,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-o2-player', {\n\ttitle: __('AMP O2 Player'),\n\tcategory: 'common',\n\ticon: 'backup',\n\tkeywords: [__('Embed'), __('AOL O2Player')],\n\n\tattributes: {\n\t\tdataPid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataVid: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataBcid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataBid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed-height'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number'\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataPid = attributes.dataPid,\n\t\t dataVid = attributes.dataVid,\n\t\t dataBcid = attributes.dataBcid,\n\t\t dataBid = attributes.dataBid,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'fixed-height', label: 'Fixed height' }, { value: 'responsive', label: 'Responsive' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, { value: 'nodisplay', label: 'No Display' }];\n\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('O2 Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Buyer Company ID (bcid, required)'),\n\t\t\t\t\tvalue: dataBcid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBcid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Playlist ID'),\n\t\t\t\t\tvalue: dataBid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video ID'),\n\t\t\t\t\tvalue: dataVid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataVid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height !== undefined ? height : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), wp.element.createElement(\n\t\t\tBlockControls,\n\t\t\t{ key: 'controls' },\n\t\t\twp.element.createElement(BlockAlignmentToolbar, {\n\t\t\t\tvalue: align,\n\t\t\t\tonChange: function onChange(nextAlign) {\n\t\t\t\t\tsetAttributes({ align: nextAlign });\n\t\t\t\t},\n\t\t\t\tcontrols: ['left', 'center', 'right']\n\t\t\t})\n\t\t), wp.element.createElement(\n\t\t\t'time',\n\t\t\t{ key: 'timeago', dateTime: attributes.dateTime },\n\t\t\ttimeAgo\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar timeagoProps = {\n\t\t\tlayout: 'responsive',\n\t\t\tclassName: 'align' + (attributes.align || 'none'),\n\t\t\tdatetime: attributes.dateTime,\n\t\t\tlocale: 'en'\n\t\t};\n\t\tif (attributes.cutoff) {\n\t\t\ttimeagoProps.cutoff = attributes.cutoff;\n\t\t}\n\t\tif (attributes.ampLayout) {\n\t\t\tswitch (attributes.ampLayout) {\n\t\t\t\tcase 'fixed-height':\n\t\t\t\t\tif (attributes.height) {\n\t\t\t\t\t\ttimeagoProps.height = attributes.height;\n\t\t\t\t\t\ttimeagoProps.layout = attributes.ampLayout;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'fixed':\n\t\t\t\t\tif (attributes.height && attributes.width) {\n\t\t\t\t\t\ttimeagoProps.height = attributes.height;\n\t\t\t\t\t\ttimeagoProps.width = attributes.width;\n\t\t\t\t\t\ttimeagoProps.layout = attributes.ampLayout;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn wp.element.createElement(\n\t\t\t'amp-timeago',\n\t\t\ttimeagoProps,\n\t\t\tmoment(attributes.dateTime).format('dddd D MMMM HH:mm')\n\t\t);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtbzItcGxheWVyL2luZGV4LmpzPzIwMGYiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2NrcyxcbiAgICByZWdpc3RlckJsb2NrVHlwZSA9IF93cCRibG9ja3MucmVnaXN0ZXJCbG9ja1R5cGUsXG4gICAgSW5zcGVjdG9yQ29udHJvbHMgPSBfd3AkYmxvY2tzLkluc3BlY3RvckNvbnRyb2xzO1xudmFyIF93cCRjb21wb25lbnRzID0gd3AuY29tcG9uZW50cyxcbiAgICBEYXRlVGltZVBpY2tlciA9IF93cCRjb21wb25lbnRzLkRhdGVUaW1lUGlja2VyLFxuICAgIFBhbmVsQm9keSA9IF93cCRjb21wb25lbnRzLlBhbmVsQm9keSxcbiAgICBUZXh0Q29udHJvbCA9IF93cCRjb21wb25lbnRzLlRleHRDb250cm9sLFxuICAgIFNlbGVjdENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5TZWxlY3RDb250cm9sO1xuXG4vKipcbiAqIFJlZ2lzdGVyIGJsb2NrLlxuICovXG5cbmV4cG9ydCBkZWZhdWx0IHJlZ2lzdGVyQmxvY2tUeXBlKCdhbXAvYW1wLW8yLXBsYXllcicsIHtcblx0dGl0bGU6IF9fKCdBTVAgTzIgUGxheWVyJyksXG5cdGNhdGVnb3J5OiAnY29tbW9uJyxcblx0aWNvbjogJ2JhY2t1cCcsXG5cdGtleXdvcmRzOiBbX18oJ0VtYmVkJyksI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0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///1\n"); +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder,\n ToggleControl = _wp$components.ToggleControl;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-o2-player', {\n\ttitle: __('AMP O2 Player'),\n\tcategory: 'common',\n\ticon: 'backup',\n\tkeywords: [__('Embed'), __('AOL O2Player')],\n\n\t// @todo Add other useful macro toggles, e.g. showing relevant content.\n\tattributes: {\n\t\tdataPid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataVid: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataBcid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataBid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tautoPlay: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed-height'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number'\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar autoPlay = attributes.autoPlay,\n\t\t dataPid = attributes.dataPid,\n\t\t dataVid = attributes.dataVid,\n\t\t dataBcid = attributes.dataBcid,\n\t\t dataBid = attributes.dataBid,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'fixed-height', label: 'Fixed height' }, { value: 'responsive', label: 'Responsive' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, { value: 'nodisplay', label: 'No Display' }];\n\t\tvar url = false;\n\t\tif (dataPid && (dataBcid || dataVid)) {\n\t\t\turl = 'https://delivery.vidible.tv/htmlembed/pid=' + dataPid + '/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('O2 Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Buyer Company ID (bcid, required)'),\n\t\t\t\t\tvalue: dataBcid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBcid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Playlist ID'),\n\t\t\t\t\tvalue: dataBid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video ID'),\n\t\t\t\t\tvalue: dataVid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataVid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(ToggleControl, {\n\t\t\t\t\tlabel: __('Autoplay'),\n\t\t\t\t\tchecked: autoPlay,\n\t\t\t\t\tonChange: function onChange() {\n\t\t\t\t\t\treturn setAttributes({ autoPlay: !autoPlay });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('O2 Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t{ href: url },\n\t\t\t\t\turl\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('O2 Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar o2Props = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\t'data-pid': attributes.dataPid\n\t\t};\n\t\tif (attributes.width) {\n\t\t\to2Props.width = attributes.width;\n\t\t}\n\t\tif (!attributes.autoPlay) {\n\t\t\to2Props['data-macros'] = 'm.playback=click';\n\t\t}\n\t\tif (attributes.dataVid) {\n\t\t\to2Props['data-vid'] = attributes.dataVid;\n\t\t} else if (attributes.dataBcid) {\n\t\t\to2Props['data-bcid'] = attributes.dataBcid;\n\t\t}\n\t\tif (attributes.dataBid) {\n\t\t\to2Props['data-bid'] = attributes.dataBid;\n\t\t}\n\t\treturn wp.element.createElement('amp-o2-player', o2Props);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtbzItcGxheWVyL2luZGV4LmpzPzIwMGYiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJ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UFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///1\n"); /***/ }) /******/ ]); \ No newline at end of file diff --git a/blocks/amp-o2-player/index.js b/blocks/amp-o2-player/index.js index c73c7896c2e..f05f70a5fbf 100644 --- a/blocks/amp-o2-player/index.js +++ b/blocks/amp-o2-player/index.js @@ -7,10 +7,11 @@ const { InspectorControls } = wp.blocks; const { - DateTimePicker, PanelBody, TextControl, - SelectControl + SelectControl, + Placeholder, + ToggleControl } = wp.components; /** @@ -24,9 +25,10 @@ export default registerBlockType( icon: 'backup', keywords: [ __( 'Embed' ), - __( 'AOL O2Player' ), + __( 'AOL O2Player' ) ], + // @todo Add other useful macro toggles, e.g. showing relevant content. attributes: { dataPid: { type: 'string' @@ -40,6 +42,10 @@ export default registerBlockType( dataBid: { type: 'string' }, + autoPlay: { + type: 'boolean', + default: false + }, layout: { type: 'string', default: 'fixed-height' @@ -54,7 +60,7 @@ export default registerBlockType( }, edit( { attributes, isSelected, setAttributes } ) { - const { dataPid, dataVid, dataBcid, dataBid, layout, height, width } = attributes; + const { autoPlay, dataPid, dataVid, dataBcid, dataBid, layout, height, width } = attributes; const ampLayoutOptions = [ { value: 'fixed-height', label: 'Fixed height' }, { value: 'responsive', label: 'Responsive' }, @@ -64,7 +70,10 @@ export default registerBlockType( { value: 'nodisplay', label: 'No Display' } ]; - + let url = false; + if ( dataPid && ( dataBcid || dataVid ) ) { + url = 'https://delivery.vidible.tv/htmlembed/pid=' + dataPid + '/'; + } return [ isSelected && ( @@ -89,6 +98,11 @@ export default registerBlockType( value={ dataVid } onChange={ value => ( setAttributes( { dataVid: value } ) ) } /> + ( setAttributes( { autoPlay: ! autoPlay } ) ) } + /> ( setAttributes( { height: value } ) ) } /> ), - - { - setAttributes( { align: nextAlign } ); - } } - controls={ [ 'left', 'center', 'right' ] } - /> - , - + url && ( + +

{ url }

+

{ __( 'Previews for this are unavailable in the editor, sorry!' ) }

+
+ ), + ! url && ( + +

{ __( 'Add data to use the block.' ) }

+
+ ) ]; }, save( { attributes } ) { - let timeagoProps = { - layout: 'responsive', - className: 'align' + ( attributes.align || 'none' ), - datetime: attributes.dateTime, - locale: 'en' + let o2Props = { + layout: attributes.layout, + height: attributes.height, + 'data-pid': attributes.dataPid }; - if ( attributes.cutoff ) { - timeagoProps.cutoff = attributes.cutoff; + if ( attributes.width ) { + o2Props.width = attributes.width; + } + if ( ! attributes.autoPlay ) { + o2Props[ 'data-macros' ] = 'm.playback=click'; + } + if ( attributes.dataVid ) { + o2Props[ 'data-vid' ] = attributes.dataVid; + } else if ( attributes.dataBcid ) { + o2Props[ 'data-bcid' ] = attributes.dataBcid; } - if ( attributes.ampLayout ) { - switch ( attributes.ampLayout ) { - case 'fixed-height': - if ( attributes.height ) { - timeagoProps.height = attributes.height; - timeagoProps.layout = attributes.ampLayout; - } - break; - case 'fixed': - if ( attributes.height && attributes.width ) { - timeagoProps.height = attributes.height; - timeagoProps.width = attributes.width; - timeagoProps.layout = attributes.ampLayout; - } - break; - } + if ( attributes.dataBid ) { + o2Props[ 'data-bid' ] = attributes.dataBid; } return ( - { moment( attributes.dateTime ).format( 'dddd D MMMM HH:mm' ) } + ); } } -); \ No newline at end of file +); From 72e783c9c270ded0786072ba49dc376284b5ee59 Mon Sep 17 00:00:00 2001 From: Miina Sikk Date: Thu, 17 May 2018 15:07:44 +0300 Subject: [PATCH 05/18] Add amp-ooyala-player block. --- assets/js/amp-blocks-compiled.js | 13 ++- blocks/amp-o2-player/index.js | 4 +- blocks/amp-ooyala-player/index.js | 156 ++++++++++++++++++++++++++++++ blocks/index.js | 1 + 4 files changed, 170 insertions(+), 4 deletions(-) create mode 100644 blocks/amp-ooyala-player/index.js diff --git a/assets/js/amp-blocks-compiled.js b/assets/js/amp-blocks-compiled.js index 9002d4f12c2..4ca07b99249 100644 --- a/assets/js/amp-blocks-compiled.js +++ b/assets/js/amp-blocks-compiled.js @@ -68,14 +68,23 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__amp_o2_player__ = __webpack_require__(1);\n/**\n * Import blocks.\n */\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9pbmRleC5qcz84MTkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW1wb3J0IGJsb2Nrcy5cbiAqL1xuaW1wb3J0ICcuL2FtcC1vMi1wbGF5ZXInO1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vYmxvY2tzL2luZGV4LmpzXG4vLyBtb2R1bGUgaWQgPSAwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///0\n"); +eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__amp_o2_player__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__amp_ooyala_player__ = __webpack_require__(4);\n/**\n * Import blocks.\n */\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9pbmRleC5qcz84MTkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW1wb3J0IGJsb2Nrcy5cbiAqL1xuaW1wb3J0ICcuL2FtcC1vMi1wbGF5ZXInO1xuaW1wb3J0ICcuL2FtcC1vb3lhbGEtcGxheWVyJztcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL2Jsb2Nrcy9pbmRleC5qc1xuLy8gbW9kdWxlIGlkID0gMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///0\n"); /***/ }), /* 1 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder,\n ToggleControl = _wp$components.ToggleControl;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-o2-player', {\n\ttitle: __('AMP O2 Player'),\n\tcategory: 'common',\n\ticon: 'backup',\n\tkeywords: [__('Embed'), __('AOL O2Player')],\n\n\t// @todo Add other useful macro toggles, e.g. showing relevant content.\n\tattributes: {\n\t\tdataPid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataVid: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataBcid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataBid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tautoPlay: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed-height'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number'\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar autoPlay = attributes.autoPlay,\n\t\t dataPid = attributes.dataPid,\n\t\t dataVid = attributes.dataVid,\n\t\t dataBcid = attributes.dataBcid,\n\t\t dataBid = attributes.dataBid,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'fixed-height', label: 'Fixed height' }, { value: 'responsive', label: 'Responsive' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, { value: 'nodisplay', label: 'No Display' }];\n\t\tvar url = false;\n\t\tif (dataPid && (dataBcid || dataVid)) {\n\t\t\turl = 'https://delivery.vidible.tv/htmlembed/pid=' + dataPid + '/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('O2 Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Buyer Company ID (bcid, required)'),\n\t\t\t\t\tvalue: dataBcid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBcid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Playlist ID'),\n\t\t\t\t\tvalue: dataBid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video ID'),\n\t\t\t\t\tvalue: dataVid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataVid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(ToggleControl, {\n\t\t\t\t\tlabel: __('Autoplay'),\n\t\t\t\t\tchecked: autoPlay,\n\t\t\t\t\tonChange: function onChange() {\n\t\t\t\t\t\treturn setAttributes({ autoPlay: !autoPlay });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('O2 Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t{ href: url },\n\t\t\t\t\turl\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('O2 Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar o2Props = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\t'data-pid': attributes.dataPid\n\t\t};\n\t\tif (attributes.width) {\n\t\t\to2Props.width = attributes.width;\n\t\t}\n\t\tif (!attributes.autoPlay) {\n\t\t\to2Props['data-macros'] = 'm.playback=click';\n\t\t}\n\t\tif (attributes.dataVid) {\n\t\t\to2Props['data-vid'] = attributes.dataVid;\n\t\t} else if (attributes.dataBcid) {\n\t\t\to2Props['data-bcid'] = attributes.dataBcid;\n\t\t}\n\t\tif (attributes.dataBid) {\n\t\t\to2Props['data-bid'] = attributes.dataBid;\n\t\t}\n\t\treturn wp.element.createElement('amp-o2-player', o2Props);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtbzItcGxheWVyL2luZGV4LmpzPzIwMGYiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2NrcyxcbiAgICByZWdpc3RlckJsb2NrVHlwZSA9IF93cCRibG9ja3MucmVnaXN0ZXJCbG9ja1R5cGUsXG4gICAgSW5zcGVjdG9yQ29udHJvbHMgPSBfd3AkYmxvY2tzLkluc3BlY3RvckNvbnRyb2xzO1xudmFyIF93cCRjb21wb25lbnRzID0gd3AuY29tcG9uZW50cyxcbiAgICBQYW5lbEJvZHkgPSBfd3AkY29tcG9uZW50cy5QYW5lbEJvZHksXG4gICAgVGV4dENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5UZXh0Q29udHJvbCxcbiAgICBTZWxlY3RDb250cm9sID0gX3dwJGNvbXBvbmVudHMuU2VsZWN0Q29udHJvbCxcbiAgICBQbGFjZWhvbGRlciA9IF93cCRjb21wb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BQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///1\n"); +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder,\n ToggleControl = _wp$components.ToggleControl;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-o2-player', {\n\ttitle: __('AMP O2 Player'),\n\tcategory: 'common',\n\ticon: 'backup',\n\tkeywords: [__('Embed'), __('AOL O2Player')],\n\n\t// @todo Add other useful macro toggles, e.g. showing relevant content.\n\tattributes: {\n\t\tdataPid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataVid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataBcid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataBid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tautoPlay: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed-height'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number'\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar autoPlay = attributes.autoPlay,\n\t\t dataPid = attributes.dataPid,\n\t\t dataVid = attributes.dataVid,\n\t\t dataBcid = attributes.dataBcid,\n\t\t dataBid = attributes.dataBid,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'fixed-height', label: 'Fixed height' }, { value: 'responsive', label: 'Responsive' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, { value: 'nodisplay', label: 'No Display' }];\n\t\tvar url = false;\n\t\tif (dataPid && (dataBcid || dataVid)) {\n\t\t\turl = 'https://delivery.vidible.tv/htmlembed/pid=' + dataPid + '/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('O2 Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Buyer Company ID (bcid, required)'),\n\t\t\t\t\tvalue: dataBcid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBcid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Playlist ID'),\n\t\t\t\t\tvalue: dataBid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video ID'),\n\t\t\t\t\tvalue: dataVid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataVid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(ToggleControl, {\n\t\t\t\t\tlabel: __('Autoplay'),\n\t\t\t\t\tchecked: autoPlay,\n\t\t\t\t\tonChange: function onChange() {\n\t\t\t\t\t\treturn setAttributes({ autoPlay: !autoPlay });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('O2 Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t{ href: url },\n\t\t\t\t\turl\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('O2 Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar o2Props = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\t'data-pid': attributes.dataPid\n\t\t};\n\t\tif ('fixed-height' !== attributes.layout && attributes.width) {\n\t\t\to2Props.width = attributes.width;\n\t\t}\n\t\tif (!attributes.autoPlay) {\n\t\t\to2Props['data-macros'] = 'm.playback=click';\n\t\t}\n\t\tif (attributes.dataVid) {\n\t\t\to2Props['data-vid'] = attributes.dataVid;\n\t\t} else if (attributes.dataBcid) {\n\t\t\to2Props['data-bcid'] = attributes.dataBcid;\n\t\t}\n\t\tif (attributes.dataBid) {\n\t\t\to2Props['data-bid'] = attributes.dataBid;\n\t\t}\n\t\treturn wp.element.createElement('amp-o2-player', o2Props);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtbzItcGxheWVyL2luZGV4LmpzPzIwMGYiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2Nrc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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///1\n"); + +/***/ }), +/* 2 */, +/* 3 */, +/* 4 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-ooyala-player', {\n\ttitle: __('AMP Ooyala Player'),\n\tdescription: __('Displays an Ooyala video.'),\n\tcategory: 'common',\n\ticon: 'backup',\n\tkeywords: [__('Embed'), __('Ooyala video')],\n\n\t// @todo Add data-config attribute?\n\tattributes: {\n\t\tdataEmbedCode: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPcode: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerVersion: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'v3'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataEmbedCode = attributes.dataEmbedCode,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataPcode = attributes.dataPcode,\n\t\t dataPlayerVersion = attributes.dataPlayerVersion,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: '', label: __('None') }, { value: 'responsive', label: __('Responsive') }, { value: 'fixed', label: __('Fixed') }, { value: 'fill', label: __('Fill') }, { value: 'flex-item', label: __('Flex-item') }];\n\t\tvar url = false;\n\t\tif (dataEmbedCode && dataPlayerId && dataPcode) {\n\t\t\turl = 'http://cf.c.ooyala.com/' + dataEmbedCode;\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Ooyala settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video embed code (required)'),\n\t\t\t\t\tvalue: dataEmbedCode,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataEmbedCode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPlayerId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Provider code for the account (required)'),\n\t\t\t\t\tvalue: dataPcode,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPcode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Player version'),\n\t\t\t\t\tvalue: dataPlayerVersion,\n\t\t\t\t\toptions: [{ value: 'v3', label: __('V3') }, { value: 'v4', label: __('V4') }],\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerVersion: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Ooyala Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t{ href: url },\n\t\t\t\t\turl\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Ooyala Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\t\tvar dataEmbedCode = attributes.dataEmbedCode,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataPcode = attributes.dataPcode,\n\t\t dataPlayerVersion = attributes.dataPlayerVersion,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\n\t\tvar ooyalaProps = {\n\t\t\tlayout: layout,\n\t\t\theight: height,\n\t\t\t'data-embedcode': dataEmbedCode,\n\t\t\t'data-playerid': dataPlayerId,\n\t\t\t'data-pcode': dataPcode,\n\t\t\t'data-playerversion': dataPlayerVersion\n\t\t};\n\t\tif ('fixed-height' !== layout && width) {\n\t\t\tooyalaProps.width = width;\n\t\t}\n\t\treturn wp.element.createElement('amp-ooyala-player', ooyalaProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtb295YWxhLXBsYXllci9pbmRleC5qcz81NmRlIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW50ZXJuYWwgYmxvY2sgbGlicmFyaWVzLlxuICovXG52YXIgX18gPSB3cC5pMThuLl9fO1xudmFyIF93cCRibG9ja3MgPSB3cC5ibG9ja3MsXG4gICAgcmVnaXN0ZXJCbG9ja1R5cGUgPSBfd3AkYmxvY2tzLnJlZ2lzdGVyQmxvY2tUeXBlLFxuICAgIEluc3BlY3RvckNvbnRyb2xzID0gX3dwJGJsb2Nrcy5JbnNwZWN0b3JDb250cm9scztcbnZhciBfd3AkY29tcG9uZW50cyA9IHdwLmNvbXBvbmVudHMsXG4gICAgUGFuZWxCb2R5ID0gX3dwJGNvbXBvbmVudHMuUGFuZWxCb2R5LFxuICAgIFRleHRDb250cm9sID0gX3dwJGNvbXBvbmVudHMuVGV4dENvbnRyb2wsXG4gICAgU2VsZWN0Q29udHJvbCA9IF93cCRjb21wb25lbnRzLlNlbGVjdENvbnRyb2wsXG4gICAgUGxhY2Vob2xkZXIgPSBfd3AkY29tcG9uZW50cy5QbGFjZWhvbGRlcjtcblxuLyoqXG4gKiBSZWdpc3RlciBibG9jay5cbiAqL1xuXG5leHBvcnQgZGVmYXVsdCByZWdpc3RlckJsb2NrVHlwZSgnYW1wL2FtcC1vb3lhbGEtcGxheWVyJywge1xuXHR0aXRsZTogX18oJ0FNUCBPb3lhbGEgUGxheWVyJyksXG5cdGRlc2NyaXB0aW9uOiBfXygnRGlzcGxheXMgYW4gT295YW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/blocks/amp-o2-player/index.js b/blocks/amp-o2-player/index.js index f05f70a5fbf..c49d6482a1e 100644 --- a/blocks/amp-o2-player/index.js +++ b/blocks/amp-o2-player/index.js @@ -34,7 +34,7 @@ export default registerBlockType( type: 'string' }, dataVid: { - type: 'number' + type: 'string' }, dataBcid: { type: 'string' @@ -144,7 +144,7 @@ export default registerBlockType( height: attributes.height, 'data-pid': attributes.dataPid }; - if ( attributes.width ) { + if ( 'fixed-height' !== attributes.layout && attributes.width ) { o2Props.width = attributes.width; } if ( ! attributes.autoPlay ) { diff --git a/blocks/amp-ooyala-player/index.js b/blocks/amp-ooyala-player/index.js new file mode 100644 index 00000000000..eb988c67627 --- /dev/null +++ b/blocks/amp-ooyala-player/index.js @@ -0,0 +1,156 @@ +/** + * Internal block libraries. + */ +const { __ } = wp.i18n; +const { + registerBlockType, + InspectorControls +} = wp.blocks; +const { + PanelBody, + TextControl, + SelectControl, + Placeholder +} = wp.components; + +/** + * Register block. + */ +export default registerBlockType( + 'amp/amp-ooyala-player', + { + title: __( 'AMP Ooyala Player' ), + description: __( 'Displays an Ooyala video.' ), + category: 'common', + icon: 'backup', + keywords: [ + __( 'Embed' ), + __( 'Ooyala video' ) + ], + + // @todo Add data-config attribute? + attributes: { + dataEmbedCode: { + type: 'string' + }, + dataPlayerId: { + type: 'string' + }, + dataPcode: { + type: 'string' + }, + dataPlayerVersion: { + type: 'string', + default: 'v3' + }, + layout: { + type: 'string', + default: 'fixed' + }, + width: { + type: 'number', + default: 600 + }, + height: { + type: 'number', + default: 400 + } + }, + + edit( { attributes, isSelected, setAttributes } ) { + const { dataEmbedCode, dataPlayerId, dataPcode, dataPlayerVersion, layout, height, width } = attributes; + const ampLayoutOptions = [ + { value: '', label: __( 'None' ) }, + { value: 'responsive', label: __( 'Responsive' ) }, + { value: 'fixed', label: __( 'Fixed' ) }, + { value: 'fill', label: __( 'Fill' ) }, + { value: 'flex-item', label: __( 'Flex-item' ) } + + ]; + let url = false; + if ( dataEmbedCode && dataPlayerId && dataPcode ) { + url = 'http://cf.c.ooyala.com/' + dataEmbedCode; + } + return [ + isSelected && ( + + + ( setAttributes( { dataEmbedCode: value } ) ) } + /> + ( setAttributes( { dataPlayerId: value } ) ) } + /> + ( setAttributes( { dataPcode: value } ) ) } + /> + ( setAttributes( { dataPlayerVersion: value } ) ) } + /> + ( setAttributes( { layout: value } ) ) } + /> + ( setAttributes( { width: value } ) ) } + /> + ( setAttributes( { height: value } ) ) } + /> + + + ), + url && ( + +

{ url }

+

{ __( 'Previews for this are unavailable in the editor, sorry!' ) }

+
+ ), + ! url && ( + +

{ __( 'Add required data to use the block.' ) }

+
+ ) + ]; + }, + + save( { attributes } ) { + const { dataEmbedCode, dataPlayerId, dataPcode, dataPlayerVersion, layout, height, width } = attributes; + + let ooyalaProps = { + layout: layout, + height: height, + 'data-embedcode': dataEmbedCode, + 'data-playerid': dataPlayerId, + 'data-pcode': dataPcode, + 'data-playerversion': dataPlayerVersion + }; + if ( 'fixed-height' !== layout && width ) { + ooyalaProps.width = width; + } + return ( + + ); + } + } +); diff --git a/blocks/index.js b/blocks/index.js index cdd8f9aafb3..468e0dfe6e5 100644 --- a/blocks/index.js +++ b/blocks/index.js @@ -2,3 +2,4 @@ * Import blocks. */ import './amp-o2-player'; +import './amp-ooyala-player'; From 456ddc515cb8de76304d79a48eaa677bf247996d Mon Sep 17 00:00:00 2001 From: Miina Sikk Date: Thu, 17 May 2018 15:25:11 +0300 Subject: [PATCH 06/18] Add amp-reach-player block. --- assets/js/amp-blocks-compiled.js | 13 +++- blocks/amp-o2-player/index.js | 2 +- blocks/amp-ooyala-player/index.js | 2 +- blocks/amp-reach-player/index.js | 123 ++++++++++++++++++++++++++++++ blocks/index.js | 1 + 5 files changed, 136 insertions(+), 5 deletions(-) create mode 100644 blocks/amp-reach-player/index.js diff --git a/assets/js/amp-blocks-compiled.js b/assets/js/amp-blocks-compiled.js index 4ca07b99249..f5f5477130d 100644 --- a/assets/js/amp-blocks-compiled.js +++ b/assets/js/amp-blocks-compiled.js @@ -68,14 +68,14 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__amp_o2_player__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__amp_ooyala_player__ = __webpack_require__(4);\n/**\n * Import blocks.\n */\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9pbmRleC5qcz84MTkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW1wb3J0IGJsb2Nrcy5cbiAqL1xuaW1wb3J0ICcuL2FtcC1vMi1wbGF5ZXInO1xuaW1wb3J0ICcuL2FtcC1vb3lhbGEtcGxheWVyJztcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL2Jsb2Nrcy9pbmRleC5qc1xuLy8gbW9kdWxlIGlkID0gMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///0\n"); +eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__amp_o2_player__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__amp_ooyala_player__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__amp_reach_player__ = __webpack_require__(5);\n/**\n * Import blocks.\n */\n\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9pbmRleC5qcz84MTkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW1wb3J0IGJsb2Nrcy5cbiAqL1xuaW1wb3J0ICcuL2FtcC1vMi1wbGF5ZXInO1xuaW1wb3J0ICcuL2FtcC1vb3lhbGEtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtcmVhY2gtcGxheWVyJztcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL2Jsb2Nrcy9pbmRleC5qc1xuLy8gbW9kdWxlIGlkID0gMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///0\n"); /***/ }), /* 1 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder,\n ToggleControl = _wp$components.ToggleControl;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-o2-player', {\n\ttitle: __('AMP O2 Player'),\n\tcategory: 'common',\n\ticon: 'backup',\n\tkeywords: [__('Embed'), __('AOL O2Player')],\n\n\t// @todo Add other useful macro toggles, e.g. showing relevant content.\n\tattributes: {\n\t\tdataPid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataVid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataBcid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataBid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tautoPlay: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed-height'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number'\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar autoPlay = attributes.autoPlay,\n\t\t dataPid = attributes.dataPid,\n\t\t dataVid = attributes.dataVid,\n\t\t dataBcid = attributes.dataBcid,\n\t\t dataBid = attributes.dataBid,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'fixed-height', label: 'Fixed height' }, { value: 'responsive', label: 'Responsive' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, { value: 'nodisplay', label: 'No Display' }];\n\t\tvar url = false;\n\t\tif (dataPid && (dataBcid || dataVid)) {\n\t\t\turl = 'https://delivery.vidible.tv/htmlembed/pid=' + dataPid + '/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('O2 Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Buyer Company ID (bcid, required)'),\n\t\t\t\t\tvalue: dataBcid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBcid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Playlist ID'),\n\t\t\t\t\tvalue: dataBid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video ID'),\n\t\t\t\t\tvalue: dataVid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataVid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(ToggleControl, {\n\t\t\t\t\tlabel: __('Autoplay'),\n\t\t\t\t\tchecked: autoPlay,\n\t\t\t\t\tonChange: function onChange() {\n\t\t\t\t\t\treturn setAttributes({ autoPlay: !autoPlay });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('O2 Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t{ href: url },\n\t\t\t\t\turl\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('O2 Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar o2Props = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\t'data-pid': attributes.dataPid\n\t\t};\n\t\tif ('fixed-height' !== attributes.layout && attributes.width) {\n\t\t\to2Props.width = attributes.width;\n\t\t}\n\t\tif (!attributes.autoPlay) {\n\t\t\to2Props['data-macros'] = 'm.playback=click';\n\t\t}\n\t\tif (attributes.dataVid) {\n\t\t\to2Props['data-vid'] = attributes.dataVid;\n\t\t} else if (attributes.dataBcid) {\n\t\t\to2Props['data-bcid'] = attributes.dataBcid;\n\t\t}\n\t\tif (attributes.dataBid) {\n\t\t\to2Props['data-bid'] = attributes.dataBid;\n\t\t}\n\t\treturn wp.element.createElement('amp-o2-player', o2Props);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjaz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val("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder,\n ToggleControl = _wp$components.ToggleControl;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-o2-player', {\n\ttitle: __('AMP O2 Player'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed'), __('AOL O2Player')],\n\n\t// @todo Add other useful macro toggles, e.g. showing relevant content.\n\tattributes: {\n\t\tdataPid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataVid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataBcid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataBid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tautoPlay: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed-height'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number'\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar autoPlay = attributes.autoPlay,\n\t\t dataPid = attributes.dataPid,\n\t\t dataVid = attributes.dataVid,\n\t\t dataBcid = attributes.dataBcid,\n\t\t dataBid = attributes.dataBid,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'fixed-height', label: 'Fixed height' }, { value: 'responsive', label: 'Responsive' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, { value: 'nodisplay', label: 'No Display' }];\n\t\tvar url = false;\n\t\tif (dataPid && (dataBcid || dataVid)) {\n\t\t\turl = 'https://delivery.vidible.tv/htmlembed/pid=' + dataPid + '/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('O2 Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Buyer Company ID (bcid, required)'),\n\t\t\t\t\tvalue: dataBcid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBcid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Playlist ID'),\n\t\t\t\t\tvalue: dataBid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video ID'),\n\t\t\t\t\tvalue: dataVid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataVid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(ToggleControl, {\n\t\t\t\t\tlabel: __('Autoplay'),\n\t\t\t\t\tchecked: autoPlay,\n\t\t\t\t\tonChange: function onChange() {\n\t\t\t\t\t\treturn setAttributes({ autoPlay: !autoPlay });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('O2 Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t{ href: url },\n\t\t\t\t\turl\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('O2 Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar o2Props = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\t'data-pid': attributes.dataPid\n\t\t};\n\t\tif ('fixed-height' !== attributes.layout && attributes.width) {\n\t\t\to2Props.width = attributes.width;\n\t\t}\n\t\tif (!attributes.autoPlay) {\n\t\t\to2Props['data-macros'] = 'm.playback=click';\n\t\t}\n\t\tif (attributes.dataVid) {\n\t\t\to2Props['data-vid'] = attributes.dataVid;\n\t\t} else if (attributes.dataBcid) {\n\t\t\to2Props['data-bcid'] = attributes.dataBcid;\n\t\t}\n\t\tif (attributes.dataBid) {\n\t\t\to2Props['data-bid'] = attributes.dataBid;\n\t\t}\n\t\treturn wp.element.createElement('amp-o2-player', o2Props);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtbzItcGxheWVyL2luZGV4LmpzPzIwMGYiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2NrcyxcbiAgICByZWdpc3RlckJsb2NrVHlwZSA9IF93cCRibG9ja3MucmVnaXN0ZXJCbG9ja1R5cGUsXG4gICAgSW5zcGVjdG9yQ29udHJvbHMgPSBfd3AkYmxvY2tzLkluc3BlY3RvckNvbnRyb2xzO1xudmFyIF93cCRjb21wb25lbnRzID0gd3AuY29tcG9uZW50cyxcbiAgICBQYW5lbEJvZHkgPSBfd3AkY29tcG9uZW50cy5QYW5lbEJvZHksXG4gICAgVGV4dENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5UZXh0Q29udHJvbCxcbiAgICBTZWxlY3RDb250cm9sID0gX3dwJGNvbXBvbmVudHMuU2VsZWN0Q29udHJvbCxcbiAgICBQbGFjZWhvbGRlciA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FDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///1\n"); /***/ }), /* 2 */, @@ -84,7 +84,14 @@ eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$bloc /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-ooyala-player', {\n\ttitle: __('AMP Ooyala Player'),\n\tdescription: __('Displays an Ooyala video.'),\n\tcategory: 'common',\n\ticon: 'backup',\n\tkeywords: [__('Embed'), __('Ooyala video')],\n\n\t// @todo Add data-config attribute?\n\tattributes: {\n\t\tdataEmbedCode: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPcode: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerVersion: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'v3'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataEmbedCode = attributes.dataEmbedCode,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataPcode = attributes.dataPcode,\n\t\t dataPlayerVersion = attributes.dataPlayerVersion,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: '', label: __('None') }, { value: 'responsive', label: __('Responsive') }, { value: 'fixed', label: __('Fixed') }, { value: 'fill', label: __('Fill') }, { value: 'flex-item', label: __('Flex-item') }];\n\t\tvar url = false;\n\t\tif (dataEmbedCode && dataPlayerId && dataPcode) {\n\t\t\turl = 'http://cf.c.ooyala.com/' + dataEmbedCode;\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Ooyala settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video embed code (required)'),\n\t\t\t\t\tvalue: dataEmbedCode,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataEmbedCode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPlayerId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Provider code for the account (required)'),\n\t\t\t\t\tvalue: dataPcode,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPcode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Player version'),\n\t\t\t\t\tvalue: dataPlayerVersion,\n\t\t\t\t\toptions: [{ value: 'v3', label: __('V3') }, { value: 'v4', label: __('V4') }],\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerVersion: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Ooyala Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t{ href: url },\n\t\t\t\t\turl\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Ooyala Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\t\tvar dataEmbedCode = attributes.dataEmbedCode,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataPcode = attributes.dataPcode,\n\t\t dataPlayerVersion = attributes.dataPlayerVersion,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\n\t\tvar ooyalaProps = {\n\t\t\tlayout: layout,\n\t\t\theight: height,\n\t\t\t'data-embedcode': dataEmbedCode,\n\t\t\t'data-playerid': dataPlayerId,\n\t\t\t'data-pcode': dataPcode,\n\t\t\t'data-playerversion': dataPlayerVersion\n\t\t};\n\t\tif ('fixed-height' !== layout && width) {\n\t\t\tooyalaProps.width = width;\n\t\t}\n\t\treturn wp.element.createElement('amp-ooyala-player', ooyalaProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtb295YWxhLXBsYXllci9pbmRleC5qcz81NmRlIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW50ZXJuYW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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///4\n"); +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-ooyala-player', {\n\ttitle: __('AMP Ooyala Player'),\n\tdescription: __('Displays an Ooyala video.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed'), __('Ooyala video')],\n\n\t// @todo Add data-config attribute?\n\tattributes: {\n\t\tdataEmbedCode: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPcode: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerVersion: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'v3'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataEmbedCode = attributes.dataEmbedCode,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataPcode = attributes.dataPcode,\n\t\t dataPlayerVersion = attributes.dataPlayerVersion,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: '', label: __('None') }, { value: 'responsive', label: __('Responsive') }, { value: 'fixed', label: __('Fixed') }, { value: 'fill', label: __('Fill') }, { value: 'flex-item', label: __('Flex-item') }];\n\t\tvar url = false;\n\t\tif (dataEmbedCode && dataPlayerId && dataPcode) {\n\t\t\turl = 'http://cf.c.ooyala.com/' + dataEmbedCode;\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Ooyala settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video embed code (required)'),\n\t\t\t\t\tvalue: dataEmbedCode,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataEmbedCode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPlayerId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Provider code for the account (required)'),\n\t\t\t\t\tvalue: dataPcode,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPcode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Player version'),\n\t\t\t\t\tvalue: dataPlayerVersion,\n\t\t\t\t\toptions: [{ value: 'v3', label: __('V3') }, { value: 'v4', label: __('V4') }],\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerVersion: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Ooyala Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t{ href: url },\n\t\t\t\t\turl\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Ooyala Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\t\tvar dataEmbedCode = attributes.dataEmbedCode,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataPcode = attributes.dataPcode,\n\t\t dataPlayerVersion = attributes.dataPlayerVersion,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\n\t\tvar ooyalaProps = {\n\t\t\tlayout: layout,\n\t\t\theight: height,\n\t\t\t'data-embedcode': dataEmbedCode,\n\t\t\t'data-playerid': dataPlayerId,\n\t\t\t'data-pcode': dataPcode,\n\t\t\t'data-playerversion': dataPlayerVersion\n\t\t};\n\t\tif ('fixed-height' !== layout && width) {\n\t\t\tooyalaProps.width = width;\n\t\t}\n\t\treturn wp.element.createElement('amp-ooyala-player', ooyalaProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNC5qcyIsInNvdXJjZXMiOlsid2VicGFjaz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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///4\n"); + +/***/ }), +/* 5 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-reach-player', {\n\ttitle: __('AMP Reach Player'),\n\tdescription: __('Displays the Reach Player configured in the Beachfront Reach platform.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed'), __('Beachfront Reach video')],\n\n\tattributes: {\n\t\tdataEmbedId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed-height'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number'\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataEmbedId = attributes.dataEmbedId,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: '', label: __('None') }, { value: 'responsive', label: __('Responsive') }, { value: 'fixed-height', label: __('Fixed Height') }, { value: 'fixed', label: __('Fixed') }, { value: 'fill', label: __('Fill') }, { value: 'flex-item', label: __('Flex-item') }];\n\t\tvar url = false;\n\t\tif (dataEmbedId) {\n\t\t\turl = 'https://media-cdn.beachfrontreach.com/acct_1/video/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Reach settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('The Reach player embed id (required)'),\n\t\t\t\t\tvalue: dataEmbedId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataEmbedId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Reach Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t{ href: url },\n\t\t\t\t\turl\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Reach Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add Reach player embed ID to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\t\tvar dataEmbedId = attributes.dataEmbedId,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\n\t\tvar reachProps = {\n\t\t\tlayout: layout,\n\t\t\theight: height,\n\t\t\t'data-embed-id': dataEmbedId\n\t\t};\n\t\tif ('fixed-height' !== layout && width) {\n\t\t\treachProps.width = width;\n\t\t}\n\t\treturn wp.element.createElement('amp-reach-player', reachProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtcmVhY2gtcGxheWVyL2luZGV4LmpzPzIwNmIiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2NrcyxcbiAgICByZWdpc3RlckJsb2NrVHlwZSA9IF93cCRibG9ja3MucmVnaXN0ZXJCbG9ja1R5cGUsXG4gICAgSW5zcGVjdG9yQ29udHJvbHMgPSBfd3AkYmxvY2tzLkluc3BlY3RvckNvbnRyb2xzO1xudmFyIF93cCRjb21wb25lbnRzID0gd3AuY29tcG9uZW50cyxcbiAgICBQYW5lbEJvZHkgPSBfd3AkY29tcG9uZW50cy5QYW5lbEJvZHksXG4gICAgVGV4dENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5UZXh0Q29udHJvbCxcbiAgICBTZWxlY3RDb250cm9sID0gX3dwJGNvbXBvbmVudHMuU2VsZWN0Q29udHJvbCxcbiAgICBQbGFjZWhvbGRlciA9IF93cCRjb21wb25lbnRzLlBsYWNlaG9sZGVyO1xuXG4vKipcbiAqIFJlZ2lzdGVyIGJsb2NrLlxuICovXG5cbmV4cG9ydCBkZWZhdWx0IHJlZ2lzdGVyQmxvY2tUeXBlKCdhbXAvYW1wLXJlYWNoLXBsYXllcicsIHtcblx0dGl0bGU6IF9fKCdBTV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 100644 --- a/blocks/amp-o2-player/index.js +++ b/blocks/amp-o2-player/index.js @@ -22,7 +22,7 @@ export default registerBlockType( { title: __( 'AMP O2 Player' ), category: 'common', - icon: 'backup', + icon: 'embed-generic', keywords: [ __( 'Embed' ), __( 'AOL O2Player' ) diff --git a/blocks/amp-ooyala-player/index.js b/blocks/amp-ooyala-player/index.js index eb988c67627..59fd95d2b15 100644 --- a/blocks/amp-ooyala-player/index.js +++ b/blocks/amp-ooyala-player/index.js @@ -22,7 +22,7 @@ export default registerBlockType( title: __( 'AMP Ooyala Player' ), description: __( 'Displays an Ooyala video.' ), category: 'common', - icon: 'backup', + icon: 'embed-generic', keywords: [ __( 'Embed' ), __( 'Ooyala video' ) diff --git a/blocks/amp-reach-player/index.js b/blocks/amp-reach-player/index.js new file mode 100644 index 00000000000..72d593d33b4 --- /dev/null +++ b/blocks/amp-reach-player/index.js @@ -0,0 +1,123 @@ +/** + * Internal block libraries. + */ +const { __ } = wp.i18n; +const { + registerBlockType, + InspectorControls +} = wp.blocks; +const { + PanelBody, + TextControl, + SelectControl, + Placeholder +} = wp.components; + +/** + * Register block. + */ +export default registerBlockType( + 'amp/amp-reach-player', + { + title: __( 'AMP Reach Player' ), + description: __( 'Displays the Reach Player configured in the Beachfront Reach platform.' ), + category: 'common', + icon: 'embed-generic', + keywords: [ + __( 'Embed' ), + __( 'Beachfront Reach video' ) + ], + + attributes: { + dataEmbedId: { + type: 'string' + }, + layout: { + type: 'string', + default: 'fixed-height' + }, + width: { + type: 'number' + }, + height: { + type: 'number', + default: 400 + } + }, + + edit( { attributes, isSelected, setAttributes } ) { + const { dataEmbedId, layout, height, width } = attributes; + const ampLayoutOptions = [ + { value: '', label: __( 'None' ) }, + { value: 'responsive', label: __( 'Responsive' ) }, + { value: 'fixed-height', label: __( 'Fixed Height' ) }, + { value: 'fixed', label: __( 'Fixed' ) }, + { value: 'fill', label: __( 'Fill' ) }, + { value: 'flex-item', label: __( 'Flex-item' ) } + + ]; + let url = false; + if ( dataEmbedId ) { + url = 'https://media-cdn.beachfrontreach.com/acct_1/video/'; + } + return [ + isSelected && ( + + + ( setAttributes( { dataEmbedId: value } ) ) } + /> + ( setAttributes( { layout: value } ) ) } + /> + ( setAttributes( { width: value } ) ) } + /> + ( setAttributes( { height: value } ) ) } + /> + + + ), + url && ( + +

{ url }

+

{ __( 'Previews for this are unavailable in the editor, sorry!' ) }

+
+ ), + ! url && ( + +

{ __( 'Add Reach player embed ID to use the block.' ) }

+
+ ) + ]; + }, + + save( { attributes } ) { + const { dataEmbedId, layout, height, width } = attributes; + + let reachProps = { + layout: layout, + height: height, + 'data-embed-id': dataEmbedId + }; + if ( 'fixed-height' !== layout && width ) { + reachProps.width = width; + } + return ( + + ); + } + } +); diff --git a/blocks/index.js b/blocks/index.js index 468e0dfe6e5..9ab631e0d10 100644 --- a/blocks/index.js +++ b/blocks/index.js @@ -3,3 +3,4 @@ */ import './amp-o2-player'; import './amp-ooyala-player'; +import './amp-reach-player'; From 77a2aacebecd1dac0dbb7a82c06a8cfa9781bfb7 Mon Sep 17 00:00:00 2001 From: Miina Sikk Date: Thu, 17 May 2018 17:55:42 +0300 Subject: [PATCH 07/18] Add amp-springboard-player block. --- assets/js/amp-blocks-compiled.js | 15 ++- blocks/amp-jwplayer/index.js | 0 blocks/amp-springboard-player/index.js | 172 +++++++++++++++++++++++++ blocks/index.js | 2 + 4 files changed, 188 insertions(+), 1 deletion(-) create mode 100644 blocks/amp-jwplayer/index.js create mode 100644 blocks/amp-springboard-player/index.js diff --git a/assets/js/amp-blocks-compiled.js b/assets/js/amp-blocks-compiled.js index f5f5477130d..68ca9ba647e 100644 --- a/assets/js/amp-blocks-compiled.js +++ b/assets/js/amp-blocks-compiled.js @@ -68,7 +68,7 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__amp_o2_player__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__amp_ooyala_player__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__amp_reach_player__ = __webpack_require__(5);\n/**\n * Import blocks.\n */\n\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9pbmRleC5qcz84MTkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW1wb3J0IGJsb2Nrcy5cbiAqL1xuaW1wb3J0ICcuL2FtcC1vMi1wbGF5ZXInO1xuaW1wb3J0ICcuL2FtcC1vb3lhbGEtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtcmVhY2gtcGxheWVyJztcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL2Jsb2Nrcy9pbmRleC5qc1xuLy8gbW9kdWxlIGlkID0gMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///0\n"); +eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__amp_o2_player__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__amp_ooyala_player__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__amp_reach_player__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__amp_springboard_player__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__amp_jwplayer__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__amp_jwplayer___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__amp_jwplayer__);\n/**\n * Import blocks.\n */\n\n\n\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9pbmRleC5qcz84MTkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW1wb3J0IGJsb2Nrcy5cbiAqL1xuaW1wb3J0ICcuL2FtcC1vMi1wbGF5ZXInO1xuaW1wb3J0ICcuL2FtcC1vb3lhbGEtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtcmVhY2gtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtc3ByaW5nYm9hcmQtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtandwbGF5ZXInO1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vYmxvY2tzL2luZGV4LmpzXG4vLyBtb2R1bGUgaWQgPSAwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///0\n"); /***/ }), /* 1 */ @@ -93,5 +93,18 @@ eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$bloc "use strict"; eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-reach-player', {\n\ttitle: __('AMP Reach Player'),\n\tdescription: __('Displays the Reach Player configured in the Beachfront Reach platform.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed'), __('Beachfront Reach video')],\n\n\tattributes: {\n\t\tdataEmbedId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed-height'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number'\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataEmbedId = attributes.dataEmbedId,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: '', label: __('None') }, { value: 'responsive', label: __('Responsive') }, { value: 'fixed-height', label: __('Fixed Height') }, { value: 'fixed', label: __('Fixed') }, { value: 'fill', label: __('Fill') }, { value: 'flex-item', label: __('Flex-item') }];\n\t\tvar url = false;\n\t\tif (dataEmbedId) {\n\t\t\turl = 'https://media-cdn.beachfrontreach.com/acct_1/video/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Reach settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('The Reach player embed id (required)'),\n\t\t\t\t\tvalue: dataEmbedId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataEmbedId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Reach Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t{ href: url },\n\t\t\t\t\turl\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Reach Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add Reach player embed ID to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\t\tvar dataEmbedId = attributes.dataEmbedId,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\n\t\tvar reachProps = {\n\t\t\tlayout: layout,\n\t\t\theight: height,\n\t\t\t'data-embed-id': dataEmbedId\n\t\t};\n\t\tif ('fixed-height' !== layout && width) {\n\t\t\treachProps.width = width;\n\t\t}\n\t\treturn wp.element.createElement('amp-reach-player', reachProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtcmVhY2gtcGxheWVyL2luZGV4LmpzPzIwNmIiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2NrcyxcbiAgICByZWdpc3RlckJsb2NrVHlwZSA9IF93cCRibG9ja3MucmVnaXN0ZXJCbG9ja1R5cGUsXG4gICAgSW5zcGVjdG9yQ29udHJvbHMgPSBfd3AkYmxvY2tzLkluc3BlY3RvckNvbnRyb2xzO1xudmFyIF93cCRjb21wb25lbnRzID0gd3AuY29tcG9uZW50cyxcbiAgICBQYW5lbEJvZHkgPSBfd3AkY29tcG9uZW50cy5QYW5lbEJvZHksXG4gICAgVGV4dENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5UZXh0Q29udHJvbCxcbiAgICBTZWxlY3RDb250cm9sID0gX3dwJGNvbXBvbmVudHMuU2VsZWN0Q29udHJvbCxcbiAgICBQbGFjZWhvbGRlciA9IF93cCRjb21wb25lbnRzLlBsYWNlaG9sZGVyO1xuXG4vKipcbiAqIFJlZ2lzdGVyIGJsb2NrLlxuICovXG5cbmV4cG9ydCBkZWZhdWx0IHJlZ2lzdGVyQmxvY2tUeXBlKCdhbXAvYW1wLXJlYWNoLXBsYXllcicsIHtcblx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**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-springboard-player', {\n\ttitle: __('AMP Springboard Player'),\n\tdescription: __('Displays the Springboard Player used in the Springboard Video Platform'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed')],\n\n\tattributes: {\n\t\tdataSiteId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataContentId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataDomain: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataMode: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'video'\n\t\t},\n\t\tdataItems: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 1\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'responsive'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataSiteId = attributes.dataSiteId,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataContentId = attributes.dataContentId,\n\t\t dataDomain = attributes.dataDomain,\n\t\t dataMode = attributes.dataMode,\n\t\t dataItems = attributes.dataItems,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: 'Responsive' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }];\n\t\tvar url = false;\n\t\tif (dataSiteId && dataContentId && dataDomain && dataMode && dataItems) {\n\t\t\turl = 'https://cms.springboardplatform.com/embed_iframe/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Springboard Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('SprintBoard site ID (required)'),\n\t\t\t\t\tvalue: dataSiteId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataSiteId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player content ID (required)'),\n\t\t\t\t\tvalue: dataContentId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataContentId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID'),\n\t\t\t\t\tvalue: dataPlayerId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Springboard partner domain'),\n\t\t\t\t\tvalue: dataDomain,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataDomain: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Mode (required)'),\n\t\t\t\t\tvalue: dataMode,\n\t\t\t\t\toptions: [{ value: 'video', label: __('Video') }, { value: 'playlist', label: __('Playlist') }],\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataMode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Number of video is playlist (required)'),\n\t\t\t\t\tvalue: dataItems,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataItems: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Springboard Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t{ href: url },\n\t\t\t\t\turl\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Springboard Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\t\tvar dataSiteId = attributes.dataSiteId,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataContentId = attributes.dataContentId,\n\t\t dataDomain = attributes.dataDomain,\n\t\t dataMode = attributes.dataMode,\n\t\t dataItems = attributes.dataItems,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar springboardProps = {\n\t\t\tlayout: layout,\n\t\t\theight: height,\n\t\t\t'data-site-id': dataSiteId,\n\t\t\t'data-mode': dataMode,\n\t\t\t'data-content-id': dataContentId,\n\t\t\t'data-player-id': dataPlayerId,\n\t\t\t'data-domain': dataDomain,\n\t\t\t'data-items': dataItems\n\t\t};\n\t\tif ('fixed-height' !== layout && width) {\n\t\t\tspringboardProps.width = attributes.width;\n\t\t}\n\t\treturn wp.element.createElement('amp-springboard-player', springboardProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtc3ByaW5nYm9hcmQtcGxheWVyL2luZGV4LmpzPzcyYjgiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2NrcyxcbiAgICByZWdpc3RlckJsb2NrVHlwZSA9IF93cCRibG9ja3M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vdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///7\n"); + /***/ }) /******/ ]); \ No newline at end of file diff --git a/blocks/amp-jwplayer/index.js b/blocks/amp-jwplayer/index.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/blocks/amp-springboard-player/index.js b/blocks/amp-springboard-player/index.js new file mode 100644 index 00000000000..230a345e42a --- /dev/null +++ b/blocks/amp-springboard-player/index.js @@ -0,0 +1,172 @@ +/** + * Internal block libraries. + */ +const { __ } = wp.i18n; +const { + registerBlockType, + InspectorControls +} = wp.blocks; +const { + PanelBody, + TextControl, + SelectControl, + Placeholder +} = wp.components; + +/** + * Register block. + */ +export default registerBlockType( + 'amp/amp-springboard-player', + { + title: __( 'AMP Springboard Player' ), + description: __( 'Displays the Springboard Player used in the Springboard Video Platform' ), + category: 'common', + icon: 'embed-generic', + keywords: [ + __( 'Embed' ) + ], + + attributes: { + dataSiteId: { + type: 'string' + }, + dataContentId: { + type: 'string' + }, + dataPlayerId: { + type: 'string' + }, + dataDomain: { + type: 'string' + }, + dataMode: { + type: 'string', + default: 'video' + }, + dataItems: { + type: 'number', + default: 1 + }, + layout: { + type: 'string', + default: 'responsive' + }, + width: { + type: 'number', + default: 600 + }, + height: { + type: 'number', + default: 400 + } + }, + + edit( { attributes, isSelected, setAttributes } ) { + const { dataSiteId, dataPlayerId, dataContentId, dataDomain, dataMode, dataItems, layout, height, width } = attributes; + const ampLayoutOptions = [ + { value: 'responsive', label: 'Responsive' }, + { value: 'fixed', label: 'Fixed' }, + { value: 'fill', label: 'Fill' }, + { value: 'flex-item', label: 'Flex-item' } + + ]; + let url = false; + if ( dataSiteId && dataContentId && dataDomain && dataMode && dataItems ) { + url = 'https://cms.springboardplatform.com/embed_iframe/'; + } + return [ + isSelected && ( + + + ( setAttributes( { dataSiteId: value } ) ) } + /> + ( setAttributes( { dataContentId: value } ) ) } + /> + ( setAttributes( { dataPlayerId: value } ) ) } + /> + ( setAttributes( { dataDomain: value } ) ) } + /> + ( setAttributes( { dataMode: value } ) ) } + /> + ( setAttributes( { dataItems: value } ) ) } + /> + ( setAttributes( { layout: value } ) ) } + /> + ( setAttributes( { width: value } ) ) } + /> + ( setAttributes( { height: value } ) ) } + /> + + + ), + url && ( + +

{ url }

+

{ __( 'Previews for this are unavailable in the editor, sorry!' ) }

+
+ ), + ! url && ( + +

{ __( 'Add required data to use the block.' ) }

+
+ ) + ]; + }, + + save( { attributes } ) { + const { dataSiteId, dataPlayerId, dataContentId, dataDomain, dataMode, dataItems, layout, height, width } = attributes; + let springboardProps = { + layout: layout, + height: height, + 'data-site-id': dataSiteId, + 'data-mode': dataMode, + 'data-content-id': dataContentId, + 'data-player-id': dataPlayerId, + 'data-domain': dataDomain, + 'data-items': dataItems + }; + if ( 'fixed-height' !== layout && width ) { + springboardProps.width = attributes.width; + } + return ( + + ); + } + } +); diff --git a/blocks/index.js b/blocks/index.js index 9ab631e0d10..3b318dae76f 100644 --- a/blocks/index.js +++ b/blocks/index.js @@ -4,3 +4,5 @@ import './amp-o2-player'; import './amp-ooyala-player'; import './amp-reach-player'; +import './amp-springboard-player'; +import './amp-jwplayer'; From 45916f7a67bc816f7c29e10279416476912844f3 Mon Sep 17 00:00:00 2001 From: Miina Sikk Date: Thu, 17 May 2018 19:17:30 +0300 Subject: [PATCH 08/18] Add amp-jwplayer block. --- assets/js/amp-blocks-compiled.js | 7 +- blocks/amp-jwplayer/index.js | 147 +++++++++++++++++++++++++++++++ 2 files changed, 151 insertions(+), 3 deletions(-) diff --git a/assets/js/amp-blocks-compiled.js b/assets/js/amp-blocks-compiled.js index 68ca9ba647e..d5de755c387 100644 --- a/assets/js/amp-blocks-compiled.js +++ b/assets/js/amp-blocks-compiled.js @@ -68,7 +68,7 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__amp_o2_player__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__amp_ooyala_player__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__amp_reach_player__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__amp_springboard_player__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__amp_jwplayer__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__amp_jwplayer___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__amp_jwplayer__);\n/**\n * Import blocks.\n */\n\n\n\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9pbmRleC5qcz84MTkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW1wb3J0IGJsb2Nrcy5cbiAqL1xuaW1wb3J0ICcuL2FtcC1vMi1wbGF5ZXInO1xuaW1wb3J0ICcuL2FtcC1vb3lhbGEtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtcmVhY2gtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtc3ByaW5nYm9hcmQtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtandwbGF5ZXInO1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vYmxvY2tzL2luZGV4LmpzXG4vLyBtb2R1bGUgaWQgPSAwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///0\n"); +eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__amp_o2_player__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__amp_ooyala_player__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__amp_reach_player__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__amp_springboard_player__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__amp_jwplayer__ = __webpack_require__(7);\n/**\n * Import blocks.\n */\n\n\n\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9pbmRleC5qcz84MTkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW1wb3J0IGJsb2Nrcy5cbiAqL1xuaW1wb3J0ICcuL2FtcC1vMi1wbGF5ZXInO1xuaW1wb3J0ICcuL2FtcC1vb3lhbGEtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtcmVhY2gtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtc3ByaW5nYm9hcmQtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtandwbGF5ZXInO1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vYmxvY2tzL2luZGV4LmpzXG4vLyBtb2R1bGUgaWQgPSAwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///0\n"); /***/ }), /* 1 */ @@ -102,9 +102,10 @@ eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$bloc /***/ }), /* 7 */ -/***/ (function(module, exports) { +/***/ (function(module, __webpack_exports__, __webpack_require__) { -eval("//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNy5qcyIsInNvdXJjZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///7\n"); +"use strict"; +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-jwplayer', {\n\ttitle: __('AMP JW Player'),\n\tdescription: __('Displays a cloud-hosted JW Player.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed')],\n\n\tattributes: {\n\t\tdataPlayerId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataMediaId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlaylistId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'responsive'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataPlayerId = attributes.dataPlayerId,\n\t\t dataMediaId = attributes.dataMediaId,\n\t\t dataPlaylistId = attributes.dataPlaylistId,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'fixed-height', label: 'Fixed height' }, { value: 'responsive', label: 'Responsive' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, { value: 'nodisplay', label: 'No Display' }];\n\t\tvar url = false;\n\t\tif (dataPlayerId && (dataMediaId || dataPlaylistId)) {\n\t\t\tif (dataPlaylistId) {\n\t\t\t\turl = 'https://content.jwplatform.com/players/' + dataPlaylistId + '-' + dataPlayerId;\n\t\t\t} else {\n\t\t\t\turl = 'https://content.jwplatform.com/players/' + dataMediaId + '-' + dataPlayerId;\n\t\t\t}\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('JW Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('JW Platform player ID (required)'),\n\t\t\t\t\tvalue: dataPlayerId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('JW Platform media ID (required if playlist ID not set)'),\n\t\t\t\t\tvalue: dataMediaId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataMediaId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('JW Platform playlist ID (required if media ID not set)'),\n\t\t\t\t\tvalue: dataPlaylistId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlaylistId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('JW Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t{ href: url },\n\t\t\t\t\turl\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('JW Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar jwProps = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\t'data-player-id': attributes.dataPlayerId\n\t\t};\n\t\tif ('fixed-height' !== attributes.layout && attributes.width) {\n\t\t\tjwProps.width = attributes.width;\n\t\t}\n\t\tif (attributes.dataPlaylistId) {\n\t\t\tjwProps['data-playlist-id'] = attributes.dataPlaylistId;\n\t\t} else if (attributes.dataMediaId) {\n\t\t\tjwProps['data-media-id'] = attributes.dataMediaId;\n\t\t}\n\t\treturn wp.element.createElement('amp-jwplayer', jwProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtandwbGF5ZXIvaW5kZXguanM/YTVkMCJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEludGVybmFsIGJsb2NrIGxpYnJhcmllcy5cbiAqL1xudmFyIF9fID0gd3AuaTE4bi5fXztcbnZhciBfd3AkYmxvY2tzID0gd3AuYmxvY2tzLFxuICAgIHJlZ2lzdGVyQmxvY2tUeXBlID0gX3dwJGJsb2Nrcy5yZWdpc3RlckJsb2NrVHlwZSxcbiAgICBJbnNwZWN0b3JDb250cm9scyA9IF93cCRibG9ja3MuSW5zcGVjdG9yQ29udHJvbHM7XG52YXIgX3dwJGNvbXBvbmVudHMgPSB3cC5jb21wb25lbnRzLFxuICAgIFBhbmVsQm9keSA9IF93cCRjb21wb25lbnRzLlBhbmVsQm9keSxcbiAgICBUZXh0Q29udHJvbCA9IF93cCRjb21wb25lbnRzLlRleHRDb250cm9sLFxuICAgIFNlbGVjdENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5TZWxlY3RDb250cm9sLFxuICAgIFBsYWNlaG9sZGVyID0gX3dwJGNvbXBvbmVudHMuUGxhY2Vob2xkZXI7XG5cbi8qKlxuICogUmVnaXN0ZXIgYmxvY2suXG4gKi9cblxuZXhwb3J0IGRlZmF1bHQgcmVnaXN0ZXJCbG9ja1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QTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///7\n"); /***/ }) /******/ ]); \ No newline at end of file diff --git a/blocks/amp-jwplayer/index.js b/blocks/amp-jwplayer/index.js index e69de29bb2d..7bfe4e247be 100644 --- a/blocks/amp-jwplayer/index.js +++ b/blocks/amp-jwplayer/index.js @@ -0,0 +1,147 @@ +/** + * Internal block libraries. + */ +const { __ } = wp.i18n; +const { + registerBlockType, + InspectorControls +} = wp.blocks; +const { + PanelBody, + TextControl, + SelectControl, + Placeholder +} = wp.components; + +/** + * Register block. + */ +export default registerBlockType( + 'amp/amp-jwplayer', + { + title: __( 'AMP JW Player' ), + description: __( 'Displays a cloud-hosted JW Player.' ), + category: 'common', + icon: 'embed-generic', + keywords: [ + __( 'Embed' ) + ], + + attributes: { + dataPlayerId: { + type: 'string' + }, + dataMediaId: { + type: 'string' + }, + dataPlaylistId: { + type: 'string' + }, + layout: { + type: 'string', + default: 'responsive' + }, + width: { + type: 'number', + default: 600 + }, + height: { + type: 'number', + default: 400 + } + }, + + edit( { attributes, isSelected, setAttributes } ) { + const { dataPlayerId, dataMediaId, dataPlaylistId, layout, height, width } = attributes; + const ampLayoutOptions = [ + { value: 'fixed-height', label: 'Fixed height' }, + { value: 'responsive', label: 'Responsive' }, + { value: 'fixed', label: 'Fixed' }, + { value: 'fill', label: 'Fill' }, + { value: 'flex-item', label: 'Flex-item' }, + { value: 'nodisplay', label: 'No Display' } + + ]; + let url = false; + if ( dataPlayerId && ( dataMediaId || dataPlaylistId ) ) { + if ( dataPlaylistId ) { + url = 'https://content.jwplatform.com/players/' + dataPlaylistId + '-' + dataPlayerId; + } else { + url = 'https://content.jwplatform.com/players/' + dataMediaId + '-' + dataPlayerId; + } + + } + return [ + isSelected && ( + + + ( setAttributes( { dataPlayerId: value } ) ) } + /> + ( setAttributes( { dataMediaId: value } ) ) } + /> + ( setAttributes( { dataPlaylistId: value } ) ) } + /> + ( setAttributes( { layout: value } ) ) } + /> + ( setAttributes( { width: value } ) ) } + /> + ( setAttributes( { height: value } ) ) } + /> + + + ), + url && ( + +

{ url }

+

{ __( 'Previews for this are unavailable in the editor, sorry!' ) }

+
+ ), + ! url && ( + +

{ __( 'Add required data to use the block.' ) }

+
+ ) + ]; + }, + + save( { attributes } ) { + let jwProps = { + layout: attributes.layout, + height: attributes.height, + 'data-player-id': attributes.dataPlayerId + }; + if ( 'fixed-height' !== attributes.layout && attributes.width ) { + jwProps.width = attributes.width; + } + if ( attributes.dataPlaylistId ) { + jwProps[ 'data-playlist-id' ] = attributes.dataPlaylistId; + } else if ( attributes.dataMediaId ) { + jwProps[ 'data-media-id' ] = attributes.dataMediaId; + } + return ( + + ); + } + } +); From a39148d3141bbbb410b287d9b2862668322dd2f0 Mon Sep 17 00:00:00 2001 From: Miina Sikk Date: Thu, 17 May 2018 19:23:07 +0300 Subject: [PATCH 09/18] Fix jscs --- blocks/amp-jwplayer/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/blocks/amp-jwplayer/index.js b/blocks/amp-jwplayer/index.js index 7bfe4e247be..984a226de17 100644 --- a/blocks/amp-jwplayer/index.js +++ b/blocks/amp-jwplayer/index.js @@ -69,7 +69,6 @@ export default registerBlockType( } else { url = 'https://content.jwplatform.com/players/' + dataMediaId + '-' + dataPlayerId; } - } return [ isSelected && ( From 8446fef21ba1ab1231f1a37cd889c639d81847e7 Mon Sep 17 00:00:00 2001 From: Miina Sikk Date: Fri, 18 May 2018 10:51:42 +0300 Subject: [PATCH 10/18] Add amp-brid-player block. --- assets/js/amp-blocks-compiled.js | 19 ++- blocks/amp-brid-player/index.js | 175 +++++++++++++++++++++++++ blocks/amp-jwplayer/index.js | 4 +- blocks/amp-o2-player/index.js | 4 +- blocks/amp-ooyala-player/index.js | 2 +- blocks/amp-reach-player/index.js | 2 +- blocks/amp-springboard-player/index.js | 2 +- blocks/index.js | 1 + 8 files changed, 196 insertions(+), 13 deletions(-) create mode 100644 blocks/amp-brid-player/index.js diff --git a/assets/js/amp-blocks-compiled.js b/assets/js/amp-blocks-compiled.js index d5de755c387..1ff56d4a281 100644 --- a/assets/js/amp-blocks-compiled.js +++ b/assets/js/amp-blocks-compiled.js @@ -68,14 +68,14 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__amp_o2_player__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__amp_ooyala_player__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__amp_reach_player__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__amp_springboard_player__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__amp_jwplayer__ = __webpack_require__(7);\n/**\n * Import blocks.\n */\n\n\n\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9pbmRleC5qcz84MTkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW1wb3J0IGJsb2Nrcy5cbiAqL1xuaW1wb3J0ICcuL2FtcC1vMi1wbGF5ZXInO1xuaW1wb3J0ICcuL2FtcC1vb3lhbGEtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtcmVhY2gtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtc3ByaW5nYm9hcmQtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtandwbGF5ZXInO1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vYmxvY2tzL2luZGV4LmpzXG4vLyBtb2R1bGUgaWQgPSAwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///0\n"); +eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__amp_o2_player__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__amp_ooyala_player__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__amp_reach_player__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__amp_springboard_player__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__amp_jwplayer__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__amp_brid_player__ = __webpack_require__(8);\n/**\n * Import blocks.\n */\n\n\n\n\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9pbmRleC5qcz84MTkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW1wb3J0IGJsb2Nrcy5cbiAqL1xuaW1wb3J0ICcuL2FtcC1vMi1wbGF5ZXInO1xuaW1wb3J0ICcuL2FtcC1vb3lhbGEtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtcmVhY2gtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtc3ByaW5nYm9hcmQtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtandwbGF5ZXInO1xuaW1wb3J0ICcuL2FtcC1icmlkLXBsYXllcic7XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ibG9ja3MvaW5kZXguanNcbi8vIG1vZHVsZSBpZCA9IDBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///0\n"); /***/ }), /* 1 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder,\n ToggleControl = _wp$components.ToggleControl;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-o2-player', {\n\ttitle: __('AMP O2 Player'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed'), __('AOL O2Player')],\n\n\t// @todo Add other useful macro toggles, e.g. showing relevant content.\n\tattributes: {\n\t\tdataPid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataVid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataBcid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataBid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tautoPlay: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed-height'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number'\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar autoPlay = attributes.autoPlay,\n\t\t dataPid = attributes.dataPid,\n\t\t dataVid = attributes.dataVid,\n\t\t dataBcid = attributes.dataBcid,\n\t\t dataBid = attributes.dataBid,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'fixed-height', label: 'Fixed height' }, { value: 'responsive', label: 'Responsive' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, { value: 'nodisplay', label: 'No Display' }];\n\t\tvar url = false;\n\t\tif (dataPid && (dataBcid || dataVid)) {\n\t\t\turl = 'https://delivery.vidible.tv/htmlembed/pid=' + dataPid + '/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('O2 Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Buyer Company ID (bcid, required)'),\n\t\t\t\t\tvalue: dataBcid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBcid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Playlist ID'),\n\t\t\t\t\tvalue: dataBid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video ID'),\n\t\t\t\t\tvalue: dataVid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataVid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(ToggleControl, {\n\t\t\t\t\tlabel: __('Autoplay'),\n\t\t\t\t\tchecked: autoPlay,\n\t\t\t\t\tonChange: function onChange() {\n\t\t\t\t\t\treturn setAttributes({ autoPlay: !autoPlay });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('O2 Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t{ href: url },\n\t\t\t\t\turl\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('O2 Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar o2Props = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\t'data-pid': attributes.dataPid\n\t\t};\n\t\tif ('fixed-height' !== attributes.layout && attributes.width) {\n\t\t\to2Props.width = attributes.width;\n\t\t}\n\t\tif (!attributes.autoPlay) {\n\t\t\to2Props['data-macros'] = 'm.playback=click';\n\t\t}\n\t\tif (attributes.dataVid) {\n\t\t\to2Props['data-vid'] = attributes.dataVid;\n\t\t} else if (attributes.dataBcid) {\n\t\t\to2Props['data-bcid'] = attributes.dataBcid;\n\t\t}\n\t\tif (attributes.dataBid) {\n\t\t\to2Props['data-bid'] = attributes.dataBid;\n\t\t}\n\t\treturn wp.element.createElement('amp-o2-player', o2Props);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtbzItcGxheWVyL2luZGV4LmpzPzIwMGYiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2NrcyxcbiAgICByZWdpc3RlckJsb2NrVHlwZSA9IF93cCRibG9ja3MucmVnaXN0ZXJCbG9ja1R5cGUsXG4gICAgSW5zcGVjdG9yQ29udHJvbHMgPSBfd3AkYmxvY2tzLkluc3BlY3RvckNvbnRyb2xzO1xudmFyIF93cCRjb21wb25lbnRzID0gd3AuY29tcG9uZW50cyxcbiAgICBQYW5lbEJvZHkgPSBfd3AkY29tcG9uZW50cy5QYW5lbEJvZHksXG4gICAgVGV4dENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5UZXh0Q29udHJvbCxcbiAgICBTZWxlY3RDb250cm9sID0gX3dwJGNvbXBvbmVudHMuU2VsZWN0Q29udHJvbCxcbiAgICBQbGFjZWhvbGRlciA9IF93cCRjb21wb25lbnRzLlBsYWNlaG9sZGVyLFxuICAgIFRvZ2dsZUNvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5Ub2dnbGVDb250cm9sO1xuXG4vKipcbiAqIFJlZ2lzdGVyIGJsb2NrLlxuICovXG5cbmV4cG9ydCBkZWZhdWx0IHJlZ2lzdGVyQmxvY2tUeXBlKCdhbXAvYW1wLW8yLXBsYXllcicsIHtcblx0dGl0bGU6IF9fKCdBTVAgTzIgUGxheWVyJyksXG5cdGNhdGVnb3J5OiAnY29tbW9uJyxcblx0aWNvbjogJ2VtYmVkLWdlbmVyaWMnLFx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UNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///1\n"); +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder,\n ToggleControl = _wp$components.ToggleControl;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-o2-player', {\n\ttitle: __('AMP O2 Player'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed'), __('AOL O2Player')],\n\n\t// @todo Add other useful macro toggles, e.g. showing relevant content.\n\tattributes: {\n\t\tdataPid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataVid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataBcid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataBid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tautoPlay: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed-height'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number'\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar autoPlay = attributes.autoPlay,\n\t\t dataPid = attributes.dataPid,\n\t\t dataVid = attributes.dataVid,\n\t\t dataBcid = attributes.dataBcid,\n\t\t dataBid = attributes.dataBid,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: 'Responsive' }, { value: 'fixed-height', label: 'Fixed height' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, { value: 'nodisplay', label: 'No Display' }];\n\t\tvar url = false;\n\t\tif (dataPid && (dataBcid || dataVid)) {\n\t\t\turl = 'https://delivery.vidible.tv/htmlembed/pid=' + dataPid + '/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('O2 Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Buyer Company ID (bcid, required)'),\n\t\t\t\t\tvalue: dataBcid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBcid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Playlist ID'),\n\t\t\t\t\tvalue: dataBid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video ID'),\n\t\t\t\t\tvalue: dataVid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataVid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(ToggleControl, {\n\t\t\t\t\tlabel: __('Autoplay'),\n\t\t\t\t\tchecked: autoPlay,\n\t\t\t\t\tonChange: function onChange() {\n\t\t\t\t\t\treturn setAttributes({ autoPlay: !autoPlay });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('O2 Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('O2 Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar o2Props = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\t'data-pid': attributes.dataPid\n\t\t};\n\t\tif ('fixed-height' !== attributes.layout && attributes.width) {\n\t\t\to2Props.width = attributes.width;\n\t\t}\n\t\tif (!attributes.autoPlay) {\n\t\t\to2Props['data-macros'] = 'm.playback=click';\n\t\t}\n\t\tif (attributes.dataVid) {\n\t\t\to2Props['data-vid'] = attributes.dataVid;\n\t\t} else if (attributes.dataBcid) {\n\t\t\to2Props['data-bcid'] = attributes.dataBcid;\n\t\t}\n\t\tif (attributes.dataBid) {\n\t\t\to2Props['data-bid'] = attributes.dataBid;\n\t\t}\n\t\treturn wp.element.createElement('amp-o2-player', o2Props);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtbzItcGxheWVyL2luZGV4LmpzPzIwMGYiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2NrcyxcbiAgICByZWdpc3RlckJsb2NrVHlwZSA9IF93cCRibG9ja3MucmVnaXN0ZXJCbG9ja1R5cGUsXG4gICAgSW5zcGVjdG9yQ29udHJvbHMgPSBfd3AkYmxvY2tzLkluc3BlY3RvckNvbnRyb2xzO1xudmFyIF93cCRjb21wb25lbnRzID0gd3AuY29tcG9uZW50cyxcbiAgICBQYW5lbEJvZHkgPSBfd3AkY29tcG9uZW50cy5QYW5lbEJvZHksXG4gICAgVGV4dENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy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UFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///1\n"); /***/ }), /* 2 */, @@ -84,28 +84,35 @@ eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$bloc /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-ooyala-player', {\n\ttitle: __('AMP Ooyala Player'),\n\tdescription: __('Displays an Ooyala video.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed'), __('Ooyala video')],\n\n\t// @todo Add data-config attribute?\n\tattributes: {\n\t\tdataEmbedCode: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPcode: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerVersion: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'v3'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataEmbedCode = attributes.dataEmbedCode,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataPcode = attributes.dataPcode,\n\t\t dataPlayerVersion = attributes.dataPlayerVersion,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: '', label: __('None') }, { value: 'responsive', label: __('Responsive') }, { value: 'fixed', label: __('Fixed') }, { value: 'fill', label: __('Fill') }, { value: 'flex-item', label: __('Flex-item') }];\n\t\tvar url = false;\n\t\tif (dataEmbedCode && dataPlayerId && dataPcode) {\n\t\t\turl = 'http://cf.c.ooyala.com/' + dataEmbedCode;\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Ooyala settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video embed code (required)'),\n\t\t\t\t\tvalue: dataEmbedCode,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataEmbedCode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPlayerId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Provider code for the account (required)'),\n\t\t\t\t\tvalue: dataPcode,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPcode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Player version'),\n\t\t\t\t\tvalue: dataPlayerVersion,\n\t\t\t\t\toptions: [{ value: 'v3', label: __('V3') }, { value: 'v4', label: __('V4') }],\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerVersion: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Ooyala Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t{ href: url },\n\t\t\t\t\turl\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Ooyala Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\t\tvar dataEmbedCode = attributes.dataEmbedCode,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataPcode = attributes.dataPcode,\n\t\t dataPlayerVersion = attributes.dataPlayerVersion,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\n\t\tvar ooyalaProps = {\n\t\t\tlayout: layout,\n\t\t\theight: height,\n\t\t\t'data-embedcode': dataEmbedCode,\n\t\t\t'data-playerid': dataPlayerId,\n\t\t\t'data-pcode': dataPcode,\n\t\t\t'data-playerversion': dataPlayerVersion\n\t\t};\n\t\tif ('fixed-height' !== layout && width) {\n\t\t\tooyalaProps.width = width;\n\t\t}\n\t\treturn wp.element.createElement('amp-ooyala-player', ooyalaProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtb295YWxhLXBsYXllci9pbmRleC5qcz81NmRlIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW50ZXJuYWwgYmxvY2sgbGlicmFyaWVzLlxuICovXG52YXIgX18gPSB3cC5pMTh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BQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///4\n"); +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-ooyala-player', {\n\ttitle: __('AMP Ooyala Player'),\n\tdescription: __('Displays an Ooyala video.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed'), __('Ooyala video')],\n\n\t// @todo Add data-config attribute?\n\tattributes: {\n\t\tdataEmbedCode: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPcode: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerVersion: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'v3'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataEmbedCode = attributes.dataEmbedCode,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataPcode = attributes.dataPcode,\n\t\t dataPlayerVersion = attributes.dataPlayerVersion,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: '', label: __('None') }, { value: 'responsive', label: __('Responsive') }, { value: 'fixed', label: __('Fixed') }, { value: 'fill', label: __('Fill') }, { value: 'flex-item', label: __('Flex-item') }];\n\t\tvar url = false;\n\t\tif (dataEmbedCode && dataPlayerId && dataPcode) {\n\t\t\turl = 'http://cf.c.ooyala.com/' + dataEmbedCode;\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Ooyala settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video embed code (required)'),\n\t\t\t\t\tvalue: dataEmbedCode,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataEmbedCode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPlayerId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Provider code for the account (required)'),\n\t\t\t\t\tvalue: dataPcode,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPcode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Player version'),\n\t\t\t\t\tvalue: dataPlayerVersion,\n\t\t\t\t\toptions: [{ value: 'v3', label: __('V3') }, { value: 'v4', label: __('V4') }],\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerVersion: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Ooyala Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Ooyala Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\t\tvar dataEmbedCode = attributes.dataEmbedCode,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataPcode = attributes.dataPcode,\n\t\t dataPlayerVersion = attributes.dataPlayerVersion,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\n\t\tvar ooyalaProps = {\n\t\t\tlayout: layout,\n\t\t\theight: height,\n\t\t\t'data-embedcode': dataEmbedCode,\n\t\t\t'data-playerid': dataPlayerId,\n\t\t\t'data-pcode': dataPcode,\n\t\t\t'data-playerversion': dataPlayerVersion\n\t\t};\n\t\tif ('fixed-height' !== layout && width) {\n\t\t\tooyalaProps.width = width;\n\t\t}\n\t\treturn wp.element.createElement('amp-ooyala-player', ooyalaProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtb295YWxhLXBsYXllci9pbmRleC5qcz81NmRlIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW50ZXJuYWwgYmxvY2sgbGlic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O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///4\n"); /***/ }), /* 5 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-reach-player', {\n\ttitle: __('AMP Reach Player'),\n\tdescription: __('Displays the Reach Player configured in the Beachfront Reach platform.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed'), __('Beachfront Reach video')],\n\n\tattributes: {\n\t\tdataEmbedId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed-height'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number'\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataEmbedId = attributes.dataEmbedId,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: '', label: __('None') }, { value: 'responsive', label: __('Responsive') }, { value: 'fixed-height', label: __('Fixed Height') }, { value: 'fixed', label: __('Fixed') }, { value: 'fill', label: __('Fill') }, { value: 'flex-item', label: __('Flex-item') }];\n\t\tvar url = false;\n\t\tif (dataEmbedId) {\n\t\t\turl = 'https://media-cdn.beachfrontreach.com/acct_1/video/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Reach settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('The Reach player embed id (required)'),\n\t\t\t\t\tvalue: dataEmbedId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataEmbedId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Reach Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t{ href: url },\n\t\t\t\t\turl\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Reach Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add Reach player embed ID to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\t\tvar dataEmbedId = attributes.dataEmbedId,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\n\t\tvar reachProps = {\n\t\t\tlayout: layout,\n\t\t\theight: height,\n\t\t\t'data-embed-id': dataEmbedId\n\t\t};\n\t\tif ('fixed-height' !== layout && width) {\n\t\t\treachProps.width = width;\n\t\t}\n\t\treturn wp.element.createElement('amp-reach-player', reachProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNS5qcyIsInNvdXJjZXM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QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///5\n"); +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-reach-player', {\n\ttitle: __('AMP Reach Player'),\n\tdescription: __('Displays the Reach Player configured in the Beachfront Reach platform.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed'), __('Beachfront Reach video')],\n\n\tattributes: {\n\t\tdataEmbedId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed-height'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number'\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataEmbedId = attributes.dataEmbedId,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: '', label: __('None') }, { value: 'responsive', label: __('Responsive') }, { value: 'fixed-height', label: __('Fixed Height') }, { value: 'fixed', label: __('Fixed') }, { value: 'fill', label: __('Fill') }, { value: 'flex-item', label: __('Flex-item') }];\n\t\tvar url = false;\n\t\tif (dataEmbedId) {\n\t\t\turl = 'https://media-cdn.beachfrontreach.com/acct_1/video/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Reach settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('The Reach player embed id (required)'),\n\t\t\t\t\tvalue: dataEmbedId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataEmbedId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Reach Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Reach Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add Reach player embed ID to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\t\tvar dataEmbedId = attributes.dataEmbedId,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\n\t\tvar reachProps = {\n\t\t\tlayout: layout,\n\t\t\theight: height,\n\t\t\t'data-embed-id': dataEmbedId\n\t\t};\n\t\tif ('fixed-height' !== layout && width) {\n\t\t\treachProps.width = width;\n\t\t}\n\t\treturn wp.element.createElement('amp-reach-player', reachProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base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tBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///5\n"); /***/ }), /* 6 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-springboard-player', {\n\ttitle: __('AMP Springboard Player'),\n\tdescription: __('Displays the Springboard Player used in the Springboard Video Platform'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed')],\n\n\tattributes: {\n\t\tdataSiteId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataContentId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataDomain: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataMode: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'video'\n\t\t},\n\t\tdataItems: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 1\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'responsive'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataSiteId = attributes.dataSiteId,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataContentId = attributes.dataContentId,\n\t\t dataDomain = attributes.dataDomain,\n\t\t dataMode = attributes.dataMode,\n\t\t dataItems = attributes.dataItems,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: 'Responsive' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }];\n\t\tvar url = false;\n\t\tif (dataSiteId && dataContentId && dataDomain && dataMode && dataItems) {\n\t\t\turl = 'https://cms.springboardplatform.com/embed_iframe/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Springboard Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('SprintBoard site ID (required)'),\n\t\t\t\t\tvalue: dataSiteId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataSiteId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player content ID (required)'),\n\t\t\t\t\tvalue: dataContentId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataContentId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID'),\n\t\t\t\t\tvalue: dataPlayerId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Springboard partner domain'),\n\t\t\t\t\tvalue: dataDomain,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataDomain: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Mode (required)'),\n\t\t\t\t\tvalue: dataMode,\n\t\t\t\t\toptions: [{ value: 'video', label: __('Video') }, { value: 'playlist', label: __('Playlist') }],\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataMode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Number of video is playlist (required)'),\n\t\t\t\t\tvalue: dataItems,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataItems: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Springboard Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t{ href: url },\n\t\t\t\t\turl\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Springboard Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\t\tvar dataSiteId = attributes.dataSiteId,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataContentId = attributes.dataContentId,\n\t\t dataDomain = attributes.dataDomain,\n\t\t dataMode = attributes.dataMode,\n\t\t dataItems = attributes.dataItems,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar springboardProps = {\n\t\t\tlayout: layout,\n\t\t\theight: height,\n\t\t\t'data-site-id': dataSiteId,\n\t\t\t'data-mode': dataMode,\n\t\t\t'data-content-id': dataContentId,\n\t\t\t'data-player-id': dataPlayerId,\n\t\t\t'data-domain': dataDomain,\n\t\t\t'data-items': dataItems\n\t\t};\n\t\tif ('fixed-height' !== layout && width) {\n\t\t\tspringboardProps.width = attributes.width;\n\t\t}\n\t\treturn wp.element.createElement('amp-springboard-player', springboardProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtc3ByaW5nYm9hcmQtcGxheWVyL2luZGV4LmpzPzcyYjgiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2NrcyxcbiAgICByZWdpc3RlckJsb2NrVHlwZSA9IF93cCRibG9ja3MucmVnaXN0ZXJCbG9ja1R5cGUsXG4gICAgSW5zcGVjdG9yQ29udHJvbHMgPSBfd3AkYmxvY2tzLkluc3BlY3RvckNvbnRyb2xzO1xudmFyIF93cCRjb21wb25lbnRzID0gd3AuY29tcG9uZW50cyxcbiAgICBQYW5lbEJvZHkgPSBfd3AkY29tcG9uZW50cy5QYW5lbEJvZHksXG4gICAgVGV4dENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5UZXh0Q29udHJvbCxcbiAgICBTZWxlY3RDb250cm9sID0gX3dwJGNvbXBvbmVudHMuU2VsZWN0Q29udHJvbCxcbiAgICBQbGFjZWhvbGRlciA9IF93cCRjb21wb25lbnRzLlBsYWNlaG9sZGVyO1xuXG4vKipcbiA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DQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///6\n"); +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-springboard-player', {\n\ttitle: __('AMP Springboard Player'),\n\tdescription: __('Displays the Springboard Player used in the Springboard Video Platform'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed')],\n\n\tattributes: {\n\t\tdataSiteId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataContentId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataDomain: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataMode: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'video'\n\t\t},\n\t\tdataItems: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 1\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'responsive'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataSiteId = attributes.dataSiteId,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataContentId = attributes.dataContentId,\n\t\t dataDomain = attributes.dataDomain,\n\t\t dataMode = attributes.dataMode,\n\t\t dataItems = attributes.dataItems,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: 'Responsive' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }];\n\t\tvar url = false;\n\t\tif (dataSiteId && dataContentId && dataDomain && dataMode && dataItems) {\n\t\t\turl = 'https://cms.springboardplatform.com/embed_iframe/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Springboard Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('SprintBoard site ID (required)'),\n\t\t\t\t\tvalue: dataSiteId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataSiteId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player content ID (required)'),\n\t\t\t\t\tvalue: dataContentId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataContentId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID'),\n\t\t\t\t\tvalue: dataPlayerId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Springboard partner domain'),\n\t\t\t\t\tvalue: dataDomain,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataDomain: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Mode (required)'),\n\t\t\t\t\tvalue: dataMode,\n\t\t\t\t\toptions: [{ value: 'video', label: __('Video') }, { value: 'playlist', label: __('Playlist') }],\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataMode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Number of video is playlist (required)'),\n\t\t\t\t\tvalue: dataItems,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataItems: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Springboard Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Springboard Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\t\tvar dataSiteId = attributes.dataSiteId,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataContentId = attributes.dataContentId,\n\t\t dataDomain = attributes.dataDomain,\n\t\t dataMode = attributes.dataMode,\n\t\t dataItems = attributes.dataItems,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar springboardProps = {\n\t\t\tlayout: layout,\n\t\t\theight: height,\n\t\t\t'data-site-id': dataSiteId,\n\t\t\t'data-mode': dataMode,\n\t\t\t'data-content-id': dataContentId,\n\t\t\t'data-player-id': dataPlayerId,\n\t\t\t'data-domain': dataDomain,\n\t\t\t'data-items': dataItems\n\t\t};\n\t\tif ('fixed-height' !== layout && width) {\n\t\t\tspringboardProps.width = attributes.width;\n\t\t}\n\t\treturn wp.element.createElement('amp-springboard-player', springboardProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtc3ByaW5nYm9hcmQtcGxheWVyL2luZGV4LmpzPzcyYjgiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2NrcyxcbiAgICByZWdpc3RlckJsb2NrVHlwZSA9IF93cCRibG9ja3MucmVnaXN0ZXJCbG9ja1R5cGUsXG4gICAgSW5zcGVjdG9yQ29udHJvbHMgPSBfd3AkYmxvY2tzLkluc3BlY3RvckNvbnRyb2xzO1xudmFyIF93cCRjb21wb25lbnRzID0gd3AuY29tcG9uZW50cyxcbiAgICBQYW5lbEJvZHkgPSBfd3AkY29tcG9uZW50cy5QYW5lbEJvZHksXG4gICAgVGV4dENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5UZXh0Q29udHJvbCxcbiAgICBTZWxlY3RDb250cm9sID0gX3dwJGNvbXBvbmVudHMuU2VsZWN0Q29udHJvbCxcbiAgICBQbGFjZWhvbGRlciA9IF93cCRjb21wb25lbnRzLlBsYWNlaG9sZGVyO1xuXG4vKipcbiAqIFJlZ2lzdGVyIGJsb2NrLlxuICovXG5cbmV4cG9ydCBkZWZhdWx0IHJlZ2lzdGVyQmxvY2tUeXBlKCdhbXAvYW1wLXNwcmluZ2JvYXJkLXBsYXllcicsIHtcblx0dGl0bGU6IF9fKCdBTVAgU3ByaW5nYm9hcmQgUGxheWVyJyksXG5cdGRlc2NyaXB0aW9uOiBfXygnRGlzcGxheXMgdG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FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///6\n"); /***/ }), /* 7 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-jwplayer', {\n\ttitle: __('AMP JW Player'),\n\tdescription: __('Displays a cloud-hosted JW Player.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed')],\n\n\tattributes: {\n\t\tdataPlayerId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataMediaId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlaylistId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'responsive'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataPlayerId = attributes.dataPlayerId,\n\t\t dataMediaId = attributes.dataMediaId,\n\t\t dataPlaylistId = attributes.dataPlaylistId,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'fixed-height', label: 'Fixed height' }, { value: 'responsive', label: 'Responsive' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, { value: 'nodisplay', label: 'No Display' }];\n\t\tvar url = false;\n\t\tif (dataPlayerId && (dataMediaId || dataPlaylistId)) {\n\t\t\tif (dataPlaylistId) {\n\t\t\t\turl = 'https://content.jwplatform.com/players/' + dataPlaylistId + '-' + dataPlayerId;\n\t\t\t} else {\n\t\t\t\turl = 'https://content.jwplatform.com/players/' + dataMediaId + '-' + dataPlayerId;\n\t\t\t}\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('JW Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('JW Platform player ID (required)'),\n\t\t\t\t\tvalue: dataPlayerId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('JW Platform media ID (required if playlist ID not set)'),\n\t\t\t\t\tvalue: dataMediaId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataMediaId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('JW Platform playlist ID (required if media ID not set)'),\n\t\t\t\t\tvalue: dataPlaylistId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlaylistId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('JW Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t{ href: url },\n\t\t\t\t\turl\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('JW Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar jwProps = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\t'data-player-id': attributes.dataPlayerId\n\t\t};\n\t\tif ('fixed-height' !== attributes.layout && attributes.width) {\n\t\t\tjwProps.width = attributes.width;\n\t\t}\n\t\tif (attributes.dataPlaylistId) {\n\t\t\tjwProps['data-playlist-id'] = attributes.dataPlaylistId;\n\t\t} else if (attributes.dataMediaId) {\n\t\t\tjwProps['data-media-id'] = attributes.dataMediaId;\n\t\t}\n\t\treturn wp.element.createElement('amp-jwplayer', jwProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtandwbGF5ZXIvaW5kZXguanM/YTVkMCJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEludGVybmFsIGJsb2NrIGxpYnJhcmllcy5cbiAqL1xudmFyIF9fID0gd3AuaTE4bi5fXztcbnZhciBfd3AkYmxvY2tzID0gd3AuYmxvY2tzLFxuICAgIHJlZ2lzdGVyQmxvY2tUeXBlID0gX3dwJGJsb2Nrcy5yZWdpc3RlckJsb2NrVHlwZSxcbiAgICBJbnNwZWN0b3JDb250cm9scyA9IF93cCRibG9ja3MuSW5zcGVjdG9yQ29udHJvbHM7XG52YXIgX3dwJGNvbXBvbmVudHMgPSB3cC5jb21wb25lbnRzLFxuICAgIFBhbmVsQm9keSA9IF93cCRjb21wb25lbnRzLlBhbmVsQm9keSxcbiAgICBUZXh0Q29udHJvbCA9IF93cCRjb21wb25lbnRzLlRleHRDb250cm9sLFxuICAgIFNlbGVjdENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5TZWxlY3RDb250cm9sLFxuICAgIFBsYWNlaG9sZGVyID0gX3dwJGNvbXBvbmVudHMuUGxhY2Vob2xkZXI7XG5cbi8qKlxuICogUmVnaXN0ZXIgYmxvY2suXG4gKi9cblxuZXhwb3J0IGRlZmF1bHQgcmVnaXN0ZXJCbG9ja1R5cGUoJ2FtcC9hbXAtandwbGF5ZXInLCB7XG5cdHRpdGxlOiBfXygnQU1QIEpXIFBsYXllcic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NBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///7\n"); +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-jwplayer', {\n\ttitle: __('AMP JW Player'),\n\tdescription: __('Displays a cloud-hosted JW Player.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed')],\n\n\tattributes: {\n\t\tdataPlayerId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataMediaId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlaylistId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'responsive'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataPlayerId = attributes.dataPlayerId,\n\t\t dataMediaId = attributes.dataMediaId,\n\t\t dataPlaylistId = attributes.dataPlaylistId,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: 'Responsive' }, { value: 'fixed-height', label: 'Fixed height' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, { value: 'nodisplay', label: 'No Display' }];\n\t\tvar url = false;\n\t\tif (dataPlayerId && (dataMediaId || dataPlaylistId)) {\n\t\t\tif (dataPlaylistId) {\n\t\t\t\turl = 'https://content.jwplatform.com/players/' + dataPlaylistId + '-' + dataPlayerId;\n\t\t\t} else {\n\t\t\t\turl = 'https://content.jwplatform.com/players/' + dataMediaId + '-' + dataPlayerId;\n\t\t\t}\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('JW Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('JW Platform player ID (required)'),\n\t\t\t\t\tvalue: dataPlayerId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('JW Platform media ID (required if playlist ID not set)'),\n\t\t\t\t\tvalue: dataMediaId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataMediaId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('JW Platform playlist ID (required if media ID not set)'),\n\t\t\t\t\tvalue: dataPlaylistId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlaylistId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('JW Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('JW Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar jwProps = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\t'data-player-id': attributes.dataPlayerId\n\t\t};\n\t\tif ('fixed-height' !== attributes.layout && attributes.width) {\n\t\t\tjwProps.width = attributes.width;\n\t\t}\n\t\tif (attributes.dataPlaylistId) {\n\t\t\tjwProps['data-playlist-id'] = attributes.dataPlaylistId;\n\t\t} else if (attributes.dataMediaId) {\n\t\t\tjwProps['data-media-id'] = attributes.dataMediaId;\n\t\t}\n\t\treturn wp.element.createElement('amp-jwplayer', jwProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtandwbGF5ZXIvaW5kZXguanM/YTVkMCJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEludGVybmFsIGJsb2NrIGxpYnJhcmllcy5cbiAqL1xudmFyIF9fID0gd3AuaTE4bi5fXztcbnZhciBfd3AkYmxvY2tzID0gd3AuYmxvY2tzLFxuICAgIHJlZ2lzdGVyQmxvY2tUeXBlID0gX3dwJGJsb2Nrcy5yZWdpc3RlckJsb2NrVHlwZSxcbiAgICBJbnNwZWN0b3JDb250cm9scyA9IF93cCRibG9ja3MuSW5zcGVjdG9yQ29udHJvbHM7XG52YXIgX3dwJGNvbXBvbmVudHMgPSB3cC5jb21wb25lbnRzLFxuICAgIFBhbmVsQm9keSA9IF93cCRjb21wb25lbnRzLlBhbmVsQm9keSxcbiAgICBUZXh0Q29udHJvbCA9IF93cCRjb21wb25lbnRzLlRleHRDb250cm9sLFxuICAgIFNlbGVjdENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5TZWxlY3RDb250cm9sLFxuICAgIFBsYWNlaG9sZGVyID0gX3dwJGNvbXBvbmVudH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FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///7\n"); + +/***/ }), +/* 8 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder,\n ToggleControl = _wp$components.ToggleControl;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-brid-player', {\n\ttitle: __('AMP Brid Player'),\n\tdescription: __('Displays the Brid Player used in Brid.tv Video Platform.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed')],\n\n\tattributes: {\n\t\tautoPlay: {\n\t\t\tdefault: false\n\t\t},\n\t\tdataPartner: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataPlayer: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataVideo: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataPlaylist: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataOutstream: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'responsive'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar autoPlay = attributes.autoPlay,\n\t\t dataPartner = attributes.dataPartner,\n\t\t dataPlayer = attributes.dataPlayer,\n\t\t dataVideo = attributes.dataVideo,\n\t\t dataPlaylist = attributes.dataPlaylist,\n\t\t dataOutstream = attributes.dataOutstream,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: 'Responsive' }, { value: 'fixed-height', label: 'Fixed height' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, { value: 'nodisplay', label: 'No Display' }];\n\t\tvar url = false;\n\t\tif (dataPartner && dataPlayer && (dataVideo || dataPlaylist || dataOutstream)) {\n\t\t\turl = 'http://cdn.brid.tv/live/partners/' + dataPartner;\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Brid Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Brid.tv partner ID (required)'),\n\t\t\t\t\tvalue: dataPartner,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPartner: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Brid.tv player ID (required)'),\n\t\t\t\t\tvalue: dataPlayer,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayer: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video ID (one of video / playlist / outstream ID is required)'),\n\t\t\t\t\tvalue: dataVideo,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataVideo: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Outstream unit ID (one of video / playlist / outstream ID is required)'),\n\t\t\t\t\tvalue: dataOutstream,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataOutstream: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Playlist ID (one of video / playlist / outstream ID is required)'),\n\t\t\t\t\tvalue: dataPlaylist,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlaylist: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(ToggleControl, {\n\t\t\t\t\tlabel: __('Autoplay'),\n\t\t\t\t\tchecked: autoPlay,\n\t\t\t\t\tonChange: function onChange() {\n\t\t\t\t\t\treturn setAttributes({ autoPlay: !autoPlay });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Brid Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Brid Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar bridProps = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\t'data-player': attributes.dataPlayer,\n\t\t\t'data-partner': attributes.dataPartner\n\t\t};\n\t\tif ('fixed-height' !== attributes.layout && attributes.width) {\n\t\t\tbridProps.width = attributes.width;\n\t\t}\n\t\tif (attributes.dataPlaylist) {\n\t\t\tbridProps['data-playlist'] = attributes.dataPlaylist;\n\t\t}\n\t\tif (attributes.dataVideo) {\n\t\t\tbridProps['data-video'] = attributes.dataVideo;\n\t\t}\n\t\tif (attributes.dataOutstream) {\n\t\t\tbridProps['data-outstream'] = attributes.dataOutstream;\n\t\t}\n\t\tif (attributes.autoPlay) {\n\t\t\tbridProps.autoplay = attributes.autoPlay;\n\t\t}\n\t\treturn wp.element.createElement('amp-brid-player', bridProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtYnJpZC1wbGF5ZXIvaW5kZXguanM/MTJiOSJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEludGVybmFsIGJsb2NrIGxpYnJhcmllcy5cbiAqL1xudmFyIF9fID0gd3AuaTE4bi5fXztcbnZhciBfd3AkYmxvY2tzID0gd3AuYmxvY2tzLFxuICAgIHJlZ2lzdGVyQmxvY2tUeXBlID0gX3dwJGJsb2Nrcy5yZWdpc3RlckJsb2NrVHlwZSxcbiAgICBJbnNwZWN0b3JDb250cm9scyA9IF93cCRibG9ja3MuSW5zcGVjdG9yQ29udHJvbHM7XG52YXIgX3dwJGNvbXBvbmVudHMgPSB3cC5jb21wb25lbnRzLFxuICAgIFBhbmVsQm9keSA9IF93cCRjb21wb25lbnRzLlBhbmVsQm9keSxcbiAgICBUZXh0Q29udHJvbCA9IF93cCRjb21wb25lbnRzLlRleHRDb250cm9sLFxuICAgIFNlbGVjdENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5TZWxlY3RDb250cm9sLFxuICAgIFBsYWNlaG9sZGVyID0gX3dwJGNvbXBvbmVudHMuUGxhY2Vob2xkZXIsXG4gICAgVG9nZ2xlQ29udHJvbCA9IF93cCRjb21wb25lbnRzLlRvZ2dsZUNvbnRyb2w7XG5cbi8qKlxuICogUmVnaXN0ZXIgYmxvY2suXG4gKi9cblxuZXhwb3J0IGRlZmF1bHQgcmVnaXN0ZXJCbG9ja1R5cGUoJ2FtcC9hbXAtYnJpZC1wbGF5ZXInLCB7XG5cd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BQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///8\n"); /***/ }) /******/ ]); \ No newline at end of file diff --git a/blocks/amp-brid-player/index.js b/blocks/amp-brid-player/index.js new file mode 100644 index 00000000000..6ed42971b66 --- /dev/null +++ b/blocks/amp-brid-player/index.js @@ -0,0 +1,175 @@ +/** + * Internal block libraries. + */ +const { __ } = wp.i18n; +const { + registerBlockType, + InspectorControls +} = wp.blocks; +const { + PanelBody, + TextControl, + SelectControl, + Placeholder, + ToggleControl +} = wp.components; + +/** + * Register block. + */ +export default registerBlockType( + 'amp/amp-brid-player', + { + title: __( 'AMP Brid Player' ), + description: __( 'Displays the Brid Player used in Brid.tv Video Platform.' ), + category: 'common', + icon: 'embed-generic', + keywords: [ + __( 'Embed' ) + ], + + attributes: { + autoPlay: { + default: false + }, + dataPartner: { + type: 'number' + }, + dataPlayer: { + type: 'number' + }, + dataVideo: { + type: 'number' + }, + dataPlaylist: { + type: 'number' + }, + dataOutstream: { + type: 'number' + }, + layout: { + type: 'string', + default: 'responsive' + }, + width: { + type: 'number', + default: 600 + }, + height: { + type: 'number', + default: 400 + } + }, + + edit( { attributes, isSelected, setAttributes } ) { + const { autoPlay, dataPartner, dataPlayer, dataVideo, dataPlaylist, dataOutstream, layout, height, width } = attributes; + const ampLayoutOptions = [ + { value: 'responsive', label: 'Responsive' }, + { value: 'fixed-height', label: 'Fixed height' }, + { value: 'fixed', label: 'Fixed' }, + { value: 'fill', label: 'Fill' }, + { value: 'flex-item', label: 'Flex-item' }, + { value: 'nodisplay', label: 'No Display' } + + ]; + let url = false; + if ( dataPartner && dataPlayer && ( dataVideo || dataPlaylist || dataOutstream ) ) { + url = 'http://cdn.brid.tv/live/partners/' + dataPartner; + } + return [ + isSelected && ( + + + ( setAttributes( { dataPartner: value } ) ) } + /> + ( setAttributes( { dataPlayer: value } ) ) } + /> + ( setAttributes( { dataVideo: value } ) ) } + /> + ( setAttributes( { dataOutstream: value } ) ) } + /> + ( setAttributes( { dataPlaylist: value } ) ) } + /> + ( setAttributes( { autoPlay: ! autoPlay } ) ) } + /> + ( setAttributes( { layout: value } ) ) } + /> + ( setAttributes( { width: value } ) ) } + /> + ( setAttributes( { height: value } ) ) } + /> + + + ), + url && ( + +

{ url }

+

{ __( 'Previews for this are unavailable in the editor, sorry!' ) }

+
+ ), + ! url && ( + +

{ __( 'Add required data to use the block.' ) }

+
+ ) + ]; + }, + + save( { attributes } ) { + let bridProps = { + layout: attributes.layout, + height: attributes.height, + 'data-player': attributes.dataPlayer, + 'data-partner': attributes.dataPartner + }; + if ( 'fixed-height' !== attributes.layout && attributes.width ) { + bridProps.width = attributes.width; + } + if ( attributes.dataPlaylist ) { + bridProps[ 'data-playlist' ] = attributes.dataPlaylist; + } + if ( attributes.dataVideo ) { + bridProps[ 'data-video' ] = attributes.dataVideo; + } + if ( attributes.dataOutstream ) { + bridProps[ 'data-outstream' ] = attributes.dataOutstream; + } + if ( attributes.autoPlay ) { + bridProps.autoplay = attributes.autoPlay; + } + return ( + + ); + } + } +); diff --git a/blocks/amp-jwplayer/index.js b/blocks/amp-jwplayer/index.js index 984a226de17..c8fb33da045 100644 --- a/blocks/amp-jwplayer/index.js +++ b/blocks/amp-jwplayer/index.js @@ -54,8 +54,8 @@ export default registerBlockType( edit( { attributes, isSelected, setAttributes } ) { const { dataPlayerId, dataMediaId, dataPlaylistId, layout, height, width } = attributes; const ampLayoutOptions = [ - { value: 'fixed-height', label: 'Fixed height' }, { value: 'responsive', label: 'Responsive' }, + { value: 'fixed-height', label: 'Fixed height' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, @@ -112,7 +112,7 @@ export default registerBlockType( ), url && ( -

{ url }

+

{ url }

{ __( 'Previews for this are unavailable in the editor, sorry!' ) }

), diff --git a/blocks/amp-o2-player/index.js b/blocks/amp-o2-player/index.js index e32de926743..1912b728725 100644 --- a/blocks/amp-o2-player/index.js +++ b/blocks/amp-o2-player/index.js @@ -62,8 +62,8 @@ export default registerBlockType( edit( { attributes, isSelected, setAttributes } ) { const { autoPlay, dataPid, dataVid, dataBcid, dataBid, layout, height, width } = attributes; const ampLayoutOptions = [ - { value: 'fixed-height', label: 'Fixed height' }, { value: 'responsive', label: 'Responsive' }, + { value: 'fixed-height', label: 'Fixed height' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, @@ -126,7 +126,7 @@ export default registerBlockType( ), url && ( -

{ url }

+

{ url }

{ __( 'Previews for this are unavailable in the editor, sorry!' ) }

), diff --git a/blocks/amp-ooyala-player/index.js b/blocks/amp-ooyala-player/index.js index 59fd95d2b15..6faf283785b 100644 --- a/blocks/amp-ooyala-player/index.js +++ b/blocks/amp-ooyala-player/index.js @@ -122,7 +122,7 @@ export default registerBlockType( ), url && ( -

{ url }

+

{ url }

{ __( 'Previews for this are unavailable in the editor, sorry!' ) }

), diff --git a/blocks/amp-reach-player/index.js b/blocks/amp-reach-player/index.js index 72d593d33b4..ad9de65125b 100644 --- a/blocks/amp-reach-player/index.js +++ b/blocks/amp-reach-player/index.js @@ -92,7 +92,7 @@ export default registerBlockType( ), url && ( -

{ url }

+

{ url }

{ __( 'Previews for this are unavailable in the editor, sorry!' ) }

), diff --git a/blocks/amp-springboard-player/index.js b/blocks/amp-springboard-player/index.js index 230a345e42a..3841a67e1d8 100644 --- a/blocks/amp-springboard-player/index.js +++ b/blocks/amp-springboard-player/index.js @@ -137,7 +137,7 @@ export default registerBlockType( ), url && ( -

{ url }

+

{ url }

{ __( 'Previews for this are unavailable in the editor, sorry!' ) }

), diff --git a/blocks/index.js b/blocks/index.js index 3b318dae76f..6289b9c3680 100644 --- a/blocks/index.js +++ b/blocks/index.js @@ -6,3 +6,4 @@ import './amp-ooyala-player'; import './amp-reach-player'; import './amp-springboard-player'; import './amp-jwplayer'; +import './amp-brid-player'; From 5f253954e8ccd6ce365336ee2d44a809538b95fe Mon Sep 17 00:00:00 2001 From: Miina Sikk Date: Fri, 18 May 2018 11:22:27 +0300 Subject: [PATCH 11/18] Add IMA Player block. --- assets/js/amp-blocks-compiled.js | 9 +- blocks/amp-ima-video/index.js | 148 +++++++++++++++++++++++++++++++ blocks/index.js | 1 + 3 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 blocks/amp-ima-video/index.js diff --git a/assets/js/amp-blocks-compiled.js b/assets/js/amp-blocks-compiled.js index 1ff56d4a281..e5b5c2625da 100644 --- a/assets/js/amp-blocks-compiled.js +++ b/assets/js/amp-blocks-compiled.js @@ -68,7 +68,7 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__amp_o2_player__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__amp_ooyala_player__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__amp_reach_player__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__amp_springboard_player__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__amp_jwplayer__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__amp_brid_player__ = __webpack_require__(8);\n/**\n * Import blocks.\n */\n\n\n\n\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9pbmRleC5qcz84MTkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW1wb3J0IGJsb2Nrcy5cbiAqL1xuaW1wb3J0ICcuL2FtcC1vMi1wbGF5ZXInO1xuaW1wb3J0ICcuL2FtcC1vb3lhbGEtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtcmVhY2gtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtc3ByaW5nYm9hcmQtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtandwbGF5ZXInO1xuaW1wb3J0ICcuL2FtcC1icmlkLXBsYXllcic7XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ibG9ja3MvaW5kZXguanNcbi8vIG1vZHVsZSBpZCA9IDBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///0\n"); +eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__amp_o2_player__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__amp_ooyala_player__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__amp_reach_player__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__amp_springboard_player__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__amp_jwplayer__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__amp_brid_player__ = __webpack_require__(8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__amp_ima_video__ = __webpack_require__(9);\n/**\n * Import blocks.\n */\n\n\n\n\n\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9pbmRleC5qcz84MTkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW1wb3J0IGJsb2Nrcy5cbiAqL1xuaW1wb3J0ICcuL2FtcC1vMi1wbGF5ZXInO1xuaW1wb3J0ICcuL2FtcC1vb3lhbGEtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtcmVhY2gtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtc3ByaW5nYm9hcmQtcGxheWVyJztcbmltcG9ydCAnLi9hbXAtandwbGF5ZXInO1xuaW1wb3J0ICcuL2FtcC1icmlkLXBsYXllcic7XG5pbXBvcnQgJy4vYW1wLWltYS12aWRlbyc7XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ibG9ja3MvaW5kZXguanNcbi8vIG1vZHVsZSBpZCA9IDBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///0\n"); /***/ }), /* 1 */ @@ -114,5 +114,12 @@ eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$bloc "use strict"; eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder,\n ToggleControl = _wp$components.ToggleControl;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-brid-player', {\n\ttitle: __('AMP Brid Player'),\n\tdescription: __('Displays the Brid Player used in Brid.tv Video Platform.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed')],\n\n\tattributes: {\n\t\tautoPlay: {\n\t\t\tdefault: false\n\t\t},\n\t\tdataPartner: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataPlayer: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataVideo: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataPlaylist: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataOutstream: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'responsive'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar autoPlay = attributes.autoPlay,\n\t\t dataPartner = attributes.dataPartner,\n\t\t dataPlayer = attributes.dataPlayer,\n\t\t dataVideo = attributes.dataVideo,\n\t\t dataPlaylist = attributes.dataPlaylist,\n\t\t dataOutstream = attributes.dataOutstream,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: 'Responsive' }, { value: 'fixed-height', label: 'Fixed height' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, { value: 'nodisplay', label: 'No Display' }];\n\t\tvar url = false;\n\t\tif (dataPartner && dataPlayer && (dataVideo || dataPlaylist || dataOutstream)) {\n\t\t\turl = 'http://cdn.brid.tv/live/partners/' + dataPartner;\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Brid Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Brid.tv partner ID (required)'),\n\t\t\t\t\tvalue: dataPartner,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPartner: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Brid.tv player ID (required)'),\n\t\t\t\t\tvalue: dataPlayer,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayer: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video ID (one of video / playlist / outstream ID is required)'),\n\t\t\t\t\tvalue: dataVideo,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataVideo: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Outstream unit ID (one of video / playlist / outstream ID is required)'),\n\t\t\t\t\tvalue: dataOutstream,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataOutstream: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Playlist ID (one of video / playlist / outstream ID is required)'),\n\t\t\t\t\tvalue: dataPlaylist,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlaylist: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(ToggleControl, {\n\t\t\t\t\tlabel: __('Autoplay'),\n\t\t\t\t\tchecked: autoPlay,\n\t\t\t\t\tonChange: function onChange() {\n\t\t\t\t\t\treturn setAttributes({ autoPlay: !autoPlay });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Brid Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Brid Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar bridProps = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\t'data-player': attributes.dataPlayer,\n\t\t\t'data-partner': attributes.dataPartner\n\t\t};\n\t\tif ('fixed-height' !== attributes.layout && attributes.width) {\n\t\t\tbridProps.width = attributes.width;\n\t\t}\n\t\tif (attributes.dataPlaylist) {\n\t\t\tbridProps['data-playlist'] = attributes.dataPlaylist;\n\t\t}\n\t\tif (attributes.dataVideo) {\n\t\t\tbridProps['data-video'] = attributes.dataVideo;\n\t\t}\n\t\tif (attributes.dataOutstream) {\n\t\t\tbridProps['data-outstream'] = attributes.dataOutstream;\n\t\t}\n\t\tif (attributes.autoPlay) {\n\t\t\tbridProps.autoplay = attributes.autoPlay;\n\t\t}\n\t\treturn wp.element.createElement('amp-brid-player', bridProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtYnJpZC1wbGF5ZXIvaW5kZXguanM/MTJiOSJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEludGVybmFsIGJsb2NrIGxpYnJhcmllcy5cbiAqL1xudmFyIF9fID0gd3AuaTE4bi5fXztcbnZhciBfd3AkYmxvY2tzID0gd3AuYmxvY2tzLFxuICAgIHJlZ2lzdGVyQmxvY2tUeXBlID0gX3dwJGJsb2Nrcy5yZWdpc3RlckJsb2NrVHlwZSxcbiAgICBJbnNwZWN0b3JDb250cm9scyA9IF93cCRibG9ja3MuSW5zcGVjdG9yQ29udHJvbHM7XG52YXIgX3dwJGNvbXBvbmVudHMgPSB3cC5jb21wb25lbnRzLFxuICAgIFBhbmVsQm9keSA9IF93cCRjb21wb25lbnRzLlBhbmVsQm9keSxcbiAgICBUZXh0Q29udHJvbCA9IF93cCRjb21wb25lbnRzLlRleHRDb250cm9sLFxuICAgIFNlbGVjdENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5TZWxlY3RDb250cm9s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0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///8\n"); +/***/ }), +/* 9 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder,\n ToggleControl = _wp$components.ToggleControl;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-ima-video', {\n\ttitle: __('AMP IMA Video'),\n\tdescription: __('Embeds a video player for instream video ads that are integrated with the IMA SDK'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed')],\n\n\t// @todo Perhaps later add subtitles option and additional source options?\n\tattributes: {\n\t\tdataDelayAdRequest: {\n\t\t\tdefault: false\n\t\t},\n\t\tdataTag: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataSrc: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPoster: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'responsive'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataDelayAdRequest = attributes.dataDelayAdRequest,\n\t\t dataTag = attributes.dataTag,\n\t\t dataSrc = attributes.dataSrc,\n\t\t dataPoster = attributes.dataPoster,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: 'Responsive' }, { value: 'fixed', label: 'Fixed' }];\n\t\tvar dataSet = false;\n\t\tif (dataTag && dataSrc) {\n\t\t\tdataSet = true;\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('IMA Video Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Https URL for your VAST ad document (required)'),\n\t\t\t\t\tvalue: dataTag,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataTag: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Https URL of your video content (required)'),\n\t\t\t\t\tvalue: dataSrc,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataSrc: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Https URL to preview image'),\n\t\t\t\t\tvalue: dataPoster,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPoster: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(ToggleControl, {\n\t\t\t\t\tlabel: __('Delay Ad Request'),\n\t\t\t\t\tchecked: dataDelayAdRequest,\n\t\t\t\t\tonChange: function onChange() {\n\t\t\t\t\t\treturn setAttributes({ dataDelayAdRequest: !dataDelayAdRequest });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), dataSet && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('IMA Video') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\tdataSrc\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !dataSet && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('IMA Video') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar imaProps = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\twidth: attributes.width,\n\t\t\t'data-tag': attributes.dataTag,\n\t\t\t'data-src': attributes.dataSrc\n\t\t};\n\t\tif (attributes.dataPoster) {\n\t\t\timaProps['data-poster'] = attributes.dataPoster;\n\t\t}\n\t\tif (attributes.dataDelayAdRequest) {\n\t\t\timaProps['data-delay-ad-request'] = attributes.dataDelayAdRequest;\n\t\t}\n\t\treturn wp.element.createElement('amp-ima-video', imaProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtaW1hLXZpZGVvL2luZGV4LmpzP2RjNTUiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2NrcyxcbiAgICByZWdpc3RlckJsb2NrVHlwZSA9IF93cCRibG9ja3MucmVnaXN0ZXJCbG9ja1R5cGUsXG4gICAgSW5zcGVjdG9yQ29udHJvbHMgPSBfd3AkYmxvY2tzLkluc3BlY3RvckNvbnRyb2xzO1xudmFyIF93cCRjb21wb25lbnRzID0gd3AuY29tcG9uZW50cyxcbiAgICBQYW5lbEJvZHkgPSBfd3AkY29tcG9uZW50cy5QYW5lbEJvZHksXG4gICAgVGV4dENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5UZXh0Q29udHJvbCxcbiAgICBTZWxlY3RDb250cm9sID0gX3dwJGNvbXBvbmVudHMuU2VsZWN0Q29udHJvbCxcbiAgICBQbGFjZW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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///9\n"); + /***/ }) /******/ ]); \ No newline at end of file diff --git a/blocks/amp-ima-video/index.js b/blocks/amp-ima-video/index.js new file mode 100644 index 00000000000..72440f6659f --- /dev/null +++ b/blocks/amp-ima-video/index.js @@ -0,0 +1,148 @@ +/** + * Internal block libraries. + */ +const { __ } = wp.i18n; +const { + registerBlockType, + InspectorControls +} = wp.blocks; +const { + PanelBody, + TextControl, + SelectControl, + Placeholder, + ToggleControl +} = wp.components; + +/** + * Register block. + */ +export default registerBlockType( + 'amp/amp-ima-video', + { + title: __( 'AMP IMA Video' ), + description: __( 'Embeds a video player for instream video ads that are integrated with the IMA SDK' ), + category: 'common', + icon: 'embed-generic', + keywords: [ + __( 'Embed' ) + ], + + // @todo Perhaps later add subtitles option and additional source options? + attributes: { + dataDelayAdRequest: { + default: false + }, + dataTag: { + type: 'string' + }, + dataSrc: { + type: 'string' + }, + dataPoster: { + type: 'string' + }, + layout: { + type: 'string', + default: 'responsive' + }, + width: { + type: 'number', + default: 600 + }, + height: { + type: 'number', + default: 400 + } + }, + + edit( { attributes, isSelected, setAttributes } ) { + const { dataDelayAdRequest, dataTag, dataSrc, dataPoster, layout, height, width } = attributes; + const ampLayoutOptions = [ + { value: 'responsive', label: 'Responsive' }, + { value: 'fixed', label: 'Fixed' } + + ]; + let dataSet = false; + if ( dataTag && dataSrc ) { + dataSet = true; + } + return [ + isSelected && ( + + + ( setAttributes( { dataTag: value } ) ) } + /> + ( setAttributes( { dataSrc: value } ) ) } + /> + ( setAttributes( { dataPoster: value } ) ) } + /> + ( setAttributes( { dataDelayAdRequest: ! dataDelayAdRequest } ) ) } + /> + ( setAttributes( { layout: value } ) ) } + /> + ( setAttributes( { width: value } ) ) } + /> + ( setAttributes( { height: value } ) ) } + /> + + + ), + dataSet && ( + +

{ dataSrc }

+

{ __( 'Previews for this are unavailable in the editor, sorry!' ) }

+
+ ), + ! dataSet && ( + +

{ __( 'Add required data to use the block.' ) }

+
+ ) + ]; + }, + + save( { attributes } ) { + let imaProps = { + layout: attributes.layout, + height: attributes.height, + width: attributes.width, + 'data-tag': attributes.dataTag, + 'data-src': attributes.dataSrc + }; + if ( attributes.dataPoster ) { + imaProps[ 'data-poster' ] = attributes.dataPoster; + } + if ( attributes.dataDelayAdRequest ) { + imaProps[ 'data-delay-ad-request' ] = attributes.dataDelayAdRequest; + } + return ( + + ); + } + } +); diff --git a/blocks/index.js b/blocks/index.js index 6289b9c3680..e623e28e572 100644 --- a/blocks/index.js +++ b/blocks/index.js @@ -7,3 +7,4 @@ import './amp-reach-player'; import './amp-springboard-player'; import './amp-jwplayer'; import './amp-brid-player'; +import './amp-ima-video'; From 36ec562c1894c67d51ac556714ddb1ca4a910c4a Mon Sep 17 00:00:00 2001 From: Miina Sikk Date: Fri, 18 May 2018 17:46:10 +0300 Subject: [PATCH 12/18] Fixes from testing. --- assets/js/amp-blocks-compiled.js | 14 ++++++------ blocks/amp-brid-player/index.js | 12 +++++----- blocks/amp-ima-video/index.js | 4 ++-- blocks/amp-jwplayer/index.js | 18 +++++++-------- blocks/amp-o2-player/index.js | 31 +++++++++++++------------- blocks/amp-ooyala-player/index.js | 1 - blocks/amp-reach-player/index.js | 4 ++-- blocks/amp-springboard-player/index.js | 8 +++---- 8 files changed, 46 insertions(+), 46 deletions(-) diff --git a/assets/js/amp-blocks-compiled.js b/assets/js/amp-blocks-compiled.js index e5b5c2625da..335943a90dc 100644 --- a/assets/js/amp-blocks-compiled.js +++ b/assets/js/amp-blocks-compiled.js @@ -75,7 +75,7 @@ eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true } /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder,\n ToggleControl = _wp$components.ToggleControl;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-o2-player', {\n\ttitle: __('AMP O2 Player'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed'), __('AOL O2Player')],\n\n\t// @todo Add other useful macro toggles, e.g. showing relevant content.\n\tattributes: {\n\t\tdataPid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataVid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataBcid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataBid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tautoPlay: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed-height'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number'\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar autoPlay = attributes.autoPlay,\n\t\t dataPid = attributes.dataPid,\n\t\t dataVid = attributes.dataVid,\n\t\t dataBcid = attributes.dataBcid,\n\t\t dataBid = attributes.dataBid,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: 'Responsive' }, { value: 'fixed-height', label: 'Fixed height' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, { value: 'nodisplay', label: 'No Display' }];\n\t\tvar url = false;\n\t\tif (dataPid && (dataBcid || dataVid)) {\n\t\t\turl = 'https://delivery.vidible.tv/htmlembed/pid=' + dataPid + '/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('O2 Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Buyer Company ID (bcid, required)'),\n\t\t\t\t\tvalue: dataBcid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBcid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Playlist ID'),\n\t\t\t\t\tvalue: dataBid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video ID'),\n\t\t\t\t\tvalue: dataVid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataVid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(ToggleControl, {\n\t\t\t\t\tlabel: __('Autoplay'),\n\t\t\t\t\tchecked: autoPlay,\n\t\t\t\t\tonChange: function onChange() {\n\t\t\t\t\t\treturn setAttributes({ autoPlay: !autoPlay });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('O2 Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('O2 Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar o2Props = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\t'data-pid': attributes.dataPid\n\t\t};\n\t\tif ('fixed-height' !== attributes.layout && attributes.width) {\n\t\t\to2Props.width = attributes.width;\n\t\t}\n\t\tif (!attributes.autoPlay) {\n\t\t\to2Props['data-macros'] = 'm.playback=click';\n\t\t}\n\t\tif (attributes.dataVid) {\n\t\t\to2Props['data-vid'] = attributes.dataVid;\n\t\t} else if (attributes.dataBcid) {\n\t\t\to2Props['data-bcid'] = attributes.dataBcid;\n\t\t}\n\t\tif (attributes.dataBid) {\n\t\t\to2Props['data-bid'] = attributes.dataBid;\n\t\t}\n\t\treturn wp.element.createElement('amp-o2-player', o2Props);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtbzItcGxheWVyL2luZGV4LmpzPzIwMGYiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb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E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///1\n"); +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder,\n ToggleControl = _wp$components.ToggleControl;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-o2-player', {\n\ttitle: __('AMP O2 Player'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed'), __('AOL O2Player')],\n\n\t// @todo Add other useful macro toggles, e.g. showing relevant content.\n\tattributes: {\n\t\tdataPid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataVid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataBcid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataBid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tautoPlay: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'responsive'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar autoPlay = attributes.autoPlay,\n\t\t dataPid = attributes.dataPid,\n\t\t dataVid = attributes.dataVid,\n\t\t dataBcid = attributes.dataBcid,\n\t\t dataBid = attributes.dataBid,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: __('Responsive') }, { value: 'fixed-height', label: __('Fixed height') }, { value: 'fixed', label: __('Fixed') }, { value: 'fill', label: __('Fill') }, { value: 'flex-item', label: __('Flex-item') }, { value: 'nodisplay', label: __('No Display') }];\n\t\tvar url = false;\n\t\tif (dataPid && (dataBcid || dataVid)) {\n\t\t\turl = 'https://delivery.vidible.tv/htmlembed/pid=' + dataPid + '/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('O2 Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Buyer Company ID (either buyer or video ID is required)'),\n\t\t\t\t\tvalue: dataBcid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBcid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video ID (either buyer or video ID is required)'),\n\t\t\t\t\tvalue: dataVid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataVid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Playlist ID'),\n\t\t\t\t\tvalue: dataBid,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataBid: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(ToggleControl, {\n\t\t\t\t\tlabel: __('Autoplay'),\n\t\t\t\t\tchecked: autoPlay,\n\t\t\t\t\tonChange: function onChange() {\n\t\t\t\t\t\treturn setAttributes({ autoPlay: !autoPlay });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('O2 Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('O2 Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar o2Props = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\t'data-pid': attributes.dataPid\n\t\t};\n\t\tif ('fixed-height' !== attributes.layout && attributes.width) {\n\t\t\to2Props.width = attributes.width;\n\t\t}\n\t\tif (!attributes.autoPlay) {\n\t\t\to2Props['data-macros'] = 'm.playback=click';\n\t\t}\n\t\tif (attributes.dataVid) {\n\t\t\to2Props['data-vid'] = attributes.dataVid;\n\t\t} else if (attributes.dataBcid) {\n\t\t\to2Props['data-bcid'] = attributes.dataBcid;\n\t\t}\n\t\tif (attributes.dataBid) {\n\t\t\to2Props['data-bid'] = attributes.dataBid;\n\t\t}\n\t\treturn wp.element.createElement('amp-o2-player', o2Props);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtbzItcGxheWVyL2luZGV4LmpzPzIwMGYiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2NrcyxcbiAgICByZWdpc3RlckJsb2NrVHlwZSA9IF93cCRibG9ja3MucmVnaXN0ZXJCbG9ja1R5cGUsXG4gICAgSW5zcGVjdG9yQ29udHJvbHMgPSBfd3AkYmxvY2tzLkluc3BlY3RvckNvbnRyb2xzO1xudmFyIF93cCRjb21wb25lbnRzID0gd3AuY29tcG9uZW50cyxcbiAgICBQYW5lbEJvZHkgPSBfd3AkY29tcG9uZW50cy5QYW5lbEJvZHksXG4gICAgVGV4dENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5UZXh0Q29udHJvbCxcbiAgICBTZWxlY3RDb250cm9sID0gX3dwJGNvbXBvbmVudHMuU2VsZWN0Q29udHJvbCxcbiAgICBQbGFjZWhvbGRlciA9IF93cCRjb21wb25lbnRzLlBsYWNlaG9sZGVyLFxuICAgIFRvZ2dsZUNvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5Ub2dnbGVDb250cm9sO1xuXG4vKipcbiAqIFJlZ2lzdGVyIGJsb2NrLlxuICovXG5cbmV4cG9ydCBkZWZhdWx0IHJlZ2lzdGVyQmxvY2tUeXBlKCdhbXAvYW1wLW8yLXBsYXllcicsIHtcblx0dGl0bGU6IF9fKCdBTVAgTzIgUGxheWVyJyksXG5cdGNhdGVnb3J5OiAnY29tbW9uJyxcblx0aWNvbjogJ2VtYmVkLWdlbmVyaWMnLFxuXH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UFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///1\n"); /***/ }), /* 2 */, @@ -84,42 +84,42 @@ eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$bloc /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-ooyala-player', {\n\ttitle: __('AMP Ooyala Player'),\n\tdescription: __('Displays an Ooyala video.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed'), __('Ooyala video')],\n\n\t// @todo Add data-config attribute?\n\tattributes: {\n\t\tdataEmbedCode: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPcode: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerVersion: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'v3'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataEmbedCode = attributes.dataEmbedCode,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataPcode = attributes.dataPcode,\n\t\t dataPlayerVersion = attributes.dataPlayerVersion,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: '', label: __('None') }, { value: 'responsive', label: __('Responsive') }, { value: 'fixed', label: __('Fixed') }, { value: 'fill', label: __('Fill') }, { value: 'flex-item', label: __('Flex-item') }];\n\t\tvar url = false;\n\t\tif (dataEmbedCode && dataPlayerId && dataPcode) {\n\t\t\turl = 'http://cf.c.ooyala.com/' + dataEmbedCode;\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Ooyala settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video embed code (required)'),\n\t\t\t\t\tvalue: dataEmbedCode,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataEmbedCode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPlayerId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Provider code for the account (required)'),\n\t\t\t\t\tvalue: dataPcode,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPcode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Player version'),\n\t\t\t\t\tvalue: dataPlayerVersion,\n\t\t\t\t\toptions: [{ value: 'v3', label: __('V3') }, { value: 'v4', label: __('V4') }],\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerVersion: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Ooyala Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Ooyala Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\t\tvar dataEmbedCode = attributes.dataEmbedCode,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataPcode = attributes.dataPcode,\n\t\t dataPlayerVersion = attributes.dataPlayerVersion,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\n\t\tvar ooyalaProps = {\n\t\t\tlayout: layout,\n\t\t\theight: height,\n\t\t\t'data-embedcode': dataEmbedCode,\n\t\t\t'data-playerid': dataPlayerId,\n\t\t\t'data-pcode': dataPcode,\n\t\t\t'data-playerversion': dataPlayerVersion\n\t\t};\n\t\tif ('fixed-height' !== layout && width) {\n\t\t\tooyalaProps.width = width;\n\t\t}\n\t\treturn wp.element.createElement('amp-ooyala-player', ooyalaProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtb295YWxhLXBsYXllci9pbmRleC5qcz81NmRlIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW50ZXJuYWwgYmxvY2sgbGlicmFyaWVzLlxuICovXG52YXIgX18gPSB3cC5pMThuLl9fO1xudmFyIF93cCRibG9ja3MgPSB3cC5ibG9ja3MsXG4gICAgcmVnaXN0ZXJCbG9ja1R5cGUgPSBfd3AkYmxvY2tzLnJlZ2lzdGVyQmxvY2tUeXBlLFxuICAgIEluc3BlY3RvckNvbnRyb2xzID0gX3dwJGJsb2Nrcy5JbnNwZWN0b3JDb250cm9scztcbnZhciBfd3AkY29tcG9uZW50cyA9IHdwLmNvbXBvbmVudHMsXG4gICAgUGFuZWxCb2R5ID0gX3dwJGNvbXBvbmVudHMuUGFuZWxCb2R5LFxuICAgIFRleHRDb250cm9sID0gX3dwJGNvbXBvbmVudHMuVGV4dENvbnRyb2wsXG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QUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///4\n"); +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-ooyala-player', {\n\ttitle: __('AMP Ooyala Player'),\n\tdescription: __('Displays an Ooyala video.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed'), __('Ooyala video')],\n\n\t// @todo Add data-config attribute?\n\tattributes: {\n\t\tdataEmbedCode: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPcode: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerVersion: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'v3'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataEmbedCode = attributes.dataEmbedCode,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataPcode = attributes.dataPcode,\n\t\t dataPlayerVersion = attributes.dataPlayerVersion,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: __('Responsive') }, { value: 'fixed', label: __('Fixed') }, { value: 'fill', label: __('Fill') }, { value: 'flex-item', label: __('Flex-item') }];\n\t\tvar url = false;\n\t\tif (dataEmbedCode && dataPlayerId && dataPcode) {\n\t\t\turl = 'http://cf.c.ooyala.com/' + dataEmbedCode;\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Ooyala settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video embed code (required)'),\n\t\t\t\t\tvalue: dataEmbedCode,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataEmbedCode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPlayerId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Provider code for the account (required)'),\n\t\t\t\t\tvalue: dataPcode,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPcode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Player version'),\n\t\t\t\t\tvalue: dataPlayerVersion,\n\t\t\t\t\toptions: [{ value: 'v3', label: __('V3') }, { value: 'v4', label: __('V4') }],\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerVersion: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Ooyala Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Ooyala Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\t\tvar dataEmbedCode = attributes.dataEmbedCode,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataPcode = attributes.dataPcode,\n\t\t dataPlayerVersion = attributes.dataPlayerVersion,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\n\t\tvar ooyalaProps = {\n\t\t\tlayout: layout,\n\t\t\theight: height,\n\t\t\t'data-embedcode': dataEmbedCode,\n\t\t\t'data-playerid': dataPlayerId,\n\t\t\t'data-pcode': dataPcode,\n\t\t\t'data-playerversion': dataPlayerVersion\n\t\t};\n\t\tif ('fixed-height' !== layout && width) {\n\t\t\tooyalaProps.width = width;\n\t\t}\n\t\treturn wp.element.createElement('amp-ooyala-player', ooyalaProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtb295YWxhLXBsYXllci9pbmRleC5qcz81NmRlIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogSW50ZXJuYWwgYmxvY2sgbGlicmFyaWVzLlxuICovXG52YXIgX18gPSB3cC5pMThuLl9fO1xudmFyIF93cCRibG9ja3MgPSB3cC5ibG9ja3MsXG4gICAgcmVnaXN0ZXJCbG9ja1R5cGUgPSBfd3AkYmxvY2tzLnJlZ2lzdGVyQmxvY2tUeXBlLFxuICAgIEluc3BlY3RvckNvbnRyb2xzID0gX3dwJGJsb2Nrcy5JbnNwZWN0b3JDb250cm9scztcbnZhciBfd3AkY29tcG9uZW50cyA9IHdwLmNvbXBvbmVudHMsXG4gICAgUGFuZWxCb2R5ID0gX3dwJGNvbXBvbmVudHMuUGFuZWxCb2R5LFxuICAgIFRleHRDb250cm9sID0gX3dwJGNvbXBvbmVudHMuVGV4dENvbnRyb2wsXG4gICAgU2VsZWN0Q29udHJvbCA9IF93cCRjb21wb25lbnRzLlNlbGVjdENvbnRyb2wsXG4gICAgUGxhY2Vob2xkZXIgPSBfd3AkY29tcG9uZW50cy5QbGFjZWhvbGRlcjtcblxu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function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-reach-player', {\n\ttitle: __('AMP Reach Player'),\n\tdescription: __('Displays the Reach Player configured in the Beachfront Reach platform.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed'), __('Beachfront Reach video')],\n\n\tattributes: {\n\t\tdataEmbedId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed-height'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number'\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataEmbedId = attributes.dataEmbedId,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: '', label: __('None') }, { value: 'responsive', label: __('Responsive') }, { value: 'fixed-height', label: __('Fixed Height') }, { value: 'fixed', label: __('Fixed') }, { value: 'fill', label: __('Fill') }, { value: 'flex-item', label: __('Flex-item') }];\n\t\tvar url = false;\n\t\tif (dataEmbedId) {\n\t\t\turl = 'https://media-cdn.beachfrontreach.com/acct_1/video/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Reach settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('The Reach player embed id (required)'),\n\t\t\t\t\tvalue: dataEmbedId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataEmbedId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Reach Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Reach Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add Reach player embed ID to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\t\tvar dataEmbedId = attributes.dataEmbedId,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\n\t\tvar reachProps = {\n\t\t\tlayout: layout,\n\t\t\theight: height,\n\t\t\t'data-embed-id': dataEmbedId\n\t\t};\n\t\tif ('fixed-height' !== layout && width) {\n\t\t\treachProps.width = width;\n\t\t}\n\t\treturn wp.element.createElement('amp-reach-player', reachProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtcmVhY2gtcGxheWVyL2luZGV4LmpzPzIwNmIiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2NrcyxcbiAgICByZWdpc3RlckJsb2NrVHlwZSA9IF93cCRibG9ja3MucmVnaXN0ZXJCbG9ja1R5cGUsXG4gICAgSW5zcGVjdG9yQ29udHJvbHMgPSBfd3AkYmxvY2tzLkluc3BlY3RvckNvbnRyb2xzO1xudmFyIF93cCRjb21wb25lbnRzID0gd3AuY29tcG9uZW50cyxcbiAgICBQYW5lbEJvZHkgPSBfd3AkY29tcG9uZW50cy5QYW5lbEJvZHksXG4gICAgVGV4dENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5UZXh0Q29udHJvbCxcbiAgICBTZWxlY3RDb250cm9sID0gX3dwJGNvbXBvbmVudHMuU2VsZWN0Q29udHJvbCxcbiAgICBQbGFjZWhvbGRlciA9IF93cCRjb21wb25lbnRzLlBsYWNlaG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p$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-reach-player', {\n\ttitle: __('AMP Reach Player'),\n\tdescription: __('Displays the Reach Player configured in the Beachfront Reach platform.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed'), __('Beachfront Reach video')],\n\n\tattributes: {\n\t\tdataEmbedId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'fixed-height'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataEmbedId = attributes.dataEmbedId,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: __('Responsive') }, { value: 'fixed-height', label: __('Fixed Height') }, { value: 'fixed', label: __('Fixed') }, { value: 'fill', label: __('Fill') }, { value: 'flex-item', label: __('Flex-item') }];\n\t\tvar url = false;\n\t\tif (dataEmbedId) {\n\t\t\turl = 'https://media-cdn.beachfrontreach.com/acct_1/video/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Reach settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('The Reach player embed id (required)'),\n\t\t\t\t\tvalue: dataEmbedId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataEmbedId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Reach Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Reach Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add Reach player embed ID to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\t\tvar dataEmbedId = attributes.dataEmbedId,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\n\t\tvar reachProps = {\n\t\t\tlayout: layout,\n\t\t\theight: height,\n\t\t\t'data-embed-id': dataEmbedId\n\t\t};\n\t\tif ('fixed-height' !== layout && width) {\n\t\t\treachProps.width = width;\n\t\t}\n\t\treturn wp.element.createElement('amp-reach-player', reachProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtcmVhY2gtcGxheWVyL2luZGV4LmpzPzIwNmIiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2NrcyxcbiAgICByZWdpc3RlckJsb2NrVHlwZSA9IF93cCRibG9ja3MucmVnaXN0ZXJCbG9ja1R5cGUsXG4gICAgSW5zcGVjdG9yQ29udHJvbHMgPSBfd3AkYmxvY2tzLkluc3BlY3RvckNvbnRyb2xzO1xudmFyIF93cCRjb21wb25lbnRzID0gd3AuY29tcG9uZW50cyxcbiAgICBQYW5lbEJvZHkgPSBfd3AkY29tcG9uZW50cy5QYW5lbEJvZHksXG4gICAgVGV4dENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5UZXh0Q29udHJvbCxcbiAgICBTZWxlY3RDb250cm9sID0gX3dwJGNvbXBvbmVudHMuU2VsZWN0Q29udHJvbCxcbiAgICBQbGFjZWhvbGRlciA9IF93cCRjb21wb25lbnRzLlBsYWNlaG9sZGVyO1xuXG4vKipcbiAqIFJlZ2lzdGVyIGJsb2NrLlxuICovXG5cbmV4cG9ydCBkZWZhdWx0IHJlZ2lzdGVyQmxvY2tU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BQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///5\n"); /***/ }), /* 6 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-springboard-player', {\n\ttitle: __('AMP Springboard Player'),\n\tdescription: __('Displays the Springboard Player used in the Springboard Video Platform'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed')],\n\n\tattributes: {\n\t\tdataSiteId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataContentId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataDomain: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataMode: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'video'\n\t\t},\n\t\tdataItems: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 1\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'responsive'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataSiteId = attributes.dataSiteId,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataContentId = attributes.dataContentId,\n\t\t dataDomain = attributes.dataDomain,\n\t\t dataMode = attributes.dataMode,\n\t\t dataItems = attributes.dataItems,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: 'Responsive' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }];\n\t\tvar url = false;\n\t\tif (dataSiteId && dataContentId && dataDomain && dataMode && dataItems) {\n\t\t\turl = 'https://cms.springboardplatform.com/embed_iframe/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Springboard Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('SprintBoard site ID (required)'),\n\t\t\t\t\tvalue: dataSiteId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataSiteId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player content ID (required)'),\n\t\t\t\t\tvalue: dataContentId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataContentId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID'),\n\t\t\t\t\tvalue: dataPlayerId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Springboard partner domain'),\n\t\t\t\t\tvalue: dataDomain,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataDomain: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Mode (required)'),\n\t\t\t\t\tvalue: dataMode,\n\t\t\t\t\toptions: [{ value: 'video', label: __('Video') }, { value: 'playlist', label: __('Playlist') }],\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataMode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Number of video is playlist (required)'),\n\t\t\t\t\tvalue: dataItems,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataItems: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Springboard Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Springboard Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\t\tvar dataSiteId = attributes.dataSiteId,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataContentId = attributes.dataContentId,\n\t\t dataDomain = attributes.dataDomain,\n\t\t dataMode = attributes.dataMode,\n\t\t dataItems = attributes.dataItems,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar springboardProps = {\n\t\t\tlayout: layout,\n\t\t\theight: height,\n\t\t\t'data-site-id': dataSiteId,\n\t\t\t'data-mode': dataMode,\n\t\t\t'data-content-id': dataContentId,\n\t\t\t'data-player-id': dataPlayerId,\n\t\t\t'data-domain': dataDomain,\n\t\t\t'data-items': dataItems\n\t\t};\n\t\tif ('fixed-height' !== layout && width) {\n\t\t\tspringboardProps.width = attributes.width;\n\t\t}\n\t\treturn wp.element.createElement('amp-springboard-player', springboardProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtc3ByaW5nYm9hcmQtcGxheWVyL2luZGV4LmpzPzcyYjgiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2NrcyxcbiAgICByZWdpc3RlckJsb2NrVHlwZSA9IF93cCRibG9ja3MucmVnaXN0ZXJCbG9ja1R5cGUsXG4gICAgSW5zcGVjdG9yQ29udHJvbHMgPSBfd3AkYmxvY2tzLkluc3BlY3RvckNvbnRyb2xzO1xudmFyIF93cCRjb21wb25lbnRzID0gd3AuY29tcG9uZW50cyxcbiAgICBQYW5lbEJvZHkgPSBfd3AkY29tcG9uZW50cy5QYW5lbEJvZ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0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///6\n"); +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-springboard-player', {\n\ttitle: __('AMP Springboard Player'),\n\tdescription: __('Displays the Springboard Player used in the Springboard Video Platform'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed')],\n\n\tattributes: {\n\t\tdataSiteId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataContentId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlayerId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataDomain: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataMode: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'video'\n\t\t},\n\t\tdataItems: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 1\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'responsive'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataSiteId = attributes.dataSiteId,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataContentId = attributes.dataContentId,\n\t\t dataDomain = attributes.dataDomain,\n\t\t dataMode = attributes.dataMode,\n\t\t dataItems = attributes.dataItems,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: __('Responsive') }, { value: 'fixed', label: __('Fixed') }, { value: 'fill', label: __('Fill') }, { value: 'flex-item', label: __('Flex-item') }];\n\t\tvar url = false;\n\t\tif (dataSiteId && dataContentId && dataDomain && dataMode && dataItems) {\n\t\t\turl = 'https://cms.springboardplatform.com/embed_iframe/';\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Springboard Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('SprintBoard site ID (required)'),\n\t\t\t\t\tvalue: dataSiteId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataSiteId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player content ID (required)'),\n\t\t\t\t\tvalue: dataContentId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataContentId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID'),\n\t\t\t\t\tvalue: dataPlayerId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Springboard partner domain'),\n\t\t\t\t\tvalue: dataDomain,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataDomain: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Mode (required)'),\n\t\t\t\t\tvalue: dataMode,\n\t\t\t\t\toptions: [{ value: 'video', label: __('Video') }, { value: 'playlist', label: __('Playlist') }],\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataMode: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Number of video is playlist (required)'),\n\t\t\t\t\tvalue: dataItems,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataItems: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Springboard Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Springboard Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\t\tvar dataSiteId = attributes.dataSiteId,\n\t\t dataPlayerId = attributes.dataPlayerId,\n\t\t dataContentId = attributes.dataContentId,\n\t\t dataDomain = attributes.dataDomain,\n\t\t dataMode = attributes.dataMode,\n\t\t dataItems = attributes.dataItems,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar springboardProps = {\n\t\t\tlayout: layout,\n\t\t\theight: height,\n\t\t\t'data-site-id': dataSiteId,\n\t\t\t'data-mode': dataMode,\n\t\t\t'data-content-id': dataContentId,\n\t\t\t'data-player-id': dataPlayerId,\n\t\t\t'data-domain': dataDomain,\n\t\t\t'data-items': dataItems\n\t\t};\n\t\tif ('fixed-height' !== layout && width) {\n\t\t\tspringboardProps.width = attributes.width;\n\t\t}\n\t\treturn wp.element.createElement('amp-springboard-player', springboardProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtc3ByaW5nYm9hcmQtcGxheWVyL2luZGV4LmpzPzcyYjgiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2NrcyxcbiAgICByZWdpc3RlckJsb2NrVHlwZSA9IF93cCRibG9ja3MucmVnaXN0ZXJCbG9ja1R5cGUsXG4gICAgSW5zcGVjdG9yQ29udHJvbHMgPSBfd3AkYmxvY2tzLkluc3BlY3RvckNvbnRyb2xzO1xudmFyIF93cCRjb21wb25lbnRzID0gd3AuY29tcG9uZW50cyxcbiAgICBQYW5lbEJvZHkgPSBfd3AkY29tcG9uZW50cy5QYW5lbEJvZHksXG4gICAgVGV4dENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5UZXh0Q29udHJvbCxcbiAgICBTZWxlY3RDb250cm9sID0gX3dwJGNvbXBvbmVudHMuU2VsZWN0Q29udHJvbCxcbiAgICBQbGFjZWhvbGRlciA9IF93cCRjb21wb25lbnRzLlBsYWNlaG9sZGVyO1xuXG4vKipcbiAqIFJlZ2lzdGVyIGJsb2NrLlxuICovXG5cbmV4cG9ydCBkZWZhdWx0IHJlZ2lzdGVyQmxvY2tUeXBlKCdhbXAvYW1wLXNwcmluZ2JvYXJkLXBsYXllcicsIHtcblx0dGl0bGU6IF9fKCdBTVAgU3ByaW5nYm9hcmQgU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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///6\n"); /***/ }), /* 7 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-jwplayer', {\n\ttitle: __('AMP JW Player'),\n\tdescription: __('Displays a cloud-hosted JW Player.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed')],\n\n\tattributes: {\n\t\tdataPlayerId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataMediaId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlaylistId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'responsive'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataPlayerId = attributes.dataPlayerId,\n\t\t dataMediaId = attributes.dataMediaId,\n\t\t dataPlaylistId = attributes.dataPlaylistId,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: 'Responsive' }, { value: 'fixed-height', label: 'Fixed height' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, { value: 'nodisplay', label: 'No Display' }];\n\t\tvar url = false;\n\t\tif (dataPlayerId && (dataMediaId || dataPlaylistId)) {\n\t\t\tif (dataPlaylistId) {\n\t\t\t\turl = 'https://content.jwplatform.com/players/' + dataPlaylistId + '-' + dataPlayerId;\n\t\t\t} else {\n\t\t\t\turl = 'https://content.jwplatform.com/players/' + dataMediaId + '-' + dataPlayerId;\n\t\t\t}\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('JW Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('JW Platform player ID (required)'),\n\t\t\t\t\tvalue: dataPlayerId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('JW Platform media ID (required if playlist ID not set)'),\n\t\t\t\t\tvalue: dataMediaId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataMediaId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('JW Platform playlist ID (required if media ID not set)'),\n\t\t\t\t\tvalue: dataPlaylistId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlaylistId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('JW Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('JW Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar jwProps = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\t'data-player-id': attributes.dataPlayerId\n\t\t};\n\t\tif ('fixed-height' !== attributes.layout && attributes.width) {\n\t\t\tjwProps.width = attributes.width;\n\t\t}\n\t\tif (attributes.dataPlaylistId) {\n\t\t\tjwProps['data-playlist-id'] = attributes.dataPlaylistId;\n\t\t} else if (attributes.dataMediaId) {\n\t\t\tjwProps['data-media-id'] = attributes.dataMediaId;\n\t\t}\n\t\treturn wp.element.createElement('amp-jwplayer', jwProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtandwbGF5ZXIvaW5kZXguanM/YTVkMCJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEludGVybmFsIGJsb2NrIGxpYnJhcmllcy5cbiAqL1xudmFyIF9fID0gd3AuaTE4bi5fXztcbnZhciBfd3AkYmxvY2tzID0gd3AuYmxvY2tzLFxuICAgIHJlZ2lzdGVyQmxvY2tUeXBlID0gX3dwJGJsb2Nrcy5yZWdpc3RlckJsb2NrVHlwZSxcbiAgICBJbnNwZWN0b3JDb250cm9scyA9IF93cCRibG9ja3MuSW5zcGVjdG9yQ29udHJvbHM7XG52YXIgX3dwJGNvbXBvbmVudHMgPSB3cC5jb21wb25lbnRzLFxuICAgIFBhbmVsQm9keSA9IF93cCRjb21wb25lbnRzLlBhbmVsQm9keSxcbiAgICBUZXh0Q29udHJvbCA9IF93cCRjb21wb25lbnRzLlRleHRDb250cm9sLFxuICAgIFNlbGVjdENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5TZWxlY3RDb250cm9sLFxuICAgIFBsYWNlaG9sZGVyID0gX3dwJGNvbXBvbmVudHMuUGxhY2Vob2xkZXI7XG5cbi8qKlxuICogUmVnaXN0ZXIgYmxvY2suXG4gKi9cblxuZXhwb3J0IGRlZmF1bHQgcmVnaXN0ZXJCbG9ja1R5cGUoJ2FtcC9hbXAtandwbGF5ZXInLCB7XG5cdHRpdGxlOiBfXygnQU1QIEpXI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UNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///7\n"); +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-jwplayer', {\n\ttitle: __('AMP JW Player'),\n\tdescription: __('Displays a cloud-hosted JW Player.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed')],\n\n\tattributes: {\n\t\tdataPlayerId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataMediaId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPlaylistId: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'responsive'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataPlayerId = attributes.dataPlayerId,\n\t\t dataMediaId = attributes.dataMediaId,\n\t\t dataPlaylistId = attributes.dataPlaylistId,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: __('Responsive') }, { value: 'fixed-height', label: __('Fixed height') }, { value: 'fixed', label: __('Fixed') }, { value: 'fill', label: __('Fill') }, { value: 'flex-item', label: __('Flex-item') }, { value: 'nodisplay', label: __('No Display') }];\n\t\tvar url = false;\n\t\tif (dataPlayerId && (dataMediaId || dataPlaylistId)) {\n\t\t\tif (dataPlaylistId) {\n\t\t\t\turl = 'https://content.jwplatform.com/players/' + dataPlaylistId + '-' + dataPlayerId;\n\t\t\t} else {\n\t\t\t\turl = 'https://content.jwplatform.com/players/' + dataMediaId + '-' + dataPlayerId;\n\t\t\t}\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('JW Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Player ID (required)'),\n\t\t\t\t\tvalue: dataPlayerId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayerId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Media ID (required if playlist ID not set)'),\n\t\t\t\t\tvalue: dataMediaId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataMediaId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Playlist ID (required if media ID not set)'),\n\t\t\t\t\tvalue: dataPlaylistId,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlaylistId: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('JW Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('JW Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar jwProps = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\t'data-player-id': attributes.dataPlayerId\n\t\t};\n\t\tif ('fixed-height' !== attributes.layout && attributes.width) {\n\t\t\tjwProps.width = attributes.width;\n\t\t}\n\t\tif (attributes.dataPlaylistId) {\n\t\t\tjwProps['data-playlist-id'] = attributes.dataPlaylistId;\n\t\t} else if (attributes.dataMediaId) {\n\t\t\tjwProps['data-media-id'] = attributes.dataMediaId;\n\t\t}\n\t\treturn wp.element.createElement('amp-jwplayer', jwProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtandwbGF5ZXIvaW5kZXguanM/YTVkMCJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEludGVybmFsIGJsb2NrIGxpYnJhcmllcy5cbiAqL1xudmFyIF9fID0gd3AuaTE4bi5fXztcbnZhciBfd3AkYmxvY2tzID0gd3AuYmxvY2tzLFxuICAgIHJlZ2lzdGVyQmxvY2tUeXBlID0gX3dwJGJsb2Nrcy5yZWdpc3RlckJsb2NrVHlwZSxcbiAgICBJbnNwZWN0b3JDb250cm9scyA9IF93cCRibG9ja3MuSW5zcGVjdG9yQ29udHJvbHM7XG52YXIgX3dwJGNvbXBvbmVudHMgPSB3cC5jb21wb25lbnRzLFxuICAgIFBhbmVsQm9keSA9IF93cCRjb21wb25lbnRzLlBhbmVsQm9keSxcbiAgICBUZXh0Q29udHJvbCA9IF93cCRjb21wb25lbnRzLlRleHRDb250cm9sLFxuICAgIFNlbGVjdENvbnRyb2wgPSBfd3AkY29tcG9uZW50cy5TZWxlY3RDb250cm9sLFxuICAgIFBsYWNlaG9sZGVyID0gX3dwJGNvbXBvbmVudHMuUGxhY2Vob2xkZXI7XG5cbi8qKlxuICogUmVnaXN0ZXIgYmxvY2suXG4gKi9cblxuZXhwb3J0IGRlZmF1bHQgcmVnaXN0ZXJCbG9ja1R5cGUoJ2FtcC9hbXAtandwbGF5ZXInLCB7XG5cdH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NBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///7\n"); /***/ }), /* 8 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder,\n ToggleControl = _wp$components.ToggleControl;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-brid-player', {\n\ttitle: __('AMP Brid Player'),\n\tdescription: __('Displays the Brid Player used in Brid.tv Video Platform.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed')],\n\n\tattributes: {\n\t\tautoPlay: {\n\t\t\tdefault: false\n\t\t},\n\t\tdataPartner: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataPlayer: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataVideo: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataPlaylist: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataOutstream: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'responsive'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar autoPlay = attributes.autoPlay,\n\t\t dataPartner = attributes.dataPartner,\n\t\t dataPlayer = attributes.dataPlayer,\n\t\t dataVideo = attributes.dataVideo,\n\t\t dataPlaylist = attributes.dataPlaylist,\n\t\t dataOutstream = attributes.dataOutstream,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: 'Responsive' }, { value: 'fixed-height', label: 'Fixed height' }, { value: 'fixed', label: 'Fixed' }, { value: 'fill', label: 'Fill' }, { value: 'flex-item', label: 'Flex-item' }, { value: 'nodisplay', label: 'No Display' }];\n\t\tvar url = false;\n\t\tif (dataPartner && dataPlayer && (dataVideo || dataPlaylist || dataOutstream)) {\n\t\t\turl = 'http://cdn.brid.tv/live/partners/' + dataPartner;\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Brid Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Brid.tv partner ID (required)'),\n\t\t\t\t\tvalue: dataPartner,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPartner: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Brid.tv player ID (required)'),\n\t\t\t\t\tvalue: dataPlayer,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayer: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video ID (one of video / playlist / outstream ID is required)'),\n\t\t\t\t\tvalue: dataVideo,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataVideo: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Outstream unit ID (one of video / playlist / outstream ID is required)'),\n\t\t\t\t\tvalue: dataOutstream,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataOutstream: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Playlist ID (one of video / playlist / outstream ID is required)'),\n\t\t\t\t\tvalue: dataPlaylist,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlaylist: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(ToggleControl, {\n\t\t\t\t\tlabel: __('Autoplay'),\n\t\t\t\t\tchecked: autoPlay,\n\t\t\t\t\tonChange: function onChange() {\n\t\t\t\t\t\treturn setAttributes({ autoPlay: !autoPlay });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Brid Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Brid Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar bridProps = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\t'data-player': attributes.dataPlayer,\n\t\t\t'data-partner': attributes.dataPartner\n\t\t};\n\t\tif ('fixed-height' !== attributes.layout && attributes.width) {\n\t\t\tbridProps.width = attributes.width;\n\t\t}\n\t\tif (attributes.dataPlaylist) {\n\t\t\tbridProps['data-playlist'] = attributes.dataPlaylist;\n\t\t}\n\t\tif (attributes.dataVideo) {\n\t\t\tbridProps['data-video'] = attributes.dataVideo;\n\t\t}\n\t\tif (attributes.dataOutstream) {\n\t\t\tbridProps['data-outstream'] = attributes.dataOutstream;\n\t\t}\n\t\tif (attributes.autoPlay) {\n\t\t\tbridProps.autoplay = attributes.autoPlay;\n\t\t}\n\t\treturn wp.element.createElement('amp-brid-player', bridProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,e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n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder,\n ToggleControl = _wp$components.ToggleControl;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-brid-player', {\n\ttitle: __('AMP Brid Player'),\n\tdescription: __('Displays the Brid Player used in Brid.tv Video Platform.'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed')],\n\n\tattributes: {\n\t\tautoPlay: {\n\t\t\tdefault: false\n\t\t},\n\t\tdataPartner: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataPlayer: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataVideo: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataPlaylist: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tdataOutstream: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'responsive'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar autoPlay = attributes.autoPlay,\n\t\t dataPartner = attributes.dataPartner,\n\t\t dataPlayer = attributes.dataPlayer,\n\t\t dataVideo = attributes.dataVideo,\n\t\t dataPlaylist = attributes.dataPlaylist,\n\t\t dataOutstream = attributes.dataOutstream,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: __('Responsive') }, { value: 'fixed-height', label: __('Fixed height') }, { value: 'fixed', label: __('Fixed') }, { value: 'fill', label: __('Fill') }, { value: 'flex-item', label: __('Flex-item') }, { value: 'nodisplay', label: __('No Display') }];\n\t\tvar url = false;\n\t\tif (dataPartner && dataPlayer && (dataVideo || dataPlaylist || dataOutstream)) {\n\t\t\turl = 'http://cdn.brid.tv/live/partners/' + dataPartner;\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('Brid Player Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Brid.tv partner ID (required)'),\n\t\t\t\t\tvalue: dataPartner,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPartner: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Brid.tv player ID (required)'),\n\t\t\t\t\tvalue: dataPlayer,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlayer: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Video ID (one of video / playlist / outstream ID is required)'),\n\t\t\t\t\tvalue: dataVideo,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataVideo: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Outstream unit ID (one of video / playlist / outstream ID is required)'),\n\t\t\t\t\tvalue: dataOutstream,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataOutstream: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Playlist ID (one of video / playlist / outstream ID is required)'),\n\t\t\t\t\tvalue: dataPlaylist,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPlaylist: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(ToggleControl, {\n\t\t\t\t\tlabel: __('Autoplay'),\n\t\t\t\t\tchecked: autoPlay,\n\t\t\t\t\tonChange: function onChange() {\n\t\t\t\t\t\treturn setAttributes({ autoPlay: !autoPlay });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Brid Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\turl\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !url && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('Brid Player') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar bridProps = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\t'data-player': attributes.dataPlayer,\n\t\t\t'data-partner': attributes.dataPartner\n\t\t};\n\t\tif ('fixed-height' !== attributes.layout && attributes.width) {\n\t\t\tbridProps.width = attributes.width;\n\t\t}\n\t\tif (attributes.dataPlaylist) {\n\t\t\tbridProps['data-playlist'] = attributes.dataPlaylist;\n\t\t}\n\t\tif (attributes.dataVideo) {\n\t\t\tbridProps['data-video'] = attributes.dataVideo;\n\t\t}\n\t\tif (attributes.dataOutstream) {\n\t\t\tbridProps['data-outstream'] = attributes.dataOutstream;\n\t\t}\n\t\tif (attributes.autoPlay) {\n\t\t\tbridProps.autoplay = attributes.autoPlay;\n\t\t}\n\t\treturn wp.element.createElement('amp-brid-player', bridProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtYnJpZC1wbGF5ZXIvaW5kZXguanM/MTJiOSJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEludGVybmFsIGJsb2NrIGxpYnJhcmllcy5cbiAqL1xudmFyIF9fID0gd3AuaTE4bi5fXztcbnZhciBfd3AkYmxvY2tzID0gd3AuYmxvY2tzLFxuICAgIHJlZ2lzdGVyQmxvY2tUeXBlID0gX3dwJGJsb2Nrcy5yZWdpc3RlckJsb2NrVHlwZSxcbiAgICBJbnNwZWN0b3JDb250cm9scyA9IF93cCRibG9ja3MuSW5zcGVjdG9yQ29udHJvbHM7XG52YXIgX3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FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///8\n"); /***/ }), /* 9 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder,\n ToggleControl = _wp$components.ToggleControl;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-ima-video', {\n\ttitle: __('AMP IMA Video'),\n\tdescription: __('Embeds a video player for instream video ads that are integrated with the IMA SDK'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed')],\n\n\t// @todo Perhaps later add subtitles option and additional source options?\n\tattributes: {\n\t\tdataDelayAdRequest: {\n\t\t\tdefault: false\n\t\t},\n\t\tdataTag: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataSrc: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPoster: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'responsive'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataDelayAdRequest = attributes.dataDelayAdRequest,\n\t\t dataTag = attributes.dataTag,\n\t\t dataSrc = attributes.dataSrc,\n\t\t dataPoster = attributes.dataPoster,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: 'Responsive' }, { value: 'fixed', label: 'Fixed' }];\n\t\tvar dataSet = false;\n\t\tif (dataTag && dataSrc) {\n\t\t\tdataSet = true;\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('IMA Video Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Https URL for your VAST ad document (required)'),\n\t\t\t\t\tvalue: dataTag,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataTag: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Https URL of your video content (required)'),\n\t\t\t\t\tvalue: dataSrc,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataSrc: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Https URL to preview image'),\n\t\t\t\t\tvalue: dataPoster,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPoster: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(ToggleControl, {\n\t\t\t\t\tlabel: __('Delay Ad Request'),\n\t\t\t\t\tchecked: dataDelayAdRequest,\n\t\t\t\t\tonChange: function onChange() {\n\t\t\t\t\t\treturn setAttributes({ dataDelayAdRequest: !dataDelayAdRequest });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), dataSet && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('IMA Video') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\tdataSrc\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !dataSet && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('IMA Video') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar imaProps = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\twidth: attributes.width,\n\t\t\t'data-tag': attributes.dataTag,\n\t\t\t'data-src': attributes.dataSrc\n\t\t};\n\t\tif (attributes.dataPoster) {\n\t\t\timaProps['data-poster'] = attributes.dataPoster;\n\t\t}\n\t\tif (attributes.dataDelayAdRequest) {\n\t\t\timaProps['data-delay-ad-request'] = attributes.dataDelayAdRequest;\n\t\t}\n\t\treturn wp.element.createElement('amp-ima-video', imaProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtaW1hLXZpZGVvL2luZGV4LmpzP2RjNTUiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayBsaWJyYXJpZXMuXG4gKi9cbnZhciBfXyA9IHdwLmkxOG4uX187XG52YXIgX3dwJGJsb2NrcyA9IHdwLmJsb2NrcyxcbiAgICByZWdpc3RlckJsb2NrVHlwZSA9IF93cCRibG9ja3MucmVnaXN0ZXJCbG9ja1R5cGUsXG4gICAgSW5zcGVjdG9yQ29udHJvbHMgPSBfd3AkYmxvY2tzLkluc3BlY3RvckNvbnRyb2xzO1xudmF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FDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///9\n"); +eval("/**\n * Internal block libraries.\n */\nvar __ = wp.i18n.__;\nvar _wp$blocks = wp.blocks,\n registerBlockType = _wp$blocks.registerBlockType,\n InspectorControls = _wp$blocks.InspectorControls;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n Placeholder = _wp$components.Placeholder,\n ToggleControl = _wp$components.ToggleControl;\n\n/**\n * Register block.\n */\n\n/* unused harmony default export */ var _unused_webpack_default_export = (registerBlockType('amp/amp-ima-video', {\n\ttitle: __('AMP IMA Video'),\n\tdescription: __('Embeds a video player for instream video ads that are integrated with the IMA SDK'),\n\tcategory: 'common',\n\ticon: 'embed-generic',\n\tkeywords: [__('Embed')],\n\n\t// @todo Perhaps later add subtitles option and additional source options?\n\tattributes: {\n\t\tdataDelayAdRequest: {\n\t\t\tdefault: false\n\t\t},\n\t\tdataTag: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataSrc: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tdataPoster: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'responsive'\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 600\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 400\n\t\t}\n\t},\n\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t isSelected = _ref.isSelected,\n\t\t setAttributes = _ref.setAttributes;\n\t\tvar dataDelayAdRequest = attributes.dataDelayAdRequest,\n\t\t dataTag = attributes.dataTag,\n\t\t dataSrc = attributes.dataSrc,\n\t\t dataPoster = attributes.dataPoster,\n\t\t layout = attributes.layout,\n\t\t height = attributes.height,\n\t\t width = attributes.width;\n\n\t\tvar ampLayoutOptions = [{ value: 'responsive', label: __('Responsive') }, { value: 'fixed', label: __('Fixed') }];\n\t\tvar dataSet = false;\n\t\tif (dataTag && dataSrc) {\n\t\t\tdataSet = true;\n\t\t}\n\t\treturn [isSelected && wp.element.createElement(\n\t\t\tInspectorControls,\n\t\t\t{ key: 'inspector' },\n\t\t\twp.element.createElement(\n\t\t\t\tPanelBody,\n\t\t\t\t{ title: __('IMA Video Settings') },\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Https URL for your VAST ad document (required)'),\n\t\t\t\t\tvalue: dataTag,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataTag: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Https URL of your video content (required)'),\n\t\t\t\t\tvalue: dataSrc,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataSrc: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\tlabel: __('Https URL to preview image'),\n\t\t\t\t\tvalue: dataPoster,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ dataPoster: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(ToggleControl, {\n\t\t\t\t\tlabel: __('Delay Ad Request'),\n\t\t\t\t\tchecked: dataDelayAdRequest,\n\t\t\t\t\tonChange: function onChange() {\n\t\t\t\t\t\treturn setAttributes({ dataDelayAdRequest: !dataDelayAdRequest });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\tlabel: __('Layout'),\n\t\t\t\t\tvalue: layout,\n\t\t\t\t\toptions: ampLayoutOptions,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ layout: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Width (px)'),\n\t\t\t\t\tvalue: width !== undefined ? width : '',\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ width: value });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\twp.element.createElement(TextControl, {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tlabel: __('Height (px)'),\n\t\t\t\t\tvalue: height,\n\t\t\t\t\tonChange: function onChange(value) {\n\t\t\t\t\t\treturn setAttributes({ height: value });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t), dataSet && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('IMA Video') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\tdataSrc\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\t{ className: 'components-placeholder__error' },\n\t\t\t\t__('Previews for this are unavailable in the editor, sorry!')\n\t\t\t)\n\t\t), !dataSet && wp.element.createElement(\n\t\t\tPlaceholder,\n\t\t\t{ label: __('IMA Video') },\n\t\t\twp.element.createElement(\n\t\t\t\t'p',\n\t\t\t\tnull,\n\t\t\t\t__('Add required data to use the block.')\n\t\t\t)\n\t\t)];\n\t},\n\tsave: function save(_ref2) {\n\t\tvar attributes = _ref2.attributes;\n\n\t\tvar imaProps = {\n\t\t\tlayout: attributes.layout,\n\t\t\theight: attributes.height,\n\t\t\twidth: attributes.width,\n\t\t\t'data-tag': attributes.dataTag,\n\t\t\t'data-src': attributes.dataSrc\n\t\t};\n\t\tif (attributes.dataPoster) {\n\t\t\timaProps['data-poster'] = attributes.dataPoster;\n\t\t}\n\t\tif (attributes.dataDelayAdRequest) {\n\t\t\timaProps['data-delay-ad-request'] = attributes.dataDelayAdRequest;\n\t\t}\n\t\treturn wp.element.createElement('amp-ima-video', imaProps);\n\t}\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Jsb2Nrcy9hbXAtaW1hLXZpZGVvL2luZGV4LmpzP2RjNTUiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJbnRlcm5hbCBibG9jayB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BIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///9\n"); /***/ }) /******/ ]); \ No newline at end of file diff --git a/blocks/amp-brid-player/index.js b/blocks/amp-brid-player/index.js index 6ed42971b66..9a465696eb5 100644 --- a/blocks/amp-brid-player/index.js +++ b/blocks/amp-brid-player/index.js @@ -64,12 +64,12 @@ export default registerBlockType( edit( { attributes, isSelected, setAttributes } ) { const { autoPlay, dataPartner, dataPlayer, dataVideo, dataPlaylist, dataOutstream, layout, height, width } = attributes; const ampLayoutOptions = [ - { value: 'responsive', label: 'Responsive' }, - { value: 'fixed-height', label: 'Fixed height' }, - { value: 'fixed', label: 'Fixed' }, - { value: 'fill', label: 'Fill' }, - { value: 'flex-item', label: 'Flex-item' }, - { value: 'nodisplay', label: 'No Display' } + { value: 'responsive', label: __( 'Responsive' ) }, + { value: 'fixed-height', label: __( 'Fixed height' ) }, + { value: 'fixed', label: __( 'Fixed' ) }, + { value: 'fill', label: __( 'Fill' ) }, + { value: 'flex-item', label: __( 'Flex-item' ) }, + { value: 'nodisplay', label: __( 'No Display' ) } ]; let url = false; diff --git a/blocks/amp-ima-video/index.js b/blocks/amp-ima-video/index.js index 72440f6659f..82bdcf639d1 100644 --- a/blocks/amp-ima-video/index.js +++ b/blocks/amp-ima-video/index.js @@ -59,8 +59,8 @@ export default registerBlockType( edit( { attributes, isSelected, setAttributes } ) { const { dataDelayAdRequest, dataTag, dataSrc, dataPoster, layout, height, width } = attributes; const ampLayoutOptions = [ - { value: 'responsive', label: 'Responsive' }, - { value: 'fixed', label: 'Fixed' } + { value: 'responsive', label: __( 'Responsive' ) }, + { value: 'fixed', label: __( 'Fixed' ) } ]; let dataSet = false; diff --git a/blocks/amp-jwplayer/index.js b/blocks/amp-jwplayer/index.js index c8fb33da045..73b5ab4a937 100644 --- a/blocks/amp-jwplayer/index.js +++ b/blocks/amp-jwplayer/index.js @@ -54,12 +54,12 @@ export default registerBlockType( edit( { attributes, isSelected, setAttributes } ) { const { dataPlayerId, dataMediaId, dataPlaylistId, layout, height, width } = attributes; const ampLayoutOptions = [ - { value: 'responsive', label: 'Responsive' }, - { value: 'fixed-height', label: 'Fixed height' }, - { value: 'fixed', label: 'Fixed' }, - { value: 'fill', label: 'Fill' }, - { value: 'flex-item', label: 'Flex-item' }, - { value: 'nodisplay', label: 'No Display' } + { value: 'responsive', label: __( 'Responsive' ) }, + { value: 'fixed-height', label: __( 'Fixed height' ) }, + { value: 'fixed', label: __( 'Fixed' ) }, + { value: 'fill', label: __( 'Fill' ) }, + { value: 'flex-item', label: __( 'Flex-item' ) }, + { value: 'nodisplay', label: __( 'No Display' ) } ]; let url = false; @@ -75,17 +75,17 @@ export default registerBlockType( ( setAttributes( { dataPlayerId: value } ) ) } /> ( setAttributes( { dataMediaId: value } ) ) } /> ( setAttributes( { dataPlaylistId: value } ) ) } /> diff --git a/blocks/amp-o2-player/index.js b/blocks/amp-o2-player/index.js index 1912b728725..ac7e9464a2a 100644 --- a/blocks/amp-o2-player/index.js +++ b/blocks/amp-o2-player/index.js @@ -48,10 +48,11 @@ export default registerBlockType( }, layout: { type: 'string', - default: 'fixed-height' + default: 'responsive' }, width: { - type: 'number' + type: 'number', + default: 600 }, height: { type: 'number', @@ -62,12 +63,12 @@ export default registerBlockType( edit( { attributes, isSelected, setAttributes } ) { const { autoPlay, dataPid, dataVid, dataBcid, dataBid, layout, height, width } = attributes; const ampLayoutOptions = [ - { value: 'responsive', label: 'Responsive' }, - { value: 'fixed-height', label: 'Fixed height' }, - { value: 'fixed', label: 'Fixed' }, - { value: 'fill', label: 'Fill' }, - { value: 'flex-item', label: 'Flex-item' }, - { value: 'nodisplay', label: 'No Display' } + { value: 'responsive', label: __( 'Responsive' ) }, + { value: 'fixed-height', label: __( 'Fixed height' ) }, + { value: 'fixed', label: __( 'Fixed' ) }, + { value: 'fill', label: __( 'Fill' ) }, + { value: 'flex-item', label: __( 'Flex-item' ) }, + { value: 'nodisplay', label: __( 'No Display' ) } ]; let url = false; @@ -84,20 +85,20 @@ export default registerBlockType( onChange={ value => ( setAttributes( { dataPid: value } ) ) } /> ( setAttributes( { dataBcid: value } ) ) } /> + ( setAttributes( { dataVid: value } ) ) } + /> ( setAttributes( { dataBid: value } ) ) } /> - ( setAttributes( { dataVid: value } ) ) } - /> -

{ __( 'Add data to use the block.' ) }

+

{ __( 'Add required data to use the block.' ) }

) ]; diff --git a/blocks/amp-ooyala-player/index.js b/blocks/amp-ooyala-player/index.js index 6faf283785b..529030784d7 100644 --- a/blocks/amp-ooyala-player/index.js +++ b/blocks/amp-ooyala-player/index.js @@ -60,7 +60,6 @@ export default registerBlockType( edit( { attributes, isSelected, setAttributes } ) { const { dataEmbedCode, dataPlayerId, dataPcode, dataPlayerVersion, layout, height, width } = attributes; const ampLayoutOptions = [ - { value: '', label: __( 'None' ) }, { value: 'responsive', label: __( 'Responsive' ) }, { value: 'fixed', label: __( 'Fixed' ) }, { value: 'fill', label: __( 'Fill' ) }, diff --git a/blocks/amp-reach-player/index.js b/blocks/amp-reach-player/index.js index ad9de65125b..9f8bb90e42c 100644 --- a/blocks/amp-reach-player/index.js +++ b/blocks/amp-reach-player/index.js @@ -37,7 +37,8 @@ export default registerBlockType( default: 'fixed-height' }, width: { - type: 'number' + type: 'number', + default: 600 }, height: { type: 'number', @@ -48,7 +49,6 @@ export default registerBlockType( edit( { attributes, isSelected, setAttributes } ) { const { dataEmbedId, layout, height, width } = attributes; const ampLayoutOptions = [ - { value: '', label: __( 'None' ) }, { value: 'responsive', label: __( 'Responsive' ) }, { value: 'fixed-height', label: __( 'Fixed Height' ) }, { value: 'fixed', label: __( 'Fixed' ) }, diff --git a/blocks/amp-springboard-player/index.js b/blocks/amp-springboard-player/index.js index 3841a67e1d8..114d4617598 100644 --- a/blocks/amp-springboard-player/index.js +++ b/blocks/amp-springboard-player/index.js @@ -65,10 +65,10 @@ export default registerBlockType( edit( { attributes, isSelected, setAttributes } ) { const { dataSiteId, dataPlayerId, dataContentId, dataDomain, dataMode, dataItems, layout, height, width } = attributes; const ampLayoutOptions = [ - { value: 'responsive', label: 'Responsive' }, - { value: 'fixed', label: 'Fixed' }, - { value: 'fill', label: 'Fill' }, - { value: 'flex-item', label: 'Flex-item' } + { value: 'responsive', label: __( 'Responsive' ) }, + { value: 'fixed', label: __( 'Fixed' ) }, + { value: 'fill', label: __( 'Fill' ) }, + { value: 'flex-item', label: __( 'Flex-item' ) } ]; let url = false; From 35a3aeea6583803559d29fa124d95999f6761c5c Mon Sep 17 00:00:00 2001 From: Miina Sikk Date: Tue, 22 May 2018 09:24:09 +0300 Subject: [PATCH 13/18] Fix jshint. --- assets/js/amp-editor-blocks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/amp-editor-blocks.js b/assets/js/amp-editor-blocks.js index 2aa59766ff2..2be3f238ef9 100644 --- a/assets/js/amp-editor-blocks.js +++ b/assets/js/amp-editor-blocks.js @@ -1,7 +1,7 @@ /* exported ampEditorBlocks */ /* eslint no-magic-numbers: [ "error", { "ignore": [ 1, -1, 0 ] } ] */ -var ampEditorBlocks = ( function() { +var ampEditorBlocks = ( function() { // eslint-disable-line no-unused-vars var component, __; __ = wp.i18n.__; From 282046d67feb821d799db853c4ac8e6316263bc4 Mon Sep 17 00:00:00 2001 From: Miina Sikk Date: Tue, 22 May 2018 09:51:32 +0300 Subject: [PATCH 14/18] Adjust conf. --- .babelrc | 3 ++- package-lock.json | 15 --------------- package.json | 2 +- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/.babelrc b/.babelrc index 5782db9d525..81d31b8c6b2 100644 --- a/.babelrc +++ b/.babelrc @@ -19,6 +19,7 @@ "env": { "default": { "plugins": ["transform-runtime"] - } + }, + "production": {} } } diff --git a/package-lock.json b/package-lock.json index 36a36f1c392..21c9a5167ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,12 +4,6 @@ "lockfileVersion": 1, "requires": true, "dependencies": { - "@types/jquery": { - "version": "2.0.49", - "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.49.tgz", - "integrity": "sha512-/9xLnYmohN/vD2gDnLS4cym8TUmrJu7DvZa/LELKzZjdPsvWVJiedsdu2SXNtb/DA7FGimqL2g0IoyhbNKLl8g==", - "dev": true - }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -5814,15 +5808,6 @@ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, - "timeago.js": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/timeago.js/-/timeago.js-3.0.2.tgz", - "integrity": "sha1-MqZ+fA2IfqQspYjTquJvd95edsw=", - "dev": true, - "requires": { - "@types/jquery": "^2.0.40" - } - }, "timers-browserify": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", diff --git a/package.json b/package.json index 03dff9303c1..07950afc820 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ }, "main": "blocks/index.js", "scripts": { - "build": "cross-env BABEL_ENV=default webpack; grunt build", + "build": "cross-env BABEL_ENV=production webpack; grunt build", "deploy": "grunt deploy", "dev": "cross-env BABEL_ENV=default webpack --watch" } From 8a1cc7139b1c0a9696a91e2941c66fe254e66d73 Mon Sep 17 00:00:00 2001 From: Miina Sikk Date: Tue, 22 May 2018 11:16:51 +0300 Subject: [PATCH 15/18] Update string literals to es6 --- blocks/amp-brid-player/index.js | 2 +- blocks/amp-jwplayer/index.js | 4 ++-- blocks/amp-o2-player/index.js | 2 +- blocks/amp-ooyala-player/index.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blocks/amp-brid-player/index.js b/blocks/amp-brid-player/index.js index 9a465696eb5..620c40b2fdd 100644 --- a/blocks/amp-brid-player/index.js +++ b/blocks/amp-brid-player/index.js @@ -74,7 +74,7 @@ export default registerBlockType( ]; let url = false; if ( dataPartner && dataPlayer && ( dataVideo || dataPlaylist || dataOutstream ) ) { - url = 'http://cdn.brid.tv/live/partners/' + dataPartner; + url = `http://cdn.brid.tv/live/partners/${dataPartner}`; } return [ isSelected && ( diff --git a/blocks/amp-jwplayer/index.js b/blocks/amp-jwplayer/index.js index 73b5ab4a937..247047e7957 100644 --- a/blocks/amp-jwplayer/index.js +++ b/blocks/amp-jwplayer/index.js @@ -65,9 +65,9 @@ export default registerBlockType( let url = false; if ( dataPlayerId && ( dataMediaId || dataPlaylistId ) ) { if ( dataPlaylistId ) { - url = 'https://content.jwplatform.com/players/' + dataPlaylistId + '-' + dataPlayerId; + url = `https://content.jwplatform.com/players/${dataPlaylistId}-${dataPlayerId}`; } else { - url = 'https://content.jwplatform.com/players/' + dataMediaId + '-' + dataPlayerId; + url = `https://content.jwplatform.com/players/${dataMediaId}-${dataPlayerId}`; } } return [ diff --git a/blocks/amp-o2-player/index.js b/blocks/amp-o2-player/index.js index ac7e9464a2a..8e717c055e9 100644 --- a/blocks/amp-o2-player/index.js +++ b/blocks/amp-o2-player/index.js @@ -73,7 +73,7 @@ export default registerBlockType( ]; let url = false; if ( dataPid && ( dataBcid || dataVid ) ) { - url = 'https://delivery.vidible.tv/htmlembed/pid=' + dataPid + '/'; + url = `https://delivery.vidible.tv/htmlembed/pid=${dataPid}/`; } return [ isSelected && ( diff --git a/blocks/amp-ooyala-player/index.js b/blocks/amp-ooyala-player/index.js index 529030784d7..4e2501a7a38 100644 --- a/blocks/amp-ooyala-player/index.js +++ b/blocks/amp-ooyala-player/index.js @@ -68,7 +68,7 @@ export default registerBlockType( ]; let url = false; if ( dataEmbedCode && dataPlayerId && dataPcode ) { - url = 'http://cf.c.ooyala.com/' + dataEmbedCode; + url = `http://cf.c.ooyala.com/${dataEmbedCode}`; } return [ isSelected && ( From c3e2b499611a61c6f7d74e54bb78c29a2086d2ce Mon Sep 17 00:00:00 2001 From: Miina Sikk Date: Wed, 23 May 2018 10:18:57 +0300 Subject: [PATCH 16/18] Use wp.editor instead of wp.blocks for InspectorControls. --- blocks/amp-brid-player/index.js | 6 ++---- blocks/amp-ima-video/index.js | 6 ++---- blocks/amp-jwplayer/index.js | 6 ++---- blocks/amp-o2-player/index.js | 6 ++---- blocks/amp-ooyala-player/index.js | 6 ++---- blocks/amp-reach-player/index.js | 6 ++---- blocks/amp-springboard-player/index.js | 6 ++---- 7 files changed, 14 insertions(+), 28 deletions(-) diff --git a/blocks/amp-brid-player/index.js b/blocks/amp-brid-player/index.js index 620c40b2fdd..bfc85202bb2 100644 --- a/blocks/amp-brid-player/index.js +++ b/blocks/amp-brid-player/index.js @@ -2,10 +2,8 @@ * Internal block libraries. */ const { __ } = wp.i18n; -const { - registerBlockType, - InspectorControls -} = wp.blocks; +const { registerBlockType } = wp.blocks; +const { InspectorControls } = wp.editor; const { PanelBody, TextControl, diff --git a/blocks/amp-ima-video/index.js b/blocks/amp-ima-video/index.js index 82bdcf639d1..cc0db54040e 100644 --- a/blocks/amp-ima-video/index.js +++ b/blocks/amp-ima-video/index.js @@ -2,10 +2,8 @@ * Internal block libraries. */ const { __ } = wp.i18n; -const { - registerBlockType, - InspectorControls -} = wp.blocks; +const { registerBlockType } = wp.blocks; +const { InspectorControls } = wp.editor; const { PanelBody, TextControl, diff --git a/blocks/amp-jwplayer/index.js b/blocks/amp-jwplayer/index.js index 247047e7957..08c1acf7b49 100644 --- a/blocks/amp-jwplayer/index.js +++ b/blocks/amp-jwplayer/index.js @@ -2,10 +2,8 @@ * Internal block libraries. */ const { __ } = wp.i18n; -const { - registerBlockType, - InspectorControls -} = wp.blocks; +const { registerBlockType } = wp.blocks; +const { InspectorControls } = wp.editor; const { PanelBody, TextControl, diff --git a/blocks/amp-o2-player/index.js b/blocks/amp-o2-player/index.js index 8e717c055e9..1bb9271de4c 100644 --- a/blocks/amp-o2-player/index.js +++ b/blocks/amp-o2-player/index.js @@ -2,10 +2,8 @@ * Internal block libraries. */ const { __ } = wp.i18n; -const { - registerBlockType, - InspectorControls -} = wp.blocks; +const { registerBlockType } = wp.blocks; +const { InspectorControls } = wp.editor; const { PanelBody, TextControl, diff --git a/blocks/amp-ooyala-player/index.js b/blocks/amp-ooyala-player/index.js index 4e2501a7a38..623a6224ff3 100644 --- a/blocks/amp-ooyala-player/index.js +++ b/blocks/amp-ooyala-player/index.js @@ -2,10 +2,8 @@ * Internal block libraries. */ const { __ } = wp.i18n; -const { - registerBlockType, - InspectorControls -} = wp.blocks; +const { registerBlockType } = wp.blocks; +const { InspectorControls } = wp.editor; const { PanelBody, TextControl, diff --git a/blocks/amp-reach-player/index.js b/blocks/amp-reach-player/index.js index 9f8bb90e42c..c3489c03915 100644 --- a/blocks/amp-reach-player/index.js +++ b/blocks/amp-reach-player/index.js @@ -2,10 +2,8 @@ * Internal block libraries. */ const { __ } = wp.i18n; -const { - registerBlockType, - InspectorControls -} = wp.blocks; +const { registerBlockType } = wp.blocks; +const { InspectorControls } = wp.editor; const { PanelBody, TextControl, diff --git a/blocks/amp-springboard-player/index.js b/blocks/amp-springboard-player/index.js index 114d4617598..f77ae22e88a 100644 --- a/blocks/amp-springboard-player/index.js +++ b/blocks/amp-springboard-player/index.js @@ -2,10 +2,8 @@ * Internal block libraries. */ const { __ } = wp.i18n; -const { - registerBlockType, - InspectorControls -} = wp.blocks; +const { registerBlockType } = wp.blocks; +const { InspectorControls } = wp.editor; const { PanelBody, TextControl, From c2286249ccd210098330804d6eafad81bee05798 Mon Sep 17 00:00:00 2001 From: Miina Sikk Date: Wed, 23 May 2018 21:06:59 +0300 Subject: [PATCH 17/18] Make use of new Fragment element. --- blocks/amp-brid-player/index.js | 144 ++++++++++++----------- blocks/amp-ima-video/index.js | 123 +++++++++++--------- blocks/amp-jwplayer/index.js | 113 +++++++++--------- blocks/amp-mathml/index.js | 4 +- blocks/amp-o2-player/index.js | 133 +++++++++++---------- blocks/amp-ooyala-player/index.js | 131 +++++++++++---------- blocks/amp-reach-player/index.js | 93 ++++++++------- blocks/amp-springboard-player/index.js | 153 +++++++++++++------------ 8 files changed, 479 insertions(+), 415 deletions(-) diff --git a/blocks/amp-brid-player/index.js b/blocks/amp-brid-player/index.js index bfc85202bb2..3853b1c234a 100644 --- a/blocks/amp-brid-player/index.js +++ b/blocks/amp-brid-player/index.js @@ -4,6 +4,7 @@ const { __ } = wp.i18n; const { registerBlockType } = wp.blocks; const { InspectorControls } = wp.editor; +const { Fragment } = wp.element; const { PanelBody, TextControl, @@ -74,73 +75,82 @@ export default registerBlockType( if ( dataPartner && dataPlayer && ( dataVideo || dataPlaylist || dataOutstream ) ) { url = `http://cdn.brid.tv/live/partners/${dataPartner}`; } - return [ - isSelected && ( - - - ( setAttributes( { dataPartner: value } ) ) } - /> - ( setAttributes( { dataPlayer: value } ) ) } - /> - ( setAttributes( { dataVideo: value } ) ) } - /> - ( setAttributes( { dataOutstream: value } ) ) } - /> - ( setAttributes( { dataPlaylist: value } ) ) } - /> - ( setAttributes( { autoPlay: ! autoPlay } ) ) } - /> - ( setAttributes( { layout: value } ) ) } - /> - ( setAttributes( { width: value } ) ) } - /> - ( setAttributes( { height: value } ) ) } - /> - - - ), - url && ( - -

{ url }

-

{ __( 'Previews for this are unavailable in the editor, sorry!' ) }

-
- ), - ! url && ( - -

{ __( 'Add required data to use the block.' ) }

-
- ) - ]; + return ( + + { + isSelected && ( + + + ( setAttributes( { dataPartner: value } ) ) } + /> + ( setAttributes( { dataPlayer: value } ) ) } + /> + ( setAttributes( { dataVideo: value } ) ) } + /> + ( setAttributes( { dataOutstream: value } ) ) } + /> + ( setAttributes( { dataPlaylist: value } ) ) } + /> + ( setAttributes( { autoPlay: ! autoPlay } ) ) } + /> + ( setAttributes( { layout: value } ) ) } + /> + ( setAttributes( { width: value } ) ) } + /> + ( setAttributes( { height: value } ) ) } + /> + + + ) + } + { + url && ( + +

{ url }

+

{ __( 'Previews for this are unavailable in the editor, sorry!' ) }

+
+ ) + + } + { + ! url && ( + +

{ __( 'Add required data to use the block.' ) }

+
+ ) + } +
+ ); }, save( { attributes } ) { diff --git a/blocks/amp-ima-video/index.js b/blocks/amp-ima-video/index.js index cc0db54040e..6065cdc2304 100644 --- a/blocks/amp-ima-video/index.js +++ b/blocks/amp-ima-video/index.js @@ -4,6 +4,7 @@ const { __ } = wp.i18n; const { registerBlockType } = wp.blocks; const { InspectorControls } = wp.editor; +const { Fragment } = wp.element; const { PanelBody, TextControl, @@ -65,63 +66,71 @@ export default registerBlockType( if ( dataTag && dataSrc ) { dataSet = true; } - return [ - isSelected && ( - - - ( setAttributes( { dataTag: value } ) ) } - /> - ( setAttributes( { dataSrc: value } ) ) } - /> - ( setAttributes( { dataPoster: value } ) ) } - /> - ( setAttributes( { dataDelayAdRequest: ! dataDelayAdRequest } ) ) } - /> - ( setAttributes( { layout: value } ) ) } - /> - ( setAttributes( { width: value } ) ) } - /> - ( setAttributes( { height: value } ) ) } - /> - - - ), - dataSet && ( - -

{ dataSrc }

-

{ __( 'Previews for this are unavailable in the editor, sorry!' ) }

-
- ), - ! dataSet && ( - -

{ __( 'Add required data to use the block.' ) }

-
- ) - ]; + return ( + + { + isSelected && ( + + + ( setAttributes( { dataTag: value } ) ) } + /> + ( setAttributes( { dataSrc: value } ) ) } + /> + ( setAttributes( { dataPoster: value } ) ) } + /> + ( setAttributes( { dataDelayAdRequest: ! dataDelayAdRequest } ) ) } + /> + ( setAttributes( { layout: value } ) ) } + /> + ( setAttributes( { width: value } ) ) } + /> + ( setAttributes( { height: value } ) ) } + /> + + + ) + } + { + dataSet && ( + +

{ dataSrc }

+

{ __( 'Previews for this are unavailable in the editor, sorry!' ) }

+
+ ) + } + { + ! dataSet && ( + +

{ __( 'Add required data to use the block.' ) }

+
+ ) + } +
+ ); }, save( { attributes } ) { diff --git a/blocks/amp-jwplayer/index.js b/blocks/amp-jwplayer/index.js index 08c1acf7b49..ea063ba517b 100644 --- a/blocks/amp-jwplayer/index.js +++ b/blocks/amp-jwplayer/index.js @@ -4,6 +4,7 @@ const { __ } = wp.i18n; const { registerBlockType } = wp.blocks; const { InspectorControls } = wp.editor; +const { Fragment } = wp.element; const { PanelBody, TextControl, @@ -68,58 +69,66 @@ export default registerBlockType( url = `https://content.jwplatform.com/players/${dataMediaId}-${dataPlayerId}`; } } - return [ - isSelected && ( - - - ( setAttributes( { dataPlayerId: value } ) ) } - /> - ( setAttributes( { dataMediaId: value } ) ) } - /> - ( setAttributes( { dataPlaylistId: value } ) ) } - /> - ( setAttributes( { layout: value } ) ) } - /> - ( setAttributes( { width: value } ) ) } - /> - ( setAttributes( { height: value } ) ) } - /> - - - ), - url && ( - -

{ url }

-

{ __( 'Previews for this are unavailable in the editor, sorry!' ) }

-
- ), - ! url && ( - -

{ __( 'Add required data to use the block.' ) }

-
- ) - ]; + return ( + + { + isSelected && ( + + + ( setAttributes( { dataPlayerId: value } ) ) } + /> + ( setAttributes( { dataMediaId: value } ) ) } + /> + ( setAttributes( { dataPlaylistId: value } ) ) } + /> + ( setAttributes( { layout: value } ) ) } + /> + ( setAttributes( { width: value } ) ) } + /> + ( setAttributes( { height: value } ) ) } + /> + + + ) + } + { + url && ( + +

{ url }

+

{ __( 'Previews for this are unavailable in the editor, sorry!' ) }

+
+ ) + } + { + ! url && ( + +

{ __( 'Add required data to use the block.' ) }

+
+ ) + } +
+ ); }, save( { attributes } ) { diff --git a/blocks/amp-mathml/index.js b/blocks/amp-mathml/index.js index 6374d3507d7..e8d39ca35c5 100644 --- a/blocks/amp-mathml/index.js +++ b/blocks/amp-mathml/index.js @@ -33,14 +33,14 @@ export default registerBlockType( edit( { attributes, setAttributes } ) { const { dataFormula } = attributes; - return [ + return ( setAttributes( { dataFormula: value } ) } /> - ]; + ); }, save( { attributes } ) { diff --git a/blocks/amp-o2-player/index.js b/blocks/amp-o2-player/index.js index 1bb9271de4c..82c21391adf 100644 --- a/blocks/amp-o2-player/index.js +++ b/blocks/amp-o2-player/index.js @@ -4,6 +4,7 @@ const { __ } = wp.i18n; const { registerBlockType } = wp.blocks; const { InspectorControls } = wp.editor; +const { Fragment } = wp.element; const { PanelBody, TextControl, @@ -73,68 +74,76 @@ export default registerBlockType( if ( dataPid && ( dataBcid || dataVid ) ) { url = `https://delivery.vidible.tv/htmlembed/pid=${dataPid}/`; } - return [ - isSelected && ( - <InspectorControls key='inspector'> - <PanelBody title={ __( 'O2 Player Settings' ) }> - <TextControl - label={ __( 'Player ID (required)' ) } - value={ dataPid } - onChange={ value => ( setAttributes( { dataPid: value } ) ) } - /> - <TextControl - label={ __( 'Buyer Company ID (either buyer or video ID is required)' ) } - value={ dataBcid } - onChange={ value => ( setAttributes( { dataBcid: value } ) ) } - /> - <TextControl - label={ __( 'Video ID (either buyer or video ID is required)' ) } - value={ dataVid } - onChange={ value => ( setAttributes( { dataVid: value } ) ) } - /> - <TextControl - label={ __( 'Playlist ID' ) } - value={ dataBid } - onChange={ value => ( setAttributes( { dataBid: value } ) ) } - /> - <ToggleControl - label={ __( 'Autoplay' ) } - checked={ autoPlay } - onChange={ () => ( setAttributes( { autoPlay: ! autoPlay } ) ) } - /> - <SelectControl - label={ __( 'Layout' ) } - value={ layout } - options={ ampLayoutOptions } - onChange={ value => ( setAttributes( { layout: value } ) ) } - /> - <TextControl - type="number" - label={ __( 'Width (px)' ) } - value={ width !== undefined ? width : '' } - onChange={ value => ( setAttributes( { width: value } ) ) } - /> - <TextControl - type="number" - label={ __( 'Height (px)' ) } - value={ height } - onChange={ value => ( setAttributes( { height: value } ) ) } - /> - </PanelBody> - </InspectorControls> - ), - url && ( - <Placeholder label={ __( 'O2 Player' ) }> - <p className="components-placeholder__error">{ url }</p> - <p className="components-placeholder__error">{ __( 'Previews for this are unavailable in the editor, sorry!' ) }</p> - </Placeholder> - ), - ! url && ( - <Placeholder label={ __( 'O2 Player' ) }> - <p>{ __( 'Add required data to use the block.' ) }</p> - </Placeholder> - ) - ]; + return ( + <Fragment> + { + isSelected && ( + <InspectorControls key='inspector'> + <PanelBody title={ __( 'O2 Player Settings' ) }> + <TextControl + label={ __( 'Player ID (required)' ) } + value={ dataPid } + onChange={ value => ( setAttributes( { dataPid: value } ) ) } + /> + <TextControl + label={ __( 'Buyer Company ID (either buyer or video ID is required)' ) } + value={ dataBcid } + onChange={ value => ( setAttributes( { dataBcid: value } ) ) } + /> + <TextControl + label={ __( 'Video ID (either buyer or video ID is required)' ) } + value={ dataVid } + onChange={ value => ( setAttributes( { dataVid: value } ) ) } + /> + <TextControl + label={ __( 'Playlist ID' ) } + value={ dataBid } + onChange={ value => ( setAttributes( { dataBid: value } ) ) } + /> + <ToggleControl + label={ __( 'Autoplay' ) } + checked={ autoPlay } + onChange={ () => ( setAttributes( { autoPlay: ! autoPlay } ) ) } + /> + <SelectControl + label={ __( 'Layout' ) } + value={ layout } + options={ ampLayoutOptions } + onChange={ value => ( setAttributes( { layout: value } ) ) } + /> + <TextControl + type="number" + label={ __( 'Width (px)' ) } + value={ width !== undefined ? width : '' } + onChange={ value => ( setAttributes( { width: value } ) ) } + /> + <TextControl + type="number" + label={ __( 'Height (px)' ) } + value={ height } + onChange={ value => ( setAttributes( { height: value } ) ) } + /> + </PanelBody> + </InspectorControls> + ) + } + { + url && ( + <Placeholder label={ __( 'O2 Player' ) }> + <p className="components-placeholder__error">{ url }</p> + <p className="components-placeholder__error">{ __( 'Previews for this are unavailable in the editor, sorry!' ) }</p> + </Placeholder> + ) + } + { + ! url && ( + <Placeholder label={ __( 'O2 Player' ) }> + <p>{ __( 'Add required data to use the block.' ) }</p> + </Placeholder> + ) + } + </Fragment> + ); }, save( { attributes } ) { diff --git a/blocks/amp-ooyala-player/index.js b/blocks/amp-ooyala-player/index.js index 623a6224ff3..d261b2bc5c9 100644 --- a/blocks/amp-ooyala-player/index.js +++ b/blocks/amp-ooyala-player/index.js @@ -4,6 +4,7 @@ const { __ } = wp.i18n; const { registerBlockType } = wp.blocks; const { InspectorControls } = wp.editor; +const { Fragment } = wp.element; const { PanelBody, TextControl, @@ -68,67 +69,75 @@ export default registerBlockType( if ( dataEmbedCode && dataPlayerId && dataPcode ) { url = `http://cf.c.ooyala.com/${dataEmbedCode}`; } - return [ - isSelected && ( - <InspectorControls key='inspector'> - <PanelBody title={ __( 'Ooyala settings' ) }> - <TextControl - label={ __( 'Video embed code (required)' ) } - value={ dataEmbedCode } - onChange={ value => ( setAttributes( { dataEmbedCode: value } ) ) } - /> - <TextControl - label={ __( 'Player ID (required)' ) } - value={ dataPlayerId } - onChange={ value => ( setAttributes( { dataPlayerId: value } ) ) } - /> - <TextControl - label={ __( 'Provider code for the account (required)' ) } - value={ dataPcode } - onChange={ value => ( setAttributes( { dataPcode: value } ) ) } - /> - <SelectControl - label={ __( 'Player version' ) } - value={ dataPlayerVersion } - options={ [ - { value: 'v3', label: __( 'V3' ) }, - { value: 'v4', label: __( 'V4' ) } - ] } - onChange={ value => ( setAttributes( { dataPlayerVersion: value } ) ) } - /> - <SelectControl - label={ __( 'Layout' ) } - value={ layout } - options={ ampLayoutOptions } - onChange={ value => ( setAttributes( { layout: value } ) ) } - /> - <TextControl - type="number" - label={ __( 'Width (px)' ) } - value={ width !== undefined ? width : '' } - onChange={ value => ( setAttributes( { width: value } ) ) } - /> - <TextControl - type="number" - label={ __( 'Height (px)' ) } - value={ height } - onChange={ value => ( setAttributes( { height: value } ) ) } - /> - </PanelBody> - </InspectorControls> - ), - url && ( - <Placeholder label={ __( 'Ooyala Player' ) }> - <p className="components-placeholder__error">{ url }</p> - <p className="components-placeholder__error">{ __( 'Previews for this are unavailable in the editor, sorry!' ) }</p> - </Placeholder> - ), - ! url && ( - <Placeholder label={ __( 'Ooyala Player' ) }> - <p>{ __( 'Add required data to use the block.' ) }</p> - </Placeholder> - ) - ]; + return ( + <Fragment> + { + isSelected && ( + <InspectorControls key='inspector'> + <PanelBody title={ __( 'Ooyala settings' ) }> + <TextControl + label={ __( 'Video embed code (required)' ) } + value={ dataEmbedCode } + onChange={ value => ( setAttributes( { dataEmbedCode: value } ) ) } + /> + <TextControl + label={ __( 'Player ID (required)' ) } + value={ dataPlayerId } + onChange={ value => ( setAttributes( { dataPlayerId: value } ) ) } + /> + <TextControl + label={ __( 'Provider code for the account (required)' ) } + value={ dataPcode } + onChange={ value => ( setAttributes( { dataPcode: value } ) ) } + /> + <SelectControl + label={ __( 'Player version' ) } + value={ dataPlayerVersion } + options={ [ + { value: 'v3', label: __( 'V3' ) }, + { value: 'v4', label: __( 'V4' ) } + ] } + onChange={ value => ( setAttributes( { dataPlayerVersion: value } ) ) } + /> + <SelectControl + label={ __( 'Layout' ) } + value={ layout } + options={ ampLayoutOptions } + onChange={ value => ( setAttributes( { layout: value } ) ) } + /> + <TextControl + type="number" + label={ __( 'Width (px)' ) } + value={ width !== undefined ? width : '' } + onChange={ value => ( setAttributes( { width: value } ) ) } + /> + <TextControl + type="number" + label={ __( 'Height (px)' ) } + value={ height } + onChange={ value => ( setAttributes( { height: value } ) ) } + /> + </PanelBody> + </InspectorControls> + ) + } + { + url && ( + <Placeholder label={ __( 'Ooyala Player' ) }> + <p className="components-placeholder__error">{ url }</p> + <p className="components-placeholder__error">{ __( 'Previews for this are unavailable in the editor, sorry!' ) }</p> + </Placeholder> + ) + } + { + ! url && ( + <Placeholder label={ __( 'Ooyala Player' ) }> + <p>{ __( 'Add required data to use the block.' ) }</p> + </Placeholder> + ) + } + </Fragment> + ); }, save( { attributes } ) { diff --git a/blocks/amp-reach-player/index.js b/blocks/amp-reach-player/index.js index c3489c03915..0c143be49e0 100644 --- a/blocks/amp-reach-player/index.js +++ b/blocks/amp-reach-player/index.js @@ -4,6 +4,7 @@ const { __ } = wp.i18n; const { registerBlockType } = wp.blocks; const { InspectorControls } = wp.editor; +const { Fragment } = wp.element; const { PanelBody, TextControl, @@ -58,48 +59,56 @@ export default registerBlockType( if ( dataEmbedId ) { url = 'https://media-cdn.beachfrontreach.com/acct_1/video/'; } - return [ - isSelected && ( - <InspectorControls key='inspector'> - <PanelBody title={ __( 'Reach settings' ) }> - <TextControl - label={ __( 'The Reach player embed id (required)' ) } - value={ dataEmbedId } - onChange={ value => ( setAttributes( { dataEmbedId: value } ) ) } - /> - <SelectControl - label={ __( 'Layout' ) } - value={ layout } - options={ ampLayoutOptions } - onChange={ value => ( setAttributes( { layout: value } ) ) } - /> - <TextControl - type="number" - label={ __( 'Width (px)' ) } - value={ width !== undefined ? width : '' } - onChange={ value => ( setAttributes( { width: value } ) ) } - /> - <TextControl - type="number" - label={ __( 'Height (px)' ) } - value={ height } - onChange={ value => ( setAttributes( { height: value } ) ) } - /> - </PanelBody> - </InspectorControls> - ), - url && ( - <Placeholder label={ __( 'Reach Player' ) }> - <p className="components-placeholder__error">{ url }</p> - <p className="components-placeholder__error">{ __( 'Previews for this are unavailable in the editor, sorry!' ) }</p> - </Placeholder> - ), - ! url && ( - <Placeholder label={ __( 'Reach Player' ) }> - <p>{ __( 'Add Reach player embed ID to use the block.' ) }</p> - </Placeholder> - ) - ]; + return ( + <Fragment> + { + isSelected && ( + <InspectorControls key='inspector'> + <PanelBody title={ __( 'Reach settings' ) }> + <TextControl + label={ __( 'The Reach player embed id (required)' ) } + value={ dataEmbedId } + onChange={ value => ( setAttributes( { dataEmbedId: value } ) ) } + /> + <SelectControl + label={ __( 'Layout' ) } + value={ layout } + options={ ampLayoutOptions } + onChange={ value => ( setAttributes( { layout: value } ) ) } + /> + <TextControl + type="number" + label={ __( 'Width (px)' ) } + value={ width !== undefined ? width : '' } + onChange={ value => ( setAttributes( { width: value } ) ) } + /> + <TextControl + type="number" + label={ __( 'Height (px)' ) } + value={ height } + onChange={ value => ( setAttributes( { height: value } ) ) } + /> + </PanelBody> + </InspectorControls> + ) + } + { + url && ( + <Placeholder label={ __( 'Reach Player' ) }> + <p className="components-placeholder__error">{ url }</p> + <p className="components-placeholder__error">{ __( 'Previews for this are unavailable in the editor, sorry!' ) }</p> + </Placeholder> + ) + } + { + ! url && ( + <Placeholder label={ __( 'Reach Player' ) }> + <p>{ __( 'Add Reach player embed ID to use the block.' ) }</p> + </Placeholder> + ) + } + </Fragment> + ); }, save( { attributes } ) { diff --git a/blocks/amp-springboard-player/index.js b/blocks/amp-springboard-player/index.js index f77ae22e88a..4a32ce35cf4 100644 --- a/blocks/amp-springboard-player/index.js +++ b/blocks/amp-springboard-player/index.js @@ -4,6 +4,7 @@ const { __ } = wp.i18n; const { registerBlockType } = wp.blocks; const { InspectorControls } = wp.editor; +const { Fragment } = wp.element; const { PanelBody, TextControl, @@ -73,78 +74,86 @@ export default registerBlockType( if ( dataSiteId && dataContentId && dataDomain && dataMode && dataItems ) { url = 'https://cms.springboardplatform.com/embed_iframe/'; } - return [ - isSelected && ( - <InspectorControls key='inspector'> - <PanelBody title={ __( 'Springboard Player Settings' ) }> - <TextControl - label={ __( 'SprintBoard site ID (required)' ) } - value={ dataSiteId } - onChange={ value => ( setAttributes( { dataSiteId: value } ) ) } - /> - <TextControl - label={ __( 'Player content ID (required)' ) } - value={ dataContentId } - onChange={ value => ( setAttributes( { dataContentId: value } ) ) } - /> - <TextControl - label={ __( 'Player ID' ) } - value={ dataPlayerId } - onChange={ value => ( setAttributes( { dataPlayerId: value } ) ) } - /> - <TextControl - label={ __( 'Springboard partner domain' ) } - value={ dataDomain } - onChange={ value => ( setAttributes( { dataDomain: value } ) ) } - /> - <SelectControl - label={ __( 'Mode (required)' ) } - value={ dataMode } - options={ [ - { value: 'video', label: __( 'Video' ) }, - { value: 'playlist', label: __( 'Playlist' ) } - ] } - onChange={ value => ( setAttributes( { dataMode: value } ) ) } - /> - <TextControl - type="number" - label={ __( 'Number of video is playlist (required)' ) } - value={ dataItems } - onChange={ value => ( setAttributes( { dataItems: value } ) ) } - /> - <SelectControl - label={ __( 'Layout' ) } - value={ layout } - options={ ampLayoutOptions } - onChange={ value => ( setAttributes( { layout: value } ) ) } - /> - <TextControl - type="number" - label={ __( 'Width (px)' ) } - value={ width !== undefined ? width : '' } - onChange={ value => ( setAttributes( { width: value } ) ) } - /> - <TextControl - type="number" - label={ __( 'Height (px)' ) } - value={ height } - onChange={ value => ( setAttributes( { height: value } ) ) } - /> - </PanelBody> - </InspectorControls> - ), - url && ( - <Placeholder label={ __( 'Springboard Player' ) }> - <p className="components-placeholder__error">{ url }</p> - <p className="components-placeholder__error">{ __( 'Previews for this are unavailable in the editor, sorry!' ) }</p> - </Placeholder> - ), - ! url && ( - <Placeholder label={ __( 'Springboard Player' ) }> - <p>{ __( 'Add required data to use the block.' ) }</p> - </Placeholder> - ) - ]; + return ( + <Fragment> + { + isSelected && ( + <InspectorControls key='inspector'> + <PanelBody title={ __( 'Springboard Player Settings' ) }> + <TextControl + label={ __( 'SprintBoard site ID (required)' ) } + value={ dataSiteId } + onChange={ value => ( setAttributes( { dataSiteId: value } ) ) } + /> + <TextControl + label={ __( 'Player content ID (required)' ) } + value={ dataContentId } + onChange={ value => ( setAttributes( { dataContentId: value } ) ) } + /> + <TextControl + label={ __( 'Player ID' ) } + value={ dataPlayerId } + onChange={ value => ( setAttributes( { dataPlayerId: value } ) ) } + /> + <TextControl + label={ __( 'Springboard partner domain' ) } + value={ dataDomain } + onChange={ value => ( setAttributes( { dataDomain: value } ) ) } + /> + <SelectControl + label={ __( 'Mode (required)' ) } + value={ dataMode } + options={ [ + { value: 'video', label: __( 'Video' ) }, + { value: 'playlist', label: __( 'Playlist' ) } + ] } + onChange={ value => ( setAttributes( { dataMode: value } ) ) } + /> + <TextControl + type="number" + label={ __( 'Number of video is playlist (required)' ) } + value={ dataItems } + onChange={ value => ( setAttributes( { dataItems: value } ) ) } + /> + <SelectControl + label={ __( 'Layout' ) } + value={ layout } + options={ ampLayoutOptions } + onChange={ value => ( setAttributes( { layout: value } ) ) } + /> + <TextControl + type="number" + label={ __( 'Width (px)' ) } + value={ width !== undefined ? width : '' } + onChange={ value => ( setAttributes( { width: value } ) ) } + /> + <TextControl + type="number" + label={ __( 'Height (px)' ) } + value={ height } + onChange={ value => ( setAttributes( { height: value } ) ) } + /> + </PanelBody> + </InspectorControls> + ) + } + { + url && ( + <Placeholder label={ __( 'Springboard Player' ) }> + <p className="components-placeholder__error">{ url }</p> + <p className="components-placeholder__error">{ __( 'Previews for this are unavailable in the editor, sorry!' ) }</p> + </Placeholder> + ) + } + { + ! url && ( + <Placeholder label={ __( 'Springboard Player' ) }> + <p>{ __( 'Add required data to use the block.' ) }</p> + </Placeholder> + ) + } + </Fragment> + ); }, save( { attributes } ) { From f9bbe30683824b1dcaa3543e34e29f5a31aaaf7b Mon Sep 17 00:00:00 2001 From: Weston Ruter <weston@xwp.co> Date: Wed, 23 May 2018 14:39:06 -0700 Subject: [PATCH 18/18] Ensure that AMP HTML is not removed via Kses when unfiltered_html absent --- includes/admin/class-amp-editor-blocks.php | 56 ++++++++++++++++++++-- 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/includes/admin/class-amp-editor-blocks.php b/includes/admin/class-amp-editor-blocks.php index 857de04fe66..b847e2362fd 100644 --- a/includes/admin/class-amp-editor-blocks.php +++ b/includes/admin/class-amp-editor-blocks.php @@ -17,21 +17,69 @@ class AMP_Editor_Blocks { public function init() { if ( function_exists( 'gutenberg_init' ) ) { add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_block_editor_assets' ) ); - add_filter( 'wp_kses_allowed_html', array( $this, 'whitelist_block_atts_in_wp_kses_allowed_html' ), 10 ); + add_filter( 'wp_kses_allowed_html', array( $this, 'whitelist_block_atts_in_wp_kses_allowed_html' ), 10, 2 ); } } /** - * Whitelist used data-amp-* attributes. + * Whitelist elements and attributes used for AMP. * - * @param array $tags Array of allowed post tags. + * This prevents AMP markup from being deleted in + * + * @param array $tags Array of allowed post tags. + * @param string $context Context. * @return mixed Modified array. */ - public function whitelist_block_atts_in_wp_kses_allowed_html( $tags ) { + public function whitelist_block_atts_in_wp_kses_allowed_html( $tags, $context ) { + if ( 'post' !== $context ) { + return $tags; + } + foreach ( $tags as &$tag ) { $tag['data-amp-layout'] = true; $tag['data-amp-noloading'] = true; } + + $amp_blocks = array( + 'amp-mathml', + 'amp-o2-player', + 'amp-ooyala-player', + 'amp-reach-player', + 'amp-springboard-player', + 'amp-jwplayer', + 'amp-brid-player', + 'amp-ima-video', + ); + + foreach ( $amp_blocks as $amp_block ) { + if ( ! isset( $tags[ $amp_block ] ) ) { + $tags[ $amp_block ] = array(); + } + + $tags[ $amp_block ] = array_merge( + array_fill_keys( + array( + 'layout', + 'width', + 'height', + ), + true + ), + $tags[ $amp_block ] + ); + + $amp_tag_specs = AMP_Allowed_Tags_Generated::get_allowed_tag( $amp_block ); + foreach ( $amp_tag_specs as $amp_tag_spec ) { + if ( ! isset( $amp_tag_spec[ AMP_Rule_Spec::ATTR_SPEC_LIST ] ) ) { + continue; + } + $tags[ $amp_block ] = array_merge( + $tags[ $amp_block ], + array_fill_keys( array_keys( $amp_tag_spec[ AMP_Rule_Spec::ATTR_SPEC_LIST ] ), true ) + ); + } + } + return $tags; }