| 1 |
/******/ (() => { // webpackBootstrap |
| 2 |
/******/ "use strict"; |
| 3 |
/******/ var __webpack_modules__ = ({ |
| 4 |
|
| 5 |
/***/ "./assets/src/apps/js/blocks/breadcrumb/edit.js" |
| 6 |
/*!******************************************************!*\ |
| 7 |
!*** ./assets/src/apps/js/blocks/breadcrumb/edit.js ***! |
| 8 |
\******************************************************/ |
| 9 |
(__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 */ edit: () => (/* binding */ edit) |
| 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 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 18 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 19 |
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); |
| 20 |
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__); |
| 21 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); |
| 22 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
const edit = props => { |
| 28 |
var _props$attributes$hom; |
| 29 |
const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps)(); |
| 30 |
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.InspectorControls, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, { |
| 31 |
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Settings', 'learnpress') |
| 32 |
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { |
| 33 |
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Show Home', 'learnpress'), |
| 34 |
checked: props.attributes.showHome ? true : false, |
| 35 |
onChange: value => props.setAttributes({ |
| 36 |
showHome: value ? true : false |
| 37 |
}) |
| 38 |
}), props.attributes.showHome ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.TextControl, { |
| 39 |
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Home Label', 'learnpress'), |
| 40 |
onChange: value => { |
| 41 |
props.setAttributes({ |
| 42 |
homeLabel: value !== null && value !== void 0 ? value : 'Home' |
| 43 |
}); |
| 44 |
}, |
| 45 |
value: (_props$attributes$hom = props.attributes.homeLabel) !== null && _props$attributes$hom !== void 0 ? _props$attributes$hom : 'Home' |
| 46 |
}) : '')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { |
| 47 |
...blockProps |
| 48 |
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", { |
| 49 |
className: "learn-press-breadcrumb" |
| 50 |
}, props.attributes.showHome ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", null, props.attributes.homeLabel)), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", { |
| 51 |
className: "breadcrumb-delimiter" |
| 52 |
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", { |
| 53 |
className: "lp-icon-angle-right" |
| 54 |
}))) : '', (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Navigation', 'learnpress'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", { |
| 55 |
className: "breadcrumb-delimiter" |
| 56 |
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", { |
| 57 |
className: "lp-icon-angle-right" |
| 58 |
})), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Path', 'learnpress')))))); |
| 59 |
}; |
| 60 |
|
| 61 |
/***/ }, |
| 62 |
|
| 63 |
/***/ "./assets/src/apps/js/blocks/breadcrumb/save.js" |
| 64 |
/*!******************************************************!*\ |
| 65 |
!*** ./assets/src/apps/js/blocks/breadcrumb/save.js ***! |
| 66 |
\******************************************************/ |
| 67 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 68 |
|
| 69 |
__webpack_require__.r(__webpack_exports__); |
| 70 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 71 |
/* harmony export */ save: () => (/* binding */ save) |
| 72 |
/* harmony export */ }); |
| 73 |
const save = props => null; |
| 74 |
|
| 75 |
/***/ }, |
| 76 |
|
| 77 |
/***/ "react" |
| 78 |
/*!************************!*\ |
| 79 |
!*** external "React" ***! |
| 80 |
\************************/ |
| 81 |
(module) { |
| 82 |
|
| 83 |
module.exports = window["React"]; |
| 84 |
|
| 85 |
/***/ }, |
| 86 |
|
| 87 |
/***/ "@wordpress/block-editor" |
| 88 |
/*!*************************************!*\ |
| 89 |
!*** external ["wp","blockEditor"] ***! |
| 90 |
\*************************************/ |
| 91 |
(module) { |
| 92 |
|
| 93 |
module.exports = window["wp"]["blockEditor"]; |
| 94 |
|
| 95 |
/***/ }, |
| 96 |
|
| 97 |
/***/ "@wordpress/blocks" |
| 98 |
/*!********************************!*\ |
| 99 |
!*** external ["wp","blocks"] ***! |
| 100 |
\********************************/ |
| 101 |
(module) { |
| 102 |
|
| 103 |
module.exports = window["wp"]["blocks"]; |
| 104 |
|
| 105 |
/***/ }, |
| 106 |
|
| 107 |
/***/ "@wordpress/components" |
| 108 |
/*!************************************!*\ |
| 109 |
!*** external ["wp","components"] ***! |
| 110 |
\************************************/ |
| 111 |
(module) { |
| 112 |
|
| 113 |
module.exports = window["wp"]["components"]; |
| 114 |
|
| 115 |
/***/ }, |
| 116 |
|
| 117 |
/***/ "@wordpress/i18n" |
| 118 |
/*!******************************!*\ |
| 119 |
!*** external ["wp","i18n"] ***! |
| 120 |
\******************************/ |
| 121 |
(module) { |
| 122 |
|
| 123 |
module.exports = window["wp"]["i18n"]; |
| 124 |
|
| 125 |
/***/ }, |
| 126 |
|
| 127 |
/***/ "./assets/src/apps/js/blocks/breadcrumb/block.json" |
| 128 |
/*!*********************************************************!*\ |
| 129 |
!*** ./assets/src/apps/js/blocks/breadcrumb/block.json ***! |
| 130 |
\*********************************************************/ |
| 131 |
(module) { |
| 132 |
|
| 133 |
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"learnpress/breadcrumb","title":"Learnpress Breadcrumb","category":"learnpress-category","icon":"ellipsis","description":"Renders Learnpress Breadcrumb PHP Template.","textdomain":"learnpress","keywords":["learnpress breadcrumb","learnpress"],"usesContext":[],"attributes":{"showHome":{"type":"boolean","default":true},"homeLabel":{"type":"string","default":"Home"}},"supports":{"multiple":false,"align":["wide","full"],"html":false,"typography":{"fontSize":true,"lineHeight":false,"fontWeight":true,"__experimentalFontFamily":false,"__experimentalTextDecoration":false,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":false,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"text":true,"link":true,"background":false,"__experimentalDefaultControls":{"text":true,"link":false}}}}'); |
| 134 |
|
| 135 |
/***/ } |
| 136 |
|
| 137 |
/******/ }); |
| 138 |
/************************************************************************/ |
| 139 |
/******/ // The module cache |
| 140 |
/******/ const __webpack_module_cache__ = {}; |
| 141 |
/******/ |
| 142 |
/******/ // The require function |
| 143 |
/******/ function __webpack_require__(moduleId) { |
| 144 |
/******/ // Check if module is in cache |
| 145 |
/******/ const cachedModule = __webpack_module_cache__[moduleId]; |
| 146 |
/******/ if (cachedModule !== undefined) { |
| 147 |
/******/ return cachedModule.exports; |
| 148 |
/******/ } |
| 149 |
/******/ // Create a new module (and put it into the cache) |
| 150 |
/******/ const module = __webpack_module_cache__[moduleId] = { |
| 151 |
/******/ // no module.id needed |
| 152 |
/******/ // no module.loaded needed |
| 153 |
/******/ exports: {} |
| 154 |
/******/ }; |
| 155 |
/******/ |
| 156 |
/******/ // Execute the module function |
| 157 |
/******/ if (!(moduleId in __webpack_modules__)) { |
| 158 |
/******/ delete __webpack_module_cache__[moduleId]; |
| 159 |
/******/ const e = new Error("Cannot find module '" + moduleId + "'"); |
| 160 |
/******/ e.code = 'MODULE_NOT_FOUND'; |
| 161 |
/******/ throw e; |
| 162 |
/******/ } |
| 163 |
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
| 164 |
/******/ |
| 165 |
/******/ // Return the exports of the module |
| 166 |
/******/ return module.exports; |
| 167 |
/******/ } |
| 168 |
/******/ |
| 169 |
/************************************************************************/ |
| 170 |
/******/ /* webpack/runtime/compat get default export */ |
| 171 |
/******/ (() => { |
| 172 |
/******/ // getDefaultExport function for compatibility with non-harmony modules |
| 173 |
/******/ __webpack_require__.n = (module) => { |
| 174 |
/******/ const getter = module && module.__esModule ? |
| 175 |
/******/ () => (module['default']) : |
| 176 |
/******/ () => (module); |
| 177 |
/******/ __webpack_require__.d(getter, { a: getter }); |
| 178 |
/******/ return getter; |
| 179 |
/******/ }; |
| 180 |
/******/ })(); |
| 181 |
/******/ |
| 182 |
/******/ /* webpack/runtime/define property getters */ |
| 183 |
/******/ (() => { |
| 184 |
/******/ // define getter/value functions for harmony exports |
| 185 |
/******/ __webpack_require__.d = (exports, definition) => { |
| 186 |
/******/ if(Array.isArray(definition)) { |
| 187 |
/******/ var i = 0; |
| 188 |
/******/ while(i < definition.length) { |
| 189 |
/******/ var key = definition[i++]; |
| 190 |
/******/ var binding = definition[i++]; |
| 191 |
/******/ if(!__webpack_require__.o(exports, key)) { |
| 192 |
/******/ if(binding === 0) { |
| 193 |
/******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] }); |
| 194 |
/******/ } else { |
| 195 |
/******/ Object.defineProperty(exports, key, { enumerable: true, get: binding }); |
| 196 |
/******/ } |
| 197 |
/******/ } else if(binding === 0) { i++; } |
| 198 |
/******/ } |
| 199 |
/******/ } else { |
| 200 |
/******/ for(var key in definition) { |
| 201 |
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
| 202 |
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
| 203 |
/******/ } |
| 204 |
/******/ } |
| 205 |
/******/ } |
| 206 |
/******/ }; |
| 207 |
/******/ })(); |
| 208 |
/******/ |
| 209 |
/******/ /* webpack/runtime/hasOwnProperty shorthand */ |
| 210 |
/******/ (() => { |
| 211 |
/******/ __webpack_require__.o = (obj, prop) => (Object.hasOwn(obj, prop)) |
| 212 |
/******/ })(); |
| 213 |
/******/ |
| 214 |
/******/ /* webpack/runtime/make namespace object */ |
| 215 |
/******/ (() => { |
| 216 |
/******/ // define __esModule on exports |
| 217 |
/******/ __webpack_require__.r = (exports) => { |
| 218 |
/******/ if(Symbol.toStringTag) { |
| 219 |
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
| 220 |
/******/ } |
| 221 |
/******/ Object.defineProperty(exports, '__esModule', { value: true }); |
| 222 |
/******/ }; |
| 223 |
/******/ })(); |
| 224 |
/******/ |
| 225 |
/************************************************************************/ |
| 226 |
let __webpack_exports__ = {}; |
| 227 |
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. |
| 228 |
(() => { |
| 229 |
/*!*******************************************************!*\ |
| 230 |
!*** ./assets/src/apps/js/blocks/breadcrumb/index.js ***! |
| 231 |
\*******************************************************/ |
| 232 |
__webpack_require__.r(__webpack_exports__); |
| 233 |
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./edit */ "./assets/src/apps/js/blocks/breadcrumb/edit.js"); |
| 234 |
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./save */ "./assets/src/apps/js/blocks/breadcrumb/save.js"); |
| 235 |
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./assets/src/apps/js/blocks/breadcrumb/block.json"); |
| 236 |
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); |
| 237 |
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__); |
| 238 |
/** |
| 239 |
* Register block archive property. |
| 240 |
*/ |
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_2__.name, { |
| 246 |
..._block_json__WEBPACK_IMPORTED_MODULE_2__, |
| 247 |
edit: _edit__WEBPACK_IMPORTED_MODULE_0__.edit, |
| 248 |
save: _save__WEBPACK_IMPORTED_MODULE_1__.save |
| 249 |
}); |
| 250 |
})(); |
| 251 |
|
| 252 |
/******/ })() |
| 253 |
; |
| 254 |
//# sourceMappingURL=breadcrumb.js.map |