: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
value: function editTrigger(event) {
value: function submitTrigger(event) {
var _this$props2 = this.props,
isActive = _this$props2.isActive,
value = _this$props2.value,
onChange = _this$props2.onChange,
speak = _this$props2.speak;
var _this$state = this.state,
popupId = _this$state.popupId,
doDefault = _this$state.doDefault;
var format = Object(_utils__WEBPACK_IMPORTED_MODULE_14__["createTriggerFormat"])({
if (Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_13__["isCollapsed"])(value) && !isActive) {
var toInsert = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_13__["applyFormat"])(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_13__["create"])({
text: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Open Popup', 'popup-maker')
}), format, 0, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Open Popup', 'popup-maker').length);
onChange(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_13__["insert"])(value, toInsert));
onChange(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_13__["applyFormat"])(value, format));
speak(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Trigger edited.', 'popup-maker'), 'assertive');
speak(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Trigger inserted.', 'popup-maker'), 'assertive');
value: function onFocusOutside() {
value: function resetState() {
this.props.stopAddingTrigger();
value: function render() {
* @constant {boolean} isActive True when the cursor is inside an existing trigger
* @constant {boolean} addingTrigger True when the user has clicked the add trigger button
* @constant {Object} activeAttributes Object containing the current attribute values for the selected text.
* @constant {Object} value Object containing the current rich text selection object containing position & formats.
* @constant {Object} value.activeFormats Array of registered & active WPFormat objects.
* @constant {number} value.formats ?? Array of format history for the active text.
* @constant {number} value.start Start offset of selected text
* @constant {number} value.end End offset of selected text.
* @constant {string} value.text Selected text.
var _this$props3 = this.props,
isActive = _this$props3.isActive,
addingTrigger = _this$props3.addingTrigger,
value = _this$props3.value,
noticeUI = _this$props3.noticeUI; // If the user is not adding a trigger from the toolbar or actively inside render nothing.
if (!isActive && !addingTrigger) {
var _this$state2 = this.state,
popupId = _this$state2.popupId,
doDefault = _this$state2.doDefault;
var showInput = isShowingInput(this.props, this.state);
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(TriggerPopoverAtText, {
addingTrigger: addingTrigger,
onFocusOutside: this.onFocusOutside,
onClose: this.resetState,
focusOnMount: showInput ? 'firstElement' : false,
renderSettings: function renderSettings() {
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["ToggleControl"], {
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Do default browser action?', 'popup-maker'),
onChange: _this2.setDoDefault
}, showInput ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_components_trigger_popover_popup_trigger_editor__WEBPACK_IMPORTED_MODULE_16__["default"], {
className: "editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",
onChangeInputValue: this.setPopupID,
onKeyDown: this.onKeyDown,
onKeyPress: stopKeyPropagation,
onSubmit: this.submitTrigger
}) : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_components_trigger_popover_popup_trigger_viewer__WEBPACK_IMPORTED_MODULE_17__["default"], {
className: "editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",
onKeyPress: stopKeyPropagation,
onEditLinkClick: this.editTrigger // linkClassName=""
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(props, state) {
var activeAttributes = props.activeAttributes;
var _activeAttributes$pop = activeAttributes.popupId,
popupId = _activeAttributes$pop === void 0 ? '' : _activeAttributes$pop;
var _activeAttributes$doD = activeAttributes.doDefault,
doDefault = _activeAttributes$doD === void 0 ? false : _activeAttributes$doD; // Convert string value to boolean for comparison.
if (window._.isString(doDefault)) {
doDefault = '1' === doDefault;
if (!isShowingInput(props, state)) {
if (popupId !== state.popupId) {
update.popupId = popupId;
if (doDefault !== state.doDefault) {
update.doDefault = doDefault;
return Object.keys(update).length ? update : null;
return InlinePopupTriggerUI;
}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["Component"]);
/* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["withSpokenMessages"])(Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["withNotices"])(InlinePopupTriggerUI)));
/***/ "./src/block-editor/formats/popup-trigger/utils.js":
/*!*********************************************************!*\
!*** ./src/block-editor/formats/popup-trigger/utils.js ***!
\*********************************************************/
/*! exports provided: createTriggerFormat */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createTriggerFormat", function() { return createTriggerFormat; });
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./src/block-editor/formats/popup-trigger/index.js");
* Generates the format object that will be applied to the trigger text.
* @param {Object} options
* @param {number} options.popupId The popup ID.
* @param {boolean} options.doDefault Whether this trigger will act normally when clicked.
* @return {Object} The final format object.
function createTriggerFormat(_ref) {
var _ref$popupId = _ref.popupId,
popupId = _ref$popupId === void 0 ? 0 : _ref$popupId,
_ref$doDefault = _ref.doDefault,
doDefault = _ref$doDefault === void 0 ? false : _ref$doDefault;
var doDefaultClass = doDefault ? 'pum-do-default' : '';
type: _index__WEBPACK_IMPORTED_MODULE_0__["name"],
class: "popmake-".concat(popupId, " ").concat(doDefaultClass),
popupId: "".concat(popupId),
doDefault: doDefault ? '1' : '0'
/***/ "./src/block-editor/icons/gears.js":
/*!*****************************************!*\
!*** ./src/block-editor/icons/gears.js ***!
\*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
var GearsIcon = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('svg', {
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('path', {
d: 'M348,327.195v-35.741l-32.436-11.912c-2.825-10.911-6.615-21.215-12.216-30.687l0.325-0.042l15.438-32.153l-25.2-25.269 l-32.118,15.299l-0.031,0.045c-9.472-5.601-19.758-9.156-30.671-11.978L219.186,162h-35.739l-11.913,32.759 c-10.913,2.821-21.213,6.774-30.685,12.379l-0.048-0.248l-32.149-15.399l-25.269,25.219l15.299,32.124l0.05,0.039 c-5.605,9.471-11.159,19.764-13.98,30.675L50,291.454v35.741l34.753,11.913c2.821,10.915,7.774,21.211,13.38,30.685l0.249,0.045 l-15.147,32.147l25.343,25.274l32.188-15.298l0.065-0.046c9.474,5.597,19.782,10.826,30.695,13.652L183.447,460h35.739 l11.915-34.432c10.913-2.826,21.209-7.614,30.681-13.215l0.05-0.175l32.151,15.192l25.267-25.326l-15.299-32.182l-0.046-0.061 c5.601-9.473,8.835-19.776,11.66-30.688L348,327.195z M201.318,368.891c-32.897,0-59.566-26.662-59.566-59.565 c0-32.896,26.669-59.568,59.566-59.568c32.901,0,59.566,26.672,59.566,59.568C260.884,342.229,234.219,368.891,201.318,368.891z'
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('path', {
d: 'M462.238,111.24l-7.815-18.866l-20.23,1.012c-3.873-5.146-8.385-9.644-13.417-13.42l0.038-0.043l1.06-20.318l-18.859-7.822 L389.385,66.89l-0.008,0.031c-6.229-0.883-12.619-0.933-18.988-0.025L356.76,51.774l-18.867,7.815l1.055,20.32 c-5.152,3.873-9.627,8.422-13.403,13.46l-0.038-0.021l-20.317-1.045l-7.799,18.853l15.103,13.616l0.038,0.021 c-0.731,5.835-1.035,12.658-0.133,19.038l-15.208,13.662l7.812,18.87l20.414-1.086c3.868,5.144,8.472,9.613,13.495,13.385 l0.013,0.025l-1.03,20.312l20.668,7.815L374,201.703v-0.033c4,0.731,10.818,0.935,17.193,0.04l12.729,15.114l18.42-7.813 l-1.286-20.324c5.144-3.875,9.521-8.424,13.297-13.456l-0.023,0.011l20.287,1.047l7.802-18.864l-15.121-13.624l-0.033-0.019 c0.877-6.222,0.852-12.58-0.05-18.953L462.238,111.24z M392.912,165.741c-17.359,7.19-37.27-1.053-44.462-18.421 c-7.196-17.364,1.047-37.272,18.415-44.465c17.371-7.192,37.274,1.053,44.471,18.417 C418.523,138.643,410.276,158.547,392.912,165.741z'
/* harmony default export */ __webpack_exports__["default"] = (GearsIcon);
/***/ "./src/block-editor/icons/logo.js":
/*!****************************************!*\
!*** ./src/block-editor/icons/logo.js ***!
\****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
var LogoIcon = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('svg', {
className: 'popup-trigger-button-svg'
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('path', {
d: 'M 74.98 0.00 L 80.18 0.00 C 86.85 0.96 93.11 3.19 97.92 8.09 C 102.82 12.91 105.07 19.19 106.00 25.89 L 106.00 29.25 C 105.01 36.93 101.84 43.76 95.96 48.90 C 85.62 57.23 75.10 65.38 64.88 73.86 C 58.14 79.85 49.63 82.94 40.76 84.00 L 36.17 84.00 C 27.56 83.00 19.39 80.03 12.89 74.16 C 5.17 67.38 1.08 57.89 0.00 47.78 L 0.00 43.19 C 1.06 33.34 4.97 24.08 12.35 17.32 C 19.55 10.62 29.39 7.33 38.98 6.07 C 50.98 4.07 63.06 2.41 74.98 0.00 Z',
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('path', {
d: 'M 73.27 3.38 C 78.51 2.46 83.84 3.16 88.72 5.25 C 99.12 9.98 105.12 21.94 102.29 33.09 C 100.93 39.34 97.06 44.25 92.19 48.20 C 84.32 54.30 76.63 60.62 68.82 66.78 C 65.27 69.54 61.99 72.75 58.21 75.17 C 53.04 78.31 47.09 80.42 41.04 80.90 C 26.64 81.98 12.34 73.74 6.37 60.53 C 0.78 48.69 2.33 34.56 10.17 24.12 C 16.07 16.10 25.11 11.68 34.69 9.75 C 47.55 7.61 60.45 5.72 73.27 3.38 Z',
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('path', {
d: 'M 73.39 7.40 C 79.51 6.31 85.83 7.34 90.84 11.17 C 97.78 16.34 100.76 25.75 97.94 33.97 C 96.07 39.49 92.17 43.26 87.63 46.67 C 80.70 52.04 73.92 57.62 67.04 63.05 C 61.52 67.32 57.24 72.00 50.55 74.56 C 39.66 79.19 26.67 77.04 17.82 69.21 C 10.09 62.55 6.01 52.13 7.21 41.99 C 8.21 32.78 13.46 24.27 21.21 19.22 C 29.30 14.01 37.69 13.29 46.90 11.83 C 55.73 10.34 64.58 9.05 73.39 7.40 Z',
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('path', {
d: 'M 79.33 11.15 C 80.91 11.34 82.49 11.77 84.05 12.13 C 83.96 13.78 83.90 15.42 83.83 17.07 C 85.21 18.44 86.59 19.81 87.96 21.19 C 89.56 21.12 91.16 21.05 92.76 20.97 C 93.19 22.58 93.62 24.19 94.07 25.79 C 92.62 26.56 91.18 27.34 89.74 28.11 C 89.27 30.00 88.80 31.89 88.29 33.77 C 89.17 35.11 90.05 36.46 90.93 37.80 C 89.75 38.99 88.56 40.18 87.37 41.36 C 86.03 40.50 84.69 39.65 83.36 38.79 C 81.43 39.31 79.50 39.83 77.57 40.33 C 76.86 41.76 76.14 43.18 75.44 44.61 C 73.84 44.14 72.22 43.70 70.60 43.30 C 70.70 41.70 70.79 40.09 70.89 38.49 C 69.46 37.08 68.05 35.65 66.64 34.22 C 65.07 34.33 63.50 34.41 61.94 34.52 C 61.54 32.88 61.09 31.25 60.61 29.63 C 62.04 28.92 63.45 28.20 64.87 27.48 C 65.38 25.56 65.93 23.65 66.45 21.74 C 65.57 20.37 64.69 19.01 63.80 17.65 C 64.99 16.46 66.17 15.27 67.36 14.08 C 68.70 14.97 70.04 15.86 71.38 16.75 C 73.20 16.26 75.02 15.78 76.84 15.32 C 77.62 13.91 78.39 12.46 79.33 11.15 Z',
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('path', {
d: 'M 31.46 18.53 C 35.73 17.41 39.75 17.90 44.06 18.38 C 43.69 20.25 43.38 22.13 43.00 23.99 C 46.30 25.32 49.40 26.46 52.10 28.89 C 56.07 32.21 58.00 36.65 59.46 41.49 C 61.32 41.26 63.19 41.04 65.06 40.81 C 65.30 45.35 65.55 49.64 64.02 54.02 C 62.82 57.89 60.52 60.95 58.09 64.10 C 56.66 62.88 55.24 61.65 53.81 60.43 C 50.80 62.88 47.90 65.17 44.07 66.21 C 39.50 67.65 35.11 67.00 30.55 65.99 C 29.84 67.72 29.12 69.46 28.40 71.19 C 24.48 69.34 20.78 67.44 17.87 64.12 C 14.90 61.08 13.34 57.40 11.80 53.51 C 13.55 52.89 15.31 52.27 17.06 51.65 C 16.43 47.16 15.95 42.88 17.48 38.49 C 18.70 34.52 21.22 31.56 23.95 28.54 C 22.80 27.05 21.69 25.54 20.55 24.05 C 23.99 21.67 27.30 19.46 31.46 18.53 Z',
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('path', {
d: 'M 76.34 24.32 C 79.21 23.52 81.89 26.79 80.48 29.46 C 79.35 31.71 76.40 32.21 74.62 30.38 C 72.72 28.34 73.67 25.06 76.34 24.32 Z',
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('path', {
d: 'M 33.46 26.53 C 40.08 24.87 47.25 27.17 51.85 32.16 C 57.28 37.94 58.59 46.87 54.94 53.94 C 51.18 61.61 42.36 65.97 33.97 64.14 C 25.47 62.43 18.97 54.70 18.77 46.02 C 18.32 36.96 24.64 28.60 33.46 26.53 Z',
/* harmony default export */ __webpack_exports__["default"] = (LogoIcon);
/***/ "./src/block-editor/index.js":
/*!***********************************!*\
!*** ./src/block-editor/index.js ***!
\***********************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _formats__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formats */ "./src/block-editor/formats/index.js");
/* harmony import */ var _block_extensions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./block-extensions */ "./src/block-editor/block-extensions/index.js");
/*******************************************************************************
* Copyright (c) 2020, Code Atlantic LLC.
******************************************************************************/
/***/ "@wordpress/block-editor":
/*!*************************************!*\
!*** external ["wp","blockEditor"] ***!
\*************************************/
/*! no static exports found */
/***/ (function(module, exports) {
(function() { module.exports = window["wp"]["blockEditor"]; }());
/***/ "@wordpress/components":
/*!************************************!*\
!*** external ["wp","components"] ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports) {
(function() { module.exports = window["wp"]["components"]; }());
/***/ "@wordpress/compose":
/*!*********************************!*\
!*** external ["wp","compose"] ***!
\*********************************/
/*! no static exports found */
/***/ (function(module, exports) {
(function() { module.exports = window["wp"]["compose"]; }());
/*!*****************************!*\
!*** external ["wp","dom"] ***!
\*****************************/
/*! no static exports found */
/***/ (function(module, exports) {
(function() { module.exports = window["wp"]["dom"]; }());
/***/ "@wordpress/element":
/*!*********************************!*\
!*** external ["wp","element"] ***!
\*********************************/
/*! no static exports found */
/***/ (function(module, exports) {
(function() { module.exports = window["wp"]["element"]; }());
/***/ "@wordpress/hooks":
/*!*******************************!*\
!*** external ["wp","hooks"] ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports) {
(function() { module.exports = window["wp"]["hooks"]; }());
/*!******************************!*\
!*** external ["wp","i18n"] ***!
\******************************/
/*! no static exports found */
/***/ (function(module, exports) {
(function() { module.exports = window["wp"]["i18n"]; }());
/***/ "@wordpress/keycodes":
/*!**********************************!*\
!*** external ["wp","keycodes"] ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports) {
(function() { module.exports = window["wp"]["keycodes"]; }());
/***/ "@wordpress/rich-text":
/*!**********************************!*\
!*** external ["wp","richText"] ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports) {
(function() { module.exports = window["wp"]["richText"]; }());
//# sourceMappingURL=block-editor.js.map