first commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
/**
|
||||
* This file is generated by Webpack, do not edit it directly.
|
||||
*/
|
||||
return [
|
||||
'handle' => 'elementor-v2-locations',
|
||||
'deps' => [
|
||||
'react',
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,168 @@
|
||||
/******/ (function() { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "react":
|
||||
/*!**************************!*\
|
||||
!*** external ["React"] ***!
|
||||
\**************************/
|
||||
/***/ (function(module) {
|
||||
|
||||
module.exports = window["React"];
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/define property getters */
|
||||
/******/ !function() {
|
||||
/******/ // define getter functions for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, definition) {
|
||||
/******/ for(var key in definition) {
|
||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ }();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||
/******/ !function() {
|
||||
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
||||
/******/ }();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ !function() {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = function(exports) {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ }();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
var __webpack_exports__ = {};
|
||||
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
||||
!function() {
|
||||
/*!**********************************************************!*\
|
||||
!*** ./node_modules/@elementor/locations/dist/index.mjs ***!
|
||||
\**********************************************************/
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ __flushAllInjections: function() { return /* binding */ flushAllInjections; },
|
||||
/* harmony export */ createLocation: function() { return /* binding */ createLocation; }
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
||||
// src/api.tsx
|
||||
|
||||
|
||||
// src/components/injected-component-wrapper.tsx
|
||||
|
||||
|
||||
|
||||
// src/components/error-boundary.tsx
|
||||
|
||||
var ErrorBoundary = class extends react__WEBPACK_IMPORTED_MODULE_0__.Component {
|
||||
state = {
|
||||
hasError: false
|
||||
};
|
||||
static getDerivedStateFromError() {
|
||||
return { hasError: true };
|
||||
}
|
||||
render() {
|
||||
if (this.state.hasError) {
|
||||
return this.props.fallback;
|
||||
}
|
||||
return this.props.children;
|
||||
}
|
||||
};
|
||||
|
||||
// src/components/injected-component-wrapper.tsx
|
||||
function InjectedComponentWrapper({ children }) {
|
||||
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(ErrorBoundary, { fallback: null }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Suspense, { fallback: null }, children));
|
||||
}
|
||||
|
||||
// src/api.tsx
|
||||
|
||||
var DEFAULT_PRIORITY = 10;
|
||||
var flushInjectionsFns = [];
|
||||
function createLocation() {
|
||||
const injections = /* @__PURE__ */ new Map();
|
||||
const getInjections = createGetInjections(injections);
|
||||
const useInjections = createUseInjections(getInjections);
|
||||
const Slot = createSlot(useInjections);
|
||||
const inject = createInject(injections);
|
||||
flushInjectionsFns.push(() => injections.clear());
|
||||
return {
|
||||
inject,
|
||||
getInjections,
|
||||
useInjections,
|
||||
Slot
|
||||
};
|
||||
}
|
||||
function flushAllInjections() {
|
||||
flushInjectionsFns.forEach((flush) => flush());
|
||||
}
|
||||
function wrapInjectedComponent(Component2) {
|
||||
return (props) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(InjectedComponentWrapper, null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component2, { ...props }));
|
||||
}
|
||||
function createSlot(useInjections) {
|
||||
return (props) => {
|
||||
const injections = useInjections();
|
||||
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, injections.map(({ id, component: Component2 }) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component2, { ...props, key: id })));
|
||||
};
|
||||
}
|
||||
function createGetInjections(injections) {
|
||||
return () => [...injections.values()].sort((a, b) => a.priority - b.priority);
|
||||
}
|
||||
function createInject(injections) {
|
||||
return ({ component, id, options = {} }) => {
|
||||
if (injections.has(id) && !options?.overwrite) {
|
||||
console.warn(
|
||||
`An injection with the id "${id}" already exists. Did you mean to use "options.overwrite"?`
|
||||
);
|
||||
return;
|
||||
}
|
||||
injections.set(id, {
|
||||
id,
|
||||
component: wrapInjectedComponent(component),
|
||||
priority: options.priority ?? DEFAULT_PRIORITY
|
||||
});
|
||||
};
|
||||
}
|
||||
function createUseInjections(getInjections) {
|
||||
return () => (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => getInjections(), []);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
}();
|
||||
(window.elementorV2 = window.elementorV2 || {}).locations = __webpack_exports__;
|
||||
/******/ })()
|
||||
;
|
||||
1
wp-content/plugins/elementor/assets/js/packages/locations/locations.min.js
vendored
Normal file
1
wp-content/plugins/elementor/assets/js/packages/locations/locations.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{__flushAllInjections:function(){return l},createLocation:function(){return a}});var n=window.React,r=class extends n.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?this.props.fallback:this.props.children}};function o({children:e}){return n.createElement(r,{fallback:null},n.createElement(n.Suspense,{fallback:null},e))}var i=10,c=[];function a(){const e=new Map,t=function(e){return()=>[...e.values()].sort(((e,t)=>e.priority-t.priority))}(e),r=function(e){return()=>(0,n.useMemo)((()=>e()),[])}(t),a=function(e){return t=>{const r=e();return n.createElement(n.Fragment,null,r.map((({id:e,component:r})=>n.createElement(r,{...t,key:e}))))}}(r),l=function(e){return({component:t,id:r,options:c={}})=>{var a;!e.has(r)||c?.overwrite?e.set(r,{id:r,component:(a=t,e=>n.createElement(o,null,n.createElement(a,{...e}))),priority:c.priority??i}):console.warn(`An injection with the id "${r}" already exists. Did you mean to use "options.overwrite"?`)}}(e);return c.push((()=>e.clear())),{inject:l,getInjections:t,useInjections:r,Slot:a}}function l(){c.forEach((e=>e()))}(window.elementorV2=window.elementorV2||{}).locations=t}();
|
||||
Reference in New Issue
Block a user