[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

/wp-includes/js/dist/ -> server-side-render.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["serverSideRender"] =
   2  /******/ (function(modules) { // webpackBootstrap
   3  /******/     // The module cache
   4  /******/     var installedModules = {};
   5  /******/
   6  /******/     // The require function
   7  /******/ 	function __webpack_require__(moduleId) {
   8  /******/
   9  /******/         // Check if module is in cache
  10  /******/         if(installedModules[moduleId]) {
  11  /******/             return installedModules[moduleId].exports;
  12  /******/         }
  13  /******/         // Create a new module (and put it into the cache)
  14  /******/         var module = installedModules[moduleId] = {
  15  /******/             i: moduleId,
  16  /******/             l: false,
  17  /******/             exports: {}
  18  /******/         };
  19  /******/
  20  /******/         // Execute the module function
  21  /******/         modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22  /******/
  23  /******/         // Flag the module as loaded
  24  /******/         module.l = true;
  25  /******/
  26  /******/         // Return the exports of the module
  27  /******/         return module.exports;
  28  /******/     }
  29  /******/
  30  /******/
  31  /******/     // expose the modules object (__webpack_modules__)
  32  /******/     __webpack_require__.m = modules;
  33  /******/
  34  /******/     // expose the module cache
  35  /******/     __webpack_require__.c = installedModules;
  36  /******/
  37  /******/     // define getter function for harmony exports
  38  /******/     __webpack_require__.d = function(exports, name, getter) {
  39  /******/         if(!__webpack_require__.o(exports, name)) {
  40  /******/             Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41  /******/         }
  42  /******/     };
  43  /******/
  44  /******/     // define __esModule on exports
  45  /******/     __webpack_require__.r = function(exports) {
  46  /******/         if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47  /******/             Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48  /******/         }
  49  /******/         Object.defineProperty(exports, '__esModule', { value: true });
  50  /******/     };
  51  /******/
  52  /******/     // create a fake namespace object
  53  /******/     // mode & 1: value is a module id, require it
  54  /******/     // mode & 2: merge all properties of value into the ns
  55  /******/     // mode & 4: return value when already ns object
  56  /******/     // mode & 8|1: behave like require
  57  /******/     __webpack_require__.t = function(value, mode) {
  58  /******/         if(mode & 1) value = __webpack_require__(value);
  59  /******/         if(mode & 8) return value;
  60  /******/         if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61  /******/         var ns = Object.create(null);
  62  /******/         __webpack_require__.r(ns);
  63  /******/         Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64  /******/         if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65  /******/         return ns;
  66  /******/     };
  67  /******/
  68  /******/     // getDefaultExport function for compatibility with non-harmony modules
  69  /******/     __webpack_require__.n = function(module) {
  70  /******/         var getter = module && module.__esModule ?
  71  /******/ 			function getDefault() { return module['default']; } :
  72  /******/ 			function getModuleExports() { return module; };
  73  /******/         __webpack_require__.d(getter, 'a', getter);
  74  /******/         return getter;
  75  /******/     };
  76  /******/
  77  /******/     // Object.prototype.hasOwnProperty.call
  78  /******/     __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79  /******/
  80  /******/     // __webpack_public_path__
  81  /******/     __webpack_require__.p = "";
  82  /******/
  83  /******/
  84  /******/     // Load entry module and return exports
  85  /******/     return __webpack_require__(__webpack_require__.s = 369);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 0:
  91  /***/ (function(module, exports) {
  92  
  93  (function() { module.exports = this["wp"]["element"]; }());
  94  
  95  /***/ }),
  96  
  97  /***/ 1:
  98  /***/ (function(module, exports) {
  99  
 100  (function() { module.exports = this["wp"]["i18n"]; }());
 101  
 102  /***/ }),
 103  
 104  /***/ 10:
 105  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 106  
 107  "use strict";
 108  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
 109  function _defineProperty(obj, key, value) {
 110    if (key in obj) {
 111      Object.defineProperty(obj, key, {
 112        value: value,
 113        enumerable: true,
 114        configurable: true,
 115        writable: true
 116      });
 117    } else {
 118      obj[key] = value;
 119    }
 120  
 121    return obj;
 122  }
 123  
 124  /***/ }),
 125  
 126  /***/ 11:
 127  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 128  
 129  "use strict";
 130  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
 131  function _defineProperties(target, props) {
 132    for (var i = 0; i < props.length; i++) {
 133      var descriptor = props[i];
 134      descriptor.enumerable = descriptor.enumerable || false;
 135      descriptor.configurable = true;
 136      if ("value" in descriptor) descriptor.writable = true;
 137      Object.defineProperty(target, descriptor.key, descriptor);
 138    }
 139  }
 140  
 141  function _createClass(Constructor, protoProps, staticProps) {
 142    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
 143    if (staticProps) _defineProperties(Constructor, staticProps);
 144    return Constructor;
 145  }
 146  
 147  /***/ }),
 148  
 149  /***/ 12:
 150  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 151  
 152  "use strict";
 153  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
 154  function _classCallCheck(instance, Constructor) {
 155    if (!(instance instanceof Constructor)) {
 156      throw new TypeError("Cannot call a class as a function");
 157    }
 158  }
 159  
 160  /***/ }),
 161  
 162  /***/ 13:
 163  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 164  
 165  "use strict";
 166  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
 167  /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(31);
 168  /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
 169  
 170  
 171  function _possibleConstructorReturn(self, call) {
 172    if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
 173      return call;
 174    }
 175  
 176    return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
 177  }
 178  
 179  /***/ }),
 180  
 181  /***/ 14:
 182  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 183  
 184  "use strict";
 185  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
 186  function _getPrototypeOf(o) {
 187    _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
 188      return o.__proto__ || Object.getPrototypeOf(o);
 189    };
 190    return _getPrototypeOf(o);
 191  }
 192  
 193  /***/ }),
 194  
 195  /***/ 15:
 196  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 197  
 198  "use strict";
 199  
 200  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
 201  function _setPrototypeOf(o, p) {
 202    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
 203      o.__proto__ = p;
 204      return o;
 205    };
 206  
 207    return _setPrototypeOf(o, p);
 208  }
 209  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
 210  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _inherits; });
 211  
 212  function _inherits(subClass, superClass) {
 213    if (typeof superClass !== "function" && superClass !== null) {
 214      throw new TypeError("Super expression must either be null or a function");
 215    }
 216  
 217    subClass.prototype = Object.create(superClass && superClass.prototype, {
 218      constructor: {
 219        value: subClass,
 220        writable: true,
 221        configurable: true
 222      }
 223    });
 224    if (superClass) _setPrototypeOf(subClass, superClass);
 225  }
 226  
 227  /***/ }),
 228  
 229  /***/ 18:
 230  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 231  
 232  "use strict";
 233  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
 234  function _extends() {
 235    _extends = Object.assign || function (target) {
 236      for (var i = 1; i < arguments.length; i++) {
 237        var source = arguments[i];
 238  
 239        for (var key in source) {
 240          if (Object.prototype.hasOwnProperty.call(source, key)) {
 241            target[key] = source[key];
 242          }
 243        }
 244      }
 245  
 246      return target;
 247    };
 248  
 249    return _extends.apply(this, arguments);
 250  }
 251  
 252  /***/ }),
 253  
 254  /***/ 2:
 255  /***/ (function(module, exports) {
 256  
 257  (function() { module.exports = this["lodash"]; }());
 258  
 259  /***/ }),
 260  
 261  /***/ 21:
 262  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 263  
 264  "use strict";
 265  
 266  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
 267  function _objectWithoutPropertiesLoose(source, excluded) {
 268    if (source == null) return {};
 269    var target = {};
 270    var sourceKeys = Object.keys(source);
 271    var key, i;
 272  
 273    for (i = 0; i < sourceKeys.length; i++) {
 274      key = sourceKeys[i];
 275      if (excluded.indexOf(key) >= 0) continue;
 276      target[key] = source[key];
 277    }
 278  
 279    return target;
 280  }
 281  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
 282  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
 283  
 284  function _objectWithoutProperties(source, excluded) {
 285    if (source == null) return {};
 286    var target = _objectWithoutPropertiesLoose(source, excluded);
 287    var key, i;
 288  
 289    if (Object.getOwnPropertySymbols) {
 290      var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
 291  
 292      for (i = 0; i < sourceSymbolKeys.length; i++) {
 293        key = sourceSymbolKeys[i];
 294        if (excluded.indexOf(key) >= 0) continue;
 295        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
 296        target[key] = source[key];
 297      }
 298    }
 299  
 300    return target;
 301  }
 302  
 303  /***/ }),
 304  
 305  /***/ 26:
 306  /***/ (function(module, exports) {
 307  
 308  (function() { module.exports = this["wp"]["url"]; }());
 309  
 310  /***/ }),
 311  
 312  /***/ 3:
 313  /***/ (function(module, exports) {
 314  
 315  (function() { module.exports = this["wp"]["components"]; }());
 316  
 317  /***/ }),
 318  
 319  /***/ 31:
 320  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 321  
 322  "use strict";
 323  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
 324  function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
 325  
 326  function _typeof(obj) {
 327    if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
 328      _typeof = function _typeof(obj) {
 329        return _typeof2(obj);
 330      };
 331    } else {
 332      _typeof = function _typeof(obj) {
 333        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
 334      };
 335    }
 336  
 337    return _typeof(obj);
 338  }
 339  
 340  /***/ }),
 341  
 342  /***/ 34:
 343  /***/ (function(module, exports) {
 344  
 345  (function() { module.exports = this["wp"]["apiFetch"]; }());
 346  
 347  /***/ }),
 348  
 349  /***/ 369:
 350  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 351  
 352  "use strict";
 353  __webpack_require__.r(__webpack_exports__);
 354  
 355  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
 356  var esm_extends = __webpack_require__(18);
 357  
 358  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread.js
 359  var objectSpread = __webpack_require__(7);
 360  
 361  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
 362  var objectWithoutProperties = __webpack_require__(21);
 363  
 364  // EXTERNAL MODULE: external {"this":["wp","element"]}
 365  var external_this_wp_element_ = __webpack_require__(0);
 366  
 367  // EXTERNAL MODULE: external {"this":["wp","data"]}
 368  var external_this_wp_data_ = __webpack_require__(4);
 369  
 370  // EXTERNAL MODULE: external {"this":["wp","deprecated"]}
 371  var external_this_wp_deprecated_ = __webpack_require__(37);
 372  var external_this_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_deprecated_);
 373  
 374  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
 375  var classCallCheck = __webpack_require__(12);
 376  
 377  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
 378  var createClass = __webpack_require__(11);
 379  
 380  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
 381  var possibleConstructorReturn = __webpack_require__(13);
 382  
 383  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
 384  var getPrototypeOf = __webpack_require__(14);
 385  
 386  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
 387  var inherits = __webpack_require__(15);
 388  
 389  // EXTERNAL MODULE: external "lodash"
 390  var external_lodash_ = __webpack_require__(2);
 391  
 392  // EXTERNAL MODULE: external {"this":["wp","i18n"]}
 393  var external_this_wp_i18n_ = __webpack_require__(1);
 394  
 395  // EXTERNAL MODULE: external {"this":["wp","apiFetch"]}
 396  var external_this_wp_apiFetch_ = __webpack_require__(34);
 397  var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_);
 398  
 399  // EXTERNAL MODULE: external {"this":["wp","url"]}
 400  var external_this_wp_url_ = __webpack_require__(26);
 401  
 402  // EXTERNAL MODULE: external {"this":["wp","components"]}
 403  var external_this_wp_components_ = __webpack_require__(3);
 404  
 405  // CONCATENATED MODULE: ./node_modules/@wordpress/server-side-render/build-module/server-side-render.js
 406  
 407  
 408  
 409  
 410  
 411  
 412  
 413  
 414  
 415  /**
 416   * External dependencies
 417   */
 418  
 419  /**
 420   * WordPress dependencies
 421   */
 422  
 423  
 424  
 425  
 426  
 427  
 428  function rendererPath(block) {
 429    var attributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
 430    var urlQueryArgs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
 431    return Object(external_this_wp_url_["addQueryArgs"])("/wp/v2/block-renderer/".concat(block), Object(objectSpread["a" /* default */])({
 432      context: 'edit'
 433    }, null !== attributes ? {
 434      attributes: attributes
 435    } : {}, urlQueryArgs));
 436  }
 437  var server_side_render_ServerSideRender =
 438  /*#__PURE__*/
 439  function (_Component) {
 440    Object(inherits["a" /* default */])(ServerSideRender, _Component);
 441  
 442    function ServerSideRender(props) {
 443      var _this;
 444  
 445      Object(classCallCheck["a" /* default */])(this, ServerSideRender);
 446  
 447      _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(ServerSideRender).call(this, props));
 448      _this.state = {
 449        response: null
 450      };
 451      return _this;
 452    }
 453  
 454    Object(createClass["a" /* default */])(ServerSideRender, [{
 455      key: "componentDidMount",
 456      value: function componentDidMount() {
 457        this.isStillMounted = true;
 458        this.fetch(this.props); // Only debounce once the initial fetch occurs to ensure that the first
 459        // renders show data as soon as possible.
 460  
 461        this.fetch = Object(external_lodash_["debounce"])(this.fetch, 500);
 462      }
 463    }, {
 464      key: "componentWillUnmount",
 465      value: function componentWillUnmount() {
 466        this.isStillMounted = false;
 467      }
 468    }, {
 469      key: "componentDidUpdate",
 470      value: function componentDidUpdate(prevProps) {
 471        if (!Object(external_lodash_["isEqual"])(prevProps, this.props)) {
 472          this.fetch(this.props);
 473        }
 474      }
 475    }, {
 476      key: "fetch",
 477      value: function fetch(props) {
 478        var _this2 = this;
 479  
 480        if (!this.isStillMounted) {
 481          return;
 482        }
 483  
 484        if (null !== this.state.response) {
 485          this.setState({
 486            response: null
 487          });
 488        }
 489  
 490        var block = props.block,
 491            _props$attributes = props.attributes,
 492            attributes = _props$attributes === void 0 ? null : _props$attributes,
 493            _props$urlQueryArgs = props.urlQueryArgs,
 494            urlQueryArgs = _props$urlQueryArgs === void 0 ? {} : _props$urlQueryArgs;
 495        var path = rendererPath(block, attributes, urlQueryArgs); // Store the latest fetch request so that when we process it, we can
 496        // check if it is the current request, to avoid race conditions on slow networks.
 497  
 498        var fetchRequest = this.currentFetchRequest = external_this_wp_apiFetch_default()({
 499          path: path
 500        }).then(function (response) {
 501          if (_this2.isStillMounted && fetchRequest === _this2.currentFetchRequest && response) {
 502            _this2.setState({
 503              response: response.rendered
 504            });
 505          }
 506        }).catch(function (error) {
 507          if (_this2.isStillMounted && fetchRequest === _this2.currentFetchRequest) {
 508            _this2.setState({
 509              response: {
 510                error: true,
 511                errorMsg: error.message
 512              }
 513            });
 514          }
 515        });
 516        return fetchRequest;
 517      }
 518    }, {
 519      key: "render",
 520      value: function render() {
 521        var response = this.state.response;
 522        var _this$props = this.props,
 523            className = _this$props.className,
 524            EmptyResponsePlaceholder = _this$props.EmptyResponsePlaceholder,
 525            ErrorResponsePlaceholder = _this$props.ErrorResponsePlaceholder,
 526            LoadingResponsePlaceholder = _this$props.LoadingResponsePlaceholder;
 527  
 528        if (response === '') {
 529          return Object(external_this_wp_element_["createElement"])(EmptyResponsePlaceholder, Object(esm_extends["a" /* default */])({
 530            response: response
 531          }, this.props));
 532        } else if (!response) {
 533          return Object(external_this_wp_element_["createElement"])(LoadingResponsePlaceholder, Object(esm_extends["a" /* default */])({
 534            response: response
 535          }, this.props));
 536        } else if (response.error) {
 537          return Object(external_this_wp_element_["createElement"])(ErrorResponsePlaceholder, Object(esm_extends["a" /* default */])({
 538            response: response
 539          }, this.props));
 540        }
 541  
 542        return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["RawHTML"], {
 543          key: "html",
 544          className: className
 545        }, response);
 546      }
 547    }]);
 548  
 549    return ServerSideRender;
 550  }(external_this_wp_element_["Component"]);
 551  server_side_render_ServerSideRender.defaultProps = {
 552    EmptyResponsePlaceholder: function EmptyResponsePlaceholder(_ref) {
 553      var className = _ref.className;
 554      return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Placeholder"], {
 555        className: className
 556      }, Object(external_this_wp_i18n_["__"])('Block rendered as empty.') + className);
 557    },
 558    ErrorResponsePlaceholder: function ErrorResponsePlaceholder(_ref2) {
 559      var response = _ref2.response,
 560          className = _ref2.className;
 561      // translators: %s: error message describing the problem
 562      var errorMessage = Object(external_this_wp_i18n_["sprintf"])(Object(external_this_wp_i18n_["__"])('Error loading block: %s'), response.errorMsg);
 563      return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Placeholder"], {
 564        className: className
 565      }, errorMessage);
 566    },
 567    LoadingResponsePlaceholder: function LoadingResponsePlaceholder(_ref3) {
 568      var className = _ref3.className;
 569      return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Placeholder"], {
 570        className: className
 571      }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Spinner"], null));
 572    }
 573  };
 574  /* harmony default export */ var server_side_render = (server_side_render_ServerSideRender);
 575  
 576  // CONCATENATED MODULE: ./node_modules/@wordpress/server-side-render/build-module/index.js
 577  
 578  
 579  
 580  
 581  
 582  /**
 583   * WordPress dependencies
 584   */
 585  
 586  
 587  
 588  /**
 589   * Internal dependencies
 590   */
 591  
 592  
 593  /**
 594   * Constants
 595   */
 596  
 597  var EMPTY_OBJECT = {};
 598  var ExportedServerSideRender = Object(external_this_wp_data_["withSelect"])(function (select) {
 599    var coreEditorSelect = select('core/editor');
 600  
 601    if (coreEditorSelect) {
 602      var currentPostId = coreEditorSelect.getCurrentPostId();
 603  
 604      if (currentPostId) {
 605        return {
 606          currentPostId: currentPostId
 607        };
 608      }
 609    }
 610  
 611    return EMPTY_OBJECT;
 612  })(function (_ref) {
 613    var _ref$urlQueryArgs = _ref.urlQueryArgs,
 614        urlQueryArgs = _ref$urlQueryArgs === void 0 ? EMPTY_OBJECT : _ref$urlQueryArgs,
 615        currentPostId = _ref.currentPostId,
 616        props = Object(objectWithoutProperties["a" /* default */])(_ref, ["urlQueryArgs", "currentPostId"]);
 617  
 618    var newUrlQueryArgs = Object(external_this_wp_element_["useMemo"])(function () {
 619      if (!currentPostId) {
 620        return urlQueryArgs;
 621      }
 622  
 623      return Object(objectSpread["a" /* default */])({
 624        post_id: currentPostId
 625      }, urlQueryArgs);
 626    }, [currentPostId, urlQueryArgs]);
 627    return Object(external_this_wp_element_["createElement"])(server_side_render, Object(esm_extends["a" /* default */])({
 628      urlQueryArgs: newUrlQueryArgs
 629    }, props));
 630  });
 631  
 632  if (window && window.wp && window.wp.components) {
 633    window.wp.components.ServerSideRender = Object(external_this_wp_element_["forwardRef"])(function (props, ref) {
 634      external_this_wp_deprecated_default()('wp.components.ServerSideRender', {
 635        alternative: 'wp.serverSideRender'
 636      });
 637      return Object(external_this_wp_element_["createElement"])(ExportedServerSideRender, Object(esm_extends["a" /* default */])({}, props, {
 638        ref: ref
 639      }));
 640    });
 641  }
 642  
 643  /* harmony default export */ var build_module = __webpack_exports__["default"] = (ExportedServerSideRender);
 644  
 645  
 646  /***/ }),
 647  
 648  /***/ 37:
 649  /***/ (function(module, exports) {
 650  
 651  (function() { module.exports = this["wp"]["deprecated"]; }());
 652  
 653  /***/ }),
 654  
 655  /***/ 4:
 656  /***/ (function(module, exports) {
 657  
 658  (function() { module.exports = this["wp"]["data"]; }());
 659  
 660  /***/ }),
 661  
 662  /***/ 5:
 663  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 664  
 665  "use strict";
 666  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
 667  function _assertThisInitialized(self) {
 668    if (self === void 0) {
 669      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
 670    }
 671  
 672    return self;
 673  }
 674  
 675  /***/ }),
 676  
 677  /***/ 7:
 678  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 679  
 680  "use strict";
 681  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread; });
 682  /* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10);
 683  
 684  function _objectSpread(target) {
 685    for (var i = 1; i < arguments.length; i++) {
 686      var source = arguments[i] != null ? arguments[i] : {};
 687      var ownKeys = Object.keys(source);
 688  
 689      if (typeof Object.getOwnPropertySymbols === 'function') {
 690        ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
 691          return Object.getOwnPropertyDescriptor(source, sym).enumerable;
 692        }));
 693      }
 694  
 695      ownKeys.forEach(function (key) {
 696        Object(_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]);
 697      });
 698    }
 699  
 700    return target;
 701  }
 702  
 703  /***/ })
 704  
 705  /******/ })["default"];


Generated: Sat Nov 23 20:47:33 2019 Cross-referenced by PHPXref 0.7