WordPress/wp-includes/js/dist/compose.min.js
youknowriad 5cf8452ae9 Build/Test Tools: Add the e2e tests setup.
- Adds a local environment based on docker
 - Adds the e2e tests setup
 - Adds a "Hello World" e2e test to serve as a template

Props gziolo, herregroen, mcsf.
Fixes #45165.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-27 11:28:19 +00:00

1 line
8.1 KiB
JavaScript

this.wp=this.wp||{},this.wp.compose=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=354)}({0:function(t,e){!function(){t.exports=this.wp.element}()},10:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",function(){return r})},11:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(32),o=n(3);function i(t,e){return!e||"object"!==Object(r.a)(e)&&"function"!=typeof e?Object(o.a)(t):e}},12:function(t,e,n){"use strict";function r(t){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"a",function(){return r})},13:function(t,e,n){"use strict";function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}n.d(e,"a",function(){return o})},19:function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}n.d(e,"a",function(){return r})},2:function(t,e){!function(){t.exports=this.lodash}()},3:function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",function(){return r})},32:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(t){return r(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":r(t)})(t)}n.d(e,"a",function(){return o})},354:function(t,e,n){"use strict";n.r(e);var r=n(2);var o=function(t,e){return function(n){var o=t(n),i=n.displayName,u=void 0===i?n.name||"Component":i;return o.displayName="".concat(Object(r.upperFirst)(Object(r.camelCase)(e)),"(").concat(u,")"),o}},i=n(0),u=function(t){return o(function(e){return function(n){return t(n)?Object(i.createElement)(e,n):null}},"ifCondition")},c=n(10),a=n(9),s=n(11),f=n(12),l=n(13),p=n(42),b=n.n(p),h=o(function(t){return t.prototype instanceof i.Component?function(t){function e(){return Object(c.a)(this,e),Object(s.a)(this,Object(f.a)(e).apply(this,arguments))}return Object(l.a)(e,t),Object(a.a)(e,[{key:"shouldComponentUpdate",value:function(t,e){return!b()(t,this.props)||!b()(e,this.state)}}]),e}(t):function(e){function n(){return Object(c.a)(this,n),Object(s.a)(this,Object(f.a)(n).apply(this,arguments))}return Object(l.a)(n,e),Object(a.a)(n,[{key:"shouldComponentUpdate",value:function(t){return!b()(t,this.props)}},{key:"render",value:function(){return Object(i.createElement)(t,this.props)}}]),n}(i.Component)},"pure"),d=n(19),O=n(3),y=new(function(){function t(){Object(c.a)(this,t),this.listeners={},this.handleEvent=this.handleEvent.bind(this)}return Object(a.a)(t,[{key:"add",value:function(t,e){this.listeners[t]||(window.addEventListener(t,this.handleEvent),this.listeners[t]=[]),this.listeners[t].push(e)}},{key:"remove",value:function(t,e){this.listeners[t]=Object(r.without)(this.listeners[t],e),this.listeners[t].length||(window.removeEventListener(t,this.handleEvent),delete this.listeners[t])}},{key:"handleEvent",value:function(t){Object(r.forEach)(this.listeners[t.type],function(e){e.handleEvent(t)})}}]),t}());var j=function(t){return o(function(e){var n=function(n){function o(){var t;return Object(c.a)(this,o),(t=Object(s.a)(this,Object(f.a)(o).apply(this,arguments))).handleEvent=t.handleEvent.bind(Object(O.a)(Object(O.a)(t))),t.handleRef=t.handleRef.bind(Object(O.a)(Object(O.a)(t))),t}return Object(l.a)(o,n),Object(a.a)(o,[{key:"componentDidMount",value:function(){var e=this;Object(r.forEach)(t,function(t,n){y.add(n,e)})}},{key:"componentWillUnmount",value:function(){var e=this;Object(r.forEach)(t,function(t,n){y.remove(n,e)})}},{key:"handleEvent",value:function(e){var n=t[e.type];"function"==typeof this.wrappedRef[n]&&this.wrappedRef[n](e)}},{key:"handleRef",value:function(t){this.wrappedRef=t,this.props.forwardedRef&&this.props.forwardedRef(t)}},{key:"render",value:function(){return Object(i.createElement)(e,Object(d.a)({},this.props.ownProps,{ref:this.handleRef}))}}]),o}(i.Component);return Object(i.forwardRef)(function(t,e){return Object(i.createElement)(n,{ownProps:t,forwardedRef:e})})},"withGlobalEvents")},m=o(function(t){var e=0;return function(n){function r(){var t;return Object(c.a)(this,r),(t=Object(s.a)(this,Object(f.a)(r).apply(this,arguments))).instanceId=e++,t}return Object(l.a)(r,n),Object(a.a)(r,[{key:"render",value:function(){return Object(i.createElement)(t,Object(d.a)({},this.props,{instanceId:this.instanceId}))}}]),r}(i.Component)},"withInstanceId"),v=o(function(t){return function(e){function n(){var t;return Object(c.a)(this,n),(t=Object(s.a)(this,Object(f.a)(n).apply(this,arguments))).timeouts=[],t.setTimeout=t.setTimeout.bind(Object(O.a)(Object(O.a)(t))),t.clearTimeout=t.clearTimeout.bind(Object(O.a)(Object(O.a)(t))),t}return Object(l.a)(n,e),Object(a.a)(n,[{key:"componentWillUnmount",value:function(){this.timeouts.forEach(clearTimeout)}},{key:"setTimeout",value:function(t){function e(e,n){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t,e){var n=this,r=setTimeout(function(){t(),n.clearTimeout(r)},e);return this.timeouts.push(r),r})},{key:"clearTimeout",value:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){clearTimeout(t),this.timeouts=Object(r.without)(this.timeouts,t)})},{key:"render",value:function(){return Object(i.createElement)(t,Object(d.a)({},this.props,{setTimeout:this.setTimeout,clearTimeout:this.clearTimeout}))}}]),n}(i.Component)},"withSafeTimeout");function w(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(function(e){return function(n){function r(){var e;return Object(c.a)(this,r),(e=Object(s.a)(this,Object(f.a)(r).apply(this,arguments))).setState=e.setState.bind(Object(O.a)(Object(O.a)(e))),e.state=t,e}return Object(l.a)(r,n),Object(a.a)(r,[{key:"render",value:function(){return Object(i.createElement)(e,Object(d.a)({},this.props,this.state,{setState:this.setState}))}}]),r}(i.Component)},"withState")}n.d(e,"createHigherOrderComponent",function(){return o}),n.d(e,"ifCondition",function(){return u}),n.d(e,"pure",function(){return h}),n.d(e,"withGlobalEvents",function(){return j}),n.d(e,"withInstanceId",function(){return m}),n.d(e,"withSafeTimeout",function(){return v}),n.d(e,"withState",function(){return w}),n.d(e,"compose",function(){return r.flowRight})},42:function(t,e){!function(){t.exports=this.wp.isShallowEqual}()},9:function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}n.d(e,"a",function(){return o})}});