mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-02 16:59:35 +01:00
b667105f60
The following package versions were changed: @wordpress/a11y: 2.11.0 -> 2.13.0 @wordpress/annotations: 1.20.4 -> 1.22.0 @wordpress/api-fetch: 3.18.0 -> 3.20.0 @wordpress/autop: 2.9.0 -> 2.10.0 @wordpress/blob: 2.9.0 -> 2.10.0 @wordpress/block-directory: 1.13.7 -> 1.16.0 @wordpress/block-editor: 4.3.7 -> 5.0.0 @wordpress/block-library: 2.22.7 -> 2.25.0 @wordpress/block-serialization-default-parser: 3.7.0 -> 3.8.0 @wordpress/blocks: 6.20.3 -> 6.23.0 @wordpress/components: 10.0.6 -> 11.0.0 @wordpress/compose: 3.19.3 -> 3.21.0 @wordpress/core-data: 2.20.3 -> 2.23.0 @wordpress/data: 4.22.3 -> 4.24.0 @wordpress/data-controls: 1.16.3 -> 1.18.0 @wordpress/date: 3.10.0 -> 3.12.0 @wordpress/deprecated: 2.9.0 -> 2.10.0 @wordpress/dom: 2.13.1 -> 2.15.0 @wordpress/dom-ready: 2.10.0 -> 2.11.0 @wordpress/e2e-test-utils: 4.11.2 -> 4.14.0 @wordpress/edit-post: 3.21.7 -> 3.24.0 @wordpress/editor: 9.20.7 -> 9.23.0 @wordpress/element: 2.16.0 -> 2.18.0 @wordpress/escape-html: 1.9.0 -> 1.10.0 @wordpress/format-library: 1.22.7 -> 1.24.0 @wordpress/hooks: 2.9.0 -> 2.10.0 @wordpress/html-entities: 2.8.0 -> 2.9.0 @wordpress/i18n: 3.14.0 -> 3.16.0 @wordpress/icons: 2.4.0 -> 2.7.0 @wordpress/is-shallow-equal: 2.1.0 -> 2.3.0 @wordpress/keyboard-shortcuts: 1.9.3 -> 1.11.0 @wordpress/keycodes: 2.14.0 -> 2.16.0 @wordpress/library-export-default-webpack-plugin: 1.7.0 -> 1.9.0 @wordpress/list-reusable-blocks: 1.21.6 -> 1.23.0 @wordpress/media-utils: 1.15.0 -> 1.17.0 @wordpress/notices: 2.8.3 -> 2.10.0 @wordpress/nux: 3.20.6 -> 3.22.0 @wordpress/plugins: 2.20.3 -> 2.22.0 @wordpress/primitives: 1.7.0 -> 1.9.0 @wordpress/priority-queue: 1.7.0 -> 1.9.0 @wordpress/redux-routine: 3.10.0 -> 3.12.0 @wordpress/rich-text: 3.20.4 -> 3.22.0 @wordpress/scripts: 12.1.1 -> 12.3.0 @wordpress/server-side-render: 1.16.6 -> 1.18.0 @wordpress/shortcode: 2.9.0 -> 2.11.0 @wordpress/token-list: 1.11.0 -> 1.13.0 @wordpress/url: 2.17.0 -> 2.19.0 @wordpress/viewport: 2.21.3 -> 2.23.0 @wordpress/warning: 1.2.0 -> 1.3.0 @wordpress/wordcount: 2.10.0 -> 2.12.0 Props isabel_brison, youknowriad, mcsf. Fixes #51461. Built from https://develop.svn.wordpress.org/trunk@49135 git-svn-id: http://core.svn.wordpress.org/trunk@48897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2 lines
8.7 KiB
JavaScript
2 lines
8.7 KiB
JavaScript
/*! This file is auto-generated */
|
|
this.wp=this.wp||{},this.wp.serverSideRender=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=482)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},14:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(42);function o(e,t){if(null==e)return{};var r,o,c=Object(n.a)(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(o=0;o<u.length;o++)r=u[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}},15:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,"a",(function(){return n}))},17:function(e,t,r){"use strict";function n(e){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}r.d(t,"a",(function(){return n}))},2:function(e,t){!function(){e.exports=this.lodash}()},20:function(e,t,r){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}r.d(t,"a",(function(){return o}))},21:function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.d(t,"a",(function(){return n}))},22:function(e,t,r){"use strict";function n(e,t){return(n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}r.d(t,"a",(function(){return o}))},23:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(40),o=r(15);function c(e,t){return!t||"object"!==Object(n.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},3:function(e,t){!function(){e.exports=this.wp.components}()},31:function(e,t){!function(){e.exports=this.wp.url}()},35:function(e,t){!function(){e.exports=this.wp.deprecated}()},4:function(e,t){!function(){e.exports=this.wp.data}()},40:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,"a",(function(){return n}))},42:function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}r.d(t,"a",(function(){return n}))},45:function(e,t){!function(){e.exports=this.wp.apiFetch}()},482:function(e,t,r){"use strict";r.r(t);var n=r(8),o=r(5),c=r(14),u=r(0),i=r(4),s=r(35),a=r.n(s),f=r(21),l=r(20),p=r(22),b=r(23),d=r(17),O=r(2),y=r(1),h=r(45),j=r.n(h),v=r(31),m=r(3);function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Object(d.a)(e);if(t){var o=Object(d.a)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Object(b.a)(this,r)}}function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){Object(o.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var S=function(e){Object(p.a)(r,e);var t=w(r);function r(e){var n;return Object(f.a)(this,r),(n=t.call(this,e)).state={response:null},n}return Object(l.a)(r,[{key:"componentDidMount",value:function(){this.isStillMounted=!0,this.fetch(this.props),this.fetch=Object(O.debounce)(this.fetch,500)}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"componentDidUpdate",value:function(e){Object(O.isEqual)(e,this.props)||this.fetch(this.props)}},{key:"fetch",value:function(e){var t=this;if(this.isStillMounted){null!==this.state.response&&this.setState({response:null});var r=e.block,n=e.attributes,o=void 0===n?null:n,c=e.httpMethod,u=void 0===c?"GET":c,i=e.urlQueryArgs,s="POST"===u,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(v.addQueryArgs)("/wp/v2/block-renderer/".concat(e),P(P({context:"edit"},null!==t?{attributes:t}:{}),r))}(r,s?null:o,void 0===i?{}:i),f=s?{attributes:o}:null,l=this.currentFetchRequest=j()({path:a,data:f,method:s?"POST":"GET"}).then((function(e){t.isStillMounted&&l===t.currentFetchRequest&&e&&t.setState({response:e.rendered})})).catch((function(e){t.isStillMounted&&l===t.currentFetchRequest&&t.setState({response:{error:!0,errorMsg:e.message}})}));return l}}},{key:"render",value:function(){var e=this.state.response,t=this.props,r=t.className,o=t.EmptyResponsePlaceholder,c=t.ErrorResponsePlaceholder,i=t.LoadingResponsePlaceholder;return""===e?Object(u.createElement)(o,Object(n.a)({response:e},this.props)):e?e.error?Object(u.createElement)(c,Object(n.a)({response:e},this.props)):Object(u.createElement)(u.RawHTML,{key:"html",className:r},e):Object(u.createElement)(i,Object(n.a)({response:e},this.props))}}]),r}(u.Component);S.defaultProps={EmptyResponsePlaceholder:function(e){var t=e.className;return Object(u.createElement)(m.Placeholder,{className:t},Object(y.__)("Block rendered as empty."))},ErrorResponsePlaceholder:function(e){var t=e.response,r=e.className,n=Object(y.sprintf)(Object(y.__)("Error loading block: %s"),t.errorMsg);return Object(u.createElement)(m.Placeholder,{className:r},n)},LoadingResponsePlaceholder:function(e){var t=e.className;return Object(u.createElement)(m.Placeholder,{className:t},Object(u.createElement)(m.Spinner,null))}};var E=S;function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var _={},x=Object(i.withSelect)((function(e){var t=e("core/editor");if(t){var r=t.getCurrentPostId();if(r)return{currentPostId:r}}return _}))((function(e){var t=e.urlQueryArgs,r=void 0===t?_:t,i=e.currentPostId,s=Object(c.a)(e,["urlQueryArgs","currentPostId"]),a=Object(u.useMemo)((function(){return i?function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){Object(o.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({post_id:i},r):r}),[i,r]);return Object(u.createElement)(E,Object(n.a)({urlQueryArgs:a},s))}));window&&window.wp&&window.wp.components&&(window.wp.components.ServerSideRender=Object(u.forwardRef)((function(e,t){return a()("wp.components.ServerSideRender",{alternative:"wp.serverSideRender"}),Object(u.createElement)(x,Object(n.a)({},e,{ref:t}))})));t.default=x},5:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},8:function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.d(t,"a",(function(){return n}))}}).default; |