WordPress/wp-includes/js/dist/server-side-render.min.js
gziolo c3ea09ebb8 Editor: Update WordPress packages published for Gutenberg 10.6
It contains several changes in addition to regular update to WordPress packages:
- All newly exposed blocks are now registered on the server.
- Dutone block support was added.
- Border block support was updated.
- New shared function `construct_wp_query_args` was added for the family of Query blocks - it might need some further work.

Props youknowriad.
See #52991.



Built from https://develop.svn.wordpress.org/trunk@50929


git-svn-id: http://core.svn.wordpress.org/trunk@50538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 15:09:27 +00:00

2 lines
3.9 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=587)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t){e.exports=window.wp.compose},2:function(e,t){e.exports=window.lodash},20:function(e,t){e.exports=window.wp.url},24:function(e,t){e.exports=window.wp.deprecated},33:function(e,t){e.exports=window.wp.apiFetch},4:function(e,t){e.exports=window.wp.components},5:function(e,t){e.exports=window.wp.data},587:function(e,t,r){"use strict";r.r(t);var n=r(7),o=r(0),c=r(5),u=r(24),s=r.n(u),l=r(2),i=r(10),a=r(1),d=r(33),p=r.n(d),f=r(20),b=r(4),w=r(8);function O({className:e}){return Object(o.createElement)(b.Placeholder,{className:e},Object(a.__)("Block rendered as empty."))}function j({response:e,className:t}){const r=Object(a.sprintf)(Object(a.__)("Error loading block: %s"),e.errorMsg);return Object(o.createElement)(b.Placeholder,{className:t},r)}function m({className:e}){return Object(o.createElement)(b.Placeholder,{className:e},Object(o.createElement)(b.Spinner,null))}function h(e){const{attributes:t,block:r,className:c,httpMethod:u="GET",urlQueryArgs:s,EmptyResponsePlaceholder:a=O,ErrorResponsePlaceholder:d=j,LoadingResponsePlaceholder:b=m}=e,h=Object(o.useRef)(!0),y=Object(o.useRef)(),[v,g]=Object(o.useState)(null),E=Object(i.usePrevious)(e);function P(){if(!h.current)return;null!==v&&g(null);const e=t&&Object(w.__experimentalSanitizeBlockAttributes)(r,t),n="POST"===u,o=function(e,t=null,r={}){return Object(f.addQueryArgs)("/wp/v2/block-renderer/"+e,{context:"edit",...null!==t?{attributes:t}:{},...r})}(r,n?null:null!=e?e:null,s),c=n?{attributes:null!=e?e:null}:null,l=y.current=p()({path:o,data:c,method:n?"POST":"GET"}).then(e=>{h.current&&l===y.current&&e&&g(e.rendered)}).catch(e=>{h.current&&l===y.current&&g({error:!0,errorMsg:e.message})});return l}const x=Object(i.useDebounce)(P,500);return Object(o.useEffect)(()=>()=>{h.current=!1},[]),Object(o.useEffect)(()=>{void 0===E?P():Object(l.isEqual)(E,e)||x()}),""===v?Object(o.createElement)(a,e):v?v.error?Object(o.createElement)(d,Object(n.a)({response:v},e)):Object(o.createElement)(o.RawHTML,{className:c},v):Object(o.createElement)(b,e)}const y={},v=Object(c.withSelect)(e=>{const t=e("core/editor");if(t){const e=t.getCurrentPostId();if(e&&"number"==typeof e.id)return{currentPostId:e}}return y})(({urlQueryArgs:e=y,currentPostId:t,...r})=>{const c=Object(o.useMemo)(()=>t?{post_id:t,...e}:e,[t,e]);return Object(o.createElement)(h,Object(n.a)({urlQueryArgs:c},r))});window&&window.wp&&window.wp.components&&(window.wp.components.ServerSideRender=Object(o.forwardRef)((e,t)=>(s()("wp.components.ServerSideRender",{since:"5.3",alternative:"wp.serverSideRender"}),Object(o.createElement)(v,Object(n.a)({},e,{ref:t})))));t.default=v},7: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}))},8:function(e,t){e.exports=window.wp.blocks}}).default;