WordPress/wp-includes/js/dist/notices.min.js

1 line
11 KiB
JavaScript
Raw Normal View History

Block Editor: Update the WordPress Packages from Gutenberg 5.3 - @wordpress/a11y@2.2.0 - @wordpress/annotations@1.2.0 - @wordpress/api-fetch@3.1.0 - @wordpress/autop@2.2.0 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0 - @wordpress/babel-preset-default@4.1.0 - @wordpress/blob@2.3.0 - @wordpress/block-editor@1.1.0 - @wordpress/block-library@2.4.0 - @wordpress/block-serialization-default-parser@3.1.0 - @wordpress/blocks@6.2.0 - @wordpress/components@7.2.0 - @wordpress/compose@3.2.0 - @wordpress/core-data@2.2.0 - @wordpress/data@4.4.0 - @wordpress/date@3.2.0 - @wordpress/deprecated@2.2.0 - @wordpress/docgen@1.1.0 - @wordpress/dom-ready@2.2.0 - @wordpress/dom@2.2.0 - @wordpress/e2e-test-utils@1.1.0 - @wordpress/e2e-tests@1.1.0 - @wordpress/edit-post@3.3.0 - @wordpress/edit-widgets@0.2.0 - @wordpress/editor@9.2.0 - @wordpress/element@2.3.0 - @wordpress/escape-html@1.2.0 - @wordpress/eslint-plugin@2.1.0 - @wordpress/format-library@1.4.0 - @wordpress/hooks@2.2.0 - @wordpress/html-entities@2.2.0 - @wordpress/i18n@3.3.0 - @wordpress/keycodes@2.2.0 - @wordpress/list-reusable-blocks@1.3.0 - @wordpress/notices@1.3.0 - @wordpress/nux@3.2.0 - @wordpress/plugins@2.2.0 - @wordpress/priority-queue@1.1.0 - @wordpress/redux-routine@3.2.0 - @wordpress/rich-text@3.2.0 - @wordpress/scripts@3.1.0 - @wordpress/shortcode@2.2.0 - @wordpress/url@2.5.0 - @wordpress/viewport@2.3.0 - @wordpress/wordcount@2.2.0 Built from https://develop.svn.wordpress.org/trunk@44960 git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 13:48:00 +01:00
this.wp=this.wp||{},this.wp.notices=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=371)}({15:function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,"a",function(){return n})},17:function(t,e,r){"use strict";var n=r(34);function o(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||Object(n.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}r.d(e,"a",function(){return o})},2:function(t,e){!function(){t.exports=this.lodash}()},26:function(t,e,r){t.exports=r(54)},34:function(t,e,r){"use strict";function n(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}r.d(e,"a",function(){return n})},371:function(t,e,r){"use strict";r.r(e);var n={};r.r(n),r.d(n,"createNotice",function(){return v}),r.d(n,"createSuccessNotice",function(){return g}),r.d(n,"createInfoNotice",function(){return m}),r.d(n,"createErrorNotice",function(){return b}),r.d(n,"createWarningNotice",function(){return w}),r.d(n,"removeNotice",function(){return O});var o={};r.r(o),r.d(o,"getNotices",function(){return j});var i=r(5),c=r(17),a=r(2),u=r(15),f=r(7),s=function(t){return function(e){return function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,o=n[t];if(void 0===o)return r;var i=e(r[o],n);return i===r[o]?r:Object(f.a)({},r,Object(u.a)({},o,i))}}}("context")(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"CREATE_NOTICE":return[].concat(Object(c.a)(Object(a.reject)(t,{id:e.notice.id})),[e.notice]);case"REMOVE_NOTICE":return Object(a.reject)(t,{id:e.id})}return t}),l=r(26),h=r.n(l),p="global",d="info",y=h.a.mark(v);function v(){var t,e,r,n,o,i,c,u,f,s,l,v,g,m,b=arguments;return h.a.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(t=b.length>0&&void 0!==b[0]?b[0]:d,e=b.length>1?b[1]:void 0,r=b.length>2&&void 0!==b[2]?b[2]:{},n=r.speak,o=void 0===n||n,i=r.isDismissible,c=void 0===i||i,u=r.context,f=void 0===u?p:u,s=r.id,l=void 0===s?Object(a.uniqueId)(f):s,v=r.actions,g=void 0===v?[]:v,m=r.__unstableHTML,e=String(e),!o){h.next=8;break}return h.next=8,{type:"SPEAK",message:e};case 8:return h.next=10,{type:"CREATE_NOTICE",context:f,notice:{id:l,status:t,content:e,__unstableHTML:m,isDismissible:c,actions:g}};case 10:case"end":return h.stop()}},y,this)}function g(t,e){return v("success",t,e)}function m(t,e){return v("info",t,e)}function b(t,e){return v("error",t,e)}function w(t,e){return v("warning",t,e)}function O(t){return{type:"REMOVE_NOTICE",id:t,context:arguments.length>1&&void 0!==arguments[1]?arguments[1]:p}}var x=[];function j(t){return t[arguments.length>1&&void 0!==arguments[1]?arguments[1]:p]||x}var E=r(48),L={SPEAK:function(t){Object(E.speak)(t.message,"assertive")}};Object(i.registerStore)("core/notices",{reducer:s,actions:n,selectors:o,controls:L})},48:function(t,e){!function(){t.exports=this.wp.a11y}()},5:function(t,e){!function(){t.exports=this.wp.data}()},54:function(t,e,r){var n=funct