[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> plugins.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["plugins"] =
   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 = 444);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 0:
  91  /***/ (function(module, exports) {
  92  
  93  (function() { module.exports = this["wp"]["element"]; }());
  94  
  95  /***/ }),
  96  
  97  /***/ 12:
  98  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  99  
 100  "use strict";
 101  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
 102  function _extends() {
 103    _extends = Object.assign || function (target) {
 104      for (var i = 1; i < arguments.length; i++) {
 105        var source = arguments[i];
 106  
 107        for (var key in source) {
 108          if (Object.prototype.hasOwnProperty.call(source, key)) {
 109            target[key] = source[key];
 110          }
 111        }
 112      }
 113  
 114      return target;
 115    };
 116  
 117    return _extends.apply(this, arguments);
 118  }
 119  
 120  /***/ }),
 121  
 122  /***/ 13:
 123  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 124  
 125  "use strict";
 126  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
 127  function _defineProperties(target, props) {
 128    for (var i = 0; i < props.length; i++) {
 129      var descriptor = props[i];
 130      descriptor.enumerable = descriptor.enumerable || false;
 131      descriptor.configurable = true;
 132      if ("value" in descriptor) descriptor.writable = true;
 133      Object.defineProperty(target, descriptor.key, descriptor);
 134    }
 135  }
 136  
 137  function _createClass(Constructor, protoProps, staticProps) {
 138    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
 139    if (staticProps) _defineProperties(Constructor, staticProps);
 140    return Constructor;
 141  }
 142  
 143  /***/ }),
 144  
 145  /***/ 14:
 146  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 147  
 148  "use strict";
 149  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
 150  function _classCallCheck(instance, Constructor) {
 151    if (!(instance instanceof Constructor)) {
 152      throw new TypeError("Cannot call a class as a function");
 153    }
 154  }
 155  
 156  /***/ }),
 157  
 158  /***/ 15:
 159  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 160  
 161  "use strict";
 162  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
 163  /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34);
 164  /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 165  
 166  
 167  function _possibleConstructorReturn(self, call) {
 168    if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
 169      return call;
 170    }
 171  
 172    return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
 173  }
 174  
 175  /***/ }),
 176  
 177  /***/ 16:
 178  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 179  
 180  "use strict";
 181  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
 182  function _getPrototypeOf(o) {
 183    _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
 184      return o.__proto__ || Object.getPrototypeOf(o);
 185    };
 186    return _getPrototypeOf(o);
 187  }
 188  
 189  /***/ }),
 190  
 191  /***/ 17:
 192  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 193  
 194  "use strict";
 195  
 196  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
 197  function _setPrototypeOf(o, p) {
 198    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
 199      o.__proto__ = p;
 200      return o;
 201    };
 202  
 203    return _setPrototypeOf(o, p);
 204  }
 205  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
 206  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _inherits; });
 207  
 208  function _inherits(subClass, superClass) {
 209    if (typeof superClass !== "function" && superClass !== null) {
 210      throw new TypeError("Super expression must either be null or a function");
 211    }
 212  
 213    subClass.prototype = Object.create(superClass && superClass.prototype, {
 214      constructor: {
 215        value: subClass,
 216        writable: true,
 217        configurable: true
 218      }
 219    });
 220    if (superClass) _setPrototypeOf(subClass, superClass);
 221  }
 222  
 223  /***/ }),
 224  
 225  /***/ 2:
 226  /***/ (function(module, exports) {
 227  
 228  (function() { module.exports = this["lodash"]; }());
 229  
 230  /***/ }),
 231  
 232  /***/ 32:
 233  /***/ (function(module, exports) {
 234  
 235  (function() { module.exports = this["wp"]["hooks"]; }());
 236  
 237  /***/ }),
 238  
 239  /***/ 34:
 240  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 241  
 242  "use strict";
 243  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
 244  function _typeof(obj) {
 245    "@babel/helpers - typeof";
 246  
 247    if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
 248      _typeof = function _typeof(obj) {
 249        return typeof obj;
 250      };
 251    } else {
 252      _typeof = function _typeof(obj) {
 253        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
 254      };
 255    }
 256  
 257    return _typeof(obj);
 258  }
 259  
 260  /***/ }),
 261  
 262  /***/ 444:
 263  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 264  
 265  "use strict";
 266  __webpack_require__.r(__webpack_exports__);
 267  
 268  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
 269  var classCallCheck = __webpack_require__(14);
 270  
 271  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
 272  var createClass = __webpack_require__(13);
 273  
 274  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
 275  var possibleConstructorReturn = __webpack_require__(15);
 276  
 277  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
 278  var getPrototypeOf = __webpack_require__(16);
 279  
 280  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
 281  var assertThisInitialized = __webpack_require__(7);
 282  
 283  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
 284  var inherits = __webpack_require__(17);
 285  
 286  // EXTERNAL MODULE: external {"this":["wp","element"]}
 287  var external_this_wp_element_ = __webpack_require__(0);
 288  
 289  // EXTERNAL MODULE: external {"this":"lodash"}
 290  var external_this_lodash_ = __webpack_require__(2);
 291  
 292  // EXTERNAL MODULE: external {"this":["wp","hooks"]}
 293  var external_this_wp_hooks_ = __webpack_require__(32);
 294  
 295  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
 296  var esm_extends = __webpack_require__(12);
 297  
 298  // EXTERNAL MODULE: external {"this":["wp","compose"]}
 299  var external_this_wp_compose_ = __webpack_require__(8);
 300  
 301  // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/components/plugin-context/index.js
 302  
 303  
 304  
 305  /**
 306   * WordPress dependencies
 307   */
 308  
 309  
 310  
 311  var _createContext = Object(external_this_wp_element_["createContext"])({
 312    name: null,
 313    icon: null
 314  }),
 315      Consumer = _createContext.Consumer,
 316      Provider = _createContext.Provider;
 317  
 318  
 319  /**
 320   * A Higher Order Component used to inject Plugin context to the
 321   * wrapped component.
 322   *
 323   * @param {Function} mapContextToProps Function called on every context change,
 324   *                                     expected to return object of props to
 325   *                                     merge with the component's own props.
 326   *
 327   * @return {WPComponent} Enhanced component with injected context as props.
 328   */
 329  
 330  var plugin_context_withPluginContext = function withPluginContext(mapContextToProps) {
 331    return Object(external_this_wp_compose_["createHigherOrderComponent"])(function (OriginalComponent) {
 332      return function (props) {
 333        return Object(external_this_wp_element_["createElement"])(Consumer, null, function (context) {
 334          return Object(external_this_wp_element_["createElement"])(OriginalComponent, Object(esm_extends["a" /* default */])({}, props, mapContextToProps(context, props)));
 335        });
 336      };
 337    }, 'withPluginContext');
 338  };
 339  
 340  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
 341  var defineProperty = __webpack_require__(5);
 342  
 343  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
 344  var esm_typeof = __webpack_require__(34);
 345  
 346  // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/api/index.js
 347  
 348  
 349  
 350  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
 351  
 352  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
 353  
 354  /* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */
 355  
 356  /**
 357   * WordPress dependencies
 358   */
 359  
 360  /**
 361   * External dependencies
 362   */
 363  
 364  
 365  /**
 366   * Defined behavior of a plugin type.
 367   *
 368   * @typedef {Object} WPPlugin
 369   *
 370   * @property {string}                    name   A string identifying the plugin. Must be
 371   *                                              unique across all registered plugins.
 372   *                                              unique across all registered plugins.
 373   * @property {string|WPElement|Function} icon   An icon to be shown in the UI. It can
 374   *                                              be a slug of the Dashicon, or an element
 375   *                                              (or function returning an element) if you
 376   *                                              choose to render your own SVG.
 377   * @property {Function}                  render A component containing the UI elements
 378   *                                              to be rendered.
 379   */
 380  
 381  /**
 382   * Plugin definitions keyed by plugin name.
 383   *
 384   * @type {Object.<string,WPPlugin>}
 385   */
 386  
 387  var plugins = {};
 388  /**
 389   * Registers a plugin to the editor.
 390   *
 391   * @param {string}   name     A string identifying the plugin.Must be
 392   *                            unique across all registered plugins.
 393   * @param {WPPlugin} settings The settings for this plugin.
 394   *
 395   * @example <caption>ES5</caption>
 396   * ```js
 397   * // Using ES5 syntax
 398   * var el = wp.element.createElement;
 399   * var Fragment = wp.element.Fragment;
 400   * var PluginSidebar = wp.editPost.PluginSidebar;
 401   * var PluginSidebarMoreMenuItem = wp.editPost.PluginSidebarMoreMenuItem;
 402   * var registerPlugin = wp.plugins.registerPlugin;
 403   * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.
 404   *
 405   * function Component() {
 406   *     return el(
 407   *         Fragment,
 408   *         {},
 409   *         el(
 410   *             PluginSidebarMoreMenuItem,
 411   *             {
 412   *                 target: 'sidebar-name',
 413   *             },
 414   *             'My Sidebar'
 415   *         ),
 416   *         el(
 417   *             PluginSidebar,
 418   *             {
 419   *                 name: 'sidebar-name',
 420   *                 title: 'My Sidebar',
 421   *             },
 422   *             'Content of the sidebar'
 423   *         )
 424   *     );
 425   * }
 426   * registerPlugin( 'plugin-name', {
 427   *     icon: moreIcon,
 428   *     render: Component,
 429   * } );
 430   * ```
 431   *
 432   * @example <caption>ESNext</caption>
 433   * ```js
 434   * // Using ESNext syntax
 435   * import { PluginSidebar, PluginSidebarMoreMenuItem } from '@wordpress/edit-post';
 436   * import { registerPlugin } from '@wordpress/plugins';
 437   * import { more } from '@wordpress/icons';
 438   *
 439   * const Component = () => (
 440   *     <>
 441   *         <PluginSidebarMoreMenuItem
 442   *             target="sidebar-name"
 443   *         >
 444   *             My Sidebar
 445   *         </PluginSidebarMoreMenuItem>
 446   *         <PluginSidebar
 447   *             name="sidebar-name"
 448   *             title="My Sidebar"
 449   *         >
 450   *             Content of the sidebar
 451   *         </PluginSidebar>
 452   *     </>
 453   * );
 454   *
 455   * registerPlugin( 'plugin-name', {
 456   *     icon: more,
 457   *     render: Component,
 458   * } );
 459   * ```
 460   *
 461   * @return {WPPlugin} The final plugin settings object.
 462   */
 463  
 464  function registerPlugin(name, settings) {
 465    if (Object(esm_typeof["a" /* default */])(settings) !== 'object') {
 466      console.error('No settings object provided!');
 467      return null;
 468    }
 469  
 470    if (typeof name !== 'string') {
 471      console.error('Plugin names must be strings.');
 472      return null;
 473    }
 474  
 475    if (!/^[a-z][a-z0-9-]*$/.test(name)) {
 476      console.error('Plugin names must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-plugin".');
 477      return null;
 478    }
 479  
 480    if (plugins[name]) {
 481      console.error("Plugin \"".concat(name, "\" is already registered."));
 482    }
 483  
 484    settings = Object(external_this_wp_hooks_["applyFilters"])('plugins.registerPlugin', settings, name);
 485  
 486    if (!Object(external_this_lodash_["isFunction"])(settings.render)) {
 487      console.error('The "render" property must be specified and must be a valid function.');
 488      return null;
 489    }
 490  
 491    plugins[name] = _objectSpread({
 492      name: name,
 493      icon: 'admin-plugins'
 494    }, settings);
 495    Object(external_this_wp_hooks_["doAction"])('plugins.pluginRegistered', settings, name);
 496    return settings;
 497  }
 498  /**
 499   * Unregisters a plugin by name.
 500   *
 501   * @param {string} name Plugin name.
 502   *
 503   * @example <caption>ES5</caption>
 504   * ```js
 505   * // Using ES5 syntax
 506   * var unregisterPlugin = wp.plugins.unregisterPlugin;
 507   *
 508   * unregisterPlugin( 'plugin-name' );
 509   * ```
 510   *
 511   * @example <caption>ESNext</caption>
 512   * ```js
 513   * // Using ESNext syntax
 514   * const { unregisterPlugin } = wp.plugins;
 515   *
 516   * unregisterPlugin( 'plugin-name' );
 517   * ```
 518   *
 519   * @return {?WPPlugin} The previous plugin settings object, if it has been
 520   *                     successfully unregistered; otherwise `undefined`.
 521   */
 522  
 523  function unregisterPlugin(name) {
 524    if (!plugins[name]) {
 525      console.error('Plugin "' + name + '" is not registered.');
 526      return;
 527    }
 528  
 529    var oldPlugin = plugins[name];
 530    delete plugins[name];
 531    Object(external_this_wp_hooks_["doAction"])('plugins.pluginUnregistered', oldPlugin, name);
 532    return oldPlugin;
 533  }
 534  /**
 535   * Returns a registered plugin settings.
 536   *
 537   * @param {string} name Plugin name.
 538   *
 539   * @return {?WPPlugin} Plugin setting.
 540   */
 541  
 542  function getPlugin(name) {
 543    return plugins[name];
 544  }
 545  /**
 546   * Returns all registered plugins.
 547   *
 548   * @return {WPPlugin[]} Plugin settings.
 549   */
 550  
 551  function getPlugins() {
 552    return Object.values(plugins);
 553  }
 554  
 555  // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/components/plugin-area/index.js
 556  
 557  
 558  
 559  
 560  
 561  
 562  
 563  
 564  /**
 565   * External dependencies
 566   */
 567  
 568  /**
 569   * WordPress dependencies
 570   */
 571  
 572  
 573  
 574  /**
 575   * Internal dependencies
 576   */
 577  
 578  
 579  
 580  /**
 581   * A component that renders all plugin fills in a hidden div.
 582   *
 583   * @example <caption>ES5</caption>
 584   * ```js
 585   * // Using ES5 syntax
 586   * var el = wp.element.createElement;
 587   * var PluginArea = wp.plugins.PluginArea;
 588   *
 589   * function Layout() {
 590   *     return el(
 591   *         'div',
 592   *         {},
 593   *         'Content of the page',
 594   *         PluginArea
 595   *     );
 596   * }
 597   * ```
 598   *
 599   * @example <caption>ESNext</caption>
 600   * ```js
 601   * // Using ESNext syntax
 602   * const { PluginArea } = wp.plugins;
 603   *
 604   * const Layout = () => (
 605   *     <div>
 606   *         Content of the page
 607   *         <PluginArea />
 608   *     </div>
 609   * );
 610   * ```
 611   *
 612   * @return {WPComponent} The component to be rendered.
 613   */
 614  
 615  var plugin_area_PluginArea =
 616  /*#__PURE__*/
 617  function (_Component) {
 618    Object(inherits["a" /* default */])(PluginArea, _Component);
 619  
 620    function PluginArea() {
 621      var _this;
 622  
 623      Object(classCallCheck["a" /* default */])(this, PluginArea);
 624  
 625      _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(PluginArea).apply(this, arguments));
 626      _this.setPlugins = _this.setPlugins.bind(Object(assertThisInitialized["a" /* default */])(_this));
 627      _this.state = _this.getCurrentPluginsState();
 628      return _this;
 629    }
 630  
 631    Object(createClass["a" /* default */])(PluginArea, [{
 632      key: "getCurrentPluginsState",
 633      value: function getCurrentPluginsState() {
 634        return {
 635          plugins: Object(external_this_lodash_["map"])(getPlugins(), function (_ref) {
 636            var icon = _ref.icon,
 637                name = _ref.name,
 638                render = _ref.render;
 639            return {
 640              Plugin: render,
 641              context: {
 642                name: name,
 643                icon: icon
 644              }
 645            };
 646          })
 647        };
 648      }
 649    }, {
 650      key: "componentDidMount",
 651      value: function componentDidMount() {
 652        Object(external_this_wp_hooks_["addAction"])('plugins.pluginRegistered', 'core/plugins/plugin-area/plugins-registered', this.setPlugins);
 653        Object(external_this_wp_hooks_["addAction"])('plugins.pluginUnregistered', 'core/plugins/plugin-area/plugins-unregistered', this.setPlugins);
 654      }
 655    }, {
 656      key: "componentWillUnmount",
 657      value: function componentWillUnmount() {
 658        Object(external_this_wp_hooks_["removeAction"])('plugins.pluginRegistered', 'core/plugins/plugin-area/plugins-registered');
 659        Object(external_this_wp_hooks_["removeAction"])('plugins.pluginUnregistered', 'core/plugins/plugin-area/plugins-unregistered');
 660      }
 661    }, {
 662      key: "setPlugins",
 663      value: function setPlugins() {
 664        this.setState(this.getCurrentPluginsState);
 665      }
 666    }, {
 667      key: "render",
 668      value: function render() {
 669        return Object(external_this_wp_element_["createElement"])("div", {
 670          style: {
 671            display: 'none'
 672          }
 673        }, Object(external_this_lodash_["map"])(this.state.plugins, function (_ref2) {
 674          var context = _ref2.context,
 675              Plugin = _ref2.Plugin;
 676          return Object(external_this_wp_element_["createElement"])(Provider, {
 677            key: context.name,
 678            value: context
 679          }, Object(external_this_wp_element_["createElement"])(Plugin, null));
 680        }));
 681      }
 682    }]);
 683  
 684    return PluginArea;
 685  }(external_this_wp_element_["Component"]);
 686  
 687  /* harmony default export */ var plugin_area = (plugin_area_PluginArea);
 688  
 689  // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/components/index.js
 690  
 691  
 692  
 693  // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/index.js
 694  /* concated harmony reexport PluginArea */__webpack_require__.d(__webpack_exports__, "PluginArea", function() { return plugin_area; });
 695  /* concated harmony reexport withPluginContext */__webpack_require__.d(__webpack_exports__, "withPluginContext", function() { return plugin_context_withPluginContext; });
 696  /* concated harmony reexport registerPlugin */__webpack_require__.d(__webpack_exports__, "registerPlugin", function() { return registerPlugin; });
 697  /* concated harmony reexport unregisterPlugin */__webpack_require__.d(__webpack_exports__, "unregisterPlugin", function() { return unregisterPlugin; });
 698  /* concated harmony reexport getPlugin */__webpack_require__.d(__webpack_exports__, "getPlugin", function() { return getPlugin; });
 699  /* concated harmony reexport getPlugins */__webpack_require__.d(__webpack_exports__, "getPlugins", function() { return getPlugins; });
 700  
 701  
 702  
 703  
 704  /***/ }),
 705  
 706  /***/ 5:
 707  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 708  
 709  "use strict";
 710  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
 711  function _defineProperty(obj, key, value) {
 712    if (key in obj) {
 713      Object.defineProperty(obj, key, {
 714        value: value,
 715        enumerable: true,
 716        configurable: true,
 717        writable: true
 718      });
 719    } else {
 720      obj[key] = value;
 721    }
 722  
 723    return obj;
 724  }
 725  
 726  /***/ }),
 727  
 728  /***/ 7:
 729  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 730  
 731  "use strict";
 732  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
 733  function _assertThisInitialized(self) {
 734    if (self === void 0) {
 735      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
 736    }
 737  
 738    return self;
 739  }
 740  
 741  /***/ }),
 742  
 743  /***/ 8:
 744  /***/ (function(module, exports) {
 745  
 746  (function() { module.exports = this["wp"]["compose"]; }());
 747  
 748  /***/ })
 749  
 750  /******/ });


Generated: Mon Mar 30 01:00:03 2020 Cross-referenced by PHPXref 0.7.1