215 lines
No EOL
8.8 KiB
JavaScript
215 lines
No EOL
8.8 KiB
JavaScript
/******/ (() => { // 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
|