silverstripe-framework/admin/client/dist/js/bundle-framework.js

4 lines
57 KiB
JavaScript
Raw Normal View History

!function e(t,r,n){function o(a,s){if(!r[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[a]={exports:{}};t[a][0].call(l.exports,function(e){var r=t[a][1][e];return o(r?r:e)},l,l.exports,e,t,r,n)}return r[a].exports}for(var i="function"==typeof require&&require,a=0;a<n.length;a++)o(n[a]);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 i(){h["default"].add("config",v["default"]),h["default"].add("schemas",E["default"]),h["default"].add("records",w["default"]),h["default"].add("campaign",C["default"]);var e={},t=(0,c.combineReducers)(h["default"].getAll()),r=(0,c.applyMiddleware)(l["default"],(0,p["default"])())(c.createStore);window.store=r(t,e),window.store.dispatch(m.setConfig(window.ss.config))}var a=e("jQuery"),s=o(a),c=e("redux"),u=e("redux-thunk"),l=o(u),f=e("redux-logger"),p=o(f),d=e("reducer-register"),h=o(d),y=e("state/config/actions"),m=n(y),b=e("state/config/reducer"),v=o(b),g=e("state/schema/reducer"),E=o(g),_=e("state/records/reducer"),w=o(_),O=e("state/campaign/reducer"),C=o(O),T=e("sections/campaign-admin/index");o(T);(0,s["default"])("body").entwine({onadd:function(){return i()}})},{jQuery:"jQuery","reducer-register":"reducer-register",redux:"redux","redux-logger":31,"redux-thunk":"redux-thunk","sections/campaign-admin/index":7,"state/campaign/reducer":14,"state/config/actions":16,"state/config/reducer":17,"state/records/reducer":20,"state/schema/reducer":22}],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],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 s(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"),u=n(c),l=e("silverstripe-component"),f=n(l);e("bootstrap-collapse");var p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){var e=this.props.groupid+"_Header",t=this.props.groupid+"_Items",r="#"+t,n={id:t,"aria-expanded":!0,className:"list-group list-group-flush collapse in",role:"tabpanel","aria-labelledby":e};return u["default"].createElement("div",{className:"accordion-group"},u["default"].createElement("h6",{className:"accordion-group__title",role:"tab",id:e},u["default"].createElement("a",{"data-toggle":"collapse",href:r,"aria-expanded":"true","aria-controls":t},this.props.title)),u["default"].createElement("div",n,this.props.children))},t}(f["default"]);r["default"]=p},{"bootstrap-collapse":"bootstrap-collapse",react:"react","silverstripe-component":"silverstripe-component"}],3:[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],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 s(e,t){if("function"!
recordType:e,data:r}})})["catch"](function(r){t({type:u["default"].FETCH_RECORD_FAILURE,payload:{error:r,recordType:e}})})}}function s(e,t,r,n){var i={recordType:e,id:t};return function(a){return a({type:u["default"].DELETE_RECORD_REQUEST,payload:i}),f["default"][r.toLowerCase()](o(n,i)).then(function(){a({type:u["default"].DELETE_RECORD_SUCCESS,payload:{recordType:e,id:t}})})["catch"](function(r){a({type:u["default"].DELETE_RECORD_FAILURE,payload:{error:r,recordType:e,id:t}})})}}Object.defineProperty(r,"__esModule",{value:!0}),r.fetchRecords=i,r.fetchRecord=a,r.deleteRecord=s;var c=e("./action-types"),u=n(c),l=e("silverstripe-backend.js"),f=n(l)},{"./action-types":18,"silverstripe-backend.js":11}],20:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(){var e=arguments.length<=0||void 0===arguments[0]?f:arguments[0],t=arguments[1],r=void 0,n=void 0,i=void 0;switch(t.type){case l["default"].CREATE_RECORD:return(0,c["default"])(a({},e,{}));case l["default"].UPDATE_RECORD:return(0,c["default"])(a({},e,{}));case l["default"].DELETE_RECORD:return(0,c["default"])(a({},e,{}));case l["default"].FETCH_RECORDS_REQUEST:return e;case l["default"].FETCH_RECORDS_FAILURE:return e;case l["default"].FETCH_RECORDS_SUCCESS:return n=t.payload.recordType,r=t.payload.data._embedded[n+"s"]||{},r=r.reduce(function(e,t){return a({},e,o({},t.id,t))},{}),(0,c["default"])(a({},e,o({},n,r)));case l["default"].FETCH_RECORD_REQUEST:return e;case l["default"].FETCH_RECORD_FAILURE:return e;case l["default"].FETCH_RECORD_SUCCESS:return n=t.payload.recordType,i=t.payload.data,(0,c["default"])(a({},e,o({},n,a({},e[n],o({},i.ID,i)))));case l["default"].DELETE_RECORD_REQUEST:return e;case l["default"].DELETE_RECORD_FAILURE:return e;case l["default"].DELETE_RECORD_SUCCESS:return n=t.payload.recordType,r=e[n],r=Object.keys(r).reduce(function(e,n){return parseInt(n,10)!==parseInt(t.payload.id,10)?a({},e,o({},n,r[n])):e},{}),(0,c["default"])(a({},e,o({},n,r)));default:return e}}Object.defineProperty(r,"__esModule",{value:!0});var a=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},s=e("deep-freeze"),c=n(s),u=e("./action-types"),l=n(u),f={};r["default"]=i},{"./action-types":18,"deep-freeze":"deep-freeze"}],21:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={SET_SCHEMA:"SET_SCHEMA"};r["default"]=n},{}],22:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(){var e=arguments.length<=0||void 0===arguments[0]?f:arguments[0],t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];switch(t.type){case l["default"].SET_SCHEMA:var r=t.payload.schema.schema_url;return(0,c["default"])(a({},e,o({},r,t.payload)));default:return e}}Object.defineProperty(r,"__esModule",{value:!0});var a=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};r["default"]=i;var s=e("deep-freeze"),c=n(s),u=e("./action-types"),l=n(u),f=(0,c["default"])({})},{"./action-types":21,"deep-freeze":"deep-freeze"}],23:[function(e,t,r){function n(){l=!1,s.length?u=s.concat(u):f=-1,u.length&&o()}function o(){if(!l){var e=setTimeout(n);l=!0;for(var t=u.length;t;){for(s=u,u=[];++f<t;)s&&s[f].run();f=-1,t=u.length}s=null,l=!1,clearTimeout(e)}}function i(e,t){this.fun=e,this.array=t}function a(){}var s,c=t.exports={},u=[],l=!1,f=-1;c.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new i(e,t)),1!==u.length||l||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version
2016-04-07 13:43:43 +02:00
//# sourceMappingURL=bundle-framework.js.map