[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

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 = 445);
  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  /***/ 19:
 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  /***/ 445:
 206  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 207  
 208  "use strict";
 209  __webpack_require__.r(__webpack_exports__);
 210  
 211  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
 212  var defineProperty = __webpack_require__(5);
 213  
 214  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
 215  var objectWithoutProperties = __webpack_require__(19);
 216  
 217  // EXTERNAL MODULE: ./node_modules/classnames/index.js
 218  var classnames = __webpack_require__(11);
 219  var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
 220  
 221  // EXTERNAL MODULE: external {"this":["wp","element"]}
 222  var external_this_wp_element_ = __webpack_require__(0);
 223  
 224  // CONCATENATED MODULE: ./node_modules/@wordpress/primitives/build-module/svg/index.js
 225  
 226  
 227  
 228  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; }
 229  
 230  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; }
 231  
 232  /**
 233   * External dependencies
 234   */
 235  
 236  /**
 237   * WordPress dependencies
 238   */
 239  
 240  
 241  var svg_Circle = function Circle(props) {
 242    return Object(external_this_wp_element_["createElement"])('circle', props);
 243  };
 244  var svg_G = function G(props) {
 245    return Object(external_this_wp_element_["createElement"])('g', props);
 246  };
 247  var svg_Path = function Path(props) {
 248    return Object(external_this_wp_element_["createElement"])('path', props);
 249  };
 250  var svg_Polygon = function Polygon(props) {
 251    return Object(external_this_wp_element_["createElement"])('polygon', props);
 252  };
 253  var svg_Rect = function Rect(props) {
 254    return Object(external_this_wp_element_["createElement"])('rect', props);
 255  };
 256  var svg_Defs = function Defs(props) {
 257    return Object(external_this_wp_element_["createElement"])('defs', props);
 258  };
 259  var svg_RadialGradient = function RadialGradient(props) {
 260    return Object(external_this_wp_element_["createElement"])('radialGradient', props);
 261  };
 262  var svg_LinearGradient = function LinearGradient(props) {
 263    return Object(external_this_wp_element_["createElement"])('linearGradient', props);
 264  };
 265  var svg_Stop = function Stop(props) {
 266    return Object(external_this_wp_element_["createElement"])('stop', props);
 267  };
 268  var svg_SVG = function SVG(_ref) {
 269    var className = _ref.className,
 270        isPressed = _ref.isPressed,
 271        props = Object(objectWithoutProperties["a" /* default */])(_ref, ["className", "isPressed"]);
 272  
 273    var appliedProps = _objectSpread({}, props, {
 274      className: classnames_default()(className, {
 275        'is-pressed': isPressed
 276      }) || undefined,
 277      role: 'img',
 278      'aria-hidden': 'true',
 279      focusable: 'false'
 280    }); // Disable reason: We need to have a way to render HTML tag for web.
 281    // eslint-disable-next-line react/forbid-elements
 282  
 283  
 284    return Object(external_this_wp_element_["createElement"])("svg", appliedProps);
 285  };
 286  
 287  // CONCATENATED MODULE: ./node_modules/@wordpress/primitives/build-module/horizontal-rule/index.js
 288  var HorizontalRule = 'hr';
 289  
 290  // CONCATENATED MODULE: ./node_modules/@wordpress/primitives/build-module/block-quotation/index.js
 291  var BlockQuotation = 'blockquote';
 292  
 293  // CONCATENATED MODULE: ./node_modules/@wordpress/primitives/build-module/index.js
 294  /* concated harmony reexport Circle */__webpack_require__.d(__webpack_exports__, "Circle", function() { return svg_Circle; });
 295  /* concated harmony reexport G */__webpack_require__.d(__webpack_exports__, "G", function() { return svg_G; });
 296  /* concated harmony reexport Path */__webpack_require__.d(__webpack_exports__, "Path", function() { return svg_Path; });
 297  /* concated harmony reexport Polygon */__webpack_require__.d(__webpack_exports__, "Polygon", function() { return svg_Polygon; });
 298  /* concated harmony reexport Rect */__webpack_require__.d(__webpack_exports__, "Rect", function() { return svg_Rect; });
 299  /* concated harmony reexport Defs */__webpack_require__.d(__webpack_exports__, "Defs", function() { return svg_Defs; });
 300  /* concated harmony reexport RadialGradient */__webpack_require__.d(__webpack_exports__, "RadialGradient", function() { return svg_RadialGradient; });
 301  /* concated harmony reexport LinearGradient */__webpack_require__.d(__webpack_exports__, "LinearGradient", function() { return svg_LinearGradient; });
 302  /* concated harmony reexport Stop */__webpack_require__.d(__webpack_exports__, "Stop", function() { return svg_Stop; });
 303  /* concated harmony reexport SVG */__webpack_require__.d(__webpack_exports__, "SVG", function() { return svg_SVG; });
 304  /* concated harmony reexport HorizontalRule */__webpack_require__.d(__webpack_exports__, "HorizontalRule", function() { return HorizontalRule; });
 305  /* concated harmony reexport BlockQuotation */__webpack_require__.d(__webpack_exports__, "BlockQuotation", function() { return BlockQuotation; });
 306  
 307  
 308  
 309  
 310  
 311  /***/ }),
 312  
 313  /***/ 5:
 314  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 315  
 316  "use strict";
 317  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
 318  function _defineProperty(obj, key, value) {
 319    if (key in obj) {
 320      Object.defineProperty(obj, key, {
 321        value: value,
 322        enumerable: true,
 323        configurable: true,
 324        writable: true
 325      });
 326    } else {
 327      obj[key] = value;
 328    }
 329  
 330    return obj;
 331  }
 332  
 333  /***/ })
 334  
 335  /******/ });


Generated : Sun Dec 22 08:20:01 2024 Cross-referenced by PHPXref