PluginProbe
Depicter — Popup & Slider Builder / 1.3.2
Depicter — Popup & Slider Builder v1.3.2
4.8.1 trunk 1.0.0 1.1.0 1.1.2 1.1.4 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.5 1.3.8 1.5.0 1.5.1 1.5.2 1.5.5 1.6.0 1.6.1 1.6.2 1.7.0 All 76 releases
depicter / app / src / Modules / Gutenberg / build / index.js

index.js in Depicter — Popup & Slider Builder 1.3.2, at app/src/Modules/Gutenberg/build/index.js

449 lines 18.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /******/ (function() { // webpackBootstrap
2 /******/ "use strict";
3 /******/ var __webpack_modules__ = ({
4
5 /***/ "./src/light-logo.svg":
6 /*!****************************!*\
7 !*** ./src/light-logo.svg ***!
8 \****************************/
9 /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
10
11 __webpack_require__.r(__webpack_exports__);
12 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13 /* harmony export */ "ReactComponent": function() { return /* binding */ SvgLightLogo; }
14 /* harmony export */ });
15 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
16 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
17 function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
18
19
20
21 var SvgLightLogo = function SvgLightLogo(props) {
22 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
23 xmlns: "http://www.w3.org/2000/svg",
24 viewBox: "0 0 350 350",
25 xmlSpace: "preserve"
26 }, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
27 d: "m239.5 547.7 114.2-114.2 144.8 144.8-145.4 145.2-113.6-113.6c-17.2-17.2-17.2-45 0-62.2z",
28 style: {
29 fill: "#265fff"
30 },
31 transform: "translate(-165 -386.994)"
32 }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
33 d: "m207.2 477 43.5-43.5 144.8 144.8-145.4 145.2-42.9-42.9c-56.3-56.2-56.3-147.4 0-203.6z",
34 style: {
35 fill: "#ffd300"
36 },
37 transform: "translate(-165 -386.994)"
38 }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
39 d: "M267.8 638.2c-32.8-32.8-32.8-86 0-118.8l34.4-34.4 93.3 93.3-93.9 93.7-33.8-33.8z",
40 style: {
41 fill: "#ffe980"
42 },
43 transform: "translate(-165 -386.994)"
44 }));
45 };
46
47
48 /* harmony default export */ __webpack_exports__["default"] = ("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyNS40LjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAzNTAgMzUwIiBzdHlsZT0iIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+DQoJLnN0MXtmaWxsOiMyNjVGRkY7fQ0KCS5zdDJ7ZmlsbDojRkZEMzAwO30NCgkuc3Qze2ZpbGw6I0ZGRTk4MDt9DQo8L3N0eWxlPg0KPGcgaWQ9ImRlcGljdGVyX2xvZ290eXBlIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTY1IC0zODYuOTk0KSI+DQoJPHBhdGggaWQ9IlJlY3RhbmdsZV83NzkiIGNsYXNzPSJzdDEiIGQ9Ik0yMzkuNSw1NDcuN2wxMTQuMi0xMTQuMmwwLDBsMTQ0LjgsMTQ0LjhsMCwwTDM1My4xLDcyMy41bDAsMEwyMzkuNSw2MDkuOQ0KCQlDMjIyLjMsNTkyLjcsMjIyLjMsNTY0LjksMjM5LjUsNTQ3Ljd6Ii8+DQoJPHBhdGggaWQ9IlJlY3RhbmdsZV83ODAiIGNsYXNzPSJzdDIiIGQ9Ik0yMDcuMiw0NzdsNDMuNS00My41bDAsMGwxNDQuOCwxNDQuOGwwLDBMMjUwLjEsNzIzLjVsMCwwbC00Mi45LTQyLjkNCgkJQzE1MC45LDYyNC40LDE1MC45LDUzMy4yLDIwNy4yLDQ3N3oiLz4NCgk8cGF0aCBpZD0iSW50ZXJzZWN0aW9uXzIyIiBjbGFzcz0ic3QzIiBkPSJNMjY3LjgsNjM4LjJjLTMyLjgtMzIuOC0zMi44LTg2LDAtMTE4LjhjMCwwLDAsMCwwLDBsMzQuNC0zNC40bDkzLjMsOTMuM0wzMDEuNiw2NzINCgkJTDI2Ny44LDYzOC4yeiIvPg0KPC9nPg0KPC9zdmc+DQo=");
49
50 /***/ }),
51
52 /***/ "./src/edit.js":
53 /*!*********************!*\
54 !*** ./src/edit.js ***!
55 \*********************/
56 /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
57
58 __webpack_require__.r(__webpack_exports__);
59 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
60 /* harmony export */ "default": function() { return /* binding */ Edit; }
61 /* harmony export */ });
62 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
63 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
64 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
65 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
66 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
67 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
68 /* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/editor.scss");
69 /* harmony import */ var _light_logo_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./light-logo.svg */ "./src/light-logo.svg");
70
71
72 /**
73 * React hook that is used to mark the block wrapper element.
74 * It provides all the necessary props like the class name.
75 *
76 * @see https://developer.wordpress.org/block-editor/packages/packages-block-editor/#useBlockProps
77 */
78 // import ServerSideRender from '@wordpress/server-side-render';
79
80
81 /**
82 * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
83 * Those files can contain any CSS code that gets applied to the editor.
84 *
85 * @see https://www.npmjs.com/package/@wordpress/scripts#using-css
86 */
87
88
89
90 function Edit(_ref) {
91 let {
92 attributes,
93 setAttributes
94 } = _ref;
95 const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)();
96
97 function updateID(newID) {
98 setAttributes({
99 id: Number(newID)
100 });
101 } // function fetchSlider( sliderID ) {
102 // fetch( ajaxurl + '?action=depicter/document/preview&status=publish&ID=' + sliderID, {
103 // method: 'GET', // or 'PUT'
104 // headers: {
105 // 'Content-Type': 'text/html',
106 // },
107 // } )
108 // .then( function( response ) {
109 // return response.text();
110 // } )
111 // .then( function( html ) {
112 // const depicterContentWrapper = document.querySelector( '.depicter-content' );
113 // depicterContentWrapper.innerHTML = html;
114 // } )
115 // .catch( function() {
116 // console.log( 'error encountered' );
117 // } );
118 // }
119
120
121 function getSliderTitle(sliderID) {
122 let sliderTitle = null;
123
124 if (sliderID) {
125 sliderTitle = depicterSliders.list.map(function (item) {
126 if (item.value == sliderID) {
127 return item.label;
128 }
129
130 return null;
131 });
132 }
133
134 return sliderTitle ? sliderTitle : 'Select slider from list';
135 }
136
137 return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
138 key: "setting"
139 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Panel, {
140 header: "Depicter"
141 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
142 title: "Depicter Settings",
143 initialOpen: true
144 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.SelectControl, {
145 label: "Slider",
146 value: attributes.id,
147 options: depicterSliders.list,
148 onChange: updateID
149 }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
150 className: "dep-widget-wrapper"
151 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
152 src: _light_logo_svg__WEBPACK_IMPORTED_MODULE_4__["default"],
153 alt: "logo"
154 }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, " ", getSliderTitle(attributes.id), " "))));
155 }
156
157 /***/ }),
158
159 /***/ "./src/index.js":
160 /*!**********************!*\
161 !*** ./src/index.js ***!
162 \**********************/
163 /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
164
165 __webpack_require__.r(__webpack_exports__);
166 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
167 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
168 /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/style.scss");
169 /* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/edit.js");
170 /**
171 * Registers a new block provided a unique name and an object defining its behavior.
172 *
173 * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
174 */
175
176 /**
177 * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
178 * All files containing `style` keyword are bundled together. The code used
179 * gets applied both to the front of your site and to the editor.
180 *
181 * @see https://www.npmjs.com/package/@wordpress/scripts#using-css
182 */
183
184
185 /**
186 * Internal dependencies
187 */
188
189
190 /**
191 * Every block starts by registering a new block type definition.
192 *
193 * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
194 */
195
196 (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)('depicter/slider', {
197 /**
198 * @see ./edit.js
199 */
200 edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"]
201 });
202
203 /***/ }),
204
205 /***/ "./src/editor.scss":
206 /*!*************************!*\
207 !*** ./src/editor.scss ***!
208 \*************************/
209 /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
210
211 __webpack_require__.r(__webpack_exports__);
212 // extracted by mini-css-extract-plugin
213
214
215 /***/ }),
216
217 /***/ "./src/style.scss":
218 /*!************************!*\
219 !*** ./src/style.scss ***!
220 \************************/
221 /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
222
223 __webpack_require__.r(__webpack_exports__);
224 // extracted by mini-css-extract-plugin
225
226
227 /***/ }),
228
229 /***/ "react":
230 /*!************************!*\
231 !*** external "React" ***!
232 \************************/
233 /***/ (function(module) {
234
235 module.exports = window["React"];
236
237 /***/ }),
238
239 /***/ "@wordpress/block-editor":
240 /*!*************************************!*\
241 !*** external ["wp","blockEditor"] ***!
242 \*************************************/
243 /***/ (function(module) {
244
245 module.exports = window["wp"]["blockEditor"];
246
247 /***/ }),
248
249 /***/ "@wordpress/blocks":
250 /*!********************************!*\
251 !*** external ["wp","blocks"] ***!
252 \********************************/
253 /***/ (function(module) {
254
255 module.exports = window["wp"]["blocks"];
256
257 /***/ }),
258
259 /***/ "@wordpress/components":
260 /*!************************************!*\
261 !*** external ["wp","components"] ***!
262 \************************************/
263 /***/ (function(module) {
264
265 module.exports = window["wp"]["components"];
266
267 /***/ }),
268
269 /***/ "@wordpress/element":
270 /*!*********************************!*\
271 !*** external ["wp","element"] ***!
272 \*********************************/
273 /***/ (function(module) {
274
275 module.exports = window["wp"]["element"];
276
277 /***/ })
278
279 /******/ });
280 /************************************************************************/
281 /******/ // The module cache
282 /******/ var __webpack_module_cache__ = {};
283 /******/
284 /******/ // The require function
285 /******/ function __webpack_require__(moduleId) {
286 /******/ // Check if module is in cache
287 /******/ var cachedModule = __webpack_module_cache__[moduleId];
288 /******/ if (cachedModule !== undefined) {
289 /******/ return cachedModule.exports;
290 /******/ }
291 /******/ // Create a new module (and put it into the cache)
292 /******/ var module = __webpack_module_cache__[moduleId] = {
293 /******/ // no module.id needed
294 /******/ // no module.loaded needed
295 /******/ exports: {}
296 /******/ };
297 /******/
298 /******/ // Execute the module function
299 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
300 /******/
301 /******/ // Return the exports of the module
302 /******/ return module.exports;
303 /******/ }
304 /******/
305 /******/ // expose the modules object (__webpack_modules__)
306 /******/ __webpack_require__.m = __webpack_modules__;
307 /******/
308 /************************************************************************/
309 /******/ /* webpack/runtime/chunk loaded */
310 /******/ !function() {
311 /******/ var deferred = [];
312 /******/ __webpack_require__.O = function(result, chunkIds, fn, priority) {
313 /******/ if(chunkIds) {
314 /******/ priority = priority || 0;
315 /******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
316 /******/ deferred[i] = [chunkIds, fn, priority];
317 /******/ return;
318 /******/ }
319 /******/ var notFulfilled = Infinity;
320 /******/ for (var i = 0; i < deferred.length; i++) {
321 /******/ var chunkIds = deferred[i][0];
322 /******/ var fn = deferred[i][1];
323 /******/ var priority = deferred[i][2];
324 /******/ var fulfilled = true;
325 /******/ for (var j = 0; j < chunkIds.length; j++) {
326 /******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {
327 /******/ chunkIds.splice(j--, 1);
328 /******/ } else {
329 /******/ fulfilled = false;
330 /******/ if(priority < notFulfilled) notFulfilled = priority;
331 /******/ }
332 /******/ }
333 /******/ if(fulfilled) {
334 /******/ deferred.splice(i--, 1)
335 /******/ var r = fn();
336 /******/ if (r !== undefined) result = r;
337 /******/ }
338 /******/ }
339 /******/ return result;
340 /******/ };
341 /******/ }();
342 /******/
343 /******/ /* webpack/runtime/compat get default export */
344 /******/ !function() {
345 /******/ // getDefaultExport function for compatibility with non-harmony modules
346 /******/ __webpack_require__.n = function(module) {
347 /******/ var getter = module && module.__esModule ?
348 /******/ function() { return module['default']; } :
349 /******/ function() { return module; };
350 /******/ __webpack_require__.d(getter, { a: getter });
351 /******/ return getter;
352 /******/ };
353 /******/ }();
354 /******/
355 /******/ /* webpack/runtime/define property getters */
356 /******/ !function() {
357 /******/ // define getter functions for harmony exports
358 /******/ __webpack_require__.d = function(exports, definition) {
359 /******/ for(var key in definition) {
360 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
361 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
362 /******/ }
363 /******/ }
364 /******/ };
365 /******/ }();
366 /******/
367 /******/ /* webpack/runtime/hasOwnProperty shorthand */
368 /******/ !function() {
369 /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
370 /******/ }();
371 /******/
372 /******/ /* webpack/runtime/make namespace object */
373 /******/ !function() {
374 /******/ // define __esModule on exports
375 /******/ __webpack_require__.r = function(exports) {
376 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
377 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
378 /******/ }
379 /******/ Object.defineProperty(exports, '__esModule', { value: true });
380 /******/ };
381 /******/ }();
382 /******/
383 /******/ /* webpack/runtime/jsonp chunk loading */
384 /******/ !function() {
385 /******/ // no baseURI
386 /******/
387 /******/ // object to store loaded and loading chunks
388 /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
389 /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
390 /******/ var installedChunks = {
391 /******/ "index": 0,
392 /******/ "./style-index": 0
393 /******/ };
394 /******/
395 /******/ // no chunk on demand loading
396 /******/
397 /******/ // no prefetching
398 /******/
399 /******/ // no preloaded
400 /******/
401 /******/ // no HMR
402 /******/
403 /******/ // no HMR manifest
404 /******/
405 /******/ __webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };
406 /******/
407 /******/ // install a JSONP callback for chunk loading
408 /******/ var webpackJsonpCallback = function(parentChunkLoadingFunction, data) {
409 /******/ var chunkIds = data[0];
410 /******/ var moreModules = data[1];
411 /******/ var runtime = data[2];
412 /******/ // add "moreModules" to the modules object,
413 /******/ // then flag all "chunkIds" as loaded and fire callback
414 /******/ var moduleId, chunkId, i = 0;
415 /******/ if(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {
416 /******/ for(moduleId in moreModules) {
417 /******/ if(__webpack_require__.o(moreModules, moduleId)) {
418 /******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
419 /******/ }
420 /******/ }
421 /******/ if(runtime) var result = runtime(__webpack_require__);
422 /******/ }
423 /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
424 /******/ for(;i < chunkIds.length; i++) {
425 /******/ chunkId = chunkIds[i];
426 /******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
427 /******/ installedChunks[chunkId][0]();
428 /******/ }
429 /******/ installedChunks[chunkId] = 0;
430 /******/ }
431 /******/ return __webpack_require__.O(result);
432 /******/ }
433 /******/
434 /******/ var chunkLoadingGlobal = self["webpackChunkdepicter"] = self["webpackChunkdepicter"] || [];
435 /******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
436 /******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
437 /******/ }();
438 /******/
439 /************************************************************************/
440 /******/
441 /******/ // startup
442 /******/ // Load entry module and return exports
443 /******/ // This entry module depends on other loaded chunks and execution need to be delayed
444 /******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["./style-index"], function() { return __webpack_require__("./src/index.js"); })
445 /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
446 /******/
447 /******/ })()
448 ;
449 //# sourceMappingURL=index.js.map