PluginProbe
Slideshow SE / 2.5
Slideshow SE v2.5
2.7.2 2.7.1 trunk 2.5 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.18 2.5.19 2.5.2 2.5.20 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6.0 All 26 releases
slideshow-se / block / index.js

index.js in Slideshow SE 2.5, at block/index.js

396 lines 14.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (window["webpackJsonp"] = window["webpackJsonp"] || []).push([["style-index"],{
2
3 /***/ "./src/style.scss":
4 /*!************************!*\
5 !*** ./src/style.scss ***!
6 \************************/
7 /*! no static exports found */
8 /***/ (function(module, exports, __webpack_require__) {
9
10 // extracted by mini-css-extract-plugin
11
12 /***/ })
13
14 }]);
15
16 /******/ (function(modules) { // webpackBootstrap
17 /******/ // install a JSONP callback for chunk loading
18 /******/ function webpackJsonpCallback(data) {
19 /******/ var chunkIds = data[0];
20 /******/ var moreModules = data[1];
21 /******/ var executeModules = data[2];
22 /******/
23 /******/ // add "moreModules" to the modules object,
24 /******/ // then flag all "chunkIds" as loaded and fire callback
25 /******/ var moduleId, chunkId, i = 0, resolves = [];
26 /******/ for(;i < chunkIds.length; i++) {
27 /******/ chunkId = chunkIds[i];
28 /******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
29 /******/ resolves.push(installedChunks[chunkId][0]);
30 /******/ }
31 /******/ installedChunks[chunkId] = 0;
32 /******/ }
33 /******/ for(moduleId in moreModules) {
34 /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
35 /******/ modules[moduleId] = moreModules[moduleId];
36 /******/ }
37 /******/ }
38 /******/ if(parentJsonpFunction) parentJsonpFunction(data);
39 /******/
40 /******/ while(resolves.length) {
41 /******/ resolves.shift()();
42 /******/ }
43 /******/
44 /******/ // add entry modules from loaded chunk to deferred list
45 /******/ deferredModules.push.apply(deferredModules, executeModules || []);
46 /******/
47 /******/ // run deferred modules when all chunks ready
48 /******/ return checkDeferredModules();
49 /******/ };
50 /******/ function checkDeferredModules() {
51 /******/ var result;
52 /******/ for(var i = 0; i < deferredModules.length; i++) {
53 /******/ var deferredModule = deferredModules[i];
54 /******/ var fulfilled = true;
55 /******/ for(var j = 1; j < deferredModule.length; j++) {
56 /******/ var depId = deferredModule[j];
57 /******/ if(installedChunks[depId] !== 0) fulfilled = false;
58 /******/ }
59 /******/ if(fulfilled) {
60 /******/ deferredModules.splice(i--, 1);
61 /******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
62 /******/ }
63 /******/ }
64 /******/
65 /******/ return result;
66 /******/ }
67 /******/
68 /******/ // The module cache
69 /******/ var installedModules = {};
70 /******/
71 /******/ // object to store loaded and loading chunks
72 /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
73 /******/ // Promise = chunk loading, 0 = chunk loaded
74 /******/ var installedChunks = {
75 /******/ "index": 0
76 /******/ };
77 /******/
78 /******/ var deferredModules = [];
79 /******/
80 /******/ // The require function
81 /******/ function __webpack_require__(moduleId) {
82 /******/
83 /******/ // Check if module is in cache
84 /******/ if(installedModules[moduleId]) {
85 /******/ return installedModules[moduleId].exports;
86 /******/ }
87 /******/ // Create a new module (and put it into the cache)
88 /******/ var module = installedModules[moduleId] = {
89 /******/ i: moduleId,
90 /******/ l: false,
91 /******/ exports: {}
92 /******/ };
93 /******/
94 /******/ // Execute the module function
95 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
96 /******/
97 /******/ // Flag the module as loaded
98 /******/ module.l = true;
99 /******/
100 /******/ // Return the exports of the module
101 /******/ return module.exports;
102 /******/ }
103 /******/
104 /******/
105 /******/ // expose the modules object (__webpack_modules__)
106 /******/ __webpack_require__.m = modules;
107 /******/
108 /******/ // expose the module cache
109 /******/ __webpack_require__.c = installedModules;
110 /******/
111 /******/ // define getter function for harmony exports
112 /******/ __webpack_require__.d = function(exports, name, getter) {
113 /******/ if(!__webpack_require__.o(exports, name)) {
114 /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
115 /******/ }
116 /******/ };
117 /******/
118 /******/ // define __esModule on exports
119 /******/ __webpack_require__.r = function(exports) {
120 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
121 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
122 /******/ }
123 /******/ Object.defineProperty(exports, '__esModule', { value: true });
124 /******/ };
125 /******/
126 /******/ // create a fake namespace object
127 /******/ // mode & 1: value is a module id, require it
128 /******/ // mode & 2: merge all properties of value into the ns
129 /******/ // mode & 4: return value when already ns object
130 /******/ // mode & 8|1: behave like require
131 /******/ __webpack_require__.t = function(value, mode) {
132 /******/ if(mode & 1) value = __webpack_require__(value);
133 /******/ if(mode & 8) return value;
134 /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
135 /******/ var ns = Object.create(null);
136 /******/ __webpack_require__.r(ns);
137 /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
138 /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
139 /******/ return ns;
140 /******/ };
141 /******/
142 /******/ // getDefaultExport function for compatibility with non-harmony modules
143 /******/ __webpack_require__.n = function(module) {
144 /******/ var getter = module && module.__esModule ?
145 /******/ function getDefault() { return module['default']; } :
146 /******/ function getModuleExports() { return module; };
147 /******/ __webpack_require__.d(getter, 'a', getter);
148 /******/ return getter;
149 /******/ };
150 /******/
151 /******/ // Object.prototype.hasOwnProperty.call
152 /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
153 /******/
154 /******/ // __webpack_public_path__
155 /******/ __webpack_require__.p = "";
156 /******/
157 /******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
158 /******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
159 /******/ jsonpArray.push = webpackJsonpCallback;
160 /******/ jsonpArray = jsonpArray.slice();
161 /******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
162 /******/ var parentJsonpFunction = oldJsonpFunction;
163 /******/
164 /******/
165 /******/ // add entry module to deferred list
166 /******/ deferredModules.push(["./src/index.js","style-index"]);
167 /******/ // run deferred modules when ready
168 /******/ return checkDeferredModules();
169 /******/ })
170 /************************************************************************/
171 /******/ ({
172
173 /***/ "./src/edit.js":
174 /*!*********************!*\
175 !*** ./src/edit.js ***!
176 \*********************/
177 /*! exports provided: default */
178 /***/ (function(module, __webpack_exports__, __webpack_require__) {
179
180 "use strict";
181 __webpack_require__.r(__webpack_exports__);
182 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Edit; });
183 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
184 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
185 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
186 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
187 /* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/editor.scss");
188 /* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_editor_scss__WEBPACK_IMPORTED_MODULE_2__);
189
190
191 /**
192 * Retrieves the translation of text.
193 *
194 * @see https://developer.wordpress.org/block-editor/packages/packages-i18n/
195 */
196
197 /**
198 * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
199 * Those files can contain any CSS code that gets applied to the editor.
200 *
201 * @see https://www.npmjs.com/package/@wordpress/scripts#using-css
202 */
203
204
205 /**
206 * The edit function describes the structure of your block in the context of the
207 * editor. This represents what the editor will render when the block is used.
208 *
209 * @see https://developer.wordpress.org/block-editor/developers/block-api/block-edit-save/#edit
210 *
211 * @param {Object} [props] Properties passed from the editor.
212 * @param {string} [props.className] Class name generated for the block.
213 *
214 * @return {WPElement} Element to render.
215 */
216
217 function Edit(_ref) {
218 var attributes = _ref.attributes,
219 setAttributes = _ref.setAttributes,
220 className = _ref.className,
221 isSelected = _ref.isSelected;
222
223 // Creates a <p class='wp-block-cgb-block-f1reslider'></p>.
224 function updateSlideshow(ev) {
225 setAttributes({
226 selectedSlideshow: ev.target.value
227 });
228 }
229
230 return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("label", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Slideshow', 'slideshow-se'), ":"), " ", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("select", {
231 onChange: updateSlideshow,
232 value: attributes.selectedSlideshow
233 }, Object.values(globals.slideshows).map(function (slideshow) {
234 return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("option", {
235 value: slideshow.ID,
236 key: slideshow.ID
237 }, slideshow.post_title);
238 })));
239 }
240
241 /***/ }),
242
243 /***/ "./src/editor.scss":
244 /*!*************************!*\
245 !*** ./src/editor.scss ***!
246 \*************************/
247 /*! no static exports found */
248 /***/ (function(module, exports, __webpack_require__) {
249
250 // extracted by mini-css-extract-plugin
251
252 /***/ }),
253
254 /***/ "./src/index.js":
255 /*!**********************!*\
256 !*** ./src/index.js ***!
257 \**********************/
258 /*! no exports provided */
259 /***/ (function(module, __webpack_exports__, __webpack_require__) {
260
261 "use strict";
262 __webpack_require__.r(__webpack_exports__);
263 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
264 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
265 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
266 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
267 /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./style.scss */ "./src/style.scss");
268 /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_2__);
269 /* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/edit.js");
270 /**
271 * Registers a new block provided a unique name and an object defining its behavior.
272 *
273 * @see https://developer.wordpress.org/block-editor/developers/block-api/#registering-a-block
274 */
275
276 /**
277 * Retrieves the translation of text.
278 *
279 * @see https://developer.wordpress.org/block-editor/packages/packages-i18n/
280 */
281
282
283 /**
284 * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
285 * All files containing `style` keyword are bundled together. The code used
286 * gets applied both to the front of your site and to the editor.
287 *
288 * @see https://www.npmjs.com/package/@wordpress/scripts#using-css
289 */
290
291
292 /**
293 * Internal dependencies
294 */
295
296
297 /**
298 * Every block starts by registering a new block type definition.
299 *
300 * @see https://developer.wordpress.org/block-editor/developers/block-api/#registering-a-block
301 */
302
303 Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__["registerBlockType"])('f1rehead/slideshow', {
304 /**
305 * This is the display title for your block, which can be translated with `i18n` functions.
306 * The block inserter will show this name.
307 */
308 title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Slideshow', 'f1rehead'),
309
310 /**
311 * This is a short description for your block, can be translated with `i18n` functions.
312 * It will be shown in the Block Tab in the Settings Sidebar.
313 */
314 description: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('A slideshow block', 'f1rehead'),
315
316 /**
317 * Blocks are grouped into categories to help users browse and discover them.
318 * The categories provided by core are `common`, `embed`, `formatting`, `layout` and `widgets`.
319 */
320 category: 'common',
321
322 /**
323 * An icon property should be specified to make it easier to identify a block.
324 * These can be any of WordPress’ Dashicons, or a custom svg element.
325 */
326 icon: 'format-gallery',
327
328 /**
329 * Optional block extended support features.
330 */
331 supports: {
332 // Removes support for an HTML mode.
333 html: false
334 },
335 keywords: [Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('slideshow carousel'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('image photo photograph'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('video youtibe vimeo')],
336 attributes: {
337 selectedSlideshow: {
338 type: 'string'
339 }
340 },
341
342 /**
343 * @see ./edit.js
344 */
345 edit: _edit__WEBPACK_IMPORTED_MODULE_3__["default"],
346
347 /**
348 * The "save" property must be specified and must be a valid function. This is a dynamic block,
349 * so return null.
350 *
351 * @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
352 *
353 * @return {null}
354 */
355 save: function save() {
356 return null;
357 }
358 });
359
360 /***/ }),
361
362 /***/ "@wordpress/blocks":
363 /*!*****************************************!*\
364 !*** external {"this":["wp","blocks"]} ***!
365 \*****************************************/
366 /*! no static exports found */
367 /***/ (function(module, exports) {
368
369 (function() { module.exports = this["wp"]["blocks"]; }());
370
371 /***/ }),
372
373 /***/ "@wordpress/element":
374 /*!******************************************!*\
375 !*** external {"this":["wp","element"]} ***!
376 \******************************************/
377 /*! no static exports found */
378 /***/ (function(module, exports) {
379
380 (function() { module.exports = this["wp"]["element"]; }());
381
382 /***/ }),
383
384 /***/ "@wordpress/i18n":
385 /*!***************************************!*\
386 !*** external {"this":["wp","i18n"]} ***!
387 \***************************************/
388 /*! no static exports found */
389 /***/ (function(module, exports) {
390
391 (function() { module.exports = this["wp"]["i18n"]; }());
392
393 /***/ })
394
395 /******/ });
396 //# sourceMappingURL=index.js.map