From d7a5b140ec040fb9156bd447d4fbb9083f29bcb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sat, 12 Oct 2024 09:42:21 +0200 Subject: [PATCH] use builds not dev js --- build/reminder/plugin.asset.php | 5 +- build/reminder/plugin.js | 216 +------------------------------- build/reminder/plugin.js.map | 1 - 3 files changed, 2 insertions(+), 220 deletions(-) delete mode 100644 build/reminder/plugin.js.map diff --git a/build/reminder/plugin.asset.php b/build/reminder/plugin.asset.php index e5882df..169666b 100644 --- a/build/reminder/plugin.asset.php +++ b/build/reminder/plugin.asset.php @@ -1,4 +1 @@ - array( 'react-jsx-runtime', 'wp-components', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-i18n', 'wp-plugins' ), - 'version' => 'f38cf2ab9e8621193407', -); + array('react-jsx-runtime', 'wp-components', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-i18n', 'wp-plugins'), 'version' => 'd491284dfb7e5078a777'); diff --git a/build/reminder/plugin.js b/build/reminder/plugin.js index 99955d4..967d07b 100644 --- a/build/reminder/plugin.js +++ b/build/reminder/plugin.js @@ -1,215 +1 @@ -/******/ (() => { // webpackBootstrap -/******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ "react/jsx-runtime": -/*!**********************************!*\ - !*** external "ReactJSXRuntime" ***! - \**********************************/ -/***/ ((module) => { - -module.exports = window["ReactJSXRuntime"]; - -/***/ }), - -/***/ "@wordpress/components": -/*!************************************!*\ - !*** external ["wp","components"] ***! - \************************************/ -/***/ ((module) => { - -module.exports = window["wp"]["components"]; - -/***/ }), - -/***/ "@wordpress/core-data": -/*!**********************************!*\ - !*** external ["wp","coreData"] ***! - \**********************************/ -/***/ ((module) => { - -module.exports = window["wp"]["coreData"]; - -/***/ }), - -/***/ "@wordpress/data": -/*!******************************!*\ - !*** external ["wp","data"] ***! - \******************************/ -/***/ ((module) => { - -module.exports = window["wp"]["data"]; - -/***/ }), - -/***/ "@wordpress/editor": -/*!********************************!*\ - !*** external ["wp","editor"] ***! - \********************************/ -/***/ ((module) => { - -module.exports = window["wp"]["editor"]; - -/***/ }), - -/***/ "@wordpress/i18n": -/*!******************************!*\ - !*** external ["wp","i18n"] ***! - \******************************/ -/***/ ((module) => { - -module.exports = window["wp"]["i18n"]; - -/***/ }), - -/***/ "@wordpress/plugins": -/*!*********************************!*\ - !*** external ["wp","plugins"] ***! - \*********************************/ -/***/ ((module) => { - -module.exports = window["wp"]["plugins"]; - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // 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/compat get default export */ -/******/ (() => { -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = (module) => { -/******/ var getter = module && module.__esModule ? -/******/ () => (module['default']) : -/******/ () => (module); -/******/ __webpack_require__.d(getter, { a: getter }); -/******/ return getter; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = (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 */ -/******/ (() => { -/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __webpack_require__.r = (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. -(() => { -/*!********************************!*\ - !*** ./src/reminder/plugin.js ***! - \********************************/ -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/editor */ "@wordpress/editor"); -/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_editor__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/plugins */ "@wordpress/plugins"); -/* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); -/* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__); - - - - - - - -const reminderTimeGapDefault = activityPubEventBridge.reminderTypeGap; -const Reminder = () => { - const postType = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useSelect)(select => select('core/editor').getCurrentPostType(), []); - const [meta, setMeta] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__.useEntityProp)('postType', postType, 'meta'); - const reminderTimeGap = meta?.activitypub_event_bridge_reminder_time_gap ? meta?.activitypub_event_bridge_reminder_time_gap : reminderTimeGapDefault; - return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_editor__WEBPACK_IMPORTED_MODULE_0__.PluginDocumentSettingPanel, { - name: "activitypub", - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Send reminder before event\'s start', 'activitypub'), - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.SelectControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Time gap', 'activitypub'), - value: reminderTimeGap, - options: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Disabled', 'activitypub-event-bridge'), - value: 0 - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('6 hours', 'activitypub-event-bridge'), - value: 21600 - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('1 day', 'activitypub-event-bridge'), - value: 86400 - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('3 days', 'activitypub-event-bridge'), - value: 259200 - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('1 week', 'activitypub-event-bridge'), - value: 604800 - }], - onChange: value => { - setMeta({ - ...meta, - activitypub_event_bridge_reminder_time_gap: value - }); - }, - __nextHasNoMarginBottom: true - }) - }); -}; -(0,_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__.registerPlugin)('activitypub-event-bridge-reminder', { - render: Reminder -}); -})(); - -/******/ })() -; -//# sourceMappingURL=plugin.js.map \ No newline at end of file +(()=>{"use strict";const e=window.wp.editor,t=window.wp.plugins,i=window.wp.components,n=window.wp.data,a=window.wp.coreData,r=window.wp.i18n,d=window.ReactJSXRuntime,p=activityPubEventBridge.reminderTypeGap;(0,t.registerPlugin)("activitypub-event-bridge-reminder",{render:()=>{const t=(0,n.useSelect)((e=>e("core/editor").getCurrentPostType()),[]),[_,b]=(0,a.useEntityProp)("postType",t,"meta"),u=_?.activitypub_event_bridge_reminder_time_gap?_?.activitypub_event_bridge_reminder_time_gap:p;return(0,d.jsx)(e.PluginDocumentSettingPanel,{name:"activitypub",title:(0,r.__)("Send reminder before event's start","activitypub"),children:(0,d.jsx)(i.SelectControl,{label:(0,r.__)("Time gap","activitypub"),value:u,options:[{label:(0,r.__)("Disabled","activitypub-event-bridge"),value:0},{label:(0,r.__)("6 hours","activitypub-event-bridge"),value:21600},{label:(0,r.__)("1 day","activitypub-event-bridge"),value:86400},{label:(0,r.__)("3 days","activitypub-event-bridge"),value:259200},{label:(0,r.__)("1 week","activitypub-event-bridge"),value:604800}],onChange:e=>{b({..._,activitypub_event_bridge_reminder_time_gap:e})},__nextHasNoMarginBottom:!0})})}})})(); \ No newline at end of file diff --git a/build/reminder/plugin.js.map b/build/reminder/plugin.js.map deleted file mode 100644 index 2eaaa1c..0000000 --- a/build/reminder/plugin.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reminder/plugin.js","mappings":";;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;;;;;ACN+D;AACX;AACE;AACV;AACS;AAChB;AAAA;AAErC,MAAMQ,sBAAsB,GAAGC,sBAAsB,CAACC,eAAe;AAErE,MAAMC,QAAQ,GAAGA,CAAA,KAAM;EACtB,MAAMC,QAAQ,GAAGT,0DAAS,CACvBU,MAAM,IAAMA,MAAM,CAAE,aAAc,CAAC,CAACC,kBAAkB,CAAC,CAAC,EAC1D,EACD,CAAC;EACD,MAAM,CAAEC,IAAI,EAAEC,OAAO,CAAE,GAAGZ,mEAAa,CAAE,UAAU,EAAEQ,QAAQ,EAAE,MAAO,CAAC;EAEvE,MAAMK,eAAe,GAAGF,IAAI,EAAEG,0CAA0C,GAAGH,IAAI,EAAEG,0CAA0C,GAAGV,sBAAsB;EAEpJ,oBACCD,sDAAA,CAACP,yEAA0B;IAC1BmB,IAAI,EAAC,aAAa;IAClBC,KAAK,EAAGf,mDAAE,CAAE,qCAAqC,EAAE,aAAc,CAAG;IAAAgB,QAAA,eAEpEd,sDAAA,CAACL,gEAAa;MACboB,KAAK,EAAGjB,mDAAE,CAAE,UAAU,EAAE,aAAc,CAAG;MACzCkB,KAAK,EAAGN,eAAiB;MACzBO,OAAO,EAAG,CACT;QAAEF,KAAK,EAAEjB,mDAAE,CAAE,UAAU,EAAE,0BAA2B,CAAC;QAAEkB,KAAK,EAAE;MAAE,CAAC,EACjE;QAAED,KAAK,EAAEjB,mDAAE,CAAE,SAAS,EAAE,0BAA2B,CAAC;QAAEkB,KAAK,EAAE;MAAM,CAAC,EACpE;QAAED,KAAK,EAAEjB,mDAAE,CAAE,OAAO,EAAE,0BAA2B,CAAC;QAAEkB,KAAK,EAAE;MAAM,CAAC,EAClE;QAAED,KAAK,EAAEjB,mDAAE,CAAE,QAAQ,EAAE,0BAA2B,CAAC;QAAEkB,KAAK,EAAE;MAAO,CAAC,EACpE;QAAED,KAAK,EAAEjB,mDAAE,CAAE,QAAQ,EAAE,0BAA2B,CAAC;QAAEkB,KAAK,EAAE;MAAO,CAAC,CAClE;MACHE,QAAQ,EAAKF,KAAK,IAAM;QACvBP,OAAO,CAAE;UAAE,GAAGD,IAAI;UAAEG,0CAA0C,EAAEK;QAAM,CAAE,CAAC;MAC1E,CAAG;MACHG,uBAAuB;IAAA,CACvB;EAAC,CACyB,CAAC;AAE/B,CAAC;AAEDzB,kEAAc,CAAE,mCAAmC,EAAE;EAAE0B,MAAM,EAAEhB;AAAS,CAAE,CAAC,C","sources":["webpack://activitypub-poll/external window \"ReactJSXRuntime\"","webpack://activitypub-poll/external window [\"wp\",\"components\"]","webpack://activitypub-poll/external window [\"wp\",\"coreData\"]","webpack://activitypub-poll/external window [\"wp\",\"data\"]","webpack://activitypub-poll/external window [\"wp\",\"editor\"]","webpack://activitypub-poll/external window [\"wp\",\"i18n\"]","webpack://activitypub-poll/external window [\"wp\",\"plugins\"]","webpack://activitypub-poll/webpack/bootstrap","webpack://activitypub-poll/webpack/runtime/compat get default export","webpack://activitypub-poll/webpack/runtime/define property getters","webpack://activitypub-poll/webpack/runtime/hasOwnProperty shorthand","webpack://activitypub-poll/webpack/runtime/make namespace object","webpack://activitypub-poll/./src/reminder/plugin.js"],"sourcesContent":["module.exports = window[\"ReactJSXRuntime\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"coreData\"];","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"editor\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"wp\"][\"plugins\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { PluginDocumentSettingPanel } from '@wordpress/editor';\nimport { registerPlugin } from '@wordpress/plugins';\nimport { SelectControl } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { useEntityProp } from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\n\nconst reminderTimeGapDefault = activityPubEventBridge.reminderTypeGap;\n\nconst Reminder = () => {\n\tconst postType = useSelect(\n\t\t( select ) => select( 'core/editor' ).getCurrentPostType(),\n\t\t[]\n\t);\n\tconst [ meta, setMeta ] = useEntityProp( 'postType', postType, 'meta' );\n\n\tconst reminderTimeGap = meta?.activitypub_event_bridge_reminder_time_gap ? meta?.activitypub_event_bridge_reminder_time_gap : reminderTimeGapDefault;\n\n\treturn (\n\t\t\n\t\t\t {\n\t\t\t\t\tsetMeta( { ...meta, activitypub_event_bridge_reminder_time_gap: value } );\n\t\t\t\t} }\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t/>\n\t\t\n\t);\n}\n\nregisterPlugin( 'activitypub-event-bridge-reminder', { render: Reminder } );"],"names":["PluginDocumentSettingPanel","registerPlugin","SelectControl","useSelect","useEntityProp","__","jsx","_jsx","reminderTimeGapDefault","activityPubEventBridge","reminderTypeGap","Reminder","postType","select","getCurrentPostType","meta","setMeta","reminderTimeGap","activitypub_event_bridge_reminder_time_gap","name","title","children","label","value","options","onChange","__nextHasNoMarginBottom","render"],"sourceRoot":""} \ No newline at end of file