silverstripe-frameworktest/client/dist/js/legacy.js

1 line
1.9 KiB
JavaScript
Raw Normal View History

!function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var t={};n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=1)}([function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(7),o=t.n(r),i=t(4),c=t.n(i),a=t(5),u=t.n(a),s=t(6),f=(t.n(s),t(3)),l=(t.n(f),t(2)),d=t.n(l),m=t.i(f.provideInjector)(d.a);o.a.entwine("ss",function(e){e(".js-injector-boot .TestReactFormBuilder").entwine({onmatch:function(){this._renderForm()},onunmatch:function(){this._clearForm()},container:function(){var n=this.find(".frameworktest-react-container");return n.length||(n=e('<div class="frameworktest-react-container panel panel--padded" style="overflow-y: auto; max-height: 100%;"></div>'),this.append(n)),n.siblings("form").hide(),n[0]},_renderForm:function(){var e=this,n=window.ss.store,t=n.getState().config.sections.find(function(e){return"TestReactFormBuilder"===e.name}),r=t.form.TestEditForm.schemaUrl;u.a.render(c.a.createElement(s.Provider,{store:n},c.a.createElement(m,{schemaUrl:r,handleSubmit:function(){return e._handleSubmit.apply(e,arguments)},identifier:"FrameworkTest.ReactSection"})),this.container())},_clearForm:function(){u.a.unmountComponentAtNode(this.container())},_handleSubmit:function(e,n,t){return e.preventDefault(),console.log(n),t()}}),e(".TestReactFormBuilder .nav-link").entwine({onclick:function(e){e.preventDefault()}})})},function(e,n,t){t(0)},function(e,n){e.exports=FormBuilderLoader},function(e,n){e.exports=Injector},function(e,n){e.exports=React},function(e,n){e.exports=ReactDom},function(e,n){e.exports=ReactRedux},function(e,n){e.exports=jQuery}]);