[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

   1  this["wp"] = this["wp"] || {}; this["wp"]["primitives"] =
   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 = 464);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 0:
  91  /***/ (function(module, exports) {
  92  
  93  (function() { module.exports = this["wp"]["element"]; }());
  94  
  95  /***/ }),
  96  
  97  /***/ 11:
  98  /***/ (function(module, exports, __webpack_require__) {
  99  
 100  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 101    Copyright (c) 2017 Jed Watson.
 102    Licensed under the MIT License (MIT), see
 103    http://jedwatson.github.io/classnames
 104  */
 105  /* global define */
 106  
 107  (function () {
 108      'use strict';
 109  
 110      var hasOwn = {}.hasOwnProperty;
 111  
 112  	function classNames () {
 113          var classes = [];
 114  
 115          for (var i = 0; i < arguments.length; i++) {
 116              var arg = arguments[i];
 117              if (!arg) continue;
 118  
 119              var argType = typeof arg;
 120  
 121              if (argType === 'string' || argType === 'number') {
 122                  classes.push(arg);
 123              } else if (Array.isArray(arg) && arg.length) {
 124                  var inner = classNames.apply(null, arg);
 125                  if (inner) {
 126                      classes.push(inner);
 127                  }
 128              } else if (argType === 'object') {
 129                  for (var key in arg) {
 130                      if (hasOwn.call(arg, key) && arg[key]) {
 131                          classes.push(key);
 132                      }
 133                  }
 134              }
 135          }
 136  
 137          return classes.join(' ');
 138      }
 139  
 140      if ( true && module.exports) {
 141          classNames.default = classNames;
 142          module.exports = classNames;
 143      } else if (true) {
 144          // register as 'classnames', consistent with npm package name
 145          !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
 146              return classNames;
 147          }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
 148                  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
 149      } else {}
 150  }());
 151  
 152  
 153  /***/ }),
 154  
 155  /***/ 15:
 156  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 157  
 158  "use strict";
 159  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
 160  /* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41);
 161  
 162  function _objectWithoutProperties(source, excluded) {
 163    if (source == null) return {};
 164    var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded);
 165    var key, i;
 166  
 167    if (Object.getOwnPropertySymbols) {
 168      var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
 169  
 170      for (i = 0; i < sourceSymbolKeys.length; i++) {
 171        key = sourceSymbolKeys[i];
 172        if (excluded.indexOf(key) >= 0) continue;
 173        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
 174        target[key] = source[key];
 175      }
 176    }
 177  
 178    return target;
 179  }
 180  
 181  /***/ }),
 182  
 183  /***/ 41:
 184  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 185  
 186  "use strict";
 187  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
 188  function _objectWithoutPropertiesLoose(source, excluded) {
 189    if (source == null) return {};
 190    var target = {};
 191    var sourceKeys = Object.keys(source);
 192    var key, i;
 193  
 194    for (i = 0; i < sourceKeys.length; i++) {
 195      key = sourceKeys[i];
 196      if (excluded.indexOf(key) >= 0) continue;
 197      target[key] = source[key];
 198    }
 199  
 200    return target;
 201  }
 202  
 203  /***/ }),
 204  
 205  /***/ 464:
 206  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 207  
 208  "use strict";
 209  // ESM COMPAT FLAG
 210  __webpack_require__.r(__webpack_exports__);
 211  
 212  // EXPORTS
 213  __webpack_require__.d(__webpack_exports__, "Circle", function() { return /* reexport */ svg_Circle; });
 214  __webpack_require__.d(__webpack_exports__, "G", function() { return /* reexport */ svg_G; });
 215  __webpack_require__.d(__webpack_exports__, "Path", function() { return /* reexport */ svg_Path; });
 216  __webpack_require__.d(__webpack_exports__, "Polygon", function() { return /* reexport */ svg_Polygon; });
 217  __webpack_require__.d(__webpack_exports__, "Rect", function() { return /* reexport */ svg_Rect; });
 218  __webpack_require__.d(__webpack_exports__, "Defs", function() { return /* reexport */ svg_Defs; });
 219  __webpack_require__.d(__webpack_exports__, "RadialGradient", function() { return /* reexport */ svg_RadialGradient; });
 220  __webpack_require__.d(__webpack_exports__, "LinearGradient", function() { return /* reexport */ svg_LinearGradient; });
 221  __webpack_require__.d(__webpack_exports__, "Stop", function() { return /* reexport */ svg_Stop; });
 222  __webpack_require__.d(__webpack_exports__, "SVG", function() { return /* reexport */ svg_SVG; });
 223  __webpack_require__.d(__webpack_exports__, "HorizontalRule", function() { return /* reexport */ HorizontalRule; });
 224  __webpack_require__.d(__webpack_exports__, "BlockQuotation", function() { return /* reexport */ BlockQuotation; });
 225  
 226  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
 227  var defineProperty = __webpack_require__(5);
 228  
 229  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
 230  var objectWithoutProperties = __webpack_require__(15);
 231  
 232  // EXTERNAL MODULE: ./node_modules/classnames/index.js
 233  var classnames = __webpack_require__(11);
 234  var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
 235  
 236  // EXTERNAL MODULE: external {"this":["wp","element"]}
 237  var external_this_wp_element_ = __webpack_require__(0);
 238  
 239  // CONCATENATED MODULE: ./node_modules/@wordpress/primitives/build-module/svg/index.js
 240  
 241  
 242  
 243  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; }
 244  
 245  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; }
 246  
 247  /**
 248   * External dependencies
 249   */
 250  
 251  /**
 252   * WordPress dependencies
 253   */
 254  
 255   // Disable reason: JSDoc linter doesn't seem to parse the union (`&`) correctly.
 256  
 257  /* eslint-disable jsdoc/valid-types */
 258  
 259  /** @typedef {{isPressed?: boolean} & import('react').ComponentPropsWithoutRef<'svg'>} SVGProps */
 260  
 261  /* eslint-enable jsdoc/valid-types */
 262  
 263  /**
 264   * @param {import('react').ComponentPropsWithoutRef<'circle'>} props
 265   *
 266   * @return {JSX.Element} Circle component
 267   */
 268  
 269  var svg_Circle = function Circle(props) {
 270    return Object(external_this_wp_element_["createElement"])('circle', props);
 271  };
 272  /**
 273   * @param {import('react').ComponentPropsWithoutRef<'g'>} props
 274   *
 275   * @return {JSX.Element} G component
 276   */
 277  
 278  var svg_G = function G(props) {
 279    return Object(external_this_wp_element_["createElement"])('g', props);
 280  };
 281  /**
 282   * @param {import('react').ComponentPropsWithoutRef<'path'>} props
 283   *
 284   * @return {JSX.Element} Path component
 285   */
 286  
 287  var svg_Path = function Path(props) {
 288    return Object(external_this_wp_element_["createElement"])('path', props);
 289  };
 290  /**
 291   * @param {import('react').ComponentPropsWithoutRef<'polygon'>} props
 292   *
 293   * @return {JSX.Element} Polygon component
 294   */
 295  
 296  var svg_Polygon = function Polygon(props) {
 297    return Object(external_this_wp_element_["createElement"])('polygon', props);
 298  };
 299  /**
 300   * @param {import('react').ComponentPropsWithoutRef<'rect'>} props
 301   *
 302   * @return {JSX.Element} Rect component
 303   */
 304  
 305  var svg_Rect = function Rect(props) {
 306    return Object(external_this_wp_element_["createElement"])('rect', props);
 307  };
 308  /**
 309   * @param {import('react').ComponentPropsWithoutRef<'defs'>} props
 310   *
 311   * @return {JSX.Element} Defs component
 312   */
 313  
 314  var svg_Defs = function Defs(props) {
 315    return Object(external_this_wp_element_["createElement"])('defs', props);
 316  };
 317  /**
 318   * @param {import('react').ComponentPropsWithoutRef<'radialGradient'>} props
 319   *
 320   * @return {JSX.Element} RadialGradient component
 321   */
 322  
 323  var svg_RadialGradient = function RadialGradient(props) {
 324    return Object(external_this_wp_element_["createElement"])('radialGradient', props);
 325  };
 326  /**
 327   * @param {import('react').ComponentPropsWithoutRef<'linearGradient'>} props
 328   *
 329   * @return {JSX.Element} LinearGradient component
 330   */
 331  
 332  var svg_LinearGradient = function LinearGradient(props) {
 333    return Object(external_this_wp_element_["createElement"])('linearGradient', props);
 334  };
 335  /**
 336   * @param {import('react').ComponentPropsWithoutRef<'stop'>} props
 337   *
 338   * @return {JSX.Element} Stop component
 339   */
 340  
 341  var svg_Stop = function Stop(props) {
 342    return Object(external_this_wp_element_["createElement"])('stop', props);
 343  };
 344  /**
 345   *
 346   * @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed.
 347   *                         Other props will be passed through to svg component.
 348   *
 349   * @return {JSX.Element} Stop component
 350   */
 351  
 352  var svg_SVG = function SVG(_ref) {
 353    var className = _ref.className,
 354        isPressed = _ref.isPressed,
 355        props = Object(objectWithoutProperties["a" /* default */])(_ref, ["className", "isPressed"]);
 356  
 357    var appliedProps = _objectSpread({}, props, {
 358      className: classnames_default()(className, {
 359        'is-pressed': isPressed
 360      }) || undefined,
 361      role: 'img',
 362      'aria-hidden': true,
 363      focusable: false
 364    }); // Disable reason: We need to have a way to render HTML tag for web.
 365    // eslint-disable-next-line react/forbid-elements
 366  
 367  
 368    return Object(external_this_wp_element_["createElement"])("svg", appliedProps);
 369  };
 370  
 371  // CONCATENATED MODULE: ./node_modules/@wordpress/primitives/build-module/horizontal-rule/index.js
 372  var HorizontalRule = 'hr';
 373  
 374  // CONCATENATED MODULE: ./node_modules/@wordpress/primitives/build-module/block-quotation/index.js
 375  var BlockQuotation = 'blockquote';
 376  
 377  // CONCATENATED MODULE: ./node_modules/@wordpress/primitives/build-module/index.js
 378  
 379  
 380  
 381  
 382  
 383  /***/ }),
 384  
 385  /***/ 5:
 386  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 387  
 388  "use strict";
 389  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
 390  function _defineProperty(obj, key, value) {
 391    if (key in obj) {
 392      Object.defineProperty(obj, key, {
 393        value: value,
 394        enumerable: true,
 395        configurable: true,
 396        writable: true
 397      });
 398    } else {
 399      obj[key] = value;
 400    }
 401  
 402    return obj;
 403  }
 404  
 405  /***/ })
 406  
 407  /******/ });


Generated: Thu Sep 24 01:02:16 2020 Cross-referenced by PHPXref 0.7.1