PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.0.0
Forumax – AI Powered Advanced Community Forum Plugin v2.0.0
2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 trunk 1.0.8 1.1.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 2.0.0 2.1.0 All 29 releases
bbp-core / build / forums / index.js

index.js in Forumax – AI Powered Advanced Community Forum Plugin 2.0.0, at build/forums/index.js

424 lines 18.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /******/ (() => { // webpackBootstrap
2 /******/ "use strict";
3 /******/ var __webpack_modules__ = ({
4
5 /***/ "./src/forums/block.json":
6 /*!*******************************!*\
7 !*** ./src/forums/block.json ***!
8 \*******************************/
9 /***/ ((module) => {
10
11 module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"bbp-core/forums","version":"0.1.0","title":"Forumax Forums Grid","category":"bbp-core","icon":"networking","description":"Displays a list of bbPress forums with a \'load more\' option.","attributes":{"ppp":{"type":"number","default":5},"ppp2":{"type":"number","default":10},"order":{"type":"string","default":"ASC"},"more_txt":{"type":"string","default":"More Communities"},"more_text_color":{"type":"string"},"title_color":{"type":"string"},"content_color":{"type":"string"}},"supports":{"html":false,"typography":{"fontSize":true}},"textdomain":"bbp-core","editorScript":"file:./index.js","editorStyle":["file:./index.css"],"style":["file:./style-index.css"]}');
12
13 /***/ }),
14
15 /***/ "./src/forums/edit.js":
16 /*!****************************!*\
17 !*** ./src/forums/edit.js ***!
18 \****************************/
19 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
20
21 __webpack_require__.r(__webpack_exports__);
22 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23 /* harmony export */ "default": () => (/* binding */ Edit)
24 /* harmony export */ });
25 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
26 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
27 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
28 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
29 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
30 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
31 /* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/server-side-render */ "@wordpress/server-side-render");
32 /* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_3__);
33 /* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editor.scss */ "./src/forums/editor.scss");
34 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
35 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__);
36
37
38
39
40
41
42 function Edit({
43 attributes,
44 setAttributes
45 }) {
46 const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)();
47 const {
48 ppp,
49 ppp2,
50 order,
51 more_txt,
52 more_text_color,
53 title_color,
54 content_color
55 } = attributes;
56 return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", {
57 ...blockProps,
58 children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
59 children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
60 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Filter Options', 'bbp-core'),
61 children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
62 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Show Forums', 'bbp-core'),
63 type: "number",
64 value: ppp,
65 onChange: value => setAttributes({
66 ppp: parseInt(value)
67 }),
68 help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Show the forums count at the initial view. Default is 5 forums in a row.', 'bbp-core')
69 }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
70 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Hidden Forums', 'bbp-core'),
71 type: "number",
72 value: ppp2,
73 onChange: value => setAttributes({
74 ppp2: parseInt(value)
75 }),
76 help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Hidden forums will show on clicking on the More button.', 'bbp-core')
77 }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.SelectControl, {
78 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'bbp-core'),
79 value: order,
80 options: [{
81 label: 'ASC',
82 value: 'ASC'
83 }, {
84 label: 'DESC',
85 value: 'DESC'
86 }],
87 onChange: value => setAttributes({
88 order: value
89 })
90 }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
91 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Read More Text', 'bbp-core'),
92 value: more_txt,
93 onChange: value => setAttributes({
94 more_txt: value
95 })
96 })]
97 })
98 }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
99 group: "styles",
100 children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.PanelColorSettings, {
101 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Colors', 'bbp-core'),
102 initialOpen: false,
103 colorSettings: [{
104 value: title_color,
105 onChange: value => setAttributes({
106 title_color: value
107 }),
108 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Title Color', 'bbp-core')
109 }, {
110 value: content_color,
111 onChange: value => setAttributes({
112 content_color: value
113 }),
114 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Content Color', 'bbp-core')
115 }, {
116 value: more_text_color,
117 onChange: value => setAttributes({
118 more_text_color: value
119 }),
120 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('More Text Color', 'bbp-core')
121 }]
122 })
123 }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)((_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_3___default()), {
124 block: "bbp-core/forums",
125 attributes: attributes
126 })]
127 });
128 }
129
130 /***/ }),
131
132 /***/ "./src/forums/editor.scss":
133 /*!********************************!*\
134 !*** ./src/forums/editor.scss ***!
135 \********************************/
136 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
137
138 __webpack_require__.r(__webpack_exports__);
139 // extracted by mini-css-extract-plugin
140
141
142 /***/ }),
143
144 /***/ "./src/forums/index.js":
145 /*!*****************************!*\
146 !*** ./src/forums/index.js ***!
147 \*****************************/
148 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
149
150 __webpack_require__.r(__webpack_exports__);
151 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
152 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
153 /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/forums/style.scss");
154 /* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/forums/edit.js");
155 /* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/forums/save.js");
156 /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/forums/block.json");
157
158
159
160
161
162 (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, {
163 edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
164 save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
165 });
166
167 /***/ }),
168
169 /***/ "./src/forums/save.js":
170 /*!****************************!*\
171 !*** ./src/forums/save.js ***!
172 \****************************/
173 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
174
175 __webpack_require__.r(__webpack_exports__);
176 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
177 /* harmony export */ "default": () => (/* binding */ save)
178 /* harmony export */ });
179 function save() {
180 return null;
181 }
182
183 /***/ }),
184
185 /***/ "./src/forums/style.scss":
186 /*!*******************************!*\
187 !*** ./src/forums/style.scss ***!
188 \*******************************/
189 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
190
191 __webpack_require__.r(__webpack_exports__);
192 // extracted by mini-css-extract-plugin
193
194
195 /***/ }),
196
197 /***/ "@wordpress/block-editor":
198 /*!*************************************!*\
199 !*** external ["wp","blockEditor"] ***!
200 \*************************************/
201 /***/ ((module) => {
202
203 module.exports = window["wp"]["blockEditor"];
204
205 /***/ }),
206
207 /***/ "@wordpress/blocks":
208 /*!********************************!*\
209 !*** external ["wp","blocks"] ***!
210 \********************************/
211 /***/ ((module) => {
212
213 module.exports = window["wp"]["blocks"];
214
215 /***/ }),
216
217 /***/ "@wordpress/components":
218 /*!************************************!*\
219 !*** external ["wp","components"] ***!
220 \************************************/
221 /***/ ((module) => {
222
223 module.exports = window["wp"]["components"];
224
225 /***/ }),
226
227 /***/ "@wordpress/i18n":
228 /*!******************************!*\
229 !*** external ["wp","i18n"] ***!
230 \******************************/
231 /***/ ((module) => {
232
233 module.exports = window["wp"]["i18n"];
234
235 /***/ }),
236
237 /***/ "@wordpress/server-side-render":
238 /*!******************************************!*\
239 !*** external ["wp","serverSideRender"] ***!
240 \******************************************/
241 /***/ ((module) => {
242
243 module.exports = window["wp"]["serverSideRender"];
244
245 /***/ }),
246
247 /***/ "react/jsx-runtime":
248 /*!**********************************!*\
249 !*** external "ReactJSXRuntime" ***!
250 \**********************************/
251 /***/ ((module) => {
252
253 module.exports = window["ReactJSXRuntime"];
254
255 /***/ })
256
257 /******/ });
258 /************************************************************************/
259 /******/ // The module cache
260 /******/ var __webpack_module_cache__ = {};
261 /******/
262 /******/ // The require function
263 /******/ function __webpack_require__(moduleId) {
264 /******/ // Check if module is in cache
265 /******/ var cachedModule = __webpack_module_cache__[moduleId];
266 /******/ if (cachedModule !== undefined) {
267 /******/ return cachedModule.exports;
268 /******/ }
269 /******/ // Create a new module (and put it into the cache)
270 /******/ var module = __webpack_module_cache__[moduleId] = {
271 /******/ // no module.id needed
272 /******/ // no module.loaded needed
273 /******/ exports: {}
274 /******/ };
275 /******/
276 /******/ // Execute the module function
277 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
278 /******/
279 /******/ // Return the exports of the module
280 /******/ return module.exports;
281 /******/ }
282 /******/
283 /******/ // expose the modules object (__webpack_modules__)
284 /******/ __webpack_require__.m = __webpack_modules__;
285 /******/
286 /************************************************************************/
287 /******/ /* webpack/runtime/chunk loaded */
288 /******/ (() => {
289 /******/ var deferred = [];
290 /******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
291 /******/ if(chunkIds) {
292 /******/ priority = priority || 0;
293 /******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
294 /******/ deferred[i] = [chunkIds, fn, priority];
295 /******/ return;
296 /******/ }
297 /******/ var notFulfilled = Infinity;
298 /******/ for (var i = 0; i < deferred.length; i++) {
299 /******/ var [chunkIds, fn, priority] = deferred[i];
300 /******/ var fulfilled = true;
301 /******/ for (var j = 0; j < chunkIds.length; j++) {
302 /******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
303 /******/ chunkIds.splice(j--, 1);
304 /******/ } else {
305 /******/ fulfilled = false;
306 /******/ if(priority < notFulfilled) notFulfilled = priority;
307 /******/ }
308 /******/ }
309 /******/ if(fulfilled) {
310 /******/ deferred.splice(i--, 1)
311 /******/ var r = fn();
312 /******/ if (r !== undefined) result = r;
313 /******/ }
314 /******/ }
315 /******/ return result;
316 /******/ };
317 /******/ })();
318 /******/
319 /******/ /* webpack/runtime/compat get default export */
320 /******/ (() => {
321 /******/ // getDefaultExport function for compatibility with non-harmony modules
322 /******/ __webpack_require__.n = (module) => {
323 /******/ var getter = module && module.__esModule ?
324 /******/ () => (module['default']) :
325 /******/ () => (module);
326 /******/ __webpack_require__.d(getter, { a: getter });
327 /******/ return getter;
328 /******/ };
329 /******/ })();
330 /******/
331 /******/ /* webpack/runtime/define property getters */
332 /******/ (() => {
333 /******/ // define getter functions for harmony exports
334 /******/ __webpack_require__.d = (exports, definition) => {
335 /******/ for(var key in definition) {
336 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
337 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
338 /******/ }
339 /******/ }
340 /******/ };
341 /******/ })();
342 /******/
343 /******/ /* webpack/runtime/hasOwnProperty shorthand */
344 /******/ (() => {
345 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
346 /******/ })();
347 /******/
348 /******/ /* webpack/runtime/make namespace object */
349 /******/ (() => {
350 /******/ // define __esModule on exports
351 /******/ __webpack_require__.r = (exports) => {
352 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
353 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
354 /******/ }
355 /******/ Object.defineProperty(exports, '__esModule', { value: true });
356 /******/ };
357 /******/ })();
358 /******/
359 /******/ /* webpack/runtime/jsonp chunk loading */
360 /******/ (() => {
361 /******/ // no baseURI
362 /******/
363 /******/ // object to store loaded and loading chunks
364 /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
365 /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
366 /******/ var installedChunks = {
367 /******/ "forums/index": 0,
368 /******/ "forums/style-index": 0
369 /******/ };
370 /******/
371 /******/ // no chunk on demand loading
372 /******/
373 /******/ // no prefetching
374 /******/
375 /******/ // no preloaded
376 /******/
377 /******/ // no HMR
378 /******/
379 /******/ // no HMR manifest
380 /******/
381 /******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
382 /******/
383 /******/ // install a JSONP callback for chunk loading
384 /******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
385 /******/ var [chunkIds, moreModules, runtime] = data;
386 /******/ // add "moreModules" to the modules object,
387 /******/ // then flag all "chunkIds" as loaded and fire callback
388 /******/ var moduleId, chunkId, i = 0;
389 /******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
390 /******/ for(moduleId in moreModules) {
391 /******/ if(__webpack_require__.o(moreModules, moduleId)) {
392 /******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
393 /******/ }
394 /******/ }
395 /******/ if(runtime) var result = runtime(__webpack_require__);
396 /******/ }
397 /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
398 /******/ for(;i < chunkIds.length; i++) {
399 /******/ chunkId = chunkIds[i];
400 /******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
401 /******/ installedChunks[chunkId][0]();
402 /******/ }
403 /******/ installedChunks[chunkId] = 0;
404 /******/ }
405 /******/ return __webpack_require__.O(result);
406 /******/ }
407 /******/
408 /******/ var chunkLoadingGlobal = globalThis["webpackChunkbbp_core_blocks"] = globalThis["webpackChunkbbp_core_blocks"] || [];
409 /******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
410 /******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
411 /******/ })();
412 /******/
413 /************************************************************************/
414 /******/
415 /******/ // startup
416 /******/ // Load entry module and return exports
417 /******/ // This entry module depends on other loaded chunks and execution need to be delayed
418 /******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["forums/style-index"], () => (__webpack_require__("./src/forums/index.js")))
419 /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
420 /******/
421 /******/ })()
422 ;
423 //# sourceMappingURL=index.js.map
424