mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
3 lines
14 KiB
JavaScript
3 lines
14 KiB
JavaScript
|
!function e(t,r,n){function o(i,u){if(!r[i]){if(!t[i]){var c="function"==typeof require&&require;if(!u&&c)return c(i,!0);if(a)return a(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var d=r[i]={exports:{}};t[i][0].call(d.exports,function(e){var r=t[i][1][e];return o(r?r:e)},d,d.exports,e,t,r,n)}return r[i].exports}for(var a="function"==typeof require&&require,i=0;i<n.length;i++)o(n[i]);return o}({1:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function a(){E["default"].add("config",v["default"]),E["default"].add("schemas",m["default"]),E["default"].add("records",b["default"]);var e={},t=(0,c.combineReducers)(E["default"].getAll()),r=(0,c.applyMiddleware)(d["default"],(0,f["default"])())(c.createStore);window.store=r(t,e),window.store.dispatch(h.setConfig(window.ss.config))}var i=e("jQuery"),u=o(i),c=e("redux"),s=e("redux-thunk"),d=o(s),l=e("redux-logger"),f=o(l),p=e("reducer-register"),E=o(p),y=e("state/config/actions"),h=n(y),g=e("state/config/reducer"),v=o(g),_=e("state/schema/reducer"),m=o(_),C=e("state/records/reducer"),b=o(C),O=e("sections/campaign-admin/index");o(O);(0,u["default"])("body").entwine({onadd:function(){return a()}})},{jQuery:"jQuery","reducer-register":"reducer-register",redux:"redux","redux-logger":12,"redux-thunk":"redux-thunk","sections/campaign-admin/index":4,"state/config/actions":6,"state/config/reducer":7,"state/records/reducer":9,"state/schema/reducer":11}],2:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],a=Object.getOwnPropertyDescriptor(t,o);a&&a.configurable&&void 0===e[o]&&Object.defineProperty(e,o,a)}return e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),s=n(c),d=e("silverstripe-component"),l=n(d),f=function(e){function t(r){a(this,t);var n=i(this,e.call(this,r));return n.handleClick=n.handleClick.bind(n),n}return u(t,e),t.prototype.render=function(){var e={type:this.props.type,className:this.getButtonClasses(),disabled:this.props.disabled};return"undefined"!=typeof this.props.id&&(e.id=this.props.id),s["default"].createElement("button",e,this.getLoadingIcon(),this.props.label)},t.prototype.getButtonClasses=function(){var e=["btn"];return e.push("btn-"+this.props.style),"undefined"==typeof this.props.label&&e.push("no-text"),"undefined"!=typeof this.props.icon&&e.push("font-icon-"+this.props.icon),this.props.loading===!0&&e.push("btn--loading"),this.props.disabled===!0&&e.push("disabled"),"undefined"!=typeof this.props.extraClass&&e.push(this.props.extraClass),e.join(" ")},t.prototype.getLoadingIcon=function(){return this.props.loading?s["default"].createElement("div",{className:"btn__loading-icon"},s["default"].createElement("svg",{viewBox:"0 0 44 12"},s["default"].createElement("circle",{cx:"6",cy:"6",r:"6"}),s["default"].createElement("circle",{cx:"22",cy:"6",r:"6"}),s["default"].createElement("circle",{cx:"38",cy:"6",r:"6"}))):null},t.prototype.handleClick=function(e){this.props.handleClick(e)},t}(l["default"]);f.propTypes={id:s["default"].PropTypes.string,handleClick:s["default"].PropTypes.func.isRequired,label:s["default"].PropTypes.string,type:s["default"].PropTypes.string,loading:s["default"].PropTypes.bool,icon:s["default"].PropTypes.string,disabled:s["defa
|
||
|
//# sourceMappingURL=bundle-framework.js.map
|