Edit File by line
/home/barbar84/public_h.../wp-inclu.../js/dist
File: notices.js
this["wp"] = this["wp"] || {}; this["wp"]["notices"] =
[0] Fix | Delete
/******/ (function(modules) { // webpackBootstrap
[1] Fix | Delete
/******/ // The module cache
[2] Fix | Delete
/******/ var installedModules = {};
[3] Fix | Delete
/******/
[4] Fix | Delete
/******/ // The require function
[5] Fix | Delete
/******/ function __webpack_require__(moduleId) {
[6] Fix | Delete
/******/
[7] Fix | Delete
/******/ // Check if module is in cache
[8] Fix | Delete
/******/ if(installedModules[moduleId]) {
[9] Fix | Delete
/******/ return installedModules[moduleId].exports;
[10] Fix | Delete
/******/ }
[11] Fix | Delete
/******/ // Create a new module (and put it into the cache)
[12] Fix | Delete
/******/ var module = installedModules[moduleId] = {
[13] Fix | Delete
/******/ i: moduleId,
[14] Fix | Delete
/******/ l: false,
[15] Fix | Delete
/******/ exports: {}
[16] Fix | Delete
/******/ };
[17] Fix | Delete
/******/
[18] Fix | Delete
/******/ // Execute the module function
[19] Fix | Delete
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
[20] Fix | Delete
/******/
[21] Fix | Delete
/******/ // Flag the module as loaded
[22] Fix | Delete
/******/ module.l = true;
[23] Fix | Delete
/******/
[24] Fix | Delete
/******/ // Return the exports of the module
[25] Fix | Delete
/******/ return module.exports;
[26] Fix | Delete
/******/ }
[27] Fix | Delete
/******/
[28] Fix | Delete
/******/
[29] Fix | Delete
/******/ // expose the modules object (__webpack_modules__)
[30] Fix | Delete
/******/ __webpack_require__.m = modules;
[31] Fix | Delete
/******/
[32] Fix | Delete
/******/ // expose the module cache
[33] Fix | Delete
/******/ __webpack_require__.c = installedModules;
[34] Fix | Delete
/******/
[35] Fix | Delete
/******/ // define getter function for harmony exports
[36] Fix | Delete
/******/ __webpack_require__.d = function(exports, name, getter) {
[37] Fix | Delete
/******/ if(!__webpack_require__.o(exports, name)) {
[38] Fix | Delete
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
[39] Fix | Delete
/******/ }
[40] Fix | Delete
/******/ };
[41] Fix | Delete
/******/
[42] Fix | Delete
/******/ // define __esModule on exports
[43] Fix | Delete
/******/ __webpack_require__.r = function(exports) {
[44] Fix | Delete
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
[45] Fix | Delete
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
[46] Fix | Delete
/******/ }
[47] Fix | Delete
/******/ Object.defineProperty(exports, '__esModule', { value: true });
[48] Fix | Delete
/******/ };
[49] Fix | Delete
/******/
[50] Fix | Delete
/******/ // create a fake namespace object
[51] Fix | Delete
/******/ // mode & 1: value is a module id, require it
[52] Fix | Delete
/******/ // mode & 2: merge all properties of value into the ns
[53] Fix | Delete
/******/ // mode & 4: return value when already ns object
[54] Fix | Delete
/******/ // mode & 8|1: behave like require
[55] Fix | Delete
/******/ __webpack_require__.t = function(value, mode) {
[56] Fix | Delete
/******/ if(mode & 1) value = __webpack_require__(value);
[57] Fix | Delete
/******/ if(mode & 8) return value;
[58] Fix | Delete
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
[59] Fix | Delete
/******/ var ns = Object.create(null);
[60] Fix | Delete
/******/ __webpack_require__.r(ns);
[61] Fix | Delete
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
[62] Fix | Delete
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
[63] Fix | Delete
/******/ return ns;
[64] Fix | Delete
/******/ };
[65] Fix | Delete
/******/
[66] Fix | Delete
/******/ // getDefaultExport function for compatibility with non-harmony modules
[67] Fix | Delete
/******/ __webpack_require__.n = function(module) {
[68] Fix | Delete
/******/ var getter = module && module.__esModule ?
[69] Fix | Delete
/******/ function getDefault() { return module['default']; } :
[70] Fix | Delete
/******/ function getModuleExports() { return module; };
[71] Fix | Delete
/******/ __webpack_require__.d(getter, 'a', getter);
[72] Fix | Delete
/******/ return getter;
[73] Fix | Delete
/******/ };
[74] Fix | Delete
/******/
[75] Fix | Delete
/******/ // Object.prototype.hasOwnProperty.call
[76] Fix | Delete
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
[77] Fix | Delete
/******/
[78] Fix | Delete
/******/ // __webpack_public_path__
[79] Fix | Delete
/******/ __webpack_require__.p = "";
[80] Fix | Delete
/******/
[81] Fix | Delete
/******/
[82] Fix | Delete
/******/ // Load entry module and return exports
[83] Fix | Delete
/******/ return __webpack_require__(__webpack_require__.s = "Ko7W");
[84] Fix | Delete
/******/ })
[85] Fix | Delete
/************************************************************************/
[86] Fix | Delete
/******/ ({
[87] Fix | Delete
[88] Fix | Delete
/***/ "1ZqX":
[89] Fix | Delete
/***/ (function(module, exports) {
[90] Fix | Delete
[91] Fix | Delete
(function() { module.exports = window["wp"]["data"]; }());
[92] Fix | Delete
[93] Fix | Delete
/***/ }),
[94] Fix | Delete
[95] Fix | Delete
/***/ "25BE":
[96] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[97] Fix | Delete
[98] Fix | Delete
"use strict";
[99] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
[100] Fix | Delete
function _iterableToArray(iter) {
[101] Fix | Delete
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
[102] Fix | Delete
}
[103] Fix | Delete
[104] Fix | Delete
/***/ }),
[105] Fix | Delete
[106] Fix | Delete
/***/ "BsWD":
[107] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[108] Fix | Delete
[109] Fix | Delete
"use strict";
[110] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
[111] Fix | Delete
/* harmony import */ var _babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a3WO");
[112] Fix | Delete
[113] Fix | Delete
function _unsupportedIterableToArray(o, minLen) {
[114] Fix | Delete
if (!o) return;
[115] Fix | Delete
if (typeof o === "string") return Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
[116] Fix | Delete
var n = Object.prototype.toString.call(o).slice(8, -1);
[117] Fix | Delete
if (n === "Object" && o.constructor) n = o.constructor.name;
[118] Fix | Delete
if (n === "Map" || n === "Set") return Array.from(o);
[119] Fix | Delete
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
[120] Fix | Delete
}
[121] Fix | Delete
[122] Fix | Delete
/***/ }),
[123] Fix | Delete
[124] Fix | Delete
/***/ "KQm4":
[125] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[126] Fix | Delete
[127] Fix | Delete
"use strict";
[128] Fix | Delete
[129] Fix | Delete
// EXPORTS
[130] Fix | Delete
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
[131] Fix | Delete
[132] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
[133] Fix | Delete
var arrayLikeToArray = __webpack_require__("a3WO");
[134] Fix | Delete
[135] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
[136] Fix | Delete
[137] Fix | Delete
function _arrayWithoutHoles(arr) {
[138] Fix | Delete
if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
[139] Fix | Delete
}
[140] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
[141] Fix | Delete
var iterableToArray = __webpack_require__("25BE");
[142] Fix | Delete
[143] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
[144] Fix | Delete
var unsupportedIterableToArray = __webpack_require__("BsWD");
[145] Fix | Delete
[146] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
[147] Fix | Delete
function _nonIterableSpread() {
[148] Fix | Delete
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
[149] Fix | Delete
}
[150] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
[151] Fix | Delete
[152] Fix | Delete
[153] Fix | Delete
[154] Fix | Delete
[155] Fix | Delete
function _toConsumableArray(arr) {
[156] Fix | Delete
return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
[157] Fix | Delete
}
[158] Fix | Delete
[159] Fix | Delete
/***/ }),
[160] Fix | Delete
[161] Fix | Delete
/***/ "Ko7W":
[162] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[163] Fix | Delete
[164] Fix | Delete
"use strict";
[165] Fix | Delete
// ESM COMPAT FLAG
[166] Fix | Delete
__webpack_require__.r(__webpack_exports__);
[167] Fix | Delete
[168] Fix | Delete
// EXPORTS
[169] Fix | Delete
__webpack_require__.d(__webpack_exports__, "store", function() { return /* reexport */ store; });
[170] Fix | Delete
[171] Fix | Delete
// NAMESPACE OBJECT: ./node_modules/@wordpress/notices/build-module/store/actions.js
[172] Fix | Delete
var actions_namespaceObject = {};
[173] Fix | Delete
__webpack_require__.r(actions_namespaceObject);
[174] Fix | Delete
__webpack_require__.d(actions_namespaceObject, "createNotice", function() { return createNotice; });
[175] Fix | Delete
__webpack_require__.d(actions_namespaceObject, "createSuccessNotice", function() { return createSuccessNotice; });
[176] Fix | Delete
__webpack_require__.d(actions_namespaceObject, "createInfoNotice", function() { return createInfoNotice; });
[177] Fix | Delete
__webpack_require__.d(actions_namespaceObject, "createErrorNotice", function() { return createErrorNotice; });
[178] Fix | Delete
__webpack_require__.d(actions_namespaceObject, "createWarningNotice", function() { return createWarningNotice; });
[179] Fix | Delete
__webpack_require__.d(actions_namespaceObject, "removeNotice", function() { return removeNotice; });
[180] Fix | Delete
[181] Fix | Delete
// NAMESPACE OBJECT: ./node_modules/@wordpress/notices/build-module/store/selectors.js
[182] Fix | Delete
var selectors_namespaceObject = {};
[183] Fix | Delete
__webpack_require__.r(selectors_namespaceObject);
[184] Fix | Delete
__webpack_require__.d(selectors_namespaceObject, "getNotices", function() { return getNotices; });
[185] Fix | Delete
[186] Fix | Delete
// EXTERNAL MODULE: external ["wp","data"]
[187] Fix | Delete
var external_wp_data_ = __webpack_require__("1ZqX");
[188] Fix | Delete
[189] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
[190] Fix | Delete
var toConsumableArray = __webpack_require__("KQm4");
[191] Fix | Delete
[192] Fix | Delete
// EXTERNAL MODULE: external "lodash"
[193] Fix | Delete
var external_lodash_ = __webpack_require__("YLtl");
[194] Fix | Delete
[195] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
[196] Fix | Delete
var defineProperty = __webpack_require__("rePB");
[197] Fix | Delete
[198] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/notices/build-module/store/utils/on-sub-key.js
[199] Fix | Delete
[200] Fix | Delete
[201] Fix | Delete
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; }
[202] Fix | Delete
[203] Fix | Delete
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; }
[204] Fix | Delete
[205] Fix | Delete
/**
[206] Fix | Delete
* Higher-order reducer creator which creates a combined reducer object, keyed
[207] Fix | Delete
* by a property on the action object.
[208] Fix | Delete
*
[209] Fix | Delete
* @param {string} actionProperty Action property by which to key object.
[210] Fix | Delete
*
[211] Fix | Delete
* @return {Function} Higher-order reducer.
[212] Fix | Delete
*/
[213] Fix | Delete
var on_sub_key_onSubKey = function onSubKey(actionProperty) {
[214] Fix | Delete
return function (reducer) {
[215] Fix | Delete
return function () {
[216] Fix | Delete
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
[217] Fix | Delete
var action = arguments.length > 1 ? arguments[1] : undefined;
[218] Fix | Delete
// Retrieve subkey from action. Do not track if undefined; useful for cases
[219] Fix | Delete
// where reducer is scoped by action shape.
[220] Fix | Delete
var key = action[actionProperty];
[221] Fix | Delete
[222] Fix | Delete
if (key === undefined) {
[223] Fix | Delete
return state;
[224] Fix | Delete
} // Avoid updating state if unchanged. Note that this also accounts for a
[225] Fix | Delete
// reducer which returns undefined on a key which is not yet tracked.
[226] Fix | Delete
[227] Fix | Delete
[228] Fix | Delete
var nextKeyState = reducer(state[key], action);
[229] Fix | Delete
[230] Fix | Delete
if (nextKeyState === state[key]) {
[231] Fix | Delete
return state;
[232] Fix | Delete
}
[233] Fix | Delete
[234] Fix | Delete
return _objectSpread(_objectSpread({}, state), {}, Object(defineProperty["a" /* default */])({}, key, nextKeyState));
[235] Fix | Delete
};
[236] Fix | Delete
};
[237] Fix | Delete
};
[238] Fix | Delete
/* harmony default export */ var on_sub_key = (on_sub_key_onSubKey);
[239] Fix | Delete
[240] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/notices/build-module/store/reducer.js
[241] Fix | Delete
[242] Fix | Delete
[243] Fix | Delete
/**
[244] Fix | Delete
* External dependencies
[245] Fix | Delete
*/
[246] Fix | Delete
[247] Fix | Delete
/**
[248] Fix | Delete
* Internal dependencies
[249] Fix | Delete
*/
[250] Fix | Delete
[251] Fix | Delete
[252] Fix | Delete
/**
[253] Fix | Delete
* Reducer returning the next notices state. The notices state is an object
[254] Fix | Delete
* where each key is a context, its value an array of notice objects.
[255] Fix | Delete
*
[256] Fix | Delete
* @param {Object} state Current state.
[257] Fix | Delete
* @param {Object} action Dispatched action.
[258] Fix | Delete
*
[259] Fix | Delete
* @return {Object} Updated state.
[260] Fix | Delete
*/
[261] Fix | Delete
[262] Fix | Delete
var notices = on_sub_key('context')(function () {
[263] Fix | Delete
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
[264] Fix | Delete
var action = arguments.length > 1 ? arguments[1] : undefined;
[265] Fix | Delete
[266] Fix | Delete
switch (action.type) {
[267] Fix | Delete
case 'CREATE_NOTICE':
[268] Fix | Delete
// Avoid duplicates on ID.
[269] Fix | Delete
return [].concat(Object(toConsumableArray["a" /* default */])(Object(external_lodash_["reject"])(state, {
[270] Fix | Delete
id: action.notice.id
[271] Fix | Delete
})), [action.notice]);
[272] Fix | Delete
[273] Fix | Delete
case 'REMOVE_NOTICE':
[274] Fix | Delete
return Object(external_lodash_["reject"])(state, {
[275] Fix | Delete
id: action.id
[276] Fix | Delete
});
[277] Fix | Delete
}
[278] Fix | Delete
[279] Fix | Delete
return state;
[280] Fix | Delete
});
[281] Fix | Delete
/* harmony default export */ var store_reducer = (notices);
[282] Fix | Delete
[283] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/notices/build-module/store/constants.js
[284] Fix | Delete
/**
[285] Fix | Delete
* Default context to use for notice grouping when not otherwise specified. Its
[286] Fix | Delete
* specific value doesn't hold much meaning, but it must be reasonably unique
[287] Fix | Delete
* and, more importantly, referenced consistently in the store implementation.
[288] Fix | Delete
*
[289] Fix | Delete
* @type {string}
[290] Fix | Delete
*/
[291] Fix | Delete
var DEFAULT_CONTEXT = 'global';
[292] Fix | Delete
/**
[293] Fix | Delete
* Default notice status.
[294] Fix | Delete
*
[295] Fix | Delete
* @type {string}
[296] Fix | Delete
*/
[297] Fix | Delete
[298] Fix | Delete
var DEFAULT_STATUS = 'info';
[299] Fix | Delete
[300] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/notices/build-module/store/actions.js
[301] Fix | Delete
/**
[302] Fix | Delete
* External dependencies
[303] Fix | Delete
*/
[304] Fix | Delete
[305] Fix | Delete
/**
[306] Fix | Delete
* Internal dependencies
[307] Fix | Delete
*/
[308] Fix | Delete
[309] Fix | Delete
[310] Fix | Delete
/**
[311] Fix | Delete
* @typedef {Object} WPNoticeAction Object describing a user action option associated with a notice.
[312] Fix | Delete
*
[313] Fix | Delete
* @property {string} label Message to use as action label.
[314] Fix | Delete
* @property {?string} url Optional URL of resource if action incurs
[315] Fix | Delete
* browser navigation.
[316] Fix | Delete
* @property {?Function} onClick Optional function to invoke when action is
[317] Fix | Delete
* triggered by user.
[318] Fix | Delete
*
[319] Fix | Delete
*/
[320] Fix | Delete
[321] Fix | Delete
/**
[322] Fix | Delete
* Returns an action object used in signalling that a notice is to be created.
[323] Fix | Delete
*
[324] Fix | Delete
* @param {string} [status='info'] Notice status.
[325] Fix | Delete
* @param {string} content Notice message.
[326] Fix | Delete
* @param {Object} [options] Notice options.
[327] Fix | Delete
* @param {string} [options.context='global'] Context under which to
[328] Fix | Delete
* group notice.
[329] Fix | Delete
* @param {string} [options.id] Identifier for notice.
[330] Fix | Delete
* Automatically assigned
[331] Fix | Delete
* if not specified.
[332] Fix | Delete
* @param {boolean} [options.isDismissible=true] Whether the notice can
[333] Fix | Delete
* be dismissed by user.
[334] Fix | Delete
* @param {string} [options.type='default'] Type of notice, one of
[335] Fix | Delete
* `default`, or `snackbar`.
[336] Fix | Delete
* @param {boolean} [options.speak=true] Whether the notice
[337] Fix | Delete
* content should be
[338] Fix | Delete
* announced to screen
[339] Fix | Delete
* readers.
[340] Fix | Delete
* @param {Array<WPNoticeAction>} [options.actions] User actions to be
[341] Fix | Delete
* presented with notice.
[342] Fix | Delete
* @param {Object} [options.icon] An icon displayed with the notice.
[343] Fix | Delete
* @param {boolean} [options.explicitDismiss] Whether the notice includes
[344] Fix | Delete
* an explict dismiss button and
[345] Fix | Delete
* can't be dismissed by clicking
[346] Fix | Delete
* the body of the notice.
[347] Fix | Delete
* @param {Function} [options.onDismiss] Called when the notice is dismissed.
[348] Fix | Delete
*
[349] Fix | Delete
* @return {Object} Action object.
[350] Fix | Delete
*/
[351] Fix | Delete
[352] Fix | Delete
function createNotice() {
[353] Fix | Delete
var status = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_STATUS;
[354] Fix | Delete
var content = arguments.length > 1 ? arguments[1] : undefined;
[355] Fix | Delete
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
[356] Fix | Delete
var _options$speak = options.speak,
[357] Fix | Delete
speak = _options$speak === void 0 ? true : _options$speak,
[358] Fix | Delete
_options$isDismissibl = options.isDismissible,
[359] Fix | Delete
isDismissible = _options$isDismissibl === void 0 ? true : _options$isDismissibl,
[360] Fix | Delete
_options$context = options.context,
[361] Fix | Delete
context = _options$context === void 0 ? DEFAULT_CONTEXT : _options$context,
[362] Fix | Delete
_options$id = options.id,
[363] Fix | Delete
id = _options$id === void 0 ? Object(external_lodash_["uniqueId"])(context) : _options$id,
[364] Fix | Delete
_options$actions = options.actions,
[365] Fix | Delete
actions = _options$actions === void 0 ? [] : _options$actions,
[366] Fix | Delete
_options$type = options.type,
[367] Fix | Delete
type = _options$type === void 0 ? 'default' : _options$type,
[368] Fix | Delete
__unstableHTML = options.__unstableHTML,
[369] Fix | Delete
_options$icon = options.icon,
[370] Fix | Delete
icon = _options$icon === void 0 ? null : _options$icon,
[371] Fix | Delete
_options$explicitDism = options.explicitDismiss,
[372] Fix | Delete
explicitDismiss = _options$explicitDism === void 0 ? false : _options$explicitDism,
[373] Fix | Delete
_options$onDismiss = options.onDismiss,
[374] Fix | Delete
onDismiss = _options$onDismiss === void 0 ? null : _options$onDismiss; // The supported value shape of content is currently limited to plain text
[375] Fix | Delete
// strings. To avoid setting expectation that e.g. a WPElement could be
[376] Fix | Delete
// supported, cast to a string.
[377] Fix | Delete
[378] Fix | Delete
content = String(content);
[379] Fix | Delete
return {
[380] Fix | Delete
type: 'CREATE_NOTICE',
[381] Fix | Delete
context: context,
[382] Fix | Delete
notice: {
[383] Fix | Delete
id: id,
[384] Fix | Delete
status: status,
[385] Fix | Delete
content: content,
[386] Fix | Delete
spokenMessage: speak ? content : null,
[387] Fix | Delete
__unstableHTML: __unstableHTML,
[388] Fix | Delete
isDismissible: isDismissible,
[389] Fix | Delete
actions: actions,
[390] Fix | Delete
type: type,
[391] Fix | Delete
icon: icon,
[392] Fix | Delete
explicitDismiss: explicitDismiss,
[393] Fix | Delete
onDismiss: onDismiss
[394] Fix | Delete
}
[395] Fix | Delete
};
[396] Fix | Delete
}
[397] Fix | Delete
/**
[398] Fix | Delete
* Returns an action object used in signalling that a success notice is to be
[399] Fix | Delete
* created. Refer to `createNotice` for options documentation.
[400] Fix | Delete
*
[401] Fix | Delete
* @see createNotice
[402] Fix | Delete
*
[403] Fix | Delete
* @param {string} content Notice message.
[404] Fix | Delete
* @param {Object} [options] Optional notice options.
[405] Fix | Delete
*
[406] Fix | Delete
* @return {Object} Action object.
[407] Fix | Delete
*/
[408] Fix | Delete
[409] Fix | Delete
function createSuccessNotice(content, options) {
[410] Fix | Delete
return createNotice('success', content, options);
[411] Fix | Delete
}
[412] Fix | Delete
/**
[413] Fix | Delete
* Returns an action object used in signalling that an info notice is to be
[414] Fix | Delete
* created. Refer to `createNotice` for options documentation.
[415] Fix | Delete
*
[416] Fix | Delete
* @see createNotice
[417] Fix | Delete
*
[418] Fix | Delete
* @param {string} content Notice message.
[419] Fix | Delete
* @param {Object} [options] Optional notice options.
[420] Fix | Delete
*
[421] Fix | Delete
* @return {Object} Action object.
[422] Fix | Delete
*/
[423] Fix | Delete
[424] Fix | Delete
function createInfoNotice(content, options) {
[425] Fix | Delete
return createNotice('info', content, options);
[426] Fix | Delete
}
[427] Fix | Delete
/**
[428] Fix | Delete
* Returns an action object used in signalling that an error notice is to be
[429] Fix | Delete
* created. Refer to `createNotice` for options documentation.
[430] Fix | Delete
*
[431] Fix | Delete
* @see createNotice
[432] Fix | Delete
*
[433] Fix | Delete
* @param {string} content Notice message.
[434] Fix | Delete
* @param {Object} [options] Optional notice options.
[435] Fix | Delete
*
[436] Fix | Delete
* @return {Object} Action object.
[437] Fix | Delete
*/
[438] Fix | Delete
[439] Fix | Delete
function createErrorNotice(content, options) {
[440] Fix | Delete
return createNotice('error', content, options);
[441] Fix | Delete
}
[442] Fix | Delete
/**
[443] Fix | Delete
* Returns an action object used in signalling that a warning notice is to be
[444] Fix | Delete
* created. Refer to `createNotice` for options documentation.
[445] Fix | Delete
*
[446] Fix | Delete
* @see createNotice
[447] Fix | Delete
*
[448] Fix | Delete
* @param {string} content Notice message.
[449] Fix | Delete
* @param {Object} [options] Optional notice options.
[450] Fix | Delete
*
[451] Fix | Delete
* @return {Object} Action object.
[452] Fix | Delete
*/
[453] Fix | Delete
[454] Fix | Delete
function createWarningNotice(content, options) {
[455] Fix | Delete
return createNotice('warning', content, options);
[456] Fix | Delete
}
[457] Fix | Delete
/**
[458] Fix | Delete
* Returns an action object used in signalling that a notice is to be removed.
[459] Fix | Delete
*
[460] Fix | Delete
* @param {string} id Notice unique identifier.
[461] Fix | Delete
* @param {string} [context='global'] Optional context (grouping) in which the notice is
[462] Fix | Delete
* intended to appear. Defaults to default context.
[463] Fix | Delete
*
[464] Fix | Delete
* @return {Object} Action object.
[465] Fix | Delete
*/
[466] Fix | Delete
[467] Fix | Delete
function removeNotice(id) {
[468] Fix | Delete
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_CONTEXT;
[469] Fix | Delete
return {
[470] Fix | Delete
type: 'REMOVE_NOTICE',
[471] Fix | Delete
id: id,
[472] Fix | Delete
context: context
[473] Fix | Delete
};
[474] Fix | Delete
}
[475] Fix | Delete
[476] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/notices/build-module/store/selectors.js
[477] Fix | Delete
/**
[478] Fix | Delete
* Internal dependencies
[479] Fix | Delete
*/
[480] Fix | Delete
[481] Fix | Delete
/** @typedef {import('./actions').WPNoticeAction} WPNoticeAction */
[482] Fix | Delete
[483] Fix | Delete
/**
[484] Fix | Delete
* The default empty set of notices to return when there are no notices
[485] Fix | Delete
* assigned for a given notices context. This can occur if the getNotices
[486] Fix | Delete
* selector is called without a notice ever having been created for the
[487] Fix | Delete
* context. A shared value is used to ensure referential equality between
[488] Fix | Delete
* sequential selector calls, since otherwise `[] !== []`.
[489] Fix | Delete
*
[490] Fix | Delete
* @type {Array}
[491] Fix | Delete
*/
[492] Fix | Delete
[493] Fix | Delete
var DEFAULT_NOTICES = [];
[494] Fix | Delete
/**
[495] Fix | Delete
* @typedef {Object} WPNotice Notice object.
[496] Fix | Delete
*
[497] Fix | Delete
* @property {string} id Unique identifier of notice.
[498] Fix | Delete
* @property {string} status Status of notice, one of `success`,
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function