| 1 |
/******/ (function() { // webpackBootstrap |
| 2 |
/******/ "use strict"; |
| 3 |
/******/ var __webpack_modules__ = ({ |
| 4 |
|
| 5 |
/***/ "./node_modules/@wordpress/icons/build-module/library/page.js": |
| 6 |
/*!********************************************************************!*\ |
| 7 |
!*** ./node_modules/@wordpress/icons/build-module/library/page.js ***! |
| 8 |
\********************************************************************/ |
| 9 |
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 10 |
|
| 11 |
__webpack_require__.r(__webpack_exports__); |
| 12 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 13 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
| 14 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); |
| 15 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
| 16 |
|
| 17 |
|
| 18 |
/** |
| 19 |
* WordPress dependencies |
| 20 |
*/ |
| 21 |
|
| 22 |
const page = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { |
| 23 |
xmlns: "http://www.w3.org/2000/svg", |
| 24 |
viewBox: "0 0 24 24" |
| 25 |
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { |
| 26 |
d: "M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z" |
| 27 |
})); |
| 28 |
/* harmony default export */ __webpack_exports__["default"] = (page); |
| 29 |
//# sourceMappingURL=page.js.map |
| 30 |
|
| 31 |
/***/ }), |
| 32 |
|
| 33 |
/***/ "./assets/src/apps/js/blocks/category.js": |
| 34 |
/*!***********************************************!*\ |
| 35 |
!*** ./assets/src/apps/js/blocks/category.js ***! |
| 36 |
\***********************************************/ |
| 37 |
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 38 |
|
| 39 |
__webpack_require__.r(__webpack_exports__); |
| 40 |
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); |
| 41 |
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); |
| 42 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 43 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 44 |
|
| 45 |
|
| 46 |
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.setCategories)([...(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.getCategories)().filter(_ref => { |
| 47 |
let { |
| 48 |
slug |
| 49 |
} = _ref; |
| 50 |
return slug !== 'learnpress'; |
| 51 |
}), { |
| 52 |
slug: 'learnpress', |
| 53 |
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('LearnPress', 'learnpress') |
| 54 |
}]); |
| 55 |
|
| 56 |
/***/ }), |
| 57 |
|
| 58 |
/***/ "./assets/src/apps/js/blocks/template/edit.js": |
| 59 |
/*!****************************************************!*\ |
| 60 |
!*** ./assets/src/apps/js/blocks/template/edit.js ***! |
| 61 |
\****************************************************/ |
| 62 |
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 63 |
|
| 64 |
__webpack_require__.r(__webpack_exports__); |
| 65 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 66 |
/* harmony export */ "default": function() { return /* binding */ Edit; } |
| 67 |
/* harmony export */ }); |
| 68 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 69 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
| 70 |
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); |
| 71 |
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__); |
| 72 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); |
| 73 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); |
| 74 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 75 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__); |
| 76 |
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/page.js"); |
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
const TEMPLATES = { |
| 83 |
'single-course': { |
| 84 |
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('LearnPress Single Course Template', 'learnpress'), |
| 85 |
placeholder: 'single-course' |
| 86 |
}, |
| 87 |
'archive-course': { |
| 88 |
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('LearnPress Course Archive Template', 'learnpress'), |
| 89 |
placeholder: 'archive-course' |
| 90 |
} |
| 91 |
}; |
| 92 |
function Edit(_ref) { |
| 93 |
var _TEMPLATES$attributes, _TEMPLATES$attributes2; |
| 94 |
|
| 95 |
let { |
| 96 |
attributes |
| 97 |
} = _ref; |
| 98 |
const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)(); |
| 99 |
const templateTitle = (_TEMPLATES$attributes = (_TEMPLATES$attributes2 = TEMPLATES[attributes.template]) === null || _TEMPLATES$attributes2 === void 0 ? void 0 : _TEMPLATES$attributes2.title) !== null && _TEMPLATES$attributes !== void 0 ? _TEMPLATES$attributes : attributes.template; |
| 100 |
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Placeholder, { |
| 101 |
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"], |
| 102 |
label: templateTitle, |
| 103 |
className: "wp-block-learnpress-template__placeholder" |
| 104 |
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { |
| 105 |
className: "wp-block-learnpress-template__placeholder-inner" |
| 106 |
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.sprintf)( |
| 107 |
/* translators: %s is the template title */ |
| 108 |
(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('This is an editor placeholder for the %s. On your store this will be replaced by the template and display with your course image(s), title, price, etc. You can move this placeholder around and add further blocks around it to extend the template.', 'learnpress'), templateTitle)))); |
| 109 |
} |
| 110 |
|
| 111 |
/***/ }), |
| 112 |
|
| 113 |
/***/ "./assets/src/apps/js/blocks/template/index.js": |
| 114 |
/*!*****************************************************!*\ |
| 115 |
!*** ./assets/src/apps/js/blocks/template/index.js ***! |
| 116 |
\*****************************************************/ |
| 117 |
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 118 |
|
| 119 |
__webpack_require__.r(__webpack_exports__); |
| 120 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 121 |
/* harmony export */ "metadata": function() { return /* reexport default export from named module */ _block_json__WEBPACK_IMPORTED_MODULE_2__; }, |
| 122 |
/* harmony export */ "name": function() { return /* binding */ name; }, |
| 123 |
/* harmony export */ "settings": function() { return /* binding */ settings; } |
| 124 |
/* harmony export */ }); |
| 125 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 126 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); |
| 127 |
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./edit */ "./assets/src/apps/js/blocks/template/edit.js"); |
| 128 |
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./assets/src/apps/js/blocks/template/block.json"); |
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
const { |
| 133 |
name |
| 134 |
} = _block_json__WEBPACK_IMPORTED_MODULE_2__; |
| 135 |
const settings = { |
| 136 |
title: 'LearnPress Template', |
| 137 |
keywords: ['learnpress', 'template'], |
| 138 |
description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Renders LearnPress PHP templates.', 'learnpress'), |
| 139 |
icon: 'archive', |
| 140 |
edit: _edit__WEBPACK_IMPORTED_MODULE_1__["default"], |
| 141 |
save: () => null |
| 142 |
}; |
| 143 |
|
| 144 |
|
| 145 |
/***/ }), |
| 146 |
|
| 147 |
/***/ "@wordpress/block-editor": |
| 148 |
/*!*************************************!*\ |
| 149 |
!*** external ["wp","blockEditor"] ***! |
| 150 |
\*************************************/ |
| 151 |
/***/ (function(module) { |
| 152 |
|
| 153 |
module.exports = window["wp"]["blockEditor"]; |
| 154 |
|
| 155 |
/***/ }), |
| 156 |
|
| 157 |
/***/ "@wordpress/blocks": |
| 158 |
/*!********************************!*\ |
| 159 |
!*** external ["wp","blocks"] ***! |
| 160 |
\********************************/ |
| 161 |
/***/ (function(module) { |
| 162 |
|
| 163 |
module.exports = window["wp"]["blocks"]; |
| 164 |
|
| 165 |
/***/ }), |
| 166 |
|
| 167 |
/***/ "@wordpress/components": |
| 168 |
/*!************************************!*\ |
| 169 |
!*** external ["wp","components"] ***! |
| 170 |
\************************************/ |
| 171 |
/***/ (function(module) { |
| 172 |
|
| 173 |
module.exports = window["wp"]["components"]; |
| 174 |
|
| 175 |
/***/ }), |
| 176 |
|
| 177 |
/***/ "@wordpress/element": |
| 178 |
/*!*********************************!*\ |
| 179 |
!*** external ["wp","element"] ***! |
| 180 |
\*********************************/ |
| 181 |
/***/ (function(module) { |
| 182 |
|
| 183 |
module.exports = window["wp"]["element"]; |
| 184 |
|
| 185 |
/***/ }), |
| 186 |
|
| 187 |
/***/ "@wordpress/i18n": |
| 188 |
/*!******************************!*\ |
| 189 |
!*** external ["wp","i18n"] ***! |
| 190 |
\******************************/ |
| 191 |
/***/ (function(module) { |
| 192 |
|
| 193 |
module.exports = window["wp"]["i18n"]; |
| 194 |
|
| 195 |
/***/ }), |
| 196 |
|
| 197 |
/***/ "@wordpress/primitives": |
| 198 |
/*!************************************!*\ |
| 199 |
!*** external ["wp","primitives"] ***! |
| 200 |
\************************************/ |
| 201 |
/***/ (function(module) { |
| 202 |
|
| 203 |
module.exports = window["wp"]["primitives"]; |
| 204 |
|
| 205 |
/***/ }), |
| 206 |
|
| 207 |
/***/ "./assets/src/apps/js/blocks/template/block.json": |
| 208 |
/*!*******************************************************!*\ |
| 209 |
!*** ./assets/src/apps/js/blocks/template/block.json ***! |
| 210 |
\*******************************************************/ |
| 211 |
/***/ (function(module) { |
| 212 |
|
| 213 |
module.exports = JSON.parse('{"apiVersion":2,"name":"learnpress/template","category":"learnpress","attributes":{"template":{"type":"string","default":""}}}'); |
| 214 |
|
| 215 |
/***/ }) |
| 216 |
|
| 217 |
/******/ }); |
| 218 |
/************************************************************************/ |
| 219 |
/******/ // The module cache |
| 220 |
/******/ var __webpack_module_cache__ = {}; |
| 221 |
/******/ |
| 222 |
/******/ // The require function |
| 223 |
/******/ function __webpack_require__(moduleId) { |
| 224 |
/******/ // Check if module is in cache |
| 225 |
/******/ var cachedModule = __webpack_module_cache__[moduleId]; |
| 226 |
/******/ if (cachedModule !== undefined) { |
| 227 |
/******/ return cachedModule.exports; |
| 228 |
/******/ } |
| 229 |
/******/ // Create a new module (and put it into the cache) |
| 230 |
/******/ var module = __webpack_module_cache__[moduleId] = { |
| 231 |
/******/ // no module.id needed |
| 232 |
/******/ // no module.loaded needed |
| 233 |
/******/ exports: {} |
| 234 |
/******/ }; |
| 235 |
/******/ |
| 236 |
/******/ // Execute the module function |
| 237 |
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
| 238 |
/******/ |
| 239 |
/******/ // Return the exports of the module |
| 240 |
/******/ return module.exports; |
| 241 |
/******/ } |
| 242 |
/******/ |
| 243 |
/************************************************************************/ |
| 244 |
/******/ /* webpack/runtime/compat get default export */ |
| 245 |
/******/ !function() { |
| 246 |
/******/ // getDefaultExport function for compatibility with non-harmony modules |
| 247 |
/******/ __webpack_require__.n = function(module) { |
| 248 |
/******/ var getter = module && module.__esModule ? |
| 249 |
/******/ function() { return module['default']; } : |
| 250 |
/******/ function() { return module; }; |
| 251 |
/******/ __webpack_require__.d(getter, { a: getter }); |
| 252 |
/******/ return getter; |
| 253 |
/******/ }; |
| 254 |
/******/ }(); |
| 255 |
/******/ |
| 256 |
/******/ /* webpack/runtime/define property getters */ |
| 257 |
/******/ !function() { |
| 258 |
/******/ // define getter functions for harmony exports |
| 259 |
/******/ __webpack_require__.d = function(exports, definition) { |
| 260 |
/******/ for(var key in definition) { |
| 261 |
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
| 262 |
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
| 263 |
/******/ } |
| 264 |
/******/ } |
| 265 |
/******/ }; |
| 266 |
/******/ }(); |
| 267 |
/******/ |
| 268 |
/******/ /* webpack/runtime/hasOwnProperty shorthand */ |
| 269 |
/******/ !function() { |
| 270 |
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } |
| 271 |
/******/ }(); |
| 272 |
/******/ |
| 273 |
/******/ /* webpack/runtime/make namespace object */ |
| 274 |
/******/ !function() { |
| 275 |
/******/ // define __esModule on exports |
| 276 |
/******/ __webpack_require__.r = function(exports) { |
| 277 |
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
| 278 |
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
| 279 |
/******/ } |
| 280 |
/******/ Object.defineProperty(exports, '__esModule', { value: true }); |
| 281 |
/******/ }; |
| 282 |
/******/ }(); |
| 283 |
/******/ |
| 284 |
/************************************************************************/ |
| 285 |
var __webpack_exports__ = {}; |
| 286 |
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. |
| 287 |
!function() { |
| 288 |
/*!********************************************!*\ |
| 289 |
!*** ./assets/src/apps/js/blocks/index.js ***! |
| 290 |
\********************************************/ |
| 291 |
__webpack_require__.r(__webpack_exports__); |
| 292 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 293 |
/* harmony export */ "registerLearnPressBlocks": function() { return /* binding */ registerLearnPressBlocks; } |
| 294 |
/* harmony export */ }); |
| 295 |
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); |
| 296 |
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); |
| 297 |
/* harmony import */ var _category__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./category */ "./assets/src/apps/js/blocks/category.js"); |
| 298 |
/* harmony import */ var _template__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./template */ "./assets/src/apps/js/blocks/template/index.js"); |
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
const registerBlock = block => { |
| 304 |
if (!block) { |
| 305 |
return; |
| 306 |
} |
| 307 |
|
| 308 |
const { |
| 309 |
metadata, |
| 310 |
settings, |
| 311 |
name |
| 312 |
} = block; |
| 313 |
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(name, { ...metadata, |
| 314 |
...settings |
| 315 |
}); |
| 316 |
}; |
| 317 |
/** |
| 318 |
* Function to register blocks. |
| 319 |
*/ |
| 320 |
|
| 321 |
|
| 322 |
const registerLearnPressBlocks = () => { |
| 323 |
[_template__WEBPACK_IMPORTED_MODULE_2__].forEach(registerBlock); |
| 324 |
}; |
| 325 |
registerLearnPressBlocks(); |
| 326 |
}(); |
| 327 |
/******/ })() |
| 328 |
; |
| 329 |
//# sourceMappingURL=index.js.map |