Merge pull request #6172 from open-sausages/pulls/4.0/redux-form

Use redux-form
This commit is contained in:
Damian Mooyman 2016-10-21 11:47:41 +13:00 committed by GitHub
commit fad23dcc4e
39 changed files with 7275 additions and 6649 deletions

View File

@ -122,8 +122,7 @@ class LiteralField extends DatalessField {
*/
public function getSchemaStateDefaults() {
$state = parent::getSchemaStateDefaults();
$state['data']['content'] = $this->FieldHolder();
$state['value'] = $this->FieldHolder();
return $state;
}

View File

@ -62,10 +62,10 @@ class ReadonlyField extends FormField {
}
public function getSchemaStateDefaults() {
$values = parent::getSchemaStateDefaults();
// Suppress `<i>('none')</i>` from appearing in react as a literal
$values['value'] = $this->dataValue();
return $values;
$state = parent::getSchemaStateDefaults();
$state['value'] = $this->dataValue();
return $state;
}

View File

@ -17,16 +17,14 @@ class FormSchema {
* Gets the schema for this form as a nested array.
*
* @param Form $form
* @param string $schemaLink Link to get this schema
* @return array
*/
public function getSchema(Form $form, $schemaLink) {
public function getSchema(Form $form) {
$schema = [
'name' => $form->getName(),
'id' => $form->FormName(),
'action' => $form->FormAction(),
'method' => $form->FormMethod(),
'schema_url' => $schemaLink,
'attributes' => $form->getAttributes(),
'data' => [],
'fields' => [],

View File

@ -1,6 +1,6 @@
webpackJsonp([5],[function(e,t,n){"use strict"
n(2),n(5),n(18),n(21),n(23),n(25),n(35),n(39),n(49),n(50),n(51),n(52),n(53),n(54),n(56),n(60),n(62),n(65),n(68),n(70),n(72),n(74),n(75),n(84),n(85),n(86),n(88),n(89),n(90),n(91),n(92),n(93),n(95),n(96),
n(97),n(98),n(99),n(100),n(101),n(104),n(106),n(107),n(108),n(109),n(113),n(114),n(115),n(116),n(117),n(114),n(109),n(120),n(121),n(123),n(124)},,function(e,t,n){(function(t){e.exports=t.SilverStripeComponent=n(3)
n(2),n(5),n(18),n(21),n(23),n(25),n(29),n(37),n(41),n(51),n(52),n(53),n(54),n(55),n(56),n(58),n(62),n(64),n(67),n(70),n(72),n(74),n(76),n(77),n(86),n(87),n(88),n(90),n(91),n(92),n(93),n(94),n(95),n(97),
n(98),n(99),n(100),n(101),n(102),n(103),n(106),n(108),n(109),n(110),n(111),n(115),n(116),n(117),n(118),n(119),n(116),n(111),n(122),n(123),n(125),n(126)},,function(e,t,n){(function(t){e.exports=t.SilverStripeComponent=n(3)
}).call(t,function(){return this}())},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -10,11 +10,11 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(1),c=i(d),f=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(1),d=i(c),f=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"componentDidMount",value:function n(){if("undefined"!=typeof this.props.cmsEvents){
this.cmsEvents=this.props.cmsEvents
for(var e in this.cmsEvents)({}).hasOwnProperty.call(this.cmsEvents,e)&&(0,c["default"])(document).on(e,this.cmsEvents[e].bind(this))}}},{key:"componentWillUnmount",value:function i(){for(var e in this.cmsEvents)({}).hasOwnProperty.call(this.cmsEvents,e)&&(0,
c["default"])(document).off(e)}},{key:"emitCmsEvent",value:function l(e,t){(0,c["default"])(document).trigger(e,t)}}]),t}(l.Component)
for(var e in this.cmsEvents)({}).hasOwnProperty.call(this.cmsEvents,e)&&(0,d["default"])(document).on(e,this.cmsEvents[e].bind(this))}}},{key:"componentWillUnmount",value:function i(){for(var e in this.cmsEvents)({}).hasOwnProperty.call(this.cmsEvents,e)&&(0,
d["default"])(document).off(e)}},{key:"emitCmsEvent",value:function l(e,t){(0,d["default"])(document).trigger(e,t)}}]),t}(l.Component)
f.propTypes={cmsEvents:u["default"].PropTypes.object},t["default"]=f},,function(e,t,n){(function(t){e.exports=t.Backend=n(6)}).call(t,function(){return this}())},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n){return t in e?Object.defineProperty(e,t,{
value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=null,n=null
@ -26,28 +26,28 @@ t=JSON.stringify(e)}return t}function l(e,t){switch(e){case"application/x-www-fo
case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.stringify(t)
default:throw new Error("Can't encode format: "+e)}}function u(e,t){switch(e){case"application/x-www-form-urlencoded":return C["default"].parse(t)
case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.parse(t)
default:throw new Error("Can't decode format: "+e)}}function d(e,t){return""===t?e:e.match(/\?/)?e+"&"+t:e+"?"+t}function c(e){return e.text().then(function(t){return u(e.headers.get("Content-Type"),t)
default:throw new Error("Can't decode format: "+e)}}function c(e,t){return""===t?e:e.match(/\?/)?e+"&"+t:e+"?"+t}function d(e){return e.text().then(function(t){return u(e.headers.get("Content-Type"),t)
})}function f(e,t){return Object.keys(t).reduce(function(n,i){var r=e[i]
return!r||r.remove!==!0&&r.querystring!==!0?m(n,o({},i,t[i])):n},{})}function p(e,t,n){var i=arguments.length<=3||void 0===arguments[3]?{setFromData:!1}:arguments[3],r=t,a=Object.keys(n).reduce(function(t,r){
var a=e[r],s=i.setFromData===!0&&!(a&&a.remove===!0),l=a&&a.querystring===!0&&a.remove!==!0
return s||l?m(t,o({},r,n[r])):t},{}),s=l("application/x-www-form-urlencoded",a)
return r=d(r,s),r=Object.keys(e).reduce(function(t,i){var r=e[i].urlReplacement
return r=c(r,s),r=Object.keys(e).reduce(function(t,i){var r=e[i].urlReplacement
return r?t.replace(r,n[i]):t},r)}Object.defineProperty(t,"__esModule",{value:!0})
var h=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),m=Object.assign||function(e){
for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e
},v=n(7),y=i(v),b=n(9),_=i(b),w=n(12),C=i(w),T=n(16),E=i(T)
_["default"].polyfill()
var P=function(){function e(){r(this,e),this.fetch=y["default"]}return h(e,[{key:"createEndpointFetcher",value:function t(e){var t=this,n=m({method:"get",payloadFormat:"application/x-www-form-urlencoded",
},v=n(7),b=i(v),y=n(9),w=i(y),_=n(12),C=i(_),T=n(16),E=i(T)
w["default"].polyfill()
var P=function(){function e(){r(this,e),this.fetch=b["default"]}return h(e,[{key:"createEndpointFetcher",value:function t(e){var t=this,n=m({method:"get",payloadFormat:"application/x-www-form-urlencoded",
responseFormat:"application/json",payloadSchema:{},defaultData:{}},e),i={json:"application/json",urlencoded:"application/x-www-form-urlencoded"}
return["payloadFormat","responseFormat"].forEach(function(e){i[n[e]]&&(n[e]=i[n[e]])}),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=m({},i,{
Accept:n.responseFormat,"Content-Type":n.payloadFormat}),o=E["default"].recursive({},n.defaultData,e),a=p(n.payloadSchema,n.url,o,{setFromData:"get"===n.method.toLowerCase()}),s="get"!==n.method.toLowerCase()?l(n.payloadFormat,f(n.payloadSchema,o)):"",u="get"===n.method.toLowerCase()?[a,r]:[a,s,r]
return t[n.method.toLowerCase()].apply(t,u).then(c)}}},{key:"get",value:function n(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1]
return t[n.method.toLowerCase()].apply(t,u).then(d)}}},{key:"get",value:function n(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1]
return this.fetch(e,{method:"get",credentials:"same-origin",headers:t}).then(a)}},{key:"post",value:function i(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],i={
"Content-Type":"application/x-www-form-urlencoded"}
return this.fetch(e,{method:"post",credentials:"same-origin",body:s(t),headers:m({},i,n)}).then(a)}},{key:"put",value:function o(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2]
@ -82,14 +82,14 @@ if(e)return e
if(this._bodyBlob)return l(this._bodyBlob)
if(this._bodyFormData)throw new Error("could not read FormData body as text")
return Promise.resolve(this._bodyText)}):this.text=function(){var e=o(this)
return e?e:Promise.resolve(this._bodyText)},m.formData&&(this.formData=function(){return this.text().then(f)}),this.json=function(){return this.text().then(JSON.parse)},this}function d(e){var t=e.toUpperCase()
return e?e:Promise.resolve(this._bodyText)},m.formData&&(this.formData=function(){return this.text().then(f)}),this.json=function(){return this.text().then(JSON.parse)},this}function c(e){var t=e.toUpperCase()
return g.indexOf(t)>-1?t:e}function c(e,t){t=t||{}
return g.indexOf(t)>-1?t:e}function d(e,t){t=t||{}
var n=t.body
if(c.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read")
if(d.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read")
this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new r(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e
if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new r(t.headers)),this.method=d(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,
if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new r(t.headers)),this.method=c(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,
("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests")
this._initBody(n)}function f(e){var t=new FormData
return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ")
@ -107,24 +107,24 @@ return this.forEach(function(t,n){e.push(n)}),i(e)},r.prototype.values=function(
return this.forEach(function(t){e.push(t)}),i(e)},r.prototype.entries=function(){var e=[]
return this.forEach(function(t,n){e.push([n,t])}),i(e)},m.iterable&&(r.prototype[Symbol.iterator]=r.prototype.entries)
var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"]
c.prototype.clone=function(){return new c(this)},u.call(c.prototype),u.call(h.prototype),h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new r(this.headers),
d.prototype.clone=function(){return new d(this)},u.call(d.prototype),u.call(h.prototype),h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new r(this.headers),
url:this.url})},h.error=function(){var e=new h(null,{status:0,statusText:""})
return e.type="error",e}
var v=[301,302,303,307,308]
h.redirect=function(e,t){if(v.indexOf(t)===-1)throw new RangeError("Invalid status code")
return new h(null,{status:t,headers:{location:e}})},e.Headers=r,e.Request=c,e.Response=h,e.fetch=function(e,t){return new Promise(function(n,i){function r(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0
return new h(null,{status:t,headers:{location:e}})},e.Headers=r,e.Request=d,e.Response=h,e.fetch=function(e,t){return new Promise(function(n,i){function r(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0
}var o
o=c.prototype.isPrototypeOf(e)&&!t?e:new c(e,t)
o=d.prototype.isPrototypeOf(e)&&!t?e:new d(e,t)
var a=new XMLHttpRequest
a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:p(a),url:r()},t="response"in a?a.response:a.responseText
n(new h(t,e))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0),
"responseType"in a&&m.blob&&(a.responseType="blob"),o.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)
},function(e,t,n){var i;(function(t,r){!function(t,n){e.exports=n()}(this,function(){"use strict"
function e(e){return"function"==typeof e||"object"==typeof e&&null!==e}function o(e){return"function"==typeof e}function a(e){K=e}function s(e){Y=e}function l(){return function(){return t.nextTick(p)}}
function u(){return function(){Q(p)}}function d(){var e=0,t=new ee(p),n=document.createTextNode("")
return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function c(){var e=new MessageChannel
function e(e){return"function"==typeof e||"object"==typeof e&&null!==e}function o(e){return"function"==typeof e}function a(e){K=e}function s(e){J=e}function l(){return function(){return t.nextTick(p)}}
function u(){return function(){Q(p)}}function c(){var e=0,t=new ee(p),n=document.createTextNode("")
return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function d(){var e=new MessageChannel
return e.port1.onmessage=p,function(){return e.port2.postMessage(0)}}function f(){var e=setTimeout
return function(){return e(p,1)}}function p(){for(var e=0;e<X;e+=2){var t=ie[e],n=ie[e+1]
t(n),ie[e]=void 0,ie[e+1]=void 0}X=0}function h(){try{var e=i,t=n(11)
@ -132,66 +132,66 @@ return Q=t.runOnLoop||t.runOnContext,u()}catch(r){return f()}}function m(e,t){va
void 0===r[oe]&&M(r)
var o=i._state
return o?!function(){var e=n[o-1]
Y(function(){return F(o,r,e,i._result)})}():j(i,r,e,t),r}function g(e){var t=this
J(function(){return A(o,r,e,i._result)})}():j(i,r,e,t),r}function g(e){var t=this
if(e&&"object"==typeof e&&e.constructor===t)return e
var n=new t(v)
return P(n,e),n}function v(){}function y(){return new TypeError("You cannot resolve a promise with itself")}function b(){return new TypeError("A promises callback cannot return that same promise.")}function _(e){
try{return e.then}catch(t){return ue.error=t,ue}}function w(e,t,n,i){try{e.call(t,n,i)}catch(r){return r}}function C(e,t,n){Y(function(e){var i=!1,r=w(n,t,function(n){i||(i=!0,t!==n?P(e,n):S(e,n))},function(t){
return P(n,e),n}function v(){}function b(){return new TypeError("You cannot resolve a promise with itself")}function y(){return new TypeError("A promises callback cannot return that same promise.")}function w(e){
try{return e.then}catch(t){return ue.error=t,ue}}function _(e,t,n,i){try{e.call(t,n,i)}catch(r){return r}}function C(e,t,n){J(function(e){var i=!1,r=_(n,t,function(n){i||(i=!0,t!==n?P(e,n):S(e,n))},function(t){
i||(i=!0,k(e,t))},"Settle: "+(e._label||" unknown promise"))
!i&&r&&(i=!0,k(e,r))},e)}function T(e,t){t._state===se?S(e,t._result):t._state===le?k(e,t._result):j(t,void 0,function(t){return P(e,t)},function(t){return k(e,t)})}function E(e,t,n){t.constructor===e.constructor&&n===m&&t.constructor.resolve===g?T(e,t):n===ue?k(e,ue.error):void 0===n?S(e,t):o(n)?C(e,t,n):S(e,t)
}function P(t,n){t===n?k(t,y()):e(n)?E(t,n,_(n)):S(t,n)}function O(e){e._onerror&&e._onerror(e._result),x(e)}function S(e,t){e._state===ae&&(e._result=t,e._state=se,0!==e._subscribers.length&&Y(x,e))}function k(e,t){
e._state===ae&&(e._state=le,e._result=t,Y(O,e))}function j(e,t,n,i){var r=e._subscribers,o=r.length
e._onerror=null,r[o]=t,r[o+se]=n,r[o+le]=i,0===o&&e._state&&Y(x,e)}function x(e){var t=e._subscribers,n=e._state
if(0!==t.length){for(var i=void 0,r=void 0,o=e._result,a=0;a<t.length;a+=3)i=t[a],r=t[a+n],i?F(n,i,r,o):r(o)
e._subscribers.length=0}}function R(){this.error=null}function I(e,t){try{return e(t)}catch(n){return de.error=n,de}}function F(e,t,n,i){var r=o(n),a=void 0,s=void 0,l=void 0,u=void 0
if(r){if(a=I(n,i),a===de?(u=!0,s=a.error,a=null):l=!0,t===a)return void k(t,b())}else a=i,l=!0
t._state!==ae||(r&&l?P(t,a):u?k(t,s):e===se?S(t,a):e===le&&k(t,a))}function A(e,t){try{t(function i(t){P(e,t)},function r(t){k(e,t)})}catch(n){k(e,n)}}function D(){return ce++}function M(e){e[oe]=ce++,
}function P(t,n){t===n?k(t,b()):e(n)?E(t,n,w(n)):S(t,n)}function O(e){e._onerror&&e._onerror(e._result),x(e)}function S(e,t){e._state===ae&&(e._result=t,e._state=se,0!==e._subscribers.length&&J(x,e))}function k(e,t){
e._state===ae&&(e._state=le,e._result=t,J(O,e))}function j(e,t,n,i){var r=e._subscribers,o=r.length
e._onerror=null,r[o]=t,r[o+se]=n,r[o+le]=i,0===o&&e._state&&J(x,e)}function x(e){var t=e._subscribers,n=e._state
if(0!==t.length){for(var i=void 0,r=void 0,o=e._result,a=0;a<t.length;a+=3)i=t[a],r=t[a+n],i?A(n,i,r,o):r(o)
e._subscribers.length=0}}function R(){this.error=null}function I(e,t){try{return e(t)}catch(n){return ce.error=n,ce}}function A(e,t,n,i){var r=o(n),a=void 0,s=void 0,l=void 0,u=void 0
if(r){if(a=I(n,i),a===ce?(u=!0,s=a.error,a=null):l=!0,t===a)return void k(t,y())}else a=i,l=!0
t._state!==ae||(r&&l?P(t,a):u?k(t,s):e===se?S(t,a):e===le&&k(t,a))}function F(e,t){try{t(function i(t){P(e,t)},function r(t){k(e,t)})}catch(n){k(e,n)}}function D(){return de++}function M(e){e[oe]=de++,
e._state=void 0,e._result=void 0,e._subscribers=[]}function N(e,t){this._instanceConstructor=e,this.promise=new e(v),this.promise[oe]||M(this.promise),W(t)?(this._input=t,this.length=t.length,this._remaining=t.length,
this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&S(this.promise,this._result))):k(this.promise,U())}function U(){
return new Error("Array Methods must be provided an Array")}function L(e){return new N(this,e).promise}function B(e){var t=this
return new t(W(e)?function(n,i){for(var r=e.length,o=0;o<r;o++)t.resolve(e[o]).then(n,i)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function H(e){var t=this,n=new t(v)
return k(n,e),n}function $(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function V(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")
}function q(e){this[oe]=D(),this._result=this._state=void 0,this._subscribers=[],v!==e&&("function"!=typeof e&&$(),this instanceof q?A(this,e):V())}function G(){var e=void 0
}function q(e){this[oe]=D(),this._result=this._state=void 0,this._subscribers=[],v!==e&&("function"!=typeof e&&$(),this instanceof q?F(this,e):V())}function G(){var e=void 0
if("undefined"!=typeof r)e=r
else if("undefined"!=typeof self)e=self
else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise
if(n){var i=null
try{i=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===i&&!n.cast)return}e.Promise=q}var z=void 0
z=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)}
var W=z,X=0,Q=void 0,K=void 0,Y=function fe(e,t){ie[X]=e,ie[X+1]=t,X+=2,2===X&&(K?K(p):re())},J="undefined"!=typeof window?window:void 0,Z=J||{},ee=Z.MutationObserver||Z.WebKitMutationObserver,te="undefined"==typeof self&&"undefined"!=typeof t&&"[object process]"==={}.toString.call(t),ne="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ie=new Array(1e3),re=void 0
var W=z,X=0,Q=void 0,K=void 0,J=function fe(e,t){ie[X]=e,ie[X+1]=t,X+=2,2===X&&(K?K(p):re())},Y="undefined"!=typeof window?window:void 0,Z=Y||{},ee=Z.MutationObserver||Z.WebKitMutationObserver,te="undefined"==typeof self&&"undefined"!=typeof t&&"[object process]"==={}.toString.call(t),ne="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ie=new Array(1e3),re=void 0
re=te?l():ee?d():ne?c():void 0===J?h():f()
var oe=Math.random().toString(36).substring(16),ae=void 0,se=1,le=2,ue=new R,de=new R,ce=0
re=te?l():ee?c():ne?d():void 0===Y?h():f()
var oe=Math.random().toString(36).substring(16),ae=void 0,se=1,le=2,ue=new R,ce=new R,de=0
return N.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===ae&&n<e;n++)this._eachEntry(t[n],n)},N.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,i=n.resolve
if(i===g){var r=_(e)
if(i===g){var r=w(e)
if(r===m&&e._state!==ae)this._settledAt(e._state,t,e._result)
else if("function"!=typeof r)this._remaining--,this._result[t]=e
else if(n===q){var o=new n(v)
E(o,e,r),this._willSettleAt(o,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(i(e),t)},N.prototype._settledAt=function(e,t,n){var i=this.promise
i._state===ae&&(this._remaining--,e===le?k(i,n):this._result[t]=n),0===this._remaining&&S(i,this._result)},N.prototype._willSettleAt=function(e,t){var n=this
j(e,void 0,function(e){return n._settledAt(se,t,e)},function(e){return n._settledAt(le,t,e)})},q.all=L,q.race=B,q.resolve=g,q.reject=H,q._setScheduler=a,q._setAsap=s,q._asap=Y,q.prototype={constructor:q,
j(e,void 0,function(e){return n._settledAt(se,t,e)},function(e){return n._settledAt(le,t,e)})},q.all=L,q.race=B,q.resolve=g,q.reject=H,q._setScheduler=a,q._setAsap=s,q._asap=J,q.prototype={constructor:q,
then:m,"catch":function pe(e){return this.then(null,e)}},G(),q.polyfill=G,q.Promise=q,q})}).call(t,n(10),function(){return this}())},,function(e,t){},function(e,t,n){"use strict"
var i=n(13),r=n(15)
e.exports={stringify:i,parse:r}},function(e,t,n){"use strict"
var i=n(14),r={brackets:function s(e){return e+"[]"},indices:function l(e,t){return e+"["+t+"]"},repeat:function u(e){return e}},o={delimiter:"&",strictNullHandling:!1,skipNulls:!1,encode:!0,encoder:i.encode
},a=function d(e,t,n,r,o,a,s,l,u){var c=e
if("function"==typeof s)c=s(t,c)
else if(c instanceof Date)c=c.toISOString()
else if(null===c){if(r)return a?a(t):t
c=""}if("string"==typeof c||"number"==typeof c||"boolean"==typeof c||i.isBuffer(c))return a?[a(t)+"="+a(c)]:[t+"="+String(c)]
},a=function c(e,t,n,r,o,a,s,l,u){var d=e
if("function"==typeof s)d=s(t,d)
else if(d instanceof Date)d=d.toISOString()
else if(null===d){if(r)return a?a(t):t
d=""}if("string"==typeof d||"number"==typeof d||"boolean"==typeof d||i.isBuffer(d))return a?[a(t)+"="+a(d)]:[t+"="+String(d)]
var f=[]
if("undefined"==typeof c)return f
if("undefined"==typeof d)return f
var p
if(Array.isArray(s))p=s
else{var h=Object.keys(c)
else{var h=Object.keys(d)
p=l?h.sort(l):h}for(var m=0;m<p.length;++m){var g=p[m]
o&&null===c[g]||(f=Array.isArray(c)?f.concat(d(c[g],n(t,g),n,r,o,a,s,l,u)):f.concat(d(c[g],t+(u?"."+g:"["+g+"]"),n,r,o,a,s,l,u)))}return f}
e.exports=function(e,t){var n=e,i=t||{},s="undefined"==typeof i.delimiter?o.delimiter:i.delimiter,l="boolean"==typeof i.strictNullHandling?i.strictNullHandling:o.strictNullHandling,u="boolean"==typeof i.skipNulls?i.skipNulls:o.skipNulls,d="boolean"==typeof i.encode?i.encode:o.encode,c=d?"function"==typeof i.encoder?i.encoder:o.encoder:null,f="function"==typeof i.sort?i.sort:null,p="undefined"!=typeof i.allowDots&&i.allowDots,h,m
o&&null===d[g]||(f=Array.isArray(d)?f.concat(c(d[g],n(t,g),n,r,o,a,s,l,u)):f.concat(c(d[g],t+(u?"."+g:"["+g+"]"),n,r,o,a,s,l,u)))}return f}
e.exports=function(e,t){var n=e,i=t||{},s="undefined"==typeof i.delimiter?o.delimiter:i.delimiter,l="boolean"==typeof i.strictNullHandling?i.strictNullHandling:o.strictNullHandling,u="boolean"==typeof i.skipNulls?i.skipNulls:o.skipNulls,c="boolean"==typeof i.encode?i.encode:o.encode,d=c?"function"==typeof i.encoder?i.encoder:o.encoder:null,f="function"==typeof i.sort?i.sort:null,p="undefined"!=typeof i.allowDots&&i.allowDots,h,m
if(null!==i.encoder&&void 0!==i.encoder&&"function"!=typeof i.encoder)throw new TypeError("Encoder has to be a function.")
@ -200,10 +200,10 @@ var g=[]
if("object"!=typeof n||null===n)return""
var v
v=i.arrayFormat in r?i.arrayFormat:"indices"in i?i.indices?"indices":"repeat":"indices"
var y=r[v]
var b=r[v]
h||(h=Object.keys(n)),f&&h.sort(f)
for(var b=0;b<h.length;++b){var _=h[b]
u&&null===n[_]||(g=g.concat(a(n[_],_,y,l,u,c,m,f,p)))}return g.join(s)}},function(e,t){"use strict"
for(var y=0;y<h.length;++y){var w=h[y]
u&&null===n[w]||(g=g.concat(a(n[w],w,b,l,u,d,m,f,p)))}return g.join(s)}},function(e,t){"use strict"
var n=function(){for(var e=new Array(256),t=0;t<256;++t)e[t]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase()
return e}()
t.arrayToObject=function(e,t){for(var n=t.plainObjects?Object.create(null):{},i=0;i<e.length;++i)"undefined"!=typeof e[i]&&(n[i]=e[i])
@ -228,18 +228,18 @@ e[u]=t.compact(e[u],i)}return e},t.isRegExp=function(e){return"[object RegExp]"=
}},function(e,t,n){"use strict"
var i=n(14),r=Object.prototype.hasOwnProperty,o={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3,strictNullHandling:!1,plainObjects:!1,allowPrototypes:!1,allowDots:!1,decoder:i.decode},a=function u(e,t){
for(var n={},i=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),o=0;o<i.length;++o){var a=i[o],s=a.indexOf("]=")===-1?a.indexOf("="):a.indexOf("]=")+1,l,u
s===-1?(l=t.decoder(a),u=t.strictNullHandling?null:""):(l=t.decoder(a.slice(0,s)),u=t.decoder(a.slice(s+1))),r.call(n,l)?n[l]=[].concat(n[l]).concat(u):n[l]=u}return n},s=function d(e,t,n){if(!e.length)return t
s===-1?(l=t.decoder(a),u=t.strictNullHandling?null:""):(l=t.decoder(a.slice(0,s)),u=t.decoder(a.slice(s+1))),r.call(n,l)?n[l]=[].concat(n[l]).concat(u):n[l]=u}return n},s=function c(e,t,n){if(!e.length)return t
var i=e.shift(),r
if("[]"===i)r=[],r=r.concat(d(e,t,n))
if("[]"===i)r=[],r=r.concat(c(e,t,n))
else{r=n.plainObjects?Object.create(null):{}
var o="["===i[0]&&"]"===i[i.length-1]?i.slice(1,i.length-1):i,a=parseInt(o,10)
!isNaN(a)&&i!==o&&String(a)===o&&a>=0&&n.parseArrays&&a<=n.arrayLimit?(r=[],r[a]=d(e,t,n)):r[o]=d(e,t,n)}return r},l=function c(e,t,n){if(e){var i=n.allowDots?e.replace(/\.([^\.\[]+)/g,"[$1]"):e,o=/^([^\[\]]*)/,a=/(\[[^\[\]]*\])/g,l=o.exec(i),u=[]
!isNaN(a)&&i!==o&&String(a)===o&&a>=0&&n.parseArrays&&a<=n.arrayLimit?(r=[],r[a]=c(e,t,n)):r[o]=c(e,t,n)}return r},l=function d(e,t,n){if(e){var i=n.allowDots?e.replace(/\.([^\.\[]+)/g,"[$1]"):e,o=/^([^\[\]]*)/,a=/(\[[^\[\]]*\])/g,l=o.exec(i),u=[]
if(l[1]){if(!n.plainObjects&&r.call(Object.prototype,l[1])&&!n.allowPrototypes)return
u.push(l[1])}for(var d=0;null!==(l=a.exec(i))&&d<n.depth;)d+=1,(n.plainObjects||!r.call(Object.prototype,l[1].replace(/\[|\]/g,""))||n.allowPrototypes)&&u.push(l[1])
u.push(l[1])}for(var c=0;null!==(l=a.exec(i))&&c<n.depth;)c+=1,(n.plainObjects||!r.call(Object.prototype,l[1].replace(/\[|\]/g,""))||n.allowPrototypes)&&u.push(l[1])
return l&&u.push("["+i.slice(l.index)+"]"),s(u,t,n)}}
e.exports=function(e,t){var n=t||{}
if(null!==n.decoder&&void 0!==n.decoder&&"function"!=typeof n.decoder)throw new TypeError("Decoder has to be a function.")
@ -247,18 +247,19 @@ if(n.delimiter="string"==typeof n.delimiter||i.isRegExp(n.delimiter)?n.delimiter
n.parseArrays=n.parseArrays!==!1,n.decoder="function"==typeof n.decoder?n.decoder:o.decoder,n.allowDots="boolean"==typeof n.allowDots?n.allowDots:o.allowDots,n.plainObjects="boolean"==typeof n.plainObjects?n.plainObjects:o.plainObjects,
n.allowPrototypes="boolean"==typeof n.allowPrototypes?n.allowPrototypes:o.allowPrototypes,n.parameterLimit="number"==typeof n.parameterLimit?n.parameterLimit:o.parameterLimit,n.strictNullHandling="boolean"==typeof n.strictNullHandling?n.strictNullHandling:o.strictNullHandling,
""===e||null===e||"undefined"==typeof e)return n.plainObjects?Object.create(null):{}
for(var r="string"==typeof e?a(e,n):e,s=n.plainObjects?Object.create(null):{},u=Object.keys(r),d=0;d<u.length;++d){var c=u[d],f=l(c,r[c],n)
for(var r="string"==typeof e?a(e,n):e,s=n.plainObjects?Object.create(null):{},u=Object.keys(r),c=0;c<u.length;++c){var d=u[c],f=l(d,r[d],n)
s=i.merge(s,f,n)}return i.compact(s)}},function(e,t,n){(function(e){!function(t){function n(e,t){if("object"!==r(e))return t
for(var i in t)"object"===r(e[i])&&"object"===r(t[i])?e[i]=n(e[i],t[i]):e[i]=t[i]
return e}function i(e,t,i){var a=i[0],s=i.length;(e||"object"!==r(a))&&(a={})
for(var l=0;l<s;++l){var u=i[l],d=r(u)
if("object"===d)for(var c in u){var f=e?o.clone(u[c]):u[c]
t?a[c]=n(a[c],f):a[c]=f}}return a}function r(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}var o=function(e){return i(e===!0,!1,arguments)},a="merge"
for(var l=0;l<s;++l){var u=i[l],c=r(u)
if("object"===c)for(var d in u){var f=e?o.clone(u[d]):u[d]
t?a[d]=n(a[d],f):a[d]=f}}return a}function r(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}var o=function(e){return i(e===!0,!1,arguments)},a="merge"
o.recursive=function(e){return i(e===!0,!0,arguments)},o.clone=function(e){var t=e,n=r(e),i,a
if("array"===n)for(t=[],a=e.length,i=0;i<a;++i)t[i]=o.clone(e[i])
else if("object"===n){t={}
for(i in e)t[i]=o.clone(e[i])}return t},t?e.exports=o:window[a]=o}("object"==typeof e&&e&&"object"==typeof e.exports&&e.exports)}).call(t,n(17)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},
e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){(function(t){e.exports=t.Form=n(19)}).call(t,function(){return this}())},function(e,t,n){"use strict"
for(i in e)t[i]=o.clone(e[i])}return t},t?e.exports=o:window[a]=o}("object"==typeof e&&e&&"object"==typeof e.exports&&e.exports)}).call(t,n(17)(e))},,function(e,t,n){(function(t){e.exports=t.Form=n(19)
}).call(t,function(){return this}())},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -267,20 +268,18 @@ e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,wri
value:!0})
var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(4),d=i(u),c=n(20),f=i(c),p=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(4),c=i(u),d=n(20),f=i(d),p=function(e){
function t(e){r(this,t)
var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.handleSubmit=n.handleSubmit.bind(n),n}return a(t,e),l(t,[{key:"componentWillUnmount",value:function n(){"undefined"!=typeof this.props.componentWillUnmount&&this.props.componentWillUnmount(this.props.formId)
}},{key:"render",value:function i(){var e={className:"form",onSubmit:this.handleSubmit},t=s({},e,this.props.attributes),n=this.props.mapFieldsToComponents(this.props.fields),i=this.props.mapActionsToComponents(this.props.actions)
return n.handleSubmit=n.handleSubmit.bind(n),n}return a(t,e),l(t,[{key:"render",value:function n(){var e=s({},{className:"form",onSubmit:this.handleSubmit},this.props.attributes),t=this.props.mapFieldsToComponents(this.props.fields),n=this.props.mapActionsToComponents(this.props.actions)
return d["default"].createElement("form",t,n&&d["default"].createElement("fieldset",null,n),i&&d["default"].createElement("div",{className:"btn-toolbar",role:"group"},i))}},{key:"handleSubmit",value:function u(e){
return c["default"].createElement("form",e,t&&c["default"].createElement("fieldset",null,t),n&&c["default"].createElement("div",{className:"btn-toolbar",role:"group"},n))}},{key:"handleSubmit",value:function i(e){
"undefined"!=typeof this.props.handleSubmit&&this.props.handleSubmit(e)}}]),t}(f["default"])
p.propTypes={actions:d["default"].PropTypes.array,attributes:d["default"].PropTypes.shape({action:d["default"].PropTypes.string.isRequired,className:d["default"].PropTypes.string,encType:d["default"].PropTypes.string,
id:d["default"].PropTypes.string,method:d["default"].PropTypes.string.isRequired}),componentWillUnmount:d["default"].PropTypes.func,data:d["default"].PropTypes.array,fields:d["default"].PropTypes.array.isRequired,
formId:d["default"].PropTypes.string.isRequired,handleSubmit:d["default"].PropTypes.func,mapActionsToComponents:d["default"].PropTypes.func.isRequired,mapFieldsToComponents:d["default"].PropTypes.func.isRequired
},t["default"]=p},function(e,t){e.exports=SilverStripeComponent},function(e,t,n){(function(t){e.exports=t.FormConstants=n(22)}).call(t,function(){return this}())},function(e,t){"use strict"
p.propTypes={actions:c["default"].PropTypes.array,attributes:c["default"].PropTypes.shape({action:c["default"].PropTypes.string.isRequired,className:c["default"].PropTypes.string,encType:c["default"].PropTypes.string,
id:c["default"].PropTypes.string,method:c["default"].PropTypes.string.isRequired}),fields:c["default"].PropTypes.array.isRequired,handleSubmit:c["default"].PropTypes.func,mapActionsToComponents:c["default"].PropTypes.func.isRequired,
mapFieldsToComponents:c["default"].PropTypes.func.isRequired},t["default"]=p},function(e,t){e.exports=SilverStripeComponent},function(e,t,n){(function(t){e.exports=t.FormConstants=n(22)}).call(t,function(){
return this}())},function(e,t){"use strict"
Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={CSRF_HEADER:"X-SecurityID"}},function(e,t,n){(function(t){e.exports=t.FormAction=n(24)}).call(t,function(){return this}())},function(e,t,n){
"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -291,113 +290,80 @@ e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,wri
value:!0})
var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(4),d=i(u),c=n(20),f=i(c),p=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(4),c=i(u),d=n(20),f=i(d),p=function(e){
function t(e){r(this,t)
var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.handleClick=n.handleClick.bind(n),n}return a(t,e),l(t,[{key:"render",value:function n(){return d["default"].createElement("button",this.getButtonProps(),this.getLoadingIcon(),d["default"].createElement("span",null,this.props.title))
return n.handleClick=n.handleClick.bind(n),n}return a(t,e),l(t,[{key:"render",value:function n(){return c["default"].createElement("button",this.getButtonProps(),this.getLoadingIcon(),c["default"].createElement("span",null,this.props.title))
}},{key:"getButtonProps",value:function i(){return s({},"undefined"==typeof this.props.attributes?{}:this.props.attributes,{id:this.props.id,className:this.getButtonClasses(),disabled:this.props.disabled,
}},{key:"getButtonProps",value:function i(){return s({},"undefined"==typeof this.props.attributes?{}:this.props.attributes,{id:this.props.id,name:this.props.name,className:this.getButtonClasses(),disabled:this.props.disabled,
onClick:this.handleClick})}},{key:"getButtonClasses",value:function u(){var e=["btn"],t=this.getButtonStyle()
t&&e.push("btn-"+t),"string"!=typeof this.props.title&&e.push("btn--no-text")
var n=this.getIcon()
return n&&e.push("font-icon-"+n),this.props.loading&&e.push("btn--loading"),this.props.disabled&&e.push("disabled"),"string"==typeof this.props.extraClass&&e.push(this.props.extraClass),e.join(" ")}},{
key:"getButtonStyle",value:function c(){if("undefined"!=typeof this.props.data.buttonStyle)return this.props.data.buttonStyle
key:"getButtonStyle",value:function d(){if("undefined"!=typeof this.props.data.buttonStyle)return this.props.data.buttonStyle
var e=this.props.extraClass.split(" ")
return e.find(function(e){return e.indexOf("btn-")>-1})?null:"action_save"===this.props.name||e.find(function(e){return"ss-ui-action-constructive"===e})?"primary":"secondary"}},{key:"getIcon",value:function f(){
return this.props.icon||this.props.data.icon||null}},{key:"getLoadingIcon",value:function p(){return this.props.loading?d["default"].createElement("div",{className:"btn__loading-icon"},d["default"].createElement("span",{
className:"btn__circle btn__circle--1"}),d["default"].createElement("span",{className:"btn__circle btn__circle--2"}),d["default"].createElement("span",{className:"btn__circle btn__circle--3"})):null}},{
return this.props.icon||this.props.data.icon||null}},{key:"getLoadingIcon",value:function p(){return this.props.loading?c["default"].createElement("div",{className:"btn__loading-icon"},c["default"].createElement("span",{
className:"btn__circle btn__circle--1"}),c["default"].createElement("span",{className:"btn__circle btn__circle--2"}),c["default"].createElement("span",{className:"btn__circle btn__circle--3"})):null}},{
key:"handleClick",value:function h(e){"function"==typeof this.props.handleClick&&this.props.handleClick(e,this.props.name||this.props.id)}}]),t}(f["default"])
p.propTypes={id:d["default"].PropTypes.string,name:d["default"].PropTypes.string,handleClick:d["default"].PropTypes.func,title:d["default"].PropTypes.string,type:d["default"].PropTypes.string,loading:d["default"].PropTypes.bool,
icon:d["default"].PropTypes.string,disabled:d["default"].PropTypes.bool,data:d["default"].PropTypes.oneOfType([d["default"].PropTypes.array,d["default"].PropTypes.shape({buttonStyle:d["default"].PropTypes.string
})]),extraClass:d["default"].PropTypes.string,attributes:d["default"].PropTypes.object},p.defaultProps={title:"",icon:"",extraClass:"",attributes:{},data:{},disabled:!1},t["default"]=p},function(e,t,n){
p.propTypes={id:c["default"].PropTypes.string,name:c["default"].PropTypes.string,handleClick:c["default"].PropTypes.func,title:c["default"].PropTypes.string,type:c["default"].PropTypes.string,loading:c["default"].PropTypes.bool,
icon:c["default"].PropTypes.string,disabled:c["default"].PropTypes.bool,data:c["default"].PropTypes.oneOfType([c["default"].PropTypes.array,c["default"].PropTypes.shape({buttonStyle:c["default"].PropTypes.string
})]),extraClass:c["default"].PropTypes.string,attributes:c["default"].PropTypes.object},p.defaultProps={title:"",icon:"",extraClass:"",attributes:{},data:{},disabled:!1},t["default"]=p},function(e,t,n){
(function(t){e.exports=t.FormBuilder=n(26)}).call(t,function(){return this}())},function(e,t,n){"use strict"
function i(e){if(e&&e.__esModule)return e
var t={}
if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])
return t["default"]=e,t}function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 l(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):e.__proto__=t)}function u(e){return{config:e.config,
form:e.form,schemas:e.schemas}}function d(e){return{formActions:(0,g.bindActionCreators)(y,e),schemaActions:(0,g.bindActionCreators)(_,e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.FormBuilderComponent=void 0
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")
var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),p=n(4),h=r(p),m=n(27),g=n(28),v=n(29),y=i(v),b=n(31),_=i(b),w=n(20),C=r(w),T=n(19),E=r(T),P=n(7),O=r(P),S=n(33),k=r(S),j=n(34),x=r(j),R=n(16),I=r(R),F=n(9),A=r(F)
A["default"].polyfill()
var D=t.FormBuilderComponent=function(e){function t(e){a(this,t)
var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.formSchemaPromise=null,n.state={isFetching:!1},n.mapActionsToComponents=n.mapActionsToComponents.bind(n),n.mapFieldsToComponents=n.mapFieldsToComponents.bind(n),n.handleFieldUpdate=n.handleFieldUpdate.bind(n),
n.handleSubmit=n.handleSubmit.bind(n),n.handleAction=n.handleAction.bind(n),n.removeForm=n.removeForm.bind(n),n.getFormId=n.getFormId.bind(n),n.getFormSchema=n.getFormSchema.bind(n),n.findField=n.findField.bind(n),
n}return l(t,e),f(t,[{key:"getFormSchema",value:function n(){return this.props.schemas[this.props.schemaUrl]}},{key:"getFormId",value:function i(){var e=this.getFormSchema()
return e?e.id:null}},{key:"componentDidMount",value:function r(){this.fetch()}},{key:"componentDidUpdate",value:function u(e){this.props.schemaUrl!==e.schemaUrl&&this.fetch()}},{key:"fetch",value:function d(){
var e=this,t=arguments.length<=0||void 0===arguments[0]||arguments[0],n=arguments.length<=1||void 0===arguments[1]||arguments[1],i=[]
return this.state.isFetching===!0?this.formSchemaPromise:(t===!0&&i.push("schema"),n===!0&&i.push("state"),this.formSchemaPromise=(0,O["default"])(this.props.schemaUrl,{headers:{"X-FormSchema-Request":i.join()
},credentials:"same-origin"}).then(function(e){return e.json()}).then(function(t){var n=c({},{id:t.id,schema:t.schema}),i=c({},t.state)
"undefined"!=typeof n.id&&!function(){var t={SecurityID:e.props.config.SecurityID}
e.submitApi=function(){var i=k["default"].createEndpointFetcher({url:n.schema.attributes.action,method:n.schema.attributes.method,defaultData:t})
return i.apply(void 0,arguments).then(function(t){if(t.schema){var n=c({},{id:t.id,schema:t.schema})
e.props.schemaActions.setSchema(n)}return t})},e.props.schemaActions.setSchema(n)}(),"undefined"!=typeof i.id&&e.props.formActions.addForm(i)}),this.formSchemaPromise)}},{key:"handleFieldUpdate",value:function p(e,t,n){
"function"==typeof n?n(this.getFormId(),this.props.formActions.updateField):this.props.formActions.updateField(this.getFormId(),t)}},{key:"handleAction",value:function m(e,t){this.props.formActions.setSubmitAction(this.getFormId(),t),
"function"==typeof this.props.handleAction&&this.props.handleAction(e,t,this.getFieldValues())}},{key:"handleSubmit",value:function g(e){var t=this,n=this.getFieldValues(),i=function r(){return t.props.formActions.submitForm(t.submitApi,t.getFormId(),n)
}
return"undefined"!=typeof this.props.handleSubmit?this.props.handleSubmit(e,n,i):(e.preventDefault(),i())}},{key:"getFieldValues",value:function v(){var e=this,t=this.props.schemas[this.props.schemaUrl],n=t.state?t.state.fields:t.schema.fields,i=this.getSubmitAction(),r={}
return i&&(r[i]=1),this.props.form[this.getFormId()].fields.reduce(function(t,i){var r=e.findField(n,i.id)
return r?c({},t,o({},r.name,i.value)):t},r)}},{key:"getSubmitAction",value:function y(){return this.props.form[this.getFormId()].submitAction}},{key:"findField",value:function b(e,t){var n=null
}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):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0}),t.schemaPropType=t.basePropTypes=void 0
var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),c=n(4),d=i(c),f=n(20),p=i(f),h=n(27),m=i(h),g=n(28),v=i(g),b=n(16),y=i(b),w=function(e){
function t(e){o(this,t)
var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),i=e.schema.schema
return n.state={submittingAction:null},n.submitApi=m["default"].createEndpointFetcher({url:i.attributes.action,method:i.attributes.method}),n.mapActionsToComponents=n.mapActionsToComponents.bind(n),n.mapFieldsToComponents=n.mapFieldsToComponents.bind(n),
n.handleSubmit=n.handleSubmit.bind(n),n.handleAction=n.handleAction.bind(n),n.findField=n.findField.bind(n),n.buildComponent=n.buildComponent.bind(n),n}return s(t,e),u(t,[{key:"handleAction",value:function n(e){
"function"==typeof this.props.handleAction&&this.props.handleAction(e,this.getFieldValues())
var t=e.currentTarget.name
e.isPropagationStopped()||this.setState({submittingAction:t})}},{key:"handleSubmit",value:function i(e){var t=this,n=this.state.submittingAction?this.state.submittingAction:this.props.schema.schema.actions[0].name,i=l({},e,r({},n,1)),o={
"X-Formschema-Request":"state,schema","X-Requested-With":"XMLHttpRequest"},a=function u(){t.setState({submittingAction:null})},s=function c(e){return t.submitApi(e||i,o).then(function(e){return a(),e})["catch"](function(e){
return a(),e})}
return"function"==typeof this.props.handleSubmit?this.props.handleSubmit(i,n,s):s()}},{key:"getFieldValues",value:function c(){var e=this,t=this.props.schema.schema,n=this.props.schema.state
return n?n.fields.reduce(function(n,i){var o=e.findField(t.fields,i.id)
return o?"Structural"===o.type||o.readOnly===!0?n:l({},n,r({},o.name,i.value)):n},{}):{}}},{key:"findField",value:function f(e,t){var n=null
if(!e)return n
n=e.find(function(e){return e.id===t})
var i=!0,r=!1,o=void 0
try{for(var a=e[Symbol.iterator](),s;!(i=(s=a.next()).done);i=!0){var l=s.value
if(n)break
n=this.findField(l.children,t)}}catch(u){r=!0,o=u}finally{try{!i&&a["return"]&&a["return"]()}finally{if(r)throw o}}return n}},{key:"buildComponent",value:function _(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=null!==e.component?x["default"].getComponentByName(e.component):x["default"].getComponentByDataType(e.type)
n=this.findField(l.children,t)}}catch(u){r=!0,o=u}finally{try{!i&&a["return"]&&a["return"]()}finally{if(r)throw o}}return n}},{key:"buildComponent",value:function p(e){var t=e,n=null!==t.schemaComponent?v["default"].getComponentByName(t.schemaComponent):v["default"].getComponentByDataType(t.type)
if(null===n)return null
if(null!==e.component&&void 0===n)throw Error("Component not found in injector: "+e.component)
var i=c({},e,t)
null===i.value&&delete i.value
var r=this.props.createFn
return"function"==typeof r?r(n,i):h["default"].createElement(n,c({key:i.id},i))}},{key:"mapFieldsToComponents",value:function w(e){var t=this
return e.map(function(e){var n={onChange:t.handleFieldUpdate}
return e.children&&(n.children=t.mapFieldsToComponents(e.children)),t.buildComponent(e,n)})}},{key:"mapActionsToComponents",value:function C(e){var t=this,n=this.props.form[this.getFormId()]
return e.map(function(e){var i=n&&n.submitting&&n.submitAction===e.name,r={handleClick:t.handleAction,loading:i,disabled:i||e.disabled}
return e.children&&(r.children=t.mapActionsToComponents(e.children)),t.buildComponent(e,r)})}},{key:"mergeFieldData",value:function T(e,t){return"undefined"==typeof t?e:I["default"].recursive(!0,e,{data:t.data,
source:t.source,messages:t.messages,valid:t.valid,value:t.value})}},{key:"removeForm",value:function P(e){this.props.formActions.removeForm(e)}},{key:"getFieldData",value:function S(e,t){var n=this
return e&&t&&t.fields?e.map(function(e){var i=t.fields.find(function(t){return t.id===e.id}),r=n.mergeFieldData(e,i)
return e.children?c({},r,{children:n.getFieldData(e.children,t)}):r}):e}},{key:"render",value:function j(){var e=this.getFormId()
if(!e)return null
var t=this.getFormSchema(),n=this.props.form[e]
if(!t||!t.schema)return null
var i=c({},t.schema.attributes,{className:t.schema.attributes["class"],encType:t.schema.attributes.enctype})
if(null!==t.schemaComponent&&void 0===n)throw Error("Component not found in injector: "+t.schemaComponent)
null===t.value&&delete t.value,t=l({},t,t.input),delete t.input
var i=this.props.createFn
return"function"==typeof i?i(n,t):d["default"].createElement(n,l({key:t.id},t))}},{key:"mapFieldsToComponents",value:function h(e){var t=this,n=this.props.baseFieldComponent
return e.map(function(e){var i=e
return e.children&&(i=l({},e,{children:t.mapFieldsToComponents(e.children)})),"Structural"===e.type||e.readOnly===!0?t.buildComponent(i):d["default"].createElement(n,l({key:i.id},i,{component:t.buildComponent
}))})}},{key:"mapActionsToComponents",value:function g(e){var t=this
return e.map(function(e){var n=l({},e)
return e.children?n.children=t.mapActionsToComponents(e.children):(n.handleClick=t.handleAction,t.state.submittingAction===e.name&&(n.loading=!0)),t.buildComponent(n)})}},{key:"mergeFieldData",value:function b(e,t){
return"undefined"==typeof t?e:y["default"].recursive(!0,e,{data:t.data,source:t.source,messages:t.messages,valid:t.valid,value:t.value})}},{key:"normalizeFields",value:function w(e,t){var n=this
return e.map(function(e){var i=t&&t.fields?t.fields.find(function(t){return t.id===e.id}):{},r=y["default"].recursive(!0,n.mergeFieldData(e,i),{schemaComponent:e.component})
return e.children&&(r.children=n.normalizeFields(e.children,t)),r})}},{key:"normalizeActions",value:function _(e){var t=this
return e.map(function(e){var n=y["default"].recursive(!0,e,{schemaComponent:e.component})
return e.children&&(n.children=t.normalizeActions(e.children)),n})}},{key:"render",value:function C(){var e=this.props.schema.schema,t=this.props.schema.state,n=this.props.baseFormComponent,i=l({},e.attributes,{
className:e.attributes["class"],encType:e.attributes.enctype})
delete i["class"],delete i.enctype
var r=this.getFieldData(t.schema.fields,n),o=this.getFieldData(t.schema.actions,n),a={actions:o,attributes:i,componentWillUnmount:this.removeForm,data:t.schema.data,fields:r,formId:e,handleSubmit:this.handleSubmit,
mapActionsToComponents:this.mapActionsToComponents,mapFieldsToComponents:this.mapFieldsToComponents}
return h["default"].createElement(E["default"],a)}}]),t}(C["default"])
D.propTypes={config:h["default"].PropTypes.object,createFn:h["default"].PropTypes.func,form:h["default"].PropTypes.object.isRequired,formActions:h["default"].PropTypes.object.isRequired,handleSubmit:h["default"].PropTypes.func,
handleAction:h["default"].PropTypes.func,schemas:h["default"].PropTypes.object.isRequired,schemaActions:h["default"].PropTypes.object.isRequired,schemaUrl:h["default"].PropTypes.string.isRequired},t["default"]=(0,
m.connect)(u,d)(D)},function(e,t){e.exports=ReactRedux},,function(e,t,n){"use strict"
function i(e){return function(t){t({type:u.ACTION_TYPES.REMOVE_FORM,payload:{formId:e}})}}function r(e,t){return function(n){n({type:u.ACTION_TYPES.UPDATE_FIELD,payload:{formId:e,updates:t}})}}function o(e){
return function(t){t({type:u.ACTION_TYPES.ADD_FORM,payload:{formState:e}})}}function a(e,t,n){return function(i){var r={"X-Formschema-Request":"schema,state","X-Requested-With":"XMLHttpRequest"}
return i({type:u.ACTION_TYPES.SUBMIT_FORM_REQUEST,payload:{formId:t}}),e(l({ID:t},n),r).then(function(e){return i({type:u.ACTION_TYPES.SUBMIT_FORM_SUCCESS,payload:{response:e}}),e})["catch"](function(e){
throw e.response.text().then(function(e){return i({type:u.ACTION_TYPES.SUBMIT_FORM_FAILURE,payload:{formId:t,error:e}}),e})})}}function s(e,t){return function(n){n({type:u.ACTION_TYPES.SET_SUBMIT_ACTION,
payload:{formId:e,submitAction:t}})}}Object.defineProperty(t,"__esModule",{value:!0})
var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}
t.removeForm=i,t.updateField=r,t.addForm=o,t.submitForm=a,t.setSubmitAction=s
var u=n(30)},function(e,t){"use strict"
Object.defineProperty(t,"__esModule",{value:!0})
var n=t.ACTION_TYPES={ADD_FORM:"ADD_FORM",REMOVE_FORM:"REMOVE_FORM",SUBMIT_FORM_FAILURE:"SUBMIT_FORM_FAILURE",SUBMIT_FORM_REQUEST:"SUBMIT_FORM_REQUEST",SUBMIT_FORM_SUCCESS:"SUBMIT_FORM_SUCCESS",UPDATE_FIELD:"UPDATE_FIELD",
SET_SUBMIT_ACTION:"SET_SUBMIT_ACTION"}},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e){return{type:a["default"].SET_SCHEMA,payload:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.setSchema=r
var o=n(32),a=i(o)},function(e,t){"use strict"
Object.defineProperty(t,"__esModule",{value:!0})
var n={SET_SCHEMA:"SET_SCHEMA"}
t["default"]=n},function(e,t){e.exports=Backend},function(e,t){"use strict"
var r=this.props,o=r.asyncValidate,a=r.onSubmitFail,s=r.onSubmitSuccess,u=r.shouldAsyncValidate,c=r.touchOnBlur,f=r.touchOnChange,p=r.persistentSubmitErrors,h=r.validate,m=r.form,g={form:m,fields:this.normalizeFields(e.fields,t),
actions:this.normalizeActions(e.actions),attributes:i,data:e.data,initialValues:this.getFieldValues(),onSubmit:this.handleSubmit,mapActionsToComponents:this.mapActionsToComponents,mapFieldsToComponents:this.mapFieldsToComponents,
asyncValidate:o,onSubmitFail:a,onSubmitSuccess:s,shouldAsyncValidate:u,touchOnBlur:c,touchOnChange:f,persistentSubmitErrors:p,validate:h}
return d["default"].createElement(n,g)}}]),t}(p["default"]),_=c.PropTypes.shape({id:c.PropTypes.string.isRequired,schema:c.PropTypes.shape({attributes:c.PropTypes.shape({"class":c.PropTypes.string,enctype:c.PropTypes.string
}),fields:c.PropTypes.array.isRequired}).isRequired,state:c.PropTypes.shape({fields:c.PropTypes.array})}),C={createFn:c.PropTypes.func,handleSubmit:c.PropTypes.func,handleAction:c.PropTypes.func,asyncValidate:c.PropTypes.func,
onSubmitFail:c.PropTypes.func,onSubmitSuccess:c.PropTypes.func,shouldAsyncValidate:c.PropTypes.func,touchOnBlur:c.PropTypes.bool,touchOnChange:c.PropTypes.bool,persistentSubmitErrors:c.PropTypes.bool,validate:c.PropTypes.func,
baseFormComponent:c.PropTypes.func.isRequired,baseFieldComponent:c.PropTypes.func.isRequired}
w.propTypes=l({},C,{form:c.PropTypes.string.isRequired,schema:_.isRequired}),t.basePropTypes=C,t.schemaPropType=_,t["default"]=w},function(e,t){e.exports=Backend},function(e,t){"use strict"
function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0})
var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){
@ -410,9 +376,40 @@ case"Structural":return this.components.CompositeField
case"Boolean":return this.components.CheckboxField
case"MultiSelect":return this.components.CheckboxSetField
default:return null}}},{key:"register",value:function o(e,t){this.components[e]=t}}]),e}()
window.ss=window.ss||{},window.ss.injector=window.ss.injector||new r,t["default"]=window.ss.injector},function(e,t,n){(function(t){e.exports=t.FormBuilderModal=n(36)}).call(t,function(){return this}())
window.ss=window.ss||{},window.ss.injector=window.ss.injector||new r,t["default"]=window.ss.injector},function(e,t,n){(function(t){e.exports=t.FormBuilderLoader=n(30)}).call(t,function(){return this}())
},function(e,t,n){"use strict"
function i(e){if(e&&e.__esModule)return e
var t={}
if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])
return t["default"]=e,t}function r(e){return e&&e.__esModule?e:{"default":e}}function o(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):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),c=n(4),d=r(c),f=n(31),p=n(32),h=n(7),m=r(h),g=n(33),v=n(34),b=i(v),y=n(19),w=r(y),_=n(36),C=r(_),T=function(e){
function t(e){o(this,t)
var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.handleSubmitSuccess=n.handleSubmitSuccess.bind(n),n}return s(t,e),u(t,[{key:"componentDidMount",value:function n(){this.fetch()}},{key:"componentDidUpdate",value:function i(e){this.props.schemaUrl!==e.schemaUrl&&this.fetch()
}},{key:"handleSubmitSuccess",value:function r(e){this.props.schemaActions.setSchema(e),this.props.onSubmitSuccess&&this.props.onSubmitSuccess(e)}},{key:"fetch",value:function c(){var e=this,t=arguments.length<=0||void 0===arguments[0]||arguments[0],n=arguments.length<=1||void 0===arguments[1]||arguments[1],i=[]
return t===!0&&i.push("schema"),n===!0&&i.push("state"),(0,m["default"])(this.props.schemaUrl,{headers:{"X-FormSchema-Request":i.join()},credentials:"same-origin"}).then(function(e){return e.json()}).then(function(t){
"undefined"!=typeof t.id&&e.props.schemaActions.setSchema(t)})}},{key:"render",value:function f(){if(!this.props.schema)return null
var e=l({},this.props,{onSubmitSuccess:this.handleSubmitSuccess})
return d["default"].createElement(C["default"],e)}}]),t}(c.Component)
T.propTypes=l({},_.basePropTypes,{schemaActions:c.PropTypes.object.isRequired,schemaUrl:c.PropTypes.string.isRequired,schema:_.schemaPropType,form:c.PropTypes.string}),T.defaultProps={baseFormComponent:(0,
g.reduxForm)()(w["default"]),baseFieldComponent:g.Field},t["default"]=(0,f.connect)(function(e,t){var n=e.schemas[t.schemaUrl],i=n?n.id:null
return{schema:n,form:i}},function(e){return{schemaActions:(0,p.bindActionCreators)(b,e)}})(T)},,,function(e,t){e.exports=ReduxForm},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e){return{type:a["default"].SET_SCHEMA,payload:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.setSchema=r
var o=n(35),a=i(o)},function(e,t){"use strict"
Object.defineProperty(t,"__esModule",{value:!0})
var n={SET_SCHEMA:"SET_SCHEMA"}
t["default"]=n},function(e,t){e.exports=FormBuilder},function(e,t,n){(function(t){e.exports=t.FormBuilderModal=n(38)}).call(t,function(){return this}())},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -420,7 +417,7 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(37),c=n(20),f=i(c),p=n(38),h=i(p),m=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(39),d=n(20),f=i(d),p=n(40),h=i(p),m=function(e){
function t(e){r(this,t)
var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.handleSubmit=n.handleSubmit.bind(n),n.handleHide=n.handleHide.bind(n),n.clearResponse=n.clearResponse.bind(n),n}return a(t,e),s(t,[{key:"getForm",value:function n(){return u["default"].createElement(h["default"],{
@ -428,15 +425,15 @@ schemaUrl:this.props.schemaUrl,handleSubmit:this.handleSubmit,handleAction:this.
var e=""
return e=this.state.error?this.props.responseClassBad||"response error":this.props.responseClassGood||"response good",u["default"].createElement("div",{className:e},u["default"].createElement("span",null,this.state.response))
}},{key:"clearResponse",value:function l(){this.setState({response:null})}},{key:"handleHide",value:function c(){this.clearResponse(),"function"==typeof this.props.handleHide&&this.props.handleHide()}},{
}},{key:"clearResponse",value:function l(){this.setState({response:null})}},{key:"handleHide",value:function d(){this.clearResponse(),"function"==typeof this.props.handleHide&&this.props.handleHide()}},{
key:"handleSubmit",value:function f(e,t,n){var i=this,r=null
return"function"==typeof this.props.handleSubmit?r=this.props.handleSubmit(e,t,n):(e.preventDefault(),r=n()),r&&r.then(function(e){return i.setState({response:e.message,error:!1}),e})["catch"](function(e){
e.then(function(e){i.setState({response:e,error:!0})})}),r}},{key:"render",value:function p(){var e=this.getForm(),t=this.getResponse()
return u["default"].createElement(d.Modal,{show:this.props.show,onHide:this.handleHide,className:this.props.className},this.props.title!==!1&&u["default"].createElement(d.Modal.Header,{closeButton:!0},u["default"].createElement(d.Modal.Title,null,this.props.title)),u["default"].createElement(d.Modal.Body,{
return r="function"==typeof this.props.handleSubmit?this.props.handleSubmit(e,t,n):n(),r&&r.then(function(e){return i.setState({response:e.message,error:!1}),e})["catch"](function(e){e.then(function(e){
i.setState({response:e,error:!0})})}),r}},{key:"render",value:function p(){var e=this.getForm(),t=this.getResponse()
return u["default"].createElement(c.Modal,{show:this.props.show,onHide:this.handleHide,className:this.props.className},this.props.title!==!1&&u["default"].createElement(c.Modal.Header,{closeButton:!0},u["default"].createElement(c.Modal.Title,null,this.props.title)),u["default"].createElement(c.Modal.Body,{
className:this.props.bodyClassName},t,e,this.props.children))}}]),t}(f["default"])
m.propTypes={show:u["default"].PropTypes.bool,title:u["default"].PropTypes.string,className:u["default"].PropTypes.string,bodyClassName:u["default"].PropTypes.string,handleHide:u["default"].PropTypes.func,
schemaUrl:u["default"].PropTypes.string,handleSubmit:u["default"].PropTypes.func,handleAction:u["default"].PropTypes.func,responseClassGood:u["default"].PropTypes.string,responseClassBad:u["default"].PropTypes.string
},m.defaultProps={show:!1,title:null},t["default"]=m},function(e,t){e.exports=ReactBootstrap},function(e,t){e.exports=FormBuilder},function(e,t,n){(function(t){e.exports=t.GridField=n(40)}).call(t,function(){
},m.defaultProps={show:!1,title:null},t["default"]=m},function(e,t){e.exports=ReactBootstrap},function(e,t){e.exports=FormBuilderLoader},function(e,t,n){(function(t){e.exports=t.GridField=n(42)}).call(t,function(){
return this}())},function(e,t,n){"use strict"
function i(e){if(e&&e.__esModule)return e
var t={}
@ -448,29 +445,29 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){var n=t.data?t.data.recordType:null
return{config:e.config,records:n&&e.records[n]?e.records[n]:A}}function u(e){return{actions:(0,h.bindActionCreators)(F,e)}}Object.defineProperty(t,"__esModule",{value:!0})
var d=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),c=function M(e,t,n){null===e&&(e=Function.prototype)
return{config:e.config,records:n&&e.records[n]?e.records[n]:F}}function u(e){return{actions:(0,h.bindActionCreators)(A,e)}}Object.defineProperty(t,"__esModule",{value:!0})
var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),d=function M(e,t,n){null===e&&(e=Function.prototype)
var i=Object.getOwnPropertyDescriptor(e,t)
if(void 0===i){var r=Object.getPrototypeOf(e)
return null===r?void 0:M(r,t,n)}if("value"in i)return i.value
var o=i.get
if(void 0!==o)return o.call(n)},f=n(4),p=r(f),h=n(28),m=n(27),g=n(20),v=r(g),y=n(41),b=r(y),_=n(42),w=r(_),C=n(44),T=r(C),E=n(43),P=r(E),O=n(45),S=r(O),k=n(46),j=r(k),x=n(22),R=r(x),I=n(47),F=i(I),A={},D=function(e){
if(void 0!==o)return o.call(n)},f=n(4),p=r(f),h=n(32),m=n(31),g=n(20),v=r(g),b=n(43),y=r(b),w=n(44),_=r(w),C=n(46),T=r(C),E=n(45),P=r(E),O=n(47),S=r(O),k=n(48),j=r(k),x=n(22),R=r(x),I=n(49),A=i(I),F={},D=function(e){
function t(e){o(this,t)
var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.deleteRecord=n.deleteRecord.bind(n),n.editRecord=n.editRecord.bind(n),n}return s(t,e),d(t,[{key:"componentDidMount",value:function n(){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)
return n.deleteRecord=n.deleteRecord.bind(n),n.editRecord=n.editRecord.bind(n),n}return s(t,e),c(t,[{key:"componentDidMount",value:function n(){d(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)
var e=this.props.data
this.props.actions.fetchRecords(e.recordType,e.collectionReadEndpoint.method,e.collectionReadEndpoint.url)}},{key:"render",value:function i(){var e=this
if(this.props.records===A)return p["default"].createElement("div",null,"Loading...")
if(this.props.records===F)return p["default"].createElement("div",null,"Loading...")
if(!Object.getOwnPropertyNames(this.props.records).length)return p["default"].createElement("div",null,"No campaigns created yet.")
var t=p["default"].createElement("th",{key:"holder",className:"grid-field__action-placeholder"}),n=this.props.data.columns.map(function(e){return p["default"].createElement(T["default"],{key:""+e.name},e.name)
}),i=p["default"].createElement(w["default"],null,n.concat(t)),r=Object.keys(this.props.records).map(function(t){return e.createRow(e.props.records[t])})
return p["default"].createElement(b["default"],{header:i,rows:r})}},{key:"createRowActions",value:function r(e){return p["default"].createElement(S["default"],{className:"grid-field__cell--actions",key:"Actions"
}),i=p["default"].createElement(_["default"],null,n.concat(t)),r=Object.keys(this.props.records).map(function(t){return e.createRow(e.props.records[t])})
return p["default"].createElement(y["default"],{header:i,rows:r})}},{key:"createRowActions",value:function r(e){return p["default"].createElement(S["default"],{className:"grid-field__cell--actions",key:"Actions"
},p["default"].createElement(j["default"],{icon:"cog",handleClick:this.editRecord,record:e}),p["default"].createElement(j["default"],{icon:"cancel",handleClick:this.deleteRecord,record:e}))}},{key:"createCell",
value:function l(e,t){var n=this.props.data.handleDrillDown,i={className:n?"grid-field__cell--drillable":"",handleDrillDown:n?function(t){return n(t,e)}:null,key:""+t.name,width:t.width},r=t.field.split(".").reduce(function(e,t){
return e[t]},e)
@ -492,12 +489,12 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"render",value:function n(){return u["default"].createElement("div",{className:"grid-field"
},u["default"].createElement("table",{className:"table table-hover grid-field__table"},u["default"].createElement("thead",null,this.generateHeader()),u["default"].createElement("tbody",null,this.generateRows())))
}},{key:"generateHeader",value:function i(){return"undefined"!=typeof this.props.header?this.props.header:("undefined"!=typeof this.props.data,null)}},{key:"generateRows",value:function l(){return"undefined"!=typeof this.props.rows?this.props.rows:("undefined"!=typeof this.props.data,
null)}}]),t}(c["default"])
null)}}]),t}(d["default"])
f.propTypes={data:u["default"].PropTypes.object,header:u["default"].PropTypes.object,rows:u["default"].PropTypes.array},t["default"]=f},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -506,10 +503,10 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=n(43),p=i(f),h=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=n(45),p=i(f),h=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"render",value:function n(){return u["default"].createElement(p["default"],null,this.props.children)
}}]),t}(c["default"])
}}]),t}(d["default"])
t["default"]=h},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -518,9 +515,9 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"render",value:function n(){var e="grid-field__row "+this.props.className
return u["default"].createElement("tr",{tabIndex:"0",className:e},this.props.children)}}]),t}(c["default"])
return u["default"].createElement("tr",{tabIndex:"0",className:e},this.props.children)}}]),t}(d["default"])
t["default"]=f},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -529,10 +526,10 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"render",value:function n(){return u["default"].createElement("th",null,this.props.children)
}}]),t}(c["default"])
}}]),t}(d["default"])
f.PropTypes={width:u["default"].PropTypes.number},t["default"]=f},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -541,13 +538,13 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=function(e){
function t(e){r(this,t)
var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.handleDrillDown=n.handleDrillDown.bind(n),n}return a(t,e),s(t,[{key:"render",value:function n(){var e=["grid-field__cell"]
"undefined"!=typeof this.props.className&&e.push(this.props.className)
var t={className:e.join(" "),onClick:this.handleDrillDown}
return u["default"].createElement("td",t,this.props.children)}},{key:"handleDrillDown",value:function i(e){"undefined"!=typeof this.props.handleDrillDown&&this.props.handleDrillDown(e)}}]),t}(c["default"])
return u["default"].createElement("td",t,this.props.children)}},{key:"handleDrillDown",value:function i(e){"undefined"!=typeof this.props.handleDrillDown&&this.props.handleDrillDown(e)}}]),t}(d["default"])
f.PropTypes={className:u["default"].PropTypes.string,width:u["default"].PropTypes.number,handleDrillDown:u["default"].PropTypes.func},t["default"]=f},function(e,t,n){"use strict"
@ -558,34 +555,34 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=function(e){
function t(e){r(this,t)
var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.handleClick=n.handleClick.bind(n),n}return a(t,e),s(t,[{key:"render",value:function n(){return u["default"].createElement("button",{className:"grid-field__icon-action font-icon-"+this.props.icon+" btn--icon-large",
onClick:this.handleClick})}},{key:"handleClick",value:function i(e){this.props.handleClick(e,this.props.record.ID)}}]),t}(c["default"])
onClick:this.handleClick})}},{key:"handleClick",value:function i(e){this.props.handleClick(e,this.props.record.ID)}}]),t}(d["default"])
f.PropTypes={handleClick:u["default"].PropTypes.func.isRequired},t["default"]=f},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){var n=["id"]
return n.reduce(function(e,n){return e.replace(":"+n,t[n])},e)}function o(e,t,n){var i={recordType:e},o={Accept:"text/json"},a=t.toLowerCase()
return function(t){t({type:u["default"].FETCH_RECORDS_REQUEST,payload:i})
var s="get"===a?[r(n,i),o]:[r(n,i),{},o]
return c["default"][a].apply(c["default"],s).then(function(e){return e.json()}).then(function(n){t({type:u["default"].FETCH_RECORDS_SUCCESS,payload:{recordType:e,data:n}})})["catch"](function(n){throw t({
return d["default"][a].apply(d["default"],s).then(function(e){return e.json()}).then(function(n){t({type:u["default"].FETCH_RECORDS_SUCCESS,payload:{recordType:e,data:n}})})["catch"](function(n){throw t({
type:u["default"].FETCH_RECORDS_FAILURE,payload:{error:n,recordType:e}}),n})}}function a(e,t,n){var i={recordType:e},o={Accept:"text/json"},a=t.toLowerCase()
return function(t){t({type:u["default"].FETCH_RECORD_REQUEST,payload:i})
var s="get"===a?[r(n,i),o]:[r(n,i),{},o]
return c["default"][a].apply(c["default"],s).then(function(e){return e.json()}).then(function(n){t({type:u["default"].FETCH_RECORD_SUCCESS,payload:{recordType:e,data:n}})})["catch"](function(n){throw t({
return d["default"][a].apply(d["default"],s).then(function(e){return e.json()}).then(function(n){t({type:u["default"].FETCH_RECORD_SUCCESS,payload:{recordType:e,data:n}})})["catch"](function(n){throw t({
type:u["default"].FETCH_RECORD_FAILURE,payload:{error:n,recordType:e}}),n})}}function s(e,t,n,i){var o=arguments.length<=4||void 0===arguments[4]?{}:arguments[4],a={recordType:e,id:t},s=n.toLowerCase(),l="get"===s?[r(i,a),o]:[r(i,a),{},o]
return function(n){return n({type:u["default"].DELETE_RECORD_REQUEST,payload:a}),c["default"][s].apply(c["default"],l).then(function(){n({type:u["default"].DELETE_RECORD_SUCCESS,payload:{recordType:e,id:t
return function(n){return n({type:u["default"].DELETE_RECORD_REQUEST,payload:a}),d["default"][s].apply(d["default"],l).then(function(){n({type:u["default"].DELETE_RECORD_SUCCESS,payload:{recordType:e,id:t
}})})["catch"](function(i){throw n({type:u["default"].DELETE_RECORD_FAILURE,payload:{error:i,recordType:e,id:t}}),i})}}Object.defineProperty(t,"__esModule",{value:!0}),t.fetchRecords=o,t.fetchRecord=a,
t.deleteRecord=s
var l=n(48),u=i(l),d=n(6),c=i(d)},function(e,t){"use strict"
var l=n(50),u=i(l),c=n(6),d=i(c)},function(e,t){"use strict"
Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={CREATE_RECORD:"CREATE_RECORD",UPDATE_RECORD:"UPDATE_RECORD",DELETE_RECORD:"DELETE_RECORD",FETCH_RECORDS_REQUEST:"FETCH_RECORDS_REQUEST",FETCH_RECORDS_FAILURE:"FETCH_RECORDS_FAILURE",
FETCH_RECORDS_SUCCESS:"FETCH_RECORDS_SUCCESS",FETCH_RECORD_REQUEST:"FETCH_RECORD_REQUEST",FETCH_RECORD_FAILURE:"FETCH_RECORD_FAILURE",FETCH_RECORD_SUCCESS:"FETCH_RECORD_SUCCESS",DELETE_RECORD_REQUEST:"DELETE_RECORD_REQUEST",
DELETE_RECORD_FAILURE:"DELETE_RECORD_FAILURE",DELETE_RECORD_SUCCESS:"DELETE_RECORD_SUCCESS"}},function(e,t,n){(function(t){e.exports=t.GridFieldCell=n(45)}).call(t,function(){return this}())},function(e,t,n){
(function(t){e.exports=t.GridFieldHeader=n(42)}).call(t,function(){return this}())},function(e,t,n){(function(t){e.exports=t.GridFieldHeaderCell=n(44)}).call(t,function(){return this}())},function(e,t,n){
(function(t){e.exports=t.GridFieldRow=n(43)}).call(t,function(){return this}())},function(e,t,n){(function(t){e.exports=t.GridFieldTable=n(41)}).call(t,function(){return this}())},function(e,t,n){(function(t){
e.exports=t.HiddenField=n(55)}).call(t,function(){return this}())},function(e,t,n){"use strict"
DELETE_RECORD_FAILURE:"DELETE_RECORD_FAILURE",DELETE_RECORD_SUCCESS:"DELETE_RECORD_SUCCESS"}},function(e,t,n){(function(t){e.exports=t.GridFieldCell=n(47)}).call(t,function(){return this}())},function(e,t,n){
(function(t){e.exports=t.GridFieldHeader=n(44)}).call(t,function(){return this}())},function(e,t,n){(function(t){e.exports=t.GridFieldHeaderCell=n(46)}).call(t,function(){return this}())},function(e,t,n){
(function(t){e.exports=t.GridFieldRow=n(45)}).call(t,function(){return this}())},function(e,t,n){(function(t){e.exports=t.GridFieldTable=n(43)}).call(t,function(){return this}())},function(e,t,n){(function(t){
e.exports=t.HiddenField=n(57)}).call(t,function(){return this}())},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -593,13 +590,13 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=n(37),p=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=n(39),p=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"getInputProps",value:function n(){return{bsClass:this.props.bsClass,componentClass:"input",
className:this.props.className+" "+this.props.extraClass,id:this.props.id,name:this.props.name,type:"hidden",value:this.props.value}}},{key:"render",value:function i(){return u["default"].createElement(f.FormControl,this.getInputProps())
}}]),t}(c["default"])
}}]),t}(d["default"])
p.propTypes={id:u["default"].PropTypes.string,extraClass:u["default"].PropTypes.string,name:u["default"].PropTypes.string.isRequired,value:u["default"].PropTypes.any},p.defaultProps={className:"",extraClass:"",
value:""},t["default"]=p},function(e,t,n){(function(t){e.exports=t.TextField=n(57)}).call(t,function(){return this}())},function(e,t,n){"use strict"
value:""},t["default"]=p},function(e,t,n){(function(t){e.exports=t.TextField=n(59)}).call(t,function(){return this}())},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -608,18 +605,18 @@ e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,wri
value:!0}),t.TextField=void 0
var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(4),d=i(u),c=n(20),f=i(c),p=n(58),h=i(p),m=n(37),g=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(4),c=i(u),d=n(20),f=i(d),p=n(60),h=i(p),m=n(39),g=function(e){
function t(e){r(this,t)
var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.handleChange=n.handleChange.bind(n),n}return a(t,e),l(t,[{key:"render",value:function n(){var e=null
return e=this.props.readOnly?d["default"].createElement(m.FormControl.Static,this.getInputProps(),this.props.value):d["default"].createElement(m.FormControl,this.getInputProps())}},{key:"getInputProps",
return e=this.props.readOnly?c["default"].createElement(m.FormControl.Static,this.getInputProps(),this.props.value):c["default"].createElement(m.FormControl,this.getInputProps())}},{key:"getInputProps",
value:function i(){var e={bsClass:this.props.bsClass,className:this.props.className+" "+this.props.extraClass,id:this.props.id,name:this.props.name,disabled:this.props.disabled,readOnly:this.props.readOnly
}
return this.props.readOnly||(s(e,{placeholder:this.props.placeholder,onChange:this.handleChange,value:this.props.value}),this.isMultiline()?s(e,{componentClass:"textarea",rows:this.props.data.rows,cols:this.props.data.columns
}):s(e,{componentClass:"input",type:this.props.type})),e}},{key:"isMultiline",value:function u(){return this.props.data&&this.props.data.rows>1}},{key:"handleChange",value:function c(e){"function"==typeof this.props.onChange&&this.props.onChange(e,{
}):s(e,{componentClass:"input",type:this.props.type})),e}},{key:"isMultiline",value:function u(){return this.props.data&&this.props.data.rows>1}},{key:"handleChange",value:function d(e){"function"==typeof this.props.onChange&&this.props.onChange(e,{
id:this.props.id,value:e.target.value})}}]),t}(f["default"])
g.propTypes={extraClass:d["default"].PropTypes.string,id:d["default"].PropTypes.string,name:d["default"].PropTypes.string.isRequired,onChange:d["default"].PropTypes.func,value:d["default"].PropTypes.oneOfType([d["default"].PropTypes.string,d["default"].PropTypes.number]),
readOnly:d["default"].PropTypes.bool,disabled:d["default"].PropTypes.bool,placeholder:d["default"].PropTypes.string,type:d["default"].PropTypes.string},g.defaultProps={value:"",extraClass:"",className:"",
g.propTypes={extraClass:c["default"].PropTypes.string,id:c["default"].PropTypes.string,name:c["default"].PropTypes.string.isRequired,onChange:c["default"].PropTypes.func,value:c["default"].PropTypes.oneOfType([c["default"].PropTypes.string,c["default"].PropTypes.number]),
readOnly:c["default"].PropTypes.bool,disabled:c["default"].PropTypes.bool,placeholder:c["default"].PropTypes.string,type:c["default"].PropTypes.string},g.defaultProps={value:"",extraClass:"",className:"",
type:"text"},t.TextField=g,t["default"]=(0,h["default"])(g)},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -629,16 +626,16 @@ e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,wri
function n(){return r(this,n),o(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return a(n,t),l(n,[{key:"getDescription",value:function i(){return null===this.props.description?null:(0,
m["default"])("div",this.props.description,{className:"form__field-description"})}},{key:"getLeftTitle",value:function s(){var e=null!==this.props.leftTitle?this.props.leftTitle:this.props.title
return!e||this.props.hideLabels?null:(0,m["default"])(p.ControlLabel,e,{className:"form__field-label"})}},{key:"getRightTitle",value:function u(){return!this.props.rightTitle||this.props.hideLabels?null:(0,
m["default"])(p.ControlLabel,this.props.rightTitle,{className:"form__field-label"})}},{key:"getHolderProps",value:function c(){var e=["field",this.props.extraClass]
m["default"])(p.ControlLabel,this.props.rightTitle,{className:"form__field-label"})}},{key:"getHolderProps",value:function d(){var e=["field",this.props.extraClass]
return this.props.readOnly&&e.push("readonly"),{bsClass:this.props.bsClass,bsSize:this.props.bsSize,validationState:this.props.validationState,className:e.join(" "),controlId:this.props.id,id:this.props.holderId
}}},{key:"render",value:function f(){return d["default"].createElement(p.FormGroup,this.getHolderProps(),this.getLeftTitle(),d["default"].createElement("div",{className:"form__field-holder"},d["default"].createElement(e,this.props)),this.getRightTitle(),this.getDescription())
}}},{key:"render",value:function f(){return c["default"].createElement(p.FormGroup,this.getHolderProps(),this.getLeftTitle(),c["default"].createElement("div",{className:"form__field-holder"},c["default"].createElement(e,this.props)),this.getRightTitle(),this.getDescription())
}}]),n}(f["default"])
return t.propTypes={leftTitle:d["default"].PropTypes.any,rightTitle:d["default"].PropTypes.any,title:d["default"].PropTypes.any,extraClass:d["default"].PropTypes.string,holderId:d["default"].PropTypes.string,
id:d["default"].PropTypes.string,description:d["default"].PropTypes.any,hideLabels:d["default"].PropTypes.bool},t.defaultProps={className:"",extraClass:"",leftTitle:null,rightTitle:null},t.defaultProps={
return t.propTypes={leftTitle:c["default"].PropTypes.any,rightTitle:c["default"].PropTypes.any,title:c["default"].PropTypes.any,extraClass:c["default"].PropTypes.string,holderId:c["default"].PropTypes.string,
id:c["default"].PropTypes.string,description:c["default"].PropTypes.any,hideLabels:c["default"].PropTypes.bool},t.defaultProps={className:"",extraClass:"",leftTitle:null,rightTitle:null},t.defaultProps={
className:"",extraClass:""},t}Object.defineProperty(t,"__esModule",{value:!0})
var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(4),d=i(u),c=n(20),f=i(c),p=n(37),h=n(59),m=i(h)
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(4),c=i(u),d=n(20),f=i(d),p=n(39),h=n(61),m=i(h)
t["default"]=s},function(e,t,n){"use strict"
@ -651,7 +648,7 @@ var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){re
for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}
t["default"]=r
var s=n(4),l=i(s)},function(e,t,n){(function(t){e.exports=t.Toolbar=n(61)}).call(t,function(){return this}())},function(e,t,n){"use strict"
var s=n(4),l=i(s)},function(e,t,n){(function(t){e.exports=t.Toolbar=n(63)}).call(t,function(){return this}())},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -659,16 +656,16 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=function(e){
function t(e){r(this,t)
var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.handleBackButtonClick=n.handleBackButtonClick.bind(n),n}return a(t,e),s(t,[{key:"render",value:function n(){var e=["btn","btn-secondary","action","font-icon-left-open-big","toolbar__back-button","btn--no-text"],t={
className:e.join(" "),onClick:this.handleBackButtonClick,href:"#",type:"button"}
return u["default"].createElement("div",{className:"toolbar toolbar--north"},u["default"].createElement("div",{className:"toolbar__navigation"},this.props.showBackButton&&u["default"].createElement("button",t),this.props.children))
}},{key:"handleBackButtonClick",value:function i(e){return"undefined"!=typeof this.props.handleBackButtonClick?void this.props.handleBackButtonClick(e):void e.preventDefault()}}]),t}(c["default"])
}},{key:"handleBackButtonClick",value:function i(e){return"undefined"!=typeof this.props.handleBackButtonClick?void this.props.handleBackButtonClick(e):void e.preventDefault()}}]),t}(d["default"])
f.propTypes={handleBackButtonClick:u["default"].PropTypes.func,showBackButton:u["default"].PropTypes.bool,breadcrumbs:u["default"].PropTypes.array},f.defaultProps={showBackButton:!1},t["default"]=f},function(e,t,n){
(function(t){e.exports=t.Breadcrumb=n(63)}).call(t,function(){return this}())},function(e,t,n){"use strict"
(function(t){e.exports=t.Breadcrumb=n(65)}).call(t,function(){return this}())},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -676,20 +673,20 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=n(64),p=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=n(66),p=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"render",value:function n(){return u["default"].createElement("ol",{className:"breadcrumb"
},this.getBreadcrumbs())}},{key:"getBreadcrumbs",value:function i(){return"undefined"==typeof this.props.crumbs?null:[].concat(this.props.crumbs.slice(0,-1).map(function(e,t){return[u["default"].createElement("li",{
className:"breadcrumb__item"},u["default"].createElement(f.Link,{key:t,className:"breadcrumb__item-title",to:e.href},e.text))]}),this.props.crumbs.slice(-1).map(function(e,t){var n=["breadcrumb__icon",e.icon?e.icon.className:""].join(" ")
return[u["default"].createElement("li",{className:"breadcrumb__item breadcrumb__item--last"},u["default"].createElement("h2",{className:"breadcrumb__item-title breadcrumb__item-title--last",key:t},e.text,e.icon&&u["default"].createElement("span",{
className:n,onClick:e.icon.action})))]}))}}]),t}(c["default"])
p.propTypes={crumbs:u["default"].PropTypes.array},t["default"]=p},function(e,t){e.exports=ReactRouter},function(e,t,n){(function(t){e.exports=t.BreadcrumbsActions=n(66)}).call(t,function(){return this}())
className:n,onClick:e.icon.action})))]}))}}]),t}(d["default"])
p.propTypes={crumbs:u["default"].PropTypes.array},t["default"]=p},function(e,t){e.exports=ReactRouter},function(e,t,n){(function(t){e.exports=t.BreadcrumbsActions=n(68)}).call(t,function(){return this}())
},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e){return{type:a["default"].SET_BREADCRUMBS,payload:{breadcrumbs:e}}}Object.defineProperty(t,"__esModule",{value:!0}),t.setBreadcrumbs=r
var o=n(67),a=i(o)},function(e,t){"use strict"
Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={SET_BREADCRUMBS:"SET_BREADCRUMBS"}},function(e,t,n){(function(t){e.exports=t.Config=n(69)}).call(t,function(){return this}())},function(e,t){
var o=n(69),a=i(o)},function(e,t){"use strict"
Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={SET_BREADCRUMBS:"SET_BREADCRUMBS"}},function(e,t,n){(function(t){e.exports=t.Config=n(71)}).call(t,function(){return this}())},function(e,t){
"use strict"
function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0})
var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
@ -697,13 +694,13 @@ i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Obj
n(this,e)}return i(e,null,[{key:"get",value:function t(e){return window.ss.config[e]}},{key:"getAll",value:function r(){return window.ss.config}},{key:"getSection",value:function o(e){return window.ss.config.sections[e]
}}]),e}()
t["default"]=r},function(e,t,n){(function(t){e.exports=t.ReducerRegister=n(71)}).call(t,function(){return this}())},function(e,t){"use strict"
t["default"]=r},function(e,t,n){(function(t){e.exports=t.ReducerRegister=n(73)}).call(t,function(){return this}())},function(e,t){"use strict"
function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0})
var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r={},o=function(){function e(){
n(this,e)}return i(e,[{key:"add",value:function t(e,n){if("undefined"!=typeof r[e])throw new Error("Reducer already exists at '"+e+"'")
r[e]=n}},{key:"getAll",value:function o(){return r}},{key:"getByKey",value:function a(e){return r[e]}},{key:"remove",value:function s(e){delete r[e]}}]),e}()
window.ss=window.ss||{},window.ss.reducerRegister=window.ss.reducerRegister||new o,t["default"]=window.ss.reducerRegister},function(e,t,n){(function(t){e.exports=t.ReactRouteRegister=n(73)}).call(t,function(){
window.ss=window.ss||{},window.ss.reducerRegister=window.ss.reducerRegister||new o,t["default"]=window.ss.reducerRegister},function(e,t,n){(function(t){e.exports=t.ReactRouteRegister=n(75)}).call(t,function(){
return this}())},function(e,t){"use strict"
function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0})
var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
@ -717,22 +714,22 @@ var a=n.findIndex(function(t){return t.path===e.path})
a>=0?n[a]=r:n.unshift(r)}},{key:"findChildRoute",value:function s(e){var t=this.childRoutes
return e&&e.forEach(function(e){var n=t.find(function(t){return t.path===e})
if(!n)throw new Error("Parent path "+e+" could not be found.")
t=n.childRoutes}),t}},{key:"getRootRoute",value:function l(){return this.rootRoute}},{key:"getChildRoutes",value:function u(){return this.childRoutes}},{key:"remove",value:function d(e){var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],n=this.findChildRoute(t),i=n.findIndex(function(t){
t=n.childRoutes}),t}},{key:"getRootRoute",value:function l(){return this.rootRoute}},{key:"getChildRoutes",value:function u(){return this.childRoutes}},{key:"remove",value:function c(e){var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],n=this.findChildRoute(t),i=n.findIndex(function(t){
return t.path===e})
return i<0?null:n.splice(i,1)[0]}}]),e}()
window.ss=window.ss||{},window.ss.routeRegister=window.ss.routeRegister||new o,t["default"]=window.ss.routeRegister},function(e,t,n){(function(t){e.exports=t.Injector=n(34)}).call(t,function(){return this
window.ss=window.ss||{},window.ss.routeRegister=window.ss.routeRegister||new o,t["default"]=window.ss.routeRegister},function(e,t,n){(function(t){e.exports=t.Injector=n(28)}).call(t,function(){return this
}())},function(e,t,n){(function(t){e.exports=t.Router=n(76)}).call(t,function(){return this}())},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e){var t=d["default"].getAbsoluteBase(),n=f["default"].resolve(t,e)
return 0!==n.indexOf(t)?n:n.substring(t.length-1)}function o(e){return function(t,n,i,r){return e(d["default"].resolveURLToBase(t),n,i,r)}}function a(e){var t=new d["default"].Route(e)
return t.match(d["default"].current,{})}function s(){return d["default"].absoluteBaseURL}function l(e){d["default"].absoluteBaseURL=e
}())},function(e,t,n){(function(t){e.exports=t.Router=n(78)}).call(t,function(){return this}())},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e){var t=c["default"].getAbsoluteBase(),n=f["default"].resolve(t,e)
return 0!==n.indexOf(t)?n:n.substring(t.length-1)}function o(e){return function(t,n,i,r){return e(c["default"].resolveURLToBase(t),n,i,r)}}function a(e){var t=new c["default"].Route(e)
return t.match(c["default"].current,{})}function s(){return c["default"].absoluteBaseURL}function l(e){c["default"].absoluteBaseURL=e
var t=document.createElement("a")
t.href=e
var n=t.pathname
n=n.replace(/\/$/,""),n.match(/^[^\/]/)&&(n="/"+n),d["default"].base(n)}Object.defineProperty(t,"__esModule",{value:!0})
var u=n(77),d=i(u),c=n(78),f=i(c)
d["default"].oldshow||(d["default"].oldshow=d["default"].show),d["default"].setAbsoluteBase=l.bind(d["default"]),d["default"].getAbsoluteBase=s.bind(d["default"]),d["default"].resolveURLToBase=r.bind(d["default"]),
d["default"].show=o(d["default"].oldshow),d["default"].routeAppliesToCurrentLocation=a,window.ss=window.ss||{},window.ss.router=window.ss.router||d["default"],t["default"]=window.ss.router},function(e,t){
n=n.replace(/\/$/,""),n.match(/^[^\/]/)&&(n="/"+n),c["default"].base(n)}Object.defineProperty(t,"__esModule",{value:!0})
var u=n(79),c=i(u),d=n(80),f=i(d)
c["default"].oldshow||(c["default"].oldshow=c["default"].show),c["default"].setAbsoluteBase=l.bind(c["default"]),c["default"].getAbsoluteBase=s.bind(c["default"]),c["default"].resolveURLToBase=r.bind(c["default"]),
c["default"].show=o(c["default"].oldshow),c["default"].routeAppliesToCurrentLocation=a,window.ss=window.ss||{},window.ss.router=window.ss.router||c["default"],t["default"]=window.ss.router},function(e,t){
e.exports=Page},function(e,t,n){"use strict"
function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null
@ -740,16 +737,16 @@ function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,
var r=new i
return r.parse(e,t,n),r}function o(e){return u.isString(e)&&(e=r(e)),e instanceof i?e.format():i.prototype.format.call(e)}function a(e,t){return r(e,!1,!0).resolve(t)}function s(e,t){return e?r(e,!1,!0).resolveObject(t):t
}var l=n(79),u=n(80)
}var l=n(81),u=n(82)
t.parse=r,t.resolve=a,t.resolveObject=s,t.format=o,t.Url=i
var d=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,p=["<",">",'"',"`"," ","\r","\n","\t"],h=["{","}","|","\\","^","`"].concat(p),m=["'"].concat(h),g=["%","/","?",";","#"].concat(m),v=["/","?","#"],y=255,b=/^[+a-z0-9A-Z_-]{0,63}$/,_=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,w={
javascript:!0,"javascript:":!0},C={javascript:!0,"javascript:":!0},T={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},E=n(81)
var c=/^([a-z0-9.+-]+:)/i,d=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,p=["<",">",'"',"`"," ","\r","\n","\t"],h=["{","}","|","\\","^","`"].concat(p),m=["'"].concat(h),g=["%","/","?",";","#"].concat(m),v=["/","?","#"],b=255,y=/^[+a-z0-9A-Z_-]{0,63}$/,w=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_={
javascript:!0,"javascript:":!0},C={javascript:!0,"javascript:":!0},T={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},E=n(83)
i.prototype.parse=function(e,t,n){if(!u.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e)
var i=e.indexOf("?"),r=i!==-1&&i<e.indexOf("#")?"?":"#",o=e.split(r),a=/\\/g
o[0]=o[0].replace(a,"/"),e=o.join(r)
var s=e
if(s=s.trim(),!n&&1===e.split("#").length){var c=f.exec(s)
if(c)return this.path=s,this.href=s,this.pathname=c[1],c[2]?(this.search=c[2],t?this.query=E.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var p=d.exec(s)
if(s=s.trim(),!n&&1===e.split("#").length){var d=f.exec(s)
if(d)return this.path=s,this.href=s,this.pathname=d[1],d[2]?(this.search=d[2],t?this.query=E.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var p=c.exec(s)
if(p){p=p[0]
@ -761,13 +758,13 @@ x=O===-1?s.lastIndexOf("@"):s.lastIndexOf("@",O),x!==-1&&(j=s.slice(0,x),s=s.sli
for(var S=0;S<g.length;S++){var k=s.indexOf(g[S])
k!==-1&&(O===-1||k<O)&&(O=k)}O===-1&&(O=s.length),this.host=s.slice(0,O),s=s.slice(O),this.parseHost(),this.hostname=this.hostname||""
var R="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1]
if(!R)for(var I=this.hostname.split(/\./),S=0,F=I.length;S<F;S++){var A=I[S]
if(A&&!A.match(b)){for(var D="",M=0,N=A.length;M<N;M++)D+=A.charCodeAt(M)>127?"x":A[M]
if(!D.match(b)){var U=I.slice(0,S),L=I.slice(S+1),B=A.match(_)
if(!R)for(var I=this.hostname.split(/\./),S=0,A=I.length;S<A;S++){var F=I[S]
if(F&&!F.match(y)){for(var D="",M=0,N=F.length;M<N;M++)D+=F.charCodeAt(M)>127?"x":F[M]
if(!D.match(y)){var U=I.slice(0,S),L=I.slice(S+1),B=F.match(w)
B&&(U.push(B[1]),L.unshift(B[2])),L.length&&(s="/"+L.join(".")+s),this.hostname=U.join(".")
break}}}this.hostname.length>y?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=l.toASCII(this.hostname))
break}}}this.hostname.length>b?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=l.toASCII(this.hostname))
var H=this.port?":"+this.port:"",$=this.hostname||""
this.host=$+H,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!w[h])for(var S=0,F=m.length;S<F;S++){var V=m[S]
this.host=$+H,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!_[h])for(var S=0,A=m.length;S<A;S++){var V=m[S]
if(s.indexOf(V)!==-1){var q=encodeURIComponent(V)
q===V&&(q=escape(V)),s=s.split(V).join(q)}}var G=s.indexOf("#")
G!==-1&&(this.hash=s.substr(G),s=s.slice(0,G))
@ -786,61 +783,61 @@ return encodeURIComponent(e)}),a=a.replace("#","%23"),t+r+n+a+i},i.prototype.res
var t=new i
t.parse(e,!1,!0),e=t}for(var n=new i,r=Object.keys(this),o=0;o<r.length;o++){var a=r[o]
n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n
if(e.slashes&&!e.protocol){for(var s=Object.keys(e),l=0;l<s.length;l++){var d=s[l]
"protocol"!==d&&(n[d]=e[d])}return T[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!T[e.protocol]){for(var c=Object.keys(e),f=0;f<c.length;f++){
var p=c[f]
if(e.slashes&&!e.protocol){for(var s=Object.keys(e),l=0;l<s.length;l++){var c=s[l]
"protocol"!==c&&(n[c]=e[c])}return T[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!T[e.protocol]){for(var d=Object.keys(e),f=0;f<d.length;f++){
var p=d[f]
n[p]=e[p]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||C[e.protocol])n.pathname=e.pathname
else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),n.pathname=h.join("/")}if(n.search=e.search,
n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",g=n.search||""
n.path=m+g}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var v=n.pathname&&"/"===n.pathname.charAt(0),y=e.host||e.pathname&&"/"===e.pathname.charAt(0),b=y||v||n.host&&e.pathname,_=b,w=n.pathname&&n.pathname.split("/")||[],h=e.pathname&&e.pathname.split("/")||[],E=n.protocol&&!T[n.protocol]
n.path=m+g}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var v=n.pathname&&"/"===n.pathname.charAt(0),b=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=b||v||n.host&&e.pathname,w=y,_=n.pathname&&n.pathname.split("/")||[],h=e.pathname&&e.pathname.split("/")||[],E=n.protocol&&!T[n.protocol]
if(E&&(n.hostname="",n.port=null,n.host&&(""===w[0]?w[0]=n.host:w.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),b=b&&(""===h[0]||""===w[0])),
y)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,w=h
else if(h.length)w||(w=[]),w.pop(),w=w.concat(h),n.search=e.search,n.query=e.query
else if(!u.isNullOrUndefined(e.search)){if(E){n.hostname=n.host=w.shift()
if(E&&(n.hostname="",n.port=null,n.host&&(""===_[0]?_[0]=n.host:_.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),y=y&&(""===h[0]||""===_[0])),
b)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,_=h
else if(h.length)_||(_=[]),_.pop(),_=_.concat(h),n.search=e.search,n.query=e.query
else if(!u.isNullOrUndefined(e.search)){if(E){n.hostname=n.host=_.shift()
var P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@")
P&&(n.auth=P.shift(),n.host=n.hostname=P.shift())}return n.search=e.search,n.query=e.query,u.isNull(n.pathname)&&u.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),
n}if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n
for(var O=w.slice(-1)[0],S=(n.host||e.host||w.length>1)&&("."===O||".."===O)||""===O,k=0,j=w.length;j>=0;j--)O=w[j],"."===O?w.splice(j,1):".."===O?(w.splice(j,1),k++):k&&(w.splice(j,1),k--)
if(!b&&!_)for(;k--;k)w.unshift("..")
!b||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),S&&"/"!==w.join("/").substr(-1)&&w.push("")
var x=""===w[0]||w[0]&&"/"===w[0].charAt(0)
if(E){n.hostname=n.host=x?"":w.length?w.shift():""
n}if(!_.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n
for(var O=_.slice(-1)[0],S=(n.host||e.host||_.length>1)&&("."===O||".."===O)||""===O,k=0,j=_.length;j>=0;j--)O=_[j],"."===O?_.splice(j,1):".."===O?(_.splice(j,1),k++):k&&(_.splice(j,1),k--)
if(!y&&!w)for(;k--;k)_.unshift("..")
!y||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),S&&"/"!==_.join("/").substr(-1)&&_.push("")
var x=""===_[0]||_[0]&&"/"===_[0].charAt(0)
if(E){n.hostname=n.host=x?"":_.length?_.shift():""
var P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@")
P&&(n.auth=P.shift(),n.host=n.hostname=P.shift())}return b=b||n.host&&w.length,b&&!x&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),u.isNull(n.pathname)&&u.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),
n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var e=this.host,t=c.exec(e)
t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){var i;(function(e,r){!function(o){function a(e){throw RangeError(A[e])}function s(e,t){
P&&(n.auth=P.shift(),n.host=n.hostname=P.shift())}return y=y||n.host&&_.length,y&&!x&&_.unshift(""),_.length?n.pathname=_.join("/"):(n.pathname=null,n.path=null),u.isNull(n.pathname)&&u.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),
n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var e=this.host,t=d.exec(e)
t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){var i;(function(e,r){!function(o){function a(e){throw RangeError(F[e])}function s(e,t){
for(var n=e.length,i=[];n--;)i[n]=t(e[n])
return i}function l(e,t){var n=e.split("@"),i=""
n.length>1&&(i=n[0]+"@",e=n[1]),e=e.replace(F,".")
n.length>1&&(i=n[0]+"@",e=n[1]),e=e.replace(A,".")
var r=e.split("."),o=s(r,t).join(".")
return i+o}function u(e){for(var t=[],n=0,i=e.length,r,o;n<i;)r=e.charCodeAt(n++),r>=55296&&r<=56319&&n<i?(o=e.charCodeAt(n++),56320==(64512&o)?t.push(((1023&r)<<10)+(1023&o)+65536):(t.push(r),n--)):t.push(r)
return t}function d(e){return s(e,function(e){var t=""
return e>65535&&(e-=65536,t+=N(e>>>10&1023|55296),e=56320|1023&e),t+=N(e)}).join("")}function c(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:T}function f(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function p(e,t,n){
return t}function c(e){return s(e,function(e){var t=""
return e>65535&&(e-=65536,t+=N(e>>>10&1023|55296),e=56320|1023&e),t+=N(e)}).join("")}function d(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:T}function f(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function p(e,t,n){
var i=0
for(e=n?M(e/S):e>>1,e+=M(e/t);e>D*P>>1;i+=T)e=M(e/D)
return M(i+(D+1)*e/(e+O))}function h(e){var t=[],n=e.length,i,r=0,o=j,s=k,l,u,f,h,m,g,v,y,b
return M(i+(D+1)*e/(e+O))}function h(e){var t=[],n=e.length,i,r=0,o=j,s=k,l,u,f,h,m,g,v,b,y
for(l=e.lastIndexOf(x),l<0&&(l=0),u=0;u<l;++u)e.charCodeAt(u)>=128&&a("not-basic"),t.push(e.charCodeAt(u))
for(f=l>0?l+1:0;f<n;){for(h=r,m=1,g=T;f>=n&&a("invalid-input"),v=c(e.charCodeAt(f++)),(v>=T||v>M((C-r)/m))&&a("overflow"),r+=v*m,y=g<=s?E:g>=s+P?P:g-s,!(v<y);g+=T)b=T-y,m>M(C/b)&&a("overflow"),m*=b
i=t.length+1,s=p(r-h,i,0==h),M(r/i)>C-o&&a("overflow"),o+=M(r/i),r%=i,t.splice(r++,0,o)}return d(t)}function m(e){var t,n,i,r,o,s,l,d,c,h,m,g=[],v,y,b,_
for(f=l>0?l+1:0;f<n;){for(h=r,m=1,g=T;f>=n&&a("invalid-input"),v=d(e.charCodeAt(f++)),(v>=T||v>M((C-r)/m))&&a("overflow"),r+=v*m,b=g<=s?E:g>=s+P?P:g-s,!(v<b);g+=T)y=T-b,m>M(C/y)&&a("overflow"),m*=y
i=t.length+1,s=p(r-h,i,0==h),M(r/i)>C-o&&a("overflow"),o+=M(r/i),r%=i,t.splice(r++,0,o)}return c(t)}function m(e){var t,n,i,r,o,s,l,c,d,h,m,g=[],v,b,y,w
for(e=u(e),v=e.length,t=j,n=0,o=k,s=0;s<v;++s)m=e[s],m<128&&g.push(N(m))
for(i=r=g.length,r&&g.push(x);i<v;){for(l=C,s=0;s<v;++s)m=e[s],m>=t&&m<l&&(l=m)
for(y=i+1,l-t>M((C-n)/y)&&a("overflow"),n+=(l-t)*y,t=l,s=0;s<v;++s)if(m=e[s],m<t&&++n>C&&a("overflow"),m==t){for(d=n,c=T;h=c<=o?E:c>=o+P?P:c-o,!(d<h);c+=T)_=d-h,b=T-h,g.push(N(f(h+_%b,0))),d=M(_/b)
g.push(N(f(d,0))),o=p(n,y,i==r),n=0,++i}++n,++t}return g.join("")}function g(e){return l(e,function(e){return R.test(e)?h(e.slice(4).toLowerCase()):e})}function v(e){return l(e,function(e){return I.test(e)?"xn--"+m(e):e
for(b=i+1,l-t>M((C-n)/b)&&a("overflow"),n+=(l-t)*b,t=l,s=0;s<v;++s)if(m=e[s],m<t&&++n>C&&a("overflow"),m==t){for(c=n,d=T;h=d<=o?E:d>=o+P?P:d-o,!(c<h);d+=T)w=c-h,y=T-h,g.push(N(f(h+w%y,0))),c=M(w/y)
g.push(N(f(c,0))),o=p(n,b,i==r),n=0,++i}++n,++t}return g.join("")}function g(e){return l(e,function(e){return R.test(e)?h(e.slice(4).toLowerCase()):e})}function v(e){return l(e,function(e){return I.test(e)?"xn--"+m(e):e
})}var y="object"==typeof t&&t&&!t.nodeType&&t,b="object"==typeof e&&e&&!e.nodeType&&e,_="object"==typeof r&&r
_.global!==_&&_.window!==_&&_.self!==_||(o=_)
var w,C=2147483647,T=36,E=1,P=26,O=38,S=700,k=72,j=128,x="-",R=/^xn--/,I=/[^\x20-\x7E]/,F=/[\x2E\u3002\uFF0E\uFF61]/g,A={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)",
})}var b="object"==typeof t&&t&&!t.nodeType&&t,y="object"==typeof e&&e&&!e.nodeType&&e,w="object"==typeof r&&r
w.global!==w&&w.window!==w&&w.self!==w||(o=w)
var _,C=2147483647,T=36,E=1,P=26,O=38,S=700,k=72,j=128,x="-",R=/^xn--/,I=/[^\x20-\x7E]/,A=/[\x2E\u3002\uFF0E\uFF61]/g,F={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)",
"invalid-input":"Invalid input"},D=T-E,M=Math.floor,N=String.fromCharCode,U
w={version:"1.3.2",ucs2:{decode:u,encode:d},decode:h,encode:m,toASCII:v,toUnicode:g},i=function(){return w}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))}(this)}).call(t,n(17)(e),function(){return this}())
_={version:"1.3.2",ucs2:{decode:u,encode:c},decode:h,encode:m,toASCII:v,toUnicode:g},i=function(){return _}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))}(this)}).call(t,n(17)(e),function(){return this}())
},function(e,t){"use strict"
e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){
"use strict"
t.decode=t.parse=n(82),t.encode=t.stringify=n(83)},function(e,t){"use strict"
t.decode=t.parse=n(84),t.encode=t.stringify=n(85)},function(e,t){"use strict"
function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,i,r){t=t||"&",i=i||"="
var o={}
if("string"!=typeof e||0===e.length)return o
@ -850,8 +847,8 @@ var s=1e3
r&&"number"==typeof r.maxKeys&&(s=r.maxKeys)
var l=e.length
s>0&&l>s&&(l=s)
for(var u=0;u<l;++u){var d=e[u].replace(a,"%20"),c=d.indexOf(i),f,p,h,m
c>=0?(f=d.substr(0,c),p=d.substr(c+1)):(f=d,p=""),h=decodeURIComponent(f),m=decodeURIComponent(p),n(o,h)?Array.isArray(o[h])?o[h].push(m):o[h]=[o[h],m]:o[h]=m}return o}},function(e,t){"use strict"
for(var u=0;u<l;++u){var c=e[u].replace(a,"%20"),d=c.indexOf(i),f,p,h,m
d>=0?(f=c.substr(0,d),p=c.substr(d+1)):(f=c,p=""),h=decodeURIComponent(f),m=decodeURIComponent(p),n(o,h)?Array.isArray(o[h])?o[h].push(m):o[h]=[o[h],m]:o[h]=m}return o}},function(e,t){"use strict"
var n=function(e){switch(typeof e){case"string":return e
case"boolean":return e?"true":"false"
case"number":return isFinite(e)?e:""
@ -870,10 +867,10 @@ return this.lang&&this.lang[this.getLocale()]&&this.lang[this.getLocale()][e]?th
}},{key:"addDictionary",value:function a(e,t){"undefined"==typeof this.lang[e]&&(this.lang[e]={})
for(var n in t)this.lang[e][n]=t[n]}},{key:"getDictionary",value:function s(e){return this.lang[e]}},{key:"stripStr",value:function l(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}},{key:"stripStrML",
value:function u(e){for(var t=e.split("\n"),n=0;n<t.length;n+=1)t[n]=stripStr(t[n])
return stripStr(t.join(" "))}},{key:"sprintf",value:function d(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i]
return stripStr(t.join(" "))}},{key:"sprintf",value:function c(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i]
if(0===n.length)return e
var r=new RegExp("(.?)(%s)","g"),o=0
return e.replace(r,function(e,t,i,r,a){return"%"===t?e:t+n[o++]})}},{key:"inject",value:function c(e,t){var n=new RegExp("{([A-Za-z0-9_]*)}","g")
return e.replace(r,function(e,t,i,r,a){return"%"===t?e:t+n[o++]})}},{key:"inject",value:function d(e,t){var n=new RegExp("{([A-Za-z0-9_]*)}","g")
return e.replace(n,function(e,n,i,r){return t[n]?t[n]:e})}},{key:"detectLocale",value:function f(){var t,n
if(t=document.body.getAttribute("lang"),!t)for(var i=document.getElementsByTagName("meta"),r=0;r<i.length;r++)i[r].attributes["http-equiv"]&&"content-language"==i[r].attributes["http-equiv"].nodeValue.toLowerCase()&&(t=i[r].attributes.content.nodeValue)
@ -886,10 +883,10 @@ return n}},{key:"addEvent",value:function p(e,t,n,i){return e.addEventListener?(
e}(),o=new r
window.ss="undefined"!=typeof window.ss?window.ss:{},window.ss.i18n=window.i18n=o,t["default"]=o},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r),a=(0,o["default"])(window),s=(0,o["default"])("html"),l=(0,o["default"])("head"),u={urlParseRE:/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,
parseUrl:function d(e){if("object"===o["default"].type(e))return e
parseUrl:function c(e){if("object"===o["default"].type(e))return e
var t=u.urlParseRE.exec(e||"")||[]
return{href:t[0]||"",hrefNoHash:t[1]||"",hrefNoSearch:t[2]||"",domain:t[3]||"",protocol:t[4]||"",doubleSlash:t[5]||"",authority:t[6]||"",username:t[8]||"",password:t[9]||"",host:t[10]||"",hostname:t[11]||"",
port:t[12]||"",pathname:t[13]||"",directory:t[14]||"",filename:t[15]||"",search:t[16]||"",hash:t[17]||""}},makePathAbsolute:function c(e,t){if(e&&"/"===e.charAt(0))return e
port:t[12]||"",pathname:t[13]||"",directory:t[14]||"",filename:t[15]||"",search:t[16]||"",hash:t[17]||""}},makePathAbsolute:function d(e,t){if(e&&"/"===e.charAt(0))return e
e=e||"",t=t?t.replace(/^\/|(\/[^\/]*|[^\/]+)$/g,""):""
for(var n=t?t.split("/"):[],i=e.split("/"),r=0;r<i.length;r++){var o=i[r]
switch(o){case".":break
@ -897,22 +894,22 @@ case"..":n.length&&n.pop()
break
default:n.push(o)}}return"/"+n.join("/")},isSameDomain:function f(e,t){return u.parseUrl(e).domain===u.parseUrl(t).domain},isRelativeUrl:function p(e){return""===u.parseUrl(e).protocol},isAbsoluteUrl:function h(e){
return""!==u.parseUrl(e).protocol},makeUrlAbsolute:function m(e,t){if(!u.isRelativeUrl(e))return e
var n=u.parseUrl(e),i=u.parseUrl(t),r=n.protocol||i.protocol,o=n.protocol?n.doubleSlash:n.doubleSlash||i.doubleSlash,a=n.authority||i.authority,s=""!==n.pathname,l=u.makePathAbsolute(n.pathname||i.filename,i.pathname),d=n.search||!s&&i.search||"",c=n.hash
var n=u.parseUrl(e),i=u.parseUrl(t),r=n.protocol||i.protocol,o=n.protocol?n.doubleSlash:n.doubleSlash||i.doubleSlash,a=n.authority||i.authority,s=""!==n.pathname,l=u.makePathAbsolute(n.pathname||i.filename,i.pathname),c=n.search||!s&&i.search||"",d=n.hash
return r+o+a+l+d+c},addSearchParams:function g(e,t){var n=u.parseUrl(e),t="string"==typeof t?u.convertSearchToArray(t):t,i=o["default"].extend(u.convertSearchToArray(n.search),t)
return r+o+a+l+c+d},addSearchParams:function g(e,t){var n=u.parseUrl(e),t="string"==typeof t?u.convertSearchToArray(t):t,i=o["default"].extend(u.convertSearchToArray(n.search),t)
return n.hrefNoSearch+"?"+o["default"].param(i)+(n.hash||"")},getSearchParams:function v(e){var t=u.parseUrl(e)
return u.convertSearchToArray(t.search)},convertSearchToArray:function y(e){var t,n,i,r={}
return u.convertSearchToArray(t.search)},convertSearchToArray:function b(e){var t,n,i,r={}
for(e=e.replace(/^\?/,""),t=e?e.split("&"):[],n=0;n<t.length;n++)i=t[n].split("="),r[decodeURIComponent(i[0])]=decodeURIComponent(i[1])
return r},convertUrlToDataUrl:function b(e){var t=u.parseUrl(e)
return u.isEmbeddedPage(t)?t.hash.split(dialogHashKey)[0].replace(/^#/,""):u.isSameDomain(t,document)?t.hrefNoHash.replace(document.domain,""):e},get:function _(e){return void 0===e&&(e=location.hash),
u.stripHash(e).replace(/[^\/]*\.[^\/*]+$/,"")},getFilePath:function w(e){var t="&"+o["default"].mobile.subPageUrlKey
return r},convertUrlToDataUrl:function y(e){var t=u.parseUrl(e)
return u.isEmbeddedPage(t)?t.hash.split(dialogHashKey)[0].replace(/^#/,""):u.isSameDomain(t,document)?t.hrefNoHash.replace(document.domain,""):e},get:function w(e){return void 0===e&&(e=location.hash),
u.stripHash(e).replace(/[^\/]*\.[^\/*]+$/,"")},getFilePath:function _(e){var t="&"+o["default"].mobile.subPageUrlKey
return e&&e.split(t)[0].split(dialogHashKey)[0]},set:function C(e){location.hash=e},isPath:function T(e){return/\//.test(e)},clean:function E(e){return e.replace(document.domain,"")},stripHash:function P(e){
return e.replace(/^#/,"")},cleanHash:function O(e){return u.stripHash(e.replace(/\?.*$/,"").replace(dialogHashKey,""))},isExternal:function S(e){var t=u.parseUrl(e)
return!(!t.protocol||t.domain===document.domain)},hasProtocol:function k(e){return/^(:?\w+:)/.test(e)}}
o["default"].path=u},function(e,t,n){(function(e){"use strict"
function t(e){return e&&e.__esModule?e:{"default":e}}var i=n(1),r=t(i)
n(87),r["default"].widget("ssui.button",r["default"].ui.button,{options:{alternate:{icon:null,text:null},showingAlternate:!1},toggleAlternate:function o(){this._trigger("ontogglealternate")!==!1&&(this.options.alternate.icon||this.options.alternate.text)&&(this.options.showingAlternate=!this.options.showingAlternate,
n(89),r["default"].widget("ssui.button",r["default"].ui.button,{options:{alternate:{icon:null,text:null},showingAlternate:!1},toggleAlternate:function o(){this._trigger("ontogglealternate")!==!1&&(this.options.alternate.icon||this.options.alternate.text)&&(this.options.showingAlternate=!this.options.showingAlternate,
this.refresh())},_refreshAlternate:function a(){this._trigger("beforerefreshalternate"),(this.options.alternate.icon||this.options.alternate.text)&&(this.options.showingAlternate?(this.element.find(".ui-button-icon-primary").hide(),
this.element.find(".ui-button-text").hide(),this.element.find(".ui-button-icon-alternate").show(),this.element.find(".ui-button-text-alternate").show()):(this.element.find(".ui-button-icon-primary").show(),
this.element.find(".ui-button-text").show(),this.element.find(".ui-button-icon-alternate").hide(),this.element.find(".ui-button-text-alternate").hide()),this._trigger("afterrefreshalternate"))},_resetButton:function s(){
@ -923,10 +920,10 @@ this.options.alternate.text&&this.buttonElement.append("<span class='ui-button-t
this._refreshAlternate()},destroy:function u(){this.element.find(".ui-button-text-alternate").remove(),this.element.find(".ui-button-icon-alternate").remove(),r["default"].ui.button.prototype.destroy.call(this)
}}),r["default"].widget("ssui.ssdialog",r["default"].ui.dialog,{options:{iframeUrl:"",reloadOnOpen:!0,dialogExtraClass:"",modal:!0,bgiframe:!0,autoOpen:!1,autoPosition:!0,minWidth:500,maxWidth:800,minHeight:300,
maxHeight:700,widthRatio:.8,heightRatio:.8,resizable:!1},_create:function d(){r["default"].ui.dialog.prototype._create.call(this)
maxHeight:700,widthRatio:.8,heightRatio:.8,resizable:!1},_create:function c(){r["default"].ui.dialog.prototype._create.call(this)
var e=this,t=(0,r["default"])('<iframe marginWidth="0" marginHeight="0" frameBorder="0" scrolling="auto"></iframe>')
t.bind("load",function(n){"about:blank"!=(0,r["default"])(this).attr("src")&&(t.addClass("loaded").show(),e._resizeIframe(),e.uiDialog.removeClass("loading"))}).hide(),this.options.dialogExtraClass&&this.uiDialog.addClass(this.options.dialogExtraClass),
this.element.append(t),this.options.iframeUrl&&this.element.css("overflow","hidden")},open:function c(){r["default"].ui.dialog.prototype.open.call(this)
this.element.append(t),this.options.iframeUrl&&this.element.css("overflow","hidden")},open:function d(){r["default"].ui.dialog.prototype.open.call(this)
var e=this,t=this.element.children("iframe")
!this.options.iframeUrl||t.hasClass("loaded")&&!this.options.reloadOnOpen||(t.hide(),t.attr("src",this.options.iframeUrl),this.uiDialog.addClass("loading")),(0,r["default"])(window).bind("resize.ssdialog",function(){
e._resizeIframe()})},close:function f(){r["default"].ui.dialog.prototype.close.call(this),this.uiDialog.unbind("resize.ssdialog"),(0,r["default"])(window).unbind("resize.ssdialog")},_resizeIframe:function p(){
@ -952,7 +949,7 @@ o.find("*").add(o).disableSelection()},destroy:function m(){this.element.unbind(
function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e
},_jQuery=__webpack_require__(1),_jQuery2=_interopRequireDefault(_jQuery)
__webpack_require__(86)
__webpack_require__(88)
var windowWidth,windowHeight
_jQuery2["default"].noConflict(),window.ss=window.ss||{},window.ss.debounce=function(e,t,n){var i,r,o,a=function s(){i=null,n||e.apply(r,o)}
return function(){var s=n&&!i
@ -981,7 +978,7 @@ void this._super())},onwindowresize:function r(){this.redraw()},"from .cms-panel
var t=this.getLayoutOptions(),n=!1
for(var i in e)t[i]!==e[i]&&(t[i]=e[i],n=!0)
n&&this.redraw()},clearViewMode:function l(){this.removeClass("cms-container--split-mode"),this.removeClass("cms-container--preview-mode"),this.removeClass("cms-container--content-mode")},splitViewMode:function u(){
this.updateLayoutOptions({mode:"split"})},contentViewMode:function d(){this.updateLayoutOptions({mode:"content"})},previewMode:function c(){this.updateLayoutOptions({mode:"preview"})},RedrawSuppression:!1,
this.updateLayoutOptions({mode:"split"})},contentViewMode:function c(){this.updateLayoutOptions({mode:"content"})},previewMode:function d(){this.updateLayoutOptions({mode:"preview"})},RedrawSuppression:!1,
redraw:function f(){if(!this.getRedrawSuppression()){window.debug&&console.log("redraw",this.attr("class"),this.get(0))
var e=this.setProperMode()
e||(this.find(".cms-panel-layout").redraw(),this.find(".cms-content-fields[data-layout-type]").redraw(),this.find(".cms-edit-form[data-layout-type]").redraw(),this.find(".cms-preview").redraw(),this.find(".cms-content").redraw())
@ -1009,7 +1006,7 @@ var a=e.serializeArray()
return a.push({name:$(t).attr("name"),value:"1"}),a.push({name:"BackURL",value:document.URL.replace(/\/$/,"")}),this.saveTabState(),jQuery.ajax(jQuery.extend({headers:{"X-Pjax":"CurrentForm,Breadcrumbs"
},url:e.attr("action"),data:a,type:"POST",complete:function s(){$(t).removeClass("loading")},success:function l(t,i,o){e.removeClass("changed"),n&&n(t,i,o)
var s=r.handleAjaxResponse(t,i,o)
s&&s.filter("form").trigger("aftersubmitform",{status:i,xhr:o,formData:a})}},i)),!1},LastState:null,PauseState:!1,handleStateChange:function y(e){var t=arguments.length<=1||void 0===arguments[1]?window.history.state:arguments[1]
s&&s.filter("form").trigger("aftersubmitform",{status:i,xhr:o,formData:a})}},i)),!1},LastState:null,PauseState:!1,handleStateChange:function b(e){var t=arguments.length<=1||void 0===arguments[1]?window.history.state:arguments[1]
if(!this.getPauseState()){this.getStateChangeXHR()&&this.getStateChangeXHR().abort()
@ -1018,15 +1015,15 @@ if(this.setStateChangeCount(this.getStateChangeCount()+1),!this.checkCanNavigate
return this.setPauseState(!0),s&&s.path?window.ss.router.show(s.path):window.ss.router.back(),void this.setPauseState(!1)}if(this.setLastState(t),a.length<o.length&&(i="Content",o=["Content"],a=this._findFragments(o)),
this.trigger("beforestatechange",{state:t,element:a}),r["X-Pjax"]=i,"undefined"!=typeof t.__forceReferer){var l=t.__forceReferer
try{l=decodeURI(l)}catch(u){}finally{r["X-Backurl"]=encodeURI(l)}}a.addClass("loading")
var d=$.ajax({headers:r,url:t.path||document.URL}).done(function(e,i,r){var o=n.handleAjaxResponse(e,i,r,t)
var c=$.ajax({headers:r,url:t.path||document.URL}).done(function(e,i,r){var o=n.handleAjaxResponse(e,i,r,t)
n.trigger("afterstatechange",{data:e,status:i,xhr:r,element:o,state:t})}).always(function(){n.setStateChangeXHR(null),a.removeClass("loading")})
return this.setStateChangeXHR(d),d}},loadFragment:function b(e,t){var n=this,i,r={},o=$("base").attr("href"),a=this.getFragmentXHR()
return this.setStateChangeXHR(c),c}},loadFragment:function y(e,t){var n=this,i,r={},o=$("base").attr("href"),a=this.getFragmentXHR()
return"undefined"!=typeof a[t]&&null!==a[t]&&(a[t].abort(),a[t]=null),e=$.path.isAbsoluteUrl(e)?e:$.path.makeUrlAbsolute(e,o),r["X-Pjax"]=t,i=$.ajax({headers:r,url:e,success:function s(e,t,i){var r=n.handleAjaxResponse(e,t,i,null)
n.trigger("afterloadfragment",{data:e,status:t,xhr:i,elements:r})},error:function l(e,t,i){n.trigger("loadfragmenterror",{xhr:e,status:t,error:i})},complete:function u(){var e=n.getFragmentXHR()
"undefined"!=typeof e[t]&&null!==e[t]&&(e[t]=null)}}),a[t]=i,i},handleAjaxResponse:function _(e,t,n,i){var r=this,o,a,s,l,u
if(n.getResponseHeader("X-Reload")&&n.getResponseHeader("X-ControllerURL")){var d=$("base").attr("href"),c=n.getResponseHeader("X-ControllerURL"),o=$.path.isAbsoluteUrl(c)?c:$.path.makeUrlAbsolute(c,d)
"undefined"!=typeof e[t]&&null!==e[t]&&(e[t]=null)}}),a[t]=i,i},handleAjaxResponse:function w(e,t,n,i){var r=this,o,a,s,l,u
if(n.getResponseHeader("X-Reload")&&n.getResponseHeader("X-ControllerURL")){var c=$("base").attr("href"),d=n.getResponseHeader("X-ControllerURL"),o=$.path.isAbsoluteUrl(d)?d:$.path.makeUrlAbsolute(d,c)
return void(document.location.href=o)}if(e){var f=n.getResponseHeader("X-Title")
@ -1042,7 +1039,7 @@ var u=i.find("style").detach()
u.length&&$(document).find("head").append(u),n.replaceWith(i)})
var m=h.filter("form")
m.hasClass("cms-tabset")&&m.removeClass("cms-tabset").addClass("cms-tabset")}finally{this.setRedrawSuppression(!1)}return this.redraw(),this.restoreTabState(i&&"undefined"!=typeof i.tabState?i.tabState:null),
h}},_findFragments:function w(e){return $("[data-pjax-fragment]").filter(function(){var t,n=$(this).data("pjaxFragment").split(" ")
h}},_findFragments:function _(e){return $("[data-pjax-fragment]").filter(function(){var t,n=$(this).data("pjaxFragment").split(" ")
for(t in e)if($.inArray(e[t],n)!=-1)return!0
return!1})},refresh:function C(){$(window).trigger("statechange"),$(this).redraw()},saveTabState:function T(){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var e=[],t=this._tabStateUrl()
@ -1065,7 +1062,7 @@ t.length&&t.remove(),n=$.path.addSearchParams(n,{tempid:e,BackURL:window.locatio
}}),$(".leftandmain-logindialog").entwine({onmatch:function j(){this._super(),this.ssdialog({iframeUrl:this.data("url"),dialogClass:"leftandmain-logindialog-dialog",autoOpen:!0,minWidth:500,maxWidth:500,
minHeight:370,maxHeight:400,closeOnEscape:!1,open:function e(){$(".ui-widget-overlay").addClass("leftandmain-logindialog-overlay")},close:function t(){$(".ui-widget-overlay").removeClass("leftandmain-logindialog-overlay")
}})},onunmatch:function x(){this._super()},open:function R(){this.ssdialog("open")},close:function I(){this.ssdialog("close")},toggle:function F(e){this.is(":visible")?this.close():this.open()},reauthenticate:function A(e){
}})},onunmatch:function x(){this._super()},open:function R(){this.ssdialog("open")},close:function I(){this.ssdialog("close")},toggle:function A(e){this.is(":visible")?this.close():this.open()},reauthenticate:function F(e){
"undefined"!=typeof e.SecurityID&&$(":input[name=SecurityID]").val(e.SecurityID),"undefined"!=typeof e.TempID&&$("body").data("member-tempid",e.TempID),this.close()}}),$("form.loading,.cms-content.loading,.cms-content-fields.loading,.cms-content-view.loading").entwine({
onmatch:function D(){this.append('<div class="cms-content-loading-overlay ui-widget-overlay-light"></div><div class="cms-content-loading-spinner"></div>'),this._super()},onunmatch:function M(){this.find(".cms-content-loading-overlay,.cms-content-loading-spinner").remove(),
this._super()}}),$('.cms input[type="submit"], .cms button, .cms input[type="reset"], .cms .ss-ui-button').entwine({onadd:function N(){this.addClass("ss-ui-button"),this.data("button")||this.button(),this._super()
@ -1098,8 +1095,8 @@ this.contents().filter(function(){return 3==this.nodeType&&!/\S/.test(this.nodeV
return t.showcalendar?(t.showOn="button",t.locale&&$.datepicker.regional[t.locale]&&(t=$.extend(t,$.datepicker.regional[t.locale],{})),this.prop("disabled")||this.prop("readonly")||$(this).datepicker(t),
void this._super()):void this._super()},onunmatch:function X(){this._super()}}),$(".cms .field.dropdown select, .cms .field select[multiple], .form__fieldgroup-item select.dropdown").entwine({onmatch:function Q(){
return this.is(".no-chosen")?void this._super():(this.data("placeholder")||this.data("placeholder"," "),this.removeClass("has-chosen").chosen("destroy"),this.siblings(".chosen-container").remove(),applyChosen(this),
void this._super())},onunmatch:function K(){this._super()}}),$(".cms-panel-layout").entwine({redraw:function Y(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),$(".cms .grid-field").entwine({
showDetailView:function J(e){var t=window.location.search.replace(/^\?/,"")
void this._super())},onunmatch:function K(){this._super()}}),$(".cms-panel-layout").entwine({redraw:function J(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),$(".cms .grid-field").entwine({
showDetailView:function Y(e){var t=window.location.search.replace(/^\?/,"")
t&&(e=$.path.addSearchParams(e,t)),$(".cms-container").loadPanel(e)}}),$(".cms-search-form").entwine({onsubmit:function Z(e){var t,n
t=this.find(":input:not(:submit)").filter(function(){var e=$.grep($(this).fieldValue(),function(e){return e})
return e.length}),n=this.attr("action"),t.length&&(n=$.path.addSearchParams(n,t.serialize().replace("+","%20")))
@ -1124,8 +1121,8 @@ $(t.newTab).closest("li").hasClass("readonly")?n.fadeOut():n.show()}}),this.trig
e&&$(this).attr("href",document.location.href.replace(/#.*/,"")+e[0])}})}}),$("#filters-button").entwine({onmatch:function le(){this._super(),this.data("collapsed",!0),this.data("animating",!1)},onunmatch:function ue(){
this._super()},showHide:function de(){var e=this,t=$(".cms-content-filters").first(),n=this.data("collapsed")
n?(this.addClass("active"),t.css("display","block")):(this.removeClass("active"),t.css("display","")),e.data("collapsed",!n)},onclick:function ce(){this.showHide()}})})
this._super()},showHide:function ce(){var e=this,t=$(".cms-content-filters").first(),n=this.data("collapsed")
n?(this.addClass("active"),t.css("display","block")):(this.removeClass("active"),t.css("display","")),e.data("collapsed",!n)},onclick:function de(){this.showHide()}})})
var statusMessage=function e(t,n){t=jQuery("<div/>").text(t).html(),jQuery.noticeAdd({text:t,type:n,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}}).call(exports,__webpack_require__(1))},function(e,t,n){
"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r)
@ -1139,9 +1136,9 @@ o=function a(t){var n,r
n=e(t.target).closest(".ss-ui-action-tabset .ui-tabs-panel"),e(t.target).closest(i).length||n.length||(i.tabs("option","active",!1),r=e(".cms-container").find("iframe"),r.each(function(t,n){e(n).contents().off("click.ss-ui-action-tabset",o)
}),e(document).off("click.ss-ui-action-tabset",o))},e(document).on("click.ss-ui-action-tabset",o),r.length>0&&r.each(function(t,n){e(n).contents().on("click.ss-ui-action-tabset",o)})},riseUp:function a(t,n){
var i,r,o,a,s,l,u,d,c
var i,r,o,a,s,l,u,c,d
return i=e(this).find(".ui-tabs-panel").outerHeight(),r=e(this).find(".ui-tabs-nav").outerHeight(),o=e(window).height()+e(document).scrollTop()-r,a=e(this).find(".ui-tabs-nav").offset().top,s=n.newPanel,
l=n.newTab,a+i>=o&&a-i>0?(this.addClass("rise-up"),null!==l.position()&&(u=-s.outerHeight(),d=s.parents(".toolbar--south"),d&&(c=l.offset().top-d.offset().top,u-=c),e(s).css("top",u+"px"))):(this.removeClass("rise-up"),
l=n.newTab,a+i>=o&&a-i>0?(this.addClass("rise-up"),null!==l.position()&&(u=-s.outerHeight(),c=s.parents(".toolbar--south"),c&&(d=l.offset().top-c.offset().top,u-=d),e(s).css("top",u+"px"))):(this.removeClass("rise-up"),
null!==l.position()&&e(s).css("bottom","100%")),!1}}),e(".cms-content-actions .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function s(t,n){this._super(t,n),e(n.newPanel).length>0&&e(n.newPanel).css("left",n.newTab.position().left+"px")
}}),e(".cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function l(t,n){this._super(t,n),e(this).closest(".ss-ui-action-tabset").removeClass("tabset-open tabset-open-last")
@ -1149,9 +1146,9 @@ null!==l.position()&&e(s).css("bottom","100%")),!1}}),e(".cms-content-actions .s
}}),e(".cms-content-fields .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function u(t,n){this._super(t,n),e(n.newPanel).length>0&&(e(n.newTab).hasClass("last")?(e(n.newPanel).css({left:"auto",
right:"0px"}),e(n.newPanel).parent().addClass("tabset-open-last")):(e(n.newPanel).css("left",n.newTab.position().left+"px"),e(n.newTab).hasClass("first")&&(e(n.newPanel).css("left","0px"),e(n.newPanel).parent().addClass("tabset-open"))))
}}),e(".cms-tree-view-sidebar .cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({"from .ui-tabs-nav li":{onhover:function d(t){e(t.target).parent().find("li .active").removeClass("active"),e(t.target).find("a").addClass("active")
}}),e(".cms-tree-view-sidebar .cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({"from .ui-tabs-nav li":{onhover:function c(t){e(t.target).parent().find("li .active").removeClass("active"),e(t.target).find("a").addClass("active")
}},ontabsbeforeactivate:function c(t,n){this._super(t,n),e(n.newPanel).css({left:"auto",right:"auto"}),e(n.newPanel).length>0&&e(n.newPanel).parent().addClass("tabset-open")}})})},function(e,t,n){"use strict"
}},ontabsbeforeactivate:function d(t,n){this._super(t,n),e(n.newPanel).css({left:"auto",right:"auto"}),e(n.newPanel).length>0&&e(n.newPanel).parent().addClass("tabset-open")}})})},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r)
@ -1171,7 +1168,7 @@ t||(this.trigger("beforetoggle.sspanel",e),this.trigger(e?"beforeexpand":"before
r.length&&(this.find(".cms-panel-content")[e?"show":"hide"](),this.find(".cms-panel-content-collapsed")[e?"hide":"show"]()),n!==!1&&this.setPersistedCollapsedState(!e),this.trigger("toggle",e),this.trigger(e?"expand":"collapse")
},expandPanel:function l(e){(e||this.hasClass("collapsed"))&&this.togglePanel(!0)},collapsePanel:function u(e){!e&&this.hasClass("collapsed")||this.togglePanel(!1)}}),e(".cms-panel.collapsed .cms-panel-toggle").entwine({
onclick:function d(e){this.expandPanel(),e.preventDefault()}}),e(".cms-panel *").entwine({getPanel:function c(){return this.parents(".cms-panel:first")}}),e(".cms-panel .toggle-expand").entwine({onclick:function f(e){
onclick:function c(e){this.expandPanel(),e.preventDefault()}}),e(".cms-panel *").entwine({getPanel:function d(){return this.parents(".cms-panel:first")}}),e(".cms-panel .toggle-expand").entwine({onclick:function f(e){
e.preventDefault(),e.stopPropagation(),this.getPanel().expandPanel(),this._super(e)}}),e(".cms-panel .toggle-collapse").entwine({onclick:function p(e){e.preventDefault(),e.stopPropagation(),this.getPanel().collapsePanel(),
this._super(e)}}),e(".cms-content-tools.collapsed").entwine({onclick:function h(e){this.expandPanel(),this._super(e)}})})},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r)
@ -1186,17 +1183,17 @@ i.inst.hide_checkboxes()}).bind("before.jstree",function(t,i){if("start_drag"==i
if(e.inArray(i.func,["check_node","uncheck_node"])){var r=e(i.args[0]).parents("li:first"),o=r.find("li:not(.disabled)")
if(r.hasClass("disabled")&&0==o)return t.stopImmediatePropagation(),!1}}).bind("move_node.jstree",function(t,i){if(!n.getIsUpdatingTree()){var r=i.rslt.o,o=i.rslt.np,a=i.inst._get_parent(r),s=e(o).data("id")||0,l=e(r).data("id"),u=e.map(e(r).siblings().andSelf(),function(t){
return e(t).data("id")})
e.ajax({url:e.path.addSearchParams(n.data("urlSavetreenode"),n.data("extraParams")),type:"POST",data:{ID:l,ParentID:s,SiblingIDs:u},success:function d(){e(".cms-edit-form :input[name=ID]").val()==l&&e(".cms-edit-form :input[name=ParentID]").val(s),
n.updateNodesFromServer([l])},statusCode:{403:function c(){e.jstree.rollback(i.rlbk)}}})}}).bind("select_node.jstree check_node.jstree uncheck_node.jstree",function(t,n){e(document).triggerHandler(t,n)
e.ajax({url:e.path.addSearchParams(n.data("urlSavetreenode"),n.data("extraParams")),type:"POST",data:{ID:l,ParentID:s,SiblingIDs:u},success:function c(){e(".cms-edit-form :input[name=ID]").val()==l&&e(".cms-edit-form :input[name=ParentID]").val(s),
n.updateNodesFromServer([l])},statusCode:{403:function d(){e.jstree.rollback(i.rlbk)}}})}}).bind("select_node.jstree check_node.jstree uncheck_node.jstree",function(t,n){e(document).triggerHandler(t,n)
})}},onremove:function n(){this.jstree("destroy"),this._super()},"from .cms-container":{onafterstatechange:function i(e){this.updateFromEditForm()}},"from .cms-container form":{onaftersubmitform:function r(t){
var n=e(".cms-edit-form :input[name=ID]").val()
this.updateNodesFromServer([n])}},getTreeConfig:function o(){var t=this
return{core:{initially_open:["record-0"],animation:0,html_titles:!0},html_data:{},ui:{select_limit:1,initially_select:[this.find(".current").attr("id")]},crrm:{move:{check_move:function n(i){var r=e(i.o),o=e(i.np),a=i.ot.get_container()[0]==i.np[0],s=r.getClassname(),l=o.getClassname(),u=t.getHints(),d=[],c=l?l:"Root",f=u&&"undefined"!=typeof u[c]?u[c]:null
return{core:{initially_open:["record-0"],animation:0,html_titles:!0},html_data:{},ui:{select_limit:1,initially_select:[this.find(".current").attr("id")]},crrm:{move:{check_move:function n(i){var r=e(i.o),o=e(i.np),a=i.ot.get_container()[0]==i.np[0],s=r.getClassname(),l=o.getClassname(),u=t.getHints(),c=[],d=l?l:"Root",f=u&&"undefined"!=typeof u[d]?u[d]:null
f&&r.attr("class").match(/VirtualPage-([^\s]*)/)&&(s=RegExp.$1),f&&(d="undefined"!=typeof f.disallowedChildren?f.disallowedChildren:[])
var p=!(0===r.data("id")||r.hasClass("status-archived")||a&&"inside"!=i.p||o.hasClass("nochildren")||d.length&&e.inArray(s,d)!=-1)
f&&r.attr("class").match(/VirtualPage-([^\s]*)/)&&(s=RegExp.$1),f&&(c="undefined"!=typeof f.disallowedChildren?f.disallowedChildren:[])
var p=!(0===r.data("id")||r.hasClass("status-archived")||a&&"inside"!=i.p||o.hasClass("nochildren")||c.length&&e.inArray(s,c)!=-1)
return p}}},dnd:{drop_target:!1,drag_target:!1},checkbox:{two_state:!0},themes:{theme:"apple",url:e("body").data("frameworkpath")+"/thirdparty/jstree/themes/apple/style.css"},plugins:["html_data","ui","dnd","crrm","themes","checkbox"]
}},search:function a(e,t){e?this.data("searchparams",e):this.removeData("searchparams"),this.jstree("refresh",-1,t)},getNodeByID:function s(e){return this.find("*[data-id="+e+"]")},createNode:function l(t,n,i){
var r=this,o=void 0!==n.ParentID&&r.getNodeByID(n.ParentID),a=e(t),s={data:""}
@ -1207,10 +1204,10 @@ e.attr(r.name,r.value)}e.addClass(t).html(a.html()),i(e)})},updateNode:function
e.each(["id","style","class","data-pagetype"],function(e,n){t.attr(n,o.attr(n))})
var u=t.children("ul").detach()
t.html(o.html()).append(u),a&&a.length?this.jstree("move_node",t,a,"before"):s&&s.length?this.jstree("move_node",t,s,"after"):this.jstree("move_node",t,l.length?l:-1)},updateFromEditForm:function d(){var t,n=e(".cms-edit-form :input[name=ID]").val()
t.html(o.html()).append(u),a&&a.length?this.jstree("move_node",t,a,"before"):s&&s.length?this.jstree("move_node",t,s,"after"):this.jstree("move_node",t,l.length?l:-1)},updateFromEditForm:function c(){var t,n=e(".cms-edit-form :input[name=ID]").val()
n?(t=this.getNodeByID(n),t.length?(this.jstree("deselect_all"),this.jstree("select_node",t)):this.updateNodesFromServer([n])):this.jstree("deselect_all")},updateNodesFromServer:function c(t){if(!this.getIsUpdatingTree()&&this.getIsLoaded()){
n?(t=this.getNodeByID(n),t.length?(this.jstree("deselect_all"),this.jstree("select_node",t)):this.updateNodesFromServer([n])):this.jstree("deselect_all")},updateNodesFromServer:function d(t){if(!this.getIsUpdatingTree()&&this.getIsLoaded()){
var n=this,i,r=!1
this.setIsUpdatingTree(!0),n.jstree("save_selected")
var o=function a(e){n.getNodeByID(e.data("id")).not(e).remove(),n.jstree("deselect_all"),n.jstree("select_node",e)}
@ -1237,7 +1234,7 @@ l&&"#"!=l?(l=l.split("?")[0],t.jstree("deselect_all"),t.jstree("uncheck_all"),e.
s.loadPanel(l)):t.removeForm()}})}}),e(".cms-content .cms-content-fields").entwine({redraw:function r(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),e(".cms-content .cms-content-header, .cms-content .cms-content-actions").entwine({
redraw:function o(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.height("auto"),this.height(this.innerHeight()-this.css("padding-top")-this.css("padding-bottom"))}})})},function(e,t,n){
(function(e){"use strict"
function t(e){return e&&e.__esModule?e:{"default":e}}var i=n(1),r=t(i),o=n(94),a=t(o)
function t(e){return e&&e.__esModule?e:{"default":e}}var i=n(1),r=t(i),o=n(96),a=t(o)
window.onbeforeunload=function(e){var t=(0,r["default"])(".cms-edit-form")
if(t.trigger("beforesubmitform"),t.is(".changed")&&!t.is(".discardchanges"))return a["default"]._t("LeftAndMain.CONFIRMUNSAVEDSHORT")},r["default"].entwine("ss",function(e){e(".cms-edit-form").entwine({
PlaceholderHtml:"",ChangeTrackerOptions:{ignoreFieldSelector:".no-change-track, .ss-upload :input, .cms-navigator :input"},ValidationErrorShown:!1,onadd:function t(){var e=this
@ -1251,10 +1248,10 @@ var n=t.closest(".ss-tabset")
n.length||(n=t.closest(".cms-tabset")),n.length?n.tabs("option","active",t.index(".tab")):this.getValidationErrorShown()||(this.setValidationErrorShown(!0),s(ss.i18n._t("ModelAdmin.VALIDATIONERROR","Validation Error")))
}}},onremove:function i(){this.changetracker("destroy"),this._super()},onmatch:function r(){this._super()},onunmatch:function o(){this._super()},redraw:function l(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),
this.add(this.find(".cms-tabset")).redrawTabs(),this.find(".cms-content-header").redraw()},_setupChangeTracker:function u(){this.changetracker(this.getChangeTrackerOptions())},confirmUnsavedChanges:function d(){
this.add(this.find(".cms-tabset")).redrawTabs(),this.find(".cms-content-header").redraw()},_setupChangeTracker:function u(){this.changetracker(this.getChangeTrackerOptions())},confirmUnsavedChanges:function c(){
if(this.trigger("beforesubmitform"),!this.is(".changed")||this.is(".discardchanges"))return!0
var e=confirm(a["default"]._t("LeftAndMain.CONFIRMUNSAVED"))
return e&&this.addClass("discardchanges"),e},onsubmit:function c(e,t){if("_blank"!=this.prop("target"))return t&&this.closest(".cms-container").submitForm(this,t),!1},validate:function f(){var e=!0
return e&&this.addClass("discardchanges"),e},onsubmit:function d(e,t){if("_blank"!=this.prop("target"))return t&&this.closest(".cms-container").submitForm(this,t),!1},validate:function f(){var e=!0
return this.trigger("validate",{isValid:e}),e},"from .htmleditor":{oneditorinit:function p(t){var n=this,i=e(t.target).closest(".field.htmleditor"),r=i.find("textarea.htmleditor").getEditor().getInstance()
@ -1262,16 +1259,16 @@ r.onClick.add(function(e){n.saveFieldFocus(i.attr("id"))})}},"from .cms-edit-for
}},"from .cms-edit-form .treedropdown *":{onfocusin:function g(t){var n=e(t.target).closest(".field.treedropdown")
this.saveFieldFocus(n.attr("id"))}},"from .cms-edit-form .dropdown .chosen-container a":{onfocusin:function v(t){var n=e(t.target).closest(".field.dropdown")
this.saveFieldFocus(n.attr("id"))}},"from .cms-container":{ontabstaterestored:function y(e){this.restoreFieldFocus()}},saveFieldFocus:function b(t){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){
this.saveFieldFocus(n.attr("id"))}},"from .cms-container":{ontabstaterestored:function b(e){this.restoreFieldFocus()}},saveFieldFocus:function y(t){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){
var n=e(this).attr("id"),i=[]
if(i.push({id:n,selected:t}),i)try{window.sessionStorage.setItem(n,JSON.stringify(i))}catch(r){if(r.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return
throw r}}},restoreFieldFocus:function _(){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var t=this,n="undefined"!=typeof window.sessionStorage&&window.sessionStorage,i=n?window.sessionStorage.getItem(this.attr("id")):null,r=!!i&&JSON.parse(i),o,a=0!==this.find(".ss-tabset").length,s,l,u,d
throw r}}},restoreFieldFocus:function w(){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var t=this,n="undefined"!=typeof window.sessionStorage&&window.sessionStorage,i=n?window.sessionStorage.getItem(this.attr("id")):null,r=!!i&&JSON.parse(i),o,a=0!==this.find(".ss-tabset").length,s,l,u,c
if(n&&r.length>0){if(e.each(r,function(n,i){t.is("#"+i.id)&&(o=e("#"+i.selected))}),e(o).length<1)return void this.focusFirstInput()
if(s=e(o).closest(".ss-tabset").find(".ui-tabs-nav .ui-tabs-active .ui-tabs-anchor").attr("id"),l="tab-"+e(o).closest(".ss-tabset .ui-tabs-panel").attr("id"),a&&l!==s)return
u=e(o).closest(".togglecomposite"),u.length>0&&u.accordion("activate",u.find(".ui-accordion-header")),d=e(o).position().top,e(o).is(":visible")||(o="#"+e(o).closest(".field").attr("id"),d=e(o).position().top),
e(o).focus(),d>e(window).height()/2&&t.find(".cms-content-fields").scrollTop(d)}else this.focusFirstInput()}},focusFirstInput:function w(){this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(":visible:first").focus()
u=e(o).closest(".togglecomposite"),u.length>0&&u.accordion("activate",u.find(".ui-accordion-header")),c=e(o).position().top,e(o).is(":visible")||(o="#"+e(o).closest(".field").attr("id"),c=e(o).position().top),
e(o).focus(),c>e(window).height()/2&&t.find(".cms-content-fields").scrollTop(c)}else this.focusFirstInput()}},focusFirstInput:function _(){this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(":visible:first").focus()
}}),e(".cms-edit-form .btn-toolbar input.action[type=submit], .cms-edit-form .btn-toolbar button.action").entwine({onclick:function C(e){return this.is(":disabled")?(e.preventDefault(),!1):this._super(e)===!1||e.defaultPrevented||e.isDefaultPrevented()?void 0:(this.parents("form").trigger("submit",[this]),
e.preventDefault(),!1)}}),e(".cms-edit-form .btn-toolbar input.action[type=submit].ss-ui-action-cancel, .cms-edit-form .btn-toolbar button.action.ss-ui-action-cancel").entwine({onclick:function T(e){window.history.length>1?window.history.back():this.parents("form").trigger("submit",[this]),
@ -1293,9 +1290,9 @@ return t=void 0===n?r:n!==r&&i?n:r},onadd:function s(){var t=this
setTimeout(function(){t.togglePanel(!t.getEvaluatedCollapsedState(),!1,!1)},0),e(window).on("ajaxComplete",function(e){setTimeout(function(){t.togglePanel(!t.getEvaluatedCollapsedState(),!1,!1)},0)}),this._super()
}}),e(".cms-menu-list").entwine({onmatch:function l(){var e=this
this.find("li.current").select(),this.updateItems(),this._super()},onunmatch:function u(){this._super()},updateMenuFromResponse:function d(e){var t=e.getResponseHeader("X-Controller")
this.find("li.current").select(),this.updateItems(),this._super()},onunmatch:function u(){this._super()},updateMenuFromResponse:function c(e){var t=e.getResponseHeader("X-Controller")
if(t){var n=this.find("li#Menu-"+t.replace(/\\/g,"-").replace(/[^a-zA-Z0-9\-_:.]+/,""))
n.hasClass("current")||n.select()}this.updateItems()},"from .cms-container":{onafterstatechange:function c(e,t){this.updateMenuFromResponse(t.xhr)},onaftersubmitform:function f(e,t){this.updateMenuFromResponse(t.xhr)
n.hasClass("current")||n.select()}this.updateItems()},"from .cms-container":{onafterstatechange:function d(e,t){this.updateMenuFromResponse(t.xhr)},onaftersubmitform:function f(e,t){this.updateMenuFromResponse(t.xhr)
}},"from .cms-edit-form":{onrelodeditform:function p(e,t){this.updateMenuFromResponse(t.xmlhttp)}},getContainingPanel:function h(){return this.closest(".cms-panel")},fromContainingPanel:{ontoggle:function m(t){
this.toggleClass("collapsed",e(t.target).hasClass("collapsed")),e(".cms-container").trigger("windowresize"),this.hasClass("collapsed")&&this.find("li.children.opened").removeClass("opened"),this.hasClass("collapsed")||e(".toggle-children.opened").closest("li").addClass("opened")
@ -1307,11 +1304,11 @@ n&&this.find("li").each(function(){e.isFunction(e(this).setRecordID)&&e(this).se
if(n.children("ul").first().hasClass("collapsed-flyout"))if(t){if(!n.children("ul").first().children("li").first().hasClass("clone")){var i=n.clone()
i.addClass("clone").css({}),i.children("ul").first().remove(),i.find("span").not(".text").remove(),i.find("a").first().unbind("click"),n.children("ul").prepend(i)}e(".collapsed-flyout").show(),n.addClass("opened"),
n.children("ul").find("li").fadeIn("fast")}else i&&i.remove(),e(".collapsed-flyout").hide(),n.removeClass("opened"),n.find("toggle-children").removeClass("opened"),n.children("ul").find("li").hide()}}),
e(".cms-menu-list li").hoverIntent(function(){e(this).toggleFlyout(!0)},function(){e(this).toggleFlyout(!1)}),e(".cms-menu-list .toggle").entwine({onclick:function y(t){t.preventDefault(),e(this).toogleFlyout(!0)
e(".cms-menu-list li").hoverIntent(function(){e(this).toggleFlyout(!0)},function(){e(this).toggleFlyout(!1)}),e(".cms-menu-list .toggle").entwine({onclick:function b(t){t.preventDefault(),e(this).toogleFlyout(!0)
}}),e(".cms-menu-list li").entwine({onmatch:function b(){this.find("ul").length&&this.find("a:first").append('<span class="toggle-children"><span class="toggle-children-icon"></span></span>'),this._super()
}}),e(".cms-menu-list li").entwine({onmatch:function y(){this.find("ul").length&&this.find("a:first").append('<span class="toggle-children"><span class="toggle-children-icon"></span></span>'),this._super()
},onunmatch:function _(){this._super()},toggle:function w(){this[this.hasClass("opened")?"close":"open"]()},open:function C(){var e=this.getMenuItem()
},onunmatch:function w(){this._super()},toggle:function _(){this[this.hasClass("opened")?"close":"open"]()},open:function C(){var e=this.getMenuItem()
e&&e.open(),this.find("li.clone")&&this.find("li.clone").remove(),this.addClass("opened").find("ul").show(),this.find(".toggle-children").addClass("opened")},close:function T(){this.removeClass("opened").find("ul").hide(),
this.find(".toggle-children").removeClass("opened")},select:function E(){var e=this.getMenuItem()
if(this.addClass("current").open(),this.siblings().removeClass("current").close(),this.siblings().find("li").removeClass("current"),e){var t=e.siblings()
@ -1328,11 +1325,11 @@ return t.toggle(),!1}}),e(".cms .profile-link").entwine({onclick:function j(){re
onadd:function x(){var t=!!e(".cms-menu").getPersistedStickyState()
this.toggleCSS(t),this.toggleIndicator(t),this._super()},toggleCSS:function R(e){this[e?"addClass":"removeClass"]("active")},toggleIndicator:function I(e){this.next(".sticky-status-indicator").text(e?"fixed":"auto")
},onclick:function F(){var e=this.closest(".cms-menu"),t=e.getPersistedCollapsedState(),n=e.getPersistedStickyState(),i=void 0===n?!this.hasClass("active"):!n
},onclick:function A(){var e=this.closest(".cms-menu"),t=e.getPersistedCollapsedState(),n=e.getPersistedStickyState(),i=void 0===n?!this.hasClass("active"):!n
void 0===t?e.setPersistedCollapsedState(e.hasClass("collapsed")):void 0!==t&&i===!1&&e.clearPersistedCollapsedState(),e.setPersistedStickyState(i),this.toggleCSS(i),this.toggleIndicator(i),this._super()
}})})},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r),a=n(94),s=i(a)
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r),a=n(96),s=i(a)
o["default"].entwine("ss.preview",function(e){e(".cms-preview").entwine({AllowedStates:["StageLink","LiveLink","ArchiveLink"],CurrentStateName:null,CurrentSizeName:"auto",IsPreviewEnabled:!1,DefaultMode:"split",
Sizes:{auto:{width:"100%",height:"100%"},mobile:{width:"335px",height:"568px"},mobileLandscape:{width:"583px",height:"320px"},tablet:{width:"783px",height:"1024px"},tabletLandscape:{width:"1039px",height:"768px"
},desktop:{width:"1024px",height:"800px"}},changeState:function t(n,i){var r=this,o=this._getNavigatorStates()
@ -1354,8 +1351,8 @@ return i&&this.find(".preview-size-selector").changeVisibleSize(this.getCurrentS
},loadState:function a(e){if(this._supportsLocalStorage())return window.localStorage.getItem("cms-preview-state-"+e)},disablePreview:function l(){return this.setPendingURL(null),this._loadUrl("about:blank"),
this._block(),this.changeMode("content",!1),this.setIsPreviewEnabled(!1),this},enablePreview:function u(){return this.getIsPreviewEnabled()||(this.setIsPreviewEnabled(!0),e.browser.msie&&e.browser.version.slice(0,3)<=7?this.changeMode("content"):this.changeMode(this.getDefaultMode(),!1)),
this},getOrAppendFontFixStyleElement:function d(){var t=e("#FontFixStyleElement")
return t.length||(t=e('<style type="text/css" id="FontFixStyleElement" disabled="disabled">:before,:after{content:none !important}</style>').appendTo("head")),t},onadd:function c(){var t=this,n=this.find("iframe")
this},getOrAppendFontFixStyleElement:function c(){var t=e("#FontFixStyleElement")
return t.length||(t=e('<style type="text/css" id="FontFixStyleElement" disabled="disabled">:before,:after{content:none !important}</style>').appendTo("head")),t},onadd:function d(){var t=this,n=this.find("iframe")
n.addClass("center"),n.bind("load",function(){t._adjustIframeForPreview(),t._loadCurrentPage(),e(this).removeClass("loading")}),e.browser.msie&&8===parseInt(e.browser.version,10)&&n.bind("readystatechange",function(e){
@ -1365,11 +1362,11 @@ try{return(t=window.localStorage).setItem(e,e),n=t.getItem(e)==e,t.removeItem(e)
this.changeMode("content",!1)},onenable:function h(){var t=e(".preview-mode-selector")
t.removeClass("split-disabled"),t.find(".disabled-tooltip").hide()},ondisable:function m(){var t=e(".preview-mode-selector")
t.addClass("split-disabled"),t.find(".disabled-tooltip").show()},_block:function g(){return this.find(".preview-note").show(),this.find(".cms-preview-overlay").show(),this},_unblock:function v(){return this.find(".preview-note").hide(),
this.find(".cms-preview-overlay").hide(),this},_initialiseFromContent:function y(){var t,n
this.find(".cms-preview-overlay").hide(),this},_initialiseFromContent:function b(){var t,n
return e(".cms-previewable").length?(t=this.loadState("mode"),n=this.loadState("size"),this._moveNavigator(),t&&"content"==t||(this.enablePreview(),this._loadCurrentState()),this.redraw(),t&&this.changeMode(t),
n&&this.changeSize(n)):this.disablePreview(),this},"from .cms-container":{onafterstatechange:function b(e,t){t.xhr.getResponseHeader("X-ControllerURL")||this._initialiseFromContent()}},PendingURL:null,
oncolumnvisibilitychanged:function _(){var e=this.getPendingURL()
e&&!this.is(".column-hidden")&&(this.setPendingURL(null),this._loadUrl(e),this._unblock())},"from .cms-container .cms-edit-form":{onaftersubmitform:function w(){this._initialiseFromContent()}},_loadUrl:function C(e){
n&&this.changeSize(n)):this.disablePreview(),this},"from .cms-container":{onafterstatechange:function y(e,t){t.xhr.getResponseHeader("X-ControllerURL")||this._initialiseFromContent()}},PendingURL:null,
oncolumnvisibilitychanged:function w(){var e=this.getPendingURL()
e&&!this.is(".column-hidden")&&(this.setPendingURL(null),this._loadUrl(e),this._unblock())},"from .cms-container .cms-edit-form":{onaftersubmitform:function _(){this._initialiseFromContent()}},_loadUrl:function C(e){
return this.find("iframe").addClass("loading").attr("src",e),this},_getNavigatorStates:function T(){var t=e.map(this.getAllowedStates(),function(t){var n=e(".cms-preview-states .state-name[data-name="+t+"]")
@ -1398,8 +1395,8 @@ this.addClass("active").siblings().removeClass("active"),e(".cms-preview").chang
}}),e(".preview-mode-selector select").entwine({onchange:function I(t){this._super(t),t.preventDefault()
var n=e(this).val()
e(".cms-preview").changeMode(n)}}),e(".cms-container--content-mode").entwine({onmatch:function F(){e(".cms-preview .result-selected").hasClass("font-icon-columns")&&statusMessage(s["default"]._t("LeftAndMain.DISABLESPLITVIEW","Screen too small to show site preview in split mode"),"error"),
this._super()}}),e(".preview-size-selector").entwine({changeVisibleSize:function A(e){this.find("select").val(e).trigger("chosen:updated")._addIcon()}}),e(".preview-size-selector select").entwine({onchange:function D(t){
e(".cms-preview").changeMode(n)}}),e(".cms-container--content-mode").entwine({onmatch:function A(){e(".cms-preview .result-selected").hasClass("font-icon-columns")&&statusMessage(s["default"]._t("LeftAndMain.DISABLESPLITVIEW","Screen too small to show site preview in split mode"),"error"),
this._super()}}),e(".preview-size-selector").entwine({changeVisibleSize:function F(e){this.find("select").val(e).trigger("chosen:updated")._addIcon()}}),e(".preview-size-selector select").entwine({onchange:function D(t){
t.preventDefault()
var n=e(this).val()
e(".cms-preview").changeSize(n)}}),e(".preview-selector select.preview-dropdown").entwine({"onchosen:ready":function M(){this._super(),this._addIcon()},_addIcon:function N(){var e=this.find(":selected"),t=e.attr("data-icon"),n=this.parent().find(".chosen-container a.chosen-single"),i=n.attr("data-icon")
@ -1408,7 +1405,7 @@ e(".cms-preview").changeSize(n)}}),e(".preview-selector select.preview-dropdown"
return"undefined"!=typeof i&&n.removeClass(i),n.addClass(t),n.attr("data-icon",t),this}}),e(".preview-mode-selector .chosen-drop li:last-child").entwine({onmatch:function U(){e(".preview-mode-selector").hasClass("split-disabled")?this.parent().append('<div class="disabled-tooltip"></div>'):this.parent().append('<div class="disabled-tooltip" style="display: none;"></div>')
}}),e(".preview-device-outer").entwine({onclick:function L(){this.toggleClass("rotate")}})})},function(e,t,n){(function(e){"use strict"
function t(e){return e&&e.__esModule?e:{"default":e}}var i=n(1),r=t(i),o=n(94),a=t(o)
function t(e){return e&&e.__esModule?e:{"default":e}}var i=n(1),r=t(i),o=n(96),a=t(o)
r["default"].entwine("ss.tree",function(t){t("#Form_BatchActionsForm").entwine({Actions:[],getTree:function n(){return t(".cms-tree")},fromTree:{oncheck_node:function i(e,t){this.serializeFromTree()},onuncheck_node:function r(e,t){
this.serializeFromTree()}},onmatch:function o(){var e=this
e.getTree().bind("load_node.jstree",function(t,n){e.refreshSelected()})},onunmatch:function s(){var e=this
@ -1424,17 +1421,17 @@ return!!t&&e}),this.register(ss.config.adminUrl+"pages/batchactions/restore",fun
num:e.length}))
return!!t&&e}),this.register(ss.config.adminUrl+"pages/batchactions/deletefromlive",function(e){var t=confirm(a["default"].inject(a["default"]._t("CMSMAIN.BATCH_DELETELIVE_PROMPT","You have {num} page(s) selected.\n\nDo you really want to delete these pages from live?"),{
num:e.length}))
return!!t&&e})},onadd:function u(){this.registerDefault(),this._super()},register:function d(e,t){this.trigger("register",{type:e,callback:t})
return!!t&&e})},onadd:function u(){this.registerDefault(),this._super()},register:function c(e,t){this.trigger("register",{type:e,callback:t})
var n=this.getActions()
n[e]=t,this.setActions(n)},unregister:function c(e){this.trigger("unregister",{type:e})
n[e]=t,this.setActions(n)},unregister:function d(e){this.trigger("unregister",{type:e})
var t=this.getActions()
t[e]&&delete t[e],this.setActions(t)},refreshSelected:function f(n){var i=this,r=this.getTree(),o=this.getIDs(),a=[],s=t(".cms-content-batchactions-button"),l=this.find(":input[name=Action]").val()
null==n&&(n=r)
for(var u in o)t(t(r).getNodeByID(u)).addClass("selected").attr("selected","selected")
if(!l||l==-1||!s.hasClass("active"))return void t(n).find("li").each(function(){t(this).setEnabled(!0)})
t(n).find("li").each(function(){a.push(t(this).data("id")),t(this).addClass("treeloading").setEnabled(!1)})
var d=t.path.parseUrl(l),c=d.hrefNoSearch+"/applicablepages/"
c=t.path.addSearchParams(c,d.search),c=t.path.addSearchParams(c,{csvIDs:a.join(",")}),e.getJSON(c,function(r){e(n).find("li").each(function(){t(this).removeClass("treeloading")
var c=t.path.parseUrl(l),d=c.hrefNoSearch+"/applicablepages/"
d=t.path.addSearchParams(d,c.search),d=t.path.addSearchParams(d,{csvIDs:a.join(",")}),e.getJSON(d,function(r){e(n).find("li").each(function(){t(this).removeClass("treeloading")
var e=t(this).data("id")
0==e||t.inArray(e,r)>=0?t(this).setEnabled(!0):(t(this).removeClass("selected").setEnabled(!1),t(this).prop("selected",!1))}),i.serializeFromTree()})},serializeFromTree:function p(){var e=this.getTree(),t=e.getSelectedIDs()
@ -1446,20 +1443,20 @@ var l=this.find(":input[name=Action]").val()
if(s[l]&&(r=this.getActions()[l].apply(this,[r])),!r||!r.length)return n.preventDefault(),!1
this.setIDs(r),o.find("li").removeClass("failed")
var u=this.find(":submit:first")
return u.addClass("loading"),e.ajax({url:l,type:"POST",data:this.serializeArray(),complete:function d(e,t){u.removeClass("loading"),o.jstree("refresh",-1),i.setIDs([]),i.find(":input[name=Action]").val("").change()
return u.addClass("loading"),e.ajax({url:l,type:"POST",data:this.serializeArray(),complete:function c(e,t){u.removeClass("loading"),o.jstree("refresh",-1),i.setIDs([]),i.find(":input[name=Action]").val("").change()
var n=e.getResponseHeader("X-Status")
n&&statusMessage(decodeURIComponent(n),"success"==t?"good":"bad")},success:function c(e,n){var i,r
n&&statusMessage(decodeURIComponent(n),"success"==t?"good":"bad")},success:function d(e,n){var i,r
if(e.modified){var a=[]
for(i in e.modified)r=o.getNodeByID(i),o.jstree("set_text",r,e.modified[i].TreeTitle),a.push(r)
t(a).effect("highlight")}if(e.deleted)for(i in e.deleted)r=o.getNodeByID(i),r.length&&o.jstree("delete_node",r)
if(e.error)for(i in e.error)r=o.getNodeByID(i),t(r).addClass("failed")},dataType:"json"}),n.preventDefault(),!1}}),t(".cms-content-batchactions-button").entwine({onmatch:function v(){this._super(),this.updateTree()
},onunmatch:function y(){this._super()},onclick:function b(e){this.updateTree()},updateTree:function _(){var e=t(".cms-tree"),n=t("#Form_BatchActionsForm")
},onunmatch:function b(){this._super()},onclick:function y(e){this.updateTree()},updateTree:function w(){var e=t(".cms-tree"),n=t("#Form_BatchActionsForm")
this._super(),this.data("active")?(e.addClass("multiple"),e.removeClass("draggable"),n.serializeFromTree()):(e.removeClass("multiple"),e.addClass("draggable")),t("#Form_BatchActionsForm").refreshSelected()
}}),t("#Form_BatchActionsForm select[name=Action]").entwine({onchange:function w(e){var n=t(e.target.form),i=n.find(":submit"),r=t(e.target).val()
}}),t("#Form_BatchActionsForm select[name=Action]").entwine({onchange:function _(e){var n=t(e.target.form),i=n.find(":submit"),r=t(e.target).val()
r&&r!=-1?i.removeAttr("disabled").button("refresh"):i.attr("disabled","disabled").button("refresh"),t("#Form_BatchActionsForm").refreshSelected(),this.trigger("chosen:updated"),this._super(e)}})})}).call(t,n(1))
},function(e,t,n){"use strict"
@ -1478,18 +1475,18 @@ this.addClass("description-toggle-enabled"),n.on("click",function(){i[e?"hide":"
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r)
o["default"].entwine("ss",function(e){e(".TreeDropdownField").entwine({"from .cms-container form":{onaftersubmitform:function t(e){this.find(".tree-holder").empty(),this._super()}}})})},function(e,t,n){
"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r),a=n(94),s=i(a),l=n(4),u=i(l),d=n(102),c=i(d),f=n(27),p=n(103),h=i(p)
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r),a=n(96),s=i(a),l=n(4),u=i(l),c=n(104),d=i(c),f=n(31),p=n(105),h=i(p)
o["default"].entwine("ss",function(e){e(".cms-content-actions .add-to-campaign-action,#add-to-campaign__action").entwine({onclick:function t(){var t=e("#add-to-campaign__dialog-wrapper")
return t.length||(t=e('<div id="add-to-campaign__dialog-wrapper" />'),e("body").append(t)),t.open(),!1}}),e("#add-to-campaign__dialog-wrapper").entwine({open:function n(){this._renderModal()},close:function i(){
this._clearModal()},_renderModal:function r(){var t=this,n=function l(){return t._clearModal()},i=function d(){return t._handleSubmitModal.apply(t,arguments)},r=e("form.cms-edit-form :input[name=ID]").val(),o=window.ss.store,a=o.getState().config.sections["SilverStripe\\CMS\\Controllers\\CMSPageEditController"],s=a.form.AddToCampaignForm.schemaUrl+"/"+r
this._clearModal()},_renderModal:function r(){var t=this,n=function l(){return t._clearModal()},i=function c(){return t._handleSubmitModal.apply(t,arguments)},r=e("form.cms-edit-form :input[name=ID]").val(),o=window.ss.store,a=o.getState().config.sections["SilverStripe\\CMS\\Controllers\\CMSPageEditController"],s=a.form.AddToCampaignForm.schemaUrl+"/"+r
c["default"].render(u["default"].createElement(f.Provider,{store:o},u["default"].createElement(h["default"],{show:!0,handleSubmit:i,handleHide:n,schemaUrl:s,bodyClassName:"modal__dialog",responseClassBad:"modal__response modal__response--error",
responseClassGood:"modal__response modal__response--good"})),this[0])},_clearModal:function o(){c["default"].unmountComponentAtNode(this[0])},_handleSubmitModal:function a(e,t,n){return e.preventDefault(),
d["default"].render(u["default"].createElement(f.Provider,{store:o},u["default"].createElement(h["default"],{show:!0,handleSubmit:i,handleHide:n,schemaUrl:s,bodyClassName:"modal__dialog",responseClassBad:"modal__response modal__response--error",
responseClassGood:"modal__response modal__response--good"})),this[0])},_clearModal:function o(){d["default"].unmountComponentAtNode(this[0])},_handleSubmitModal:function a(e,t,n){return e.preventDefault(),
t.Campaign?n():(alert(s["default"]._t("AddToCampaigns.ErrorCampaignNotSelected","There was no campaign selected to be added to")),null)}})})},,function(e,t){e.exports=FormBuilderModal},function(e,t,n){
"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r)
n(88),n(105)
n(90),n(107)
var a=function s(e){var t=(0,o["default"])((0,o["default"])(this).contents()).find(".message")
if(t&&t.html()){var n=(0,o["default"])(window.parent.document).find("#Form_EditForm_Members").get(0)
n&&n.refresh()
@ -1517,7 +1514,7 @@ e(this).prop("checked","checked")}):t.each(function(){e(this).prop("checked",e(t
})}})})},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r)
n(88),o["default"].entwine("ss",function(e){e(".cms-content-tools #Form_SearchForm").entwine({onsubmit:function t(e){this.trigger("beforeSubmit")}}),e(".importSpec").entwine({onmatch:function n(){this.find("div.details").hide(),
n(90),o["default"].entwine("ss",function(e){e(".cms-content-tools #Form_SearchForm").entwine({onsubmit:function t(e){this.trigger("beforeSubmit")}}),e(".importSpec").entwine({onmatch:function n(){this.find("div.details").hide(),
this.find("a.detailsLink").click(function(){return e("#"+e(this).attr("href").replace(/.*#/,"")).slideToggle(),!1}),this._super()},onunmatch:function i(){this._super()}})})},function(e,t,n){"use strict"
@ -1525,19 +1522,19 @@ function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r);(0,o["def
},onunmatch:function s(){this._super()},onfileuploadadd:function l(e){this.find(".ss-uploadfield-editandorganize").show()},onfileuploadstart:function u(e){this.find(".ss-uploadfield-editandorganize").show()
}}),(0,o["default"])(".ss-uploadfield-view-allowed-extensions .toggle").entwine({onclick:function d(e){var t=this.closest(".ss-uploadfield-view-allowed-extensions"),n=this.closest(".ui-tabs-panel").height()+20
}}),(0,o["default"])(".ss-uploadfield-view-allowed-extensions .toggle").entwine({onclick:function c(e){var t=this.closest(".ss-uploadfield-view-allowed-extensions"),n=this.closest(".ui-tabs-panel").height()+20
t.toggleClass("active"),t.find(".toggle-content").css("minHeight",n)}})},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r);(0,o["default"])(document).on("click",".confirmedpassword .showOnClick a",function(){var e=(0,o["default"])(".showOnClickContainer",(0,
o["default"])(this).parent())
return e.toggle("fast",function(){e.find('input[type="hidden"]').val(e.is(":visible")?1:0)}),!1})},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r),a=n(94),s=i(a)
window.tmpl=n(110),n(111),n(112),o["default"].widget("blueimpUIX.fileupload",o["default"].blueimpUI.fileupload,{_initTemplates:function l(){this.options.templateContainer=document.createElement(this._files.prop("nodeName")),
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r),a=n(96),s=i(a)
window.tmpl=n(112),n(113),n(114),o["default"].widget("blueimpUIX.fileupload",o["default"].blueimpUI.fileupload,{_initTemplates:function l(){this.options.templateContainer=document.createElement(this._files.prop("nodeName")),
this.options.uploadTemplate=window.tmpl(this.options.uploadTemplateName),this.options.downloadTemplate=window.tmpl(this.options.downloadTemplateName)},_enableFileInputButton:function u(){o["default"].blueimpUI.fileupload.prototype._enableFileInputButton.call(this),
this.element.find(".ss-uploadfield-addfile").show()},_disableFileInputButton:function d(){o["default"].blueimpUI.fileupload.prototype._disableFileInputButton.call(this),this.element.find(".ss-uploadfield-addfile").hide()
this.element.find(".ss-uploadfield-addfile").show()},_disableFileInputButton:function c(){o["default"].blueimpUI.fileupload.prototype._disableFileInputButton.call(this),this.element.find(".ss-uploadfield-addfile").hide()
},_onAdd:function c(e,t){var n=o["default"].blueimpUI.fileupload.prototype._onAdd.call(this,e,t),i=this._files.find(".ss-uploadfield-item").slice(t.files.length*-1).first(),r="+="+(i.position().top-parseInt(i.css("marginTop"),10)||0-parseInt(i.css("borderTopWidth"),10)||0)
},_onAdd:function d(e,t){var n=o["default"].blueimpUI.fileupload.prototype._onAdd.call(this,e,t),i=this._files.find(".ss-uploadfield-item").slice(t.files.length*-1).first(),r="+="+(i.position().top-parseInt(i.css("marginTop"),10)||0-parseInt(i.css("borderTopWidth"),10)||0)
i.offsetParent().animate({scrollTop:r},1e3)
@ -1591,8 +1588,8 @@ a.children().hide(),a.append(o),e.ajax({type:"POST",url:r.urlAttach,data:{ids:t}
files:t,options:i.fileupload("option"),replaceFileID:n})}})}}),e("div.ss-upload *").entwine({getUploadField:function o(){return this.parents("div.ss-upload:first")}}),e("div.ss-upload .ss-uploadfield-files .ss-uploadfield-item").entwine({
onadd:function a(){this._super(),this.closest(".ss-upload").find(".ss-uploadfield-addfile").addClass("borderTop")},onremove:function l(){e(".ss-uploadfield-files:not(:has(.ss-uploadfield-item))").closest(".ss-upload").find(".ss-uploadfield-addfile").removeClass("borderTop"),
this._super()}}),e("div.ss-upload .ss-uploadfield-startall").entwine({onclick:function u(e){return this.closest(".ss-upload").find(".ss-uploadfield-item-start button").click(),e.preventDefault(),!1}}),
e("div.ss-upload .ss-uploadfield-item-cancelfailed").entwine({onclick:function d(e){return this.closest(".ss-uploadfield-item").remove(),e.preventDefault(),!1}}),e("div.ss-upload .ss-uploadfield-item-remove:not(.ui-state-disabled), .ss-uploadfield-item-delete:not(.ui-state-disabled)").entwine({
onclick:function c(e){var t=this.closest("div.ss-upload"),n=t.getConfig("changeDetection"),i=t.data("fileupload"),r=this.closest(".ss-uploadfield-item"),o=""
e("div.ss-upload .ss-uploadfield-item-cancelfailed").entwine({onclick:function c(e){return this.closest(".ss-uploadfield-item").remove(),e.preventDefault(),!1}}),e("div.ss-upload .ss-uploadfield-item-remove:not(.ui-state-disabled), .ss-uploadfield-item-delete:not(.ui-state-disabled)").entwine({
onclick:function d(e){var t=this.closest("div.ss-upload"),n=t.getConfig("changeDetection"),i=t.data("fileupload"),r=this.closest(".ss-uploadfield-item"),o=""
return this.is(".ss-uploadfield-item-delete")?confirm(s["default"]._t("UploadField.ConfirmDelete"))&&(n.changeDetection&&this.closest("form").trigger("dirty"),i&&i._trigger("destroy",e,{context:r,url:this.data("href"),
type:"get",dataType:i.options.dataType})):(n.changeDetection&&this.closest("form").trigger("dirty"),i&&i._trigger("destroy",e,{context:r})),e.preventDefault(),!1}}),e("div.ss-upload .ss-uploadfield-item-edit-all").entwine({
onclick:function f(t){return e(this).hasClass("opened")?(e(".ss-uploadfield-item .ss-uploadfield-item-edit .toggle-details-icon.opened").each(function(t){e(this).closest(".ss-uploadfield-item-edit").click()
@ -1643,22 +1640,22 @@ t.length&&t.removeClass("selected")
var n=e.nextAll("li.selected")
n.length&&n.removeClass("selected"),(0,o["default"])(this).focus()})})},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r)
n(87),o["default"].fn.extend({ssDatepicker:function a(e){return(0,o["default"])(this).each(function(){if(!((0,o["default"])(this).prop("disabled")||(0,o["default"])(this).prop("readonly")||(0,o["default"])(this).data("datepicker"))){
n(89),o["default"].fn.extend({ssDatepicker:function a(e){return(0,o["default"])(this).each(function(){if(!((0,o["default"])(this).prop("disabled")||(0,o["default"])(this).prop("readonly")||(0,o["default"])(this).data("datepicker"))){
(0,o["default"])(this).siblings("button").addClass("ui-icon ui-icon-calendar")
var t=(0,o["default"])(this).closest(".field.date"),n=o["default"].extend(e||{},(0,o["default"])(this).data(),(0,o["default"])(this).data("jqueryuiconfig"),{})
n.showcalendar&&(n.locale&&o["default"].datepicker.regional[n.locale]&&(n=o["default"].extend(n,o["default"].datepicker.regional[n.locale],{})),n.min&&(n.minDate=o["default"].datepicker.parseDate("yy-mm-dd",n.min)),
n.max&&(n.maxDate=o["default"].datepicker.parseDate("yy-mm-dd",n.max)),n.dateFormat=n.jquerydateformat,(0,o["default"])(this).datepicker(n))}})}}),(0,o["default"])(document).on("click",".field.date input.text,input.text.date",function(){
(0,o["default"])(this).ssDatepicker(),(0,o["default"])(this).data("datepicker")&&(0,o["default"])(this).datepicker("show")})},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r)
n(87),o["default"].entwine("ss",function(e){e(".ss-toggle").entwine({onadd:function t(){this._super(),this.accordion({heightStyle:"content",collapsible:!0,active:!this.hasClass("ss-toggle-start-closed")&&0
n(89),o["default"].entwine("ss",function(e){e(".ss-toggle").entwine({onadd:function t(){this._super(),this.accordion({heightStyle:"content",collapsible:!0,active:!this.hasClass("ss-toggle-start-closed")&&0
})},onremove:function n(){this.data("accordion")&&this.accordion("destroy"),this._super()},getTabSet:function i(){return this.closest(".ss-tabset")},fromTabSet:{ontabsshow:function r(){this.accordion("resize")
}}})})},function(e,t,n){(function(e){"use strict"
function t(e){return e&&e.__esModule?e:{"default":e}}var i=n(1),r=t(i)
r["default"].entwine("ss",function(t){t(".memberdatetimeoptionset").entwine({onmatch:function n(){this.find(".toggle-content").hide(),this._super()}}),t(".memberdatetimeoptionset .toggle").entwine({onclick:function i(t){
return e(this).closest(".form__field-description").parent().find(".toggle-content").toggle(),!1}})})}).call(t,n(1))},function(e,t,n){(function(e){"use strict"
function t(e){return e&&e.__esModule?e:{"default":e}}var i=n(1),r=t(i),o=n(94),a=t(o)
n(118),n(119),r["default"].entwine("ss",function(t){var n,i
function t(e){return e&&e.__esModule?e:{"default":e}}var i=n(1),r=t(i),o=n(96),a=t(o)
n(120),n(121),r["default"].entwine("ss",function(t){var n,i
t(window).bind("resize.treedropdownfield",function(){var e=function a(){t(".TreeDropdownField").closePanel()}
if(t.browser.msie&&parseInt(t.browser.version,10)<9){var r=t(window).width(),o=t(window).height()
r==n&&o==i||(n=r,i=o,e())}else e()})
@ -1670,12 +1667,12 @@ t(".TreeDropdownField").entwine({CurrentXhr:null,onadd:function l(){this.append(
var e=r.openLink
e&&this.find("treedropdownfield-toggle-panel-link a").attr("title",e),this.data("title")&&this.setTitle(this.data("title")),this.getPanel().hide(),this._super()},getPanel:function u(){return this.find(".treedropdownfield-panel")
},openPanel:function d(){t(".TreeDropdownField").closePanel(),t("body").bind("click",o)
},openPanel:function c(){t(".TreeDropdownField").closePanel(),t("body").bind("click",o)
var e=this.getPanel(),n=this.find(".tree-holder")
e.css("width",this.width()),e.show()
var i=this.find(".treedropdownfield-toggle-panel-link")
i.addClass("treedropdownfield-open-tree"),this.addClass("treedropdownfield-open-tree"),i.find("a").removeClass("ui-icon-triangle-1-s").addClass("ui-icon-triangle-1-n"),n.is(":empty")&&!e.hasClass("loading")?this.loadTree(null,this._riseUp):this._riseUp(),
this.trigger("panelshow")},_riseUp:function c(){var e=this,n=this.getPanel(),i=this.find(".treedropdownfield-toggle-panel-link"),r=i.innerHeight(),o,a,s
this.trigger("panelshow")},_riseUp:function d(){var e=this,n=this.getPanel(),i=this.find(".treedropdownfield-toggle-panel-link"),r=i.innerHeight(),o,a,s
i.length>0&&(s=t(window).height()+t(document).scrollTop()-i.innerHeight(),a=i.offset().top,o=n.innerHeight(),a+o>s&&a-o>0?(e.addClass("treedropdownfield-with-rise"),r=-n.outerHeight()):e.removeClass("treedropdownfield-with-rise")),
n.css({top:r+"px"})},closePanel:function f(){e("body").unbind("click",o)
var t=this.find(".treedropdownfield-toggle-panel-link")
@ -1687,7 +1684,7 @@ if(n){var i=t.find('*[data-id="'+n+'"]'),r=i.children("a").find("span.jstree_pag
r||(r=i.length>0?t.jstree("get_text",i[0]):null),r&&(e.setTitle(r),e.data("title",r)),i&&t.jstree("select_node",i)}else e.setTitle(e.data("empty-title")),e.removeData("title")}
t.is(":empty")&&n?this.loadTree({forceValue:n},i):i()},setValue:function v(e){this.data("metadata",t.extend(this.data("metadata"),{id:e})),this.find(":input:hidden").val(e).trigger("valueupdated").trigger("change")
},getValue:function y(){return this.find(":input:hidden").val()},loadTree:function b(e,n){var i=this,r=this.getPanel(),o=t(r).find(".tree-holder"),e=e?t.extend({},this.getRequestParams(),e):this.getRequestParams(),a
},getValue:function b(){return this.find(":input:hidden").val()},loadTree:function y(e,n){var i=this,r=this.getPanel(),o=t(r).find(".tree-holder"),e=e?t.extend({},this.getRequestParams(),e):this.getRequestParams(),a
this.getCurrentXhr()&&this.getCurrentXhr().abort(),r.addClass("loading"),a=t.ajax({url:this.data("urlTree"),data:e,complete:function s(e,t){r.removeClass("loading")},success:function l(e,r,a){o.html(e)
@ -1697,13 +1694,13 @@ var s=!0
o.jstree("destroy").bind("loaded.jstree",function(e,t){var r=i.getValue(),a=o.find('*[data-id="'+r+'"]'),l=t.inst.get_selected()
r&&a!=l&&t.inst.select_node(a),s=!1,n&&n.apply(i)}).jstree(i.getTreeConfig()).bind("select_node.jstree",function(e,n){var r=n.rslt.obj,o=t(r).data("id")
s||i.getValue()!=o?(i.data("metadata",t.extend({id:o},t(r).getMetaData())),i.setTitle(n.inst.get_text(r)),i.setValue(o)):(i.data("metadata",null),i.setTitle(null),i.setValue(null),n.inst.deselect_node(r)),
s||i.closePanel(),s=!1}),i.setCurrentXhr(null)}}),this.setCurrentXhr(a)},getTreeConfig:function _(){var e=this
s||i.closePanel(),s=!1}),i.setCurrentXhr(null)}}),this.setCurrentXhr(a)},getTreeConfig:function w(){var e=this
return{core:{html_titles:!0,animation:0},html_data:{data:this.getPanel().find(".tree-holder").html(),ajax:{url:function n(i){var n=t.path.parseUrl(e.data("urlTree")).hrefNoSearch
return n+"/"+(t(i).data("id")?t(i).data("id"):0)},data:function i(n){var i=t.query.load(e.data("urlTree")).keys,r=e.getRequestParams()
return r=t.extend({},i,r,{ajax:1})}}},ui:{select_limit:1,initially_select:[this.getPanel().find(".current").attr("id")]},themes:{theme:"apple"},types:{types:{"default":{check_node:function r(e){return!e.hasClass("disabled")
},uncheck_node:function o(e){return!e.hasClass("disabled")},select_node:function a(e){return!e.hasClass("disabled")},deselect_node:function s(e){return!e.hasClass("disabled")}}}},plugins:["html_data","ui","themes","types"]
}},getRequestParams:function w(){return{}}}),t(".TreeDropdownField .tree-holder li").entwine({getMetaData:function C(){var e=this.attr("class").match(/class-([^\s]*)/i),t=e?e[1]:""
}},getRequestParams:function _(){return{}}}),t(".TreeDropdownField .tree-holder li").entwine({getMetaData:function C(){var e=this.attr("class").match(/class-([^\s]*)/i),t=e?e[1]:""
return{ClassName:t}}}),t(".TreeDropdownField *").entwine({getField:function T(){return this.parents(".TreeDropdownField:first")}}),t(".TreeDropdownField").entwine({onclick:function E(e){return this.togglePanel(),
!1}}),t(".TreeDropdownField .treedropdownfield-panel").entwine({onclick:function P(e){return!1}}),t(".TreeDropdownField.searchable").entwine({onadd:function O(){this._super()
var e=a["default"]._t("TreeDropdownField.ENTERTOSEARCH")
@ -1721,11 +1718,11 @@ i.setCurrentXhr(null),o.jstree("destroy").bind("loaded.jstree",function(e,r){t.e
var r=n.inst.get_checked(null,!0)
i.setValue(t.map(r,function(e,n){return t(e).data("id")})),i.setTitle(t.map(r,function(e,t){return n.inst.get_text(e)})),i.data("metadata",t.map(r,function(e,n){return{id:t(e).data("id"),metadata:t(e).getMetaData()
}}))})}}),this.setCurrentXhr(a)},getValue:function I(){var e=this._super()
return e.split(/ *, */)},setValue:function F(e){this._super(t.isArray(e)?e.join(","):e)},setTitle:function A(e){this._super(t.isArray(e)?e.join(", "):e)},updateTitle:function D(){}}),t(".TreeDropdownField input[type=hidden]").entwine({
return e.split(/ *, */)},setValue:function A(e){this._super(t.isArray(e)?e.join(","):e)},setTitle:function F(e){this._super(t.isArray(e)?e.join(", "):e)},updateTitle:function D(){}}),t(".TreeDropdownField input[type=hidden]").entwine({
onadd:function M(){this._super(),this.bind("change.TreeDropdownField",function(){t(this).getField().updateTitle()})},onremove:function N(){this._super(),this.unbind(".TreeDropdownField")}})})}).call(t,n(1))
},,,function(module,exports,__webpack_require__){"use strict"
function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}var _jQuery=__webpack_require__(1),_jQuery2=_interopRequireDefault(_jQuery),_i18n=__webpack_require__(94),_i18n2=_interopRequireDefault(_i18n),ss="undefined"!=typeof window.ss?window.ss:{}
function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}var _jQuery=__webpack_require__(1),_jQuery2=_interopRequireDefault(_jQuery),_i18n=__webpack_require__(96),_i18n2=_interopRequireDefault(_i18n),ss="undefined"!=typeof window.ss?window.ss:{}
ss.editorWrappers={},ss.editorWrappers.tinyMCE=function(){var editorID
@ -1734,16 +1731,16 @@ return{init:function e(t){editorID=t,this.create()},destroy:function t(){tinymce
},onopen:function i(){},onclose:function r(){},getConfig:function o(){var e="#"+editorID,t=(0,_jQuery2["default"])(e).data("config"),n=this
return t.selector=e,t.setup=function(e){e.on("change",function(){n.save()})},t},save:function a(){var e=this.getInstance()
e.save(),(0,_jQuery2["default"])(e.getElement()).trigger("change")},create:function s(){var e=this.getConfig()
"undefined"!=typeof e.baseURL&&(tinymce.EditorManager.baseURL=e.baseURL),tinymce.init(e)},repaint:function l(){},isDirty:function u(){return this.getInstance().isDirty()},getContent:function d(){return this.getInstance().getContent()
"undefined"!=typeof e.baseURL&&(tinymce.EditorManager.baseURL=e.baseURL),tinymce.init(e)},repaint:function l(){},isDirty:function u(){return this.getInstance().isDirty()},getContent:function c(){return this.getInstance().getContent()
},getDOM:function c(){return this.getInstance().getElement()},getContainer:function f(){return this.getInstance().getContainer()},getSelectedNode:function p(){return this.getInstance().selection.getNode()
},getDOM:function d(){return this.getInstance().getElement()},getContainer:function f(){return this.getInstance().getContainer()},getSelectedNode:function p(){return this.getInstance().selection.getNode()
},selectNode:function h(e){this.getInstance().selection.select(e)},setContent:function m(e,t){this.getInstance().setContent(e,t)},insertContent:function g(e,t){this.getInstance().insertContent(e,t)},replaceContent:function v(e,t){
this.getInstance().execCommand("mceReplaceContent",!1,e,t)},insertLink:function y(e,t){this.getInstance().execCommand("mceInsertLink",!1,e,t)},removeLink:function b(){this.getInstance().execCommand("unlink",!1)
this.getInstance().execCommand("mceReplaceContent",!1,e,t)},insertLink:function b(e,t){this.getInstance().execCommand("mceInsertLink",!1,e,t)},removeLink:function y(){this.getInstance().execCommand("unlink",!1)
},cleanLink:function cleanLink(href,node){var settings=this.getConfig,cb=settings.urlconverter_callback
return cb&&(href=eval(cb+"(href, node, true);")),href.match(new RegExp("^"+tinyMCE.settings.document_base_url+"(.*)$"))&&(href=RegExp.$1),href.match(/^javascript:\s*mctmp/)&&(href=""),href},createBookmark:function _(){
return this.getInstance().selection.getBookmark()},moveToBookmark:function w(e){this.getInstance().selection.moveToBookmark(e),this.getInstance().focus()},blur:function C(){this.getInstance().selection.collapse()
return cb&&(href=eval(cb+"(href, node, true);")),href.match(new RegExp("^"+tinyMCE.settings.document_base_url+"(.*)$"))&&(href=RegExp.$1),href.match(/^javascript:\s*mctmp/)&&(href=""),href},createBookmark:function w(){
return this.getInstance().selection.getBookmark()},moveToBookmark:function _(e){this.getInstance().selection.moveToBookmark(e),this.getInstance().focus()},blur:function C(){this.getInstance().selection.collapse()
},addUndo:function T(){this.getInstance().undoManager.add()}}},ss.editorWrappers["default"]=ss.editorWrappers.tinyMCE,_jQuery2["default"].entwine("ss",function(e){e("textarea.htmleditor").entwine({Editor:null,
onadd:function t(){var e=this.data("editor")||"default",t=ss.editorWrappers[e]()
@ -1756,7 +1753,7 @@ o.length?(o.getForm().setElement(this),o.html(""),o.addClass("loading"),o.open()
o.removeClass("loading")},success:function l(e){o.html(e),o.getForm().setElement(i),o.trigger("ssdialogopen")}})}}),e(".htmleditorfield-dialog").entwine({onadd:function s(){this.is(".ui-dialog-content")||this.ssdialog({
autoOpen:!0,buttons:{insert:{text:_i18n2["default"]._t("HtmlEditorField.INSERT","Insert"),"data-icon":"accept","class":"ss-ui-action-constructive media-insert",click:function t(){e(this).find("form").submit()
}}}}),this._super()},getForm:function l(){return this.find("form")},open:function u(){this.ssdialog("open")},close:function d(){this.ssdialog("close")},toggle:function c(e){this.is(":visible")?this.close():this.open()
}}}}),this._super()},getForm:function l(){return this.find("form")},open:function u(){this.ssdialog("open")},close:function c(){this.ssdialog("close")},toggle:function d(e){this.is(":visible")?this.close():this.open()
},onscroll:function f(){this.animate({scrollTop:this.find("form").height()},500)}}),e("form.htmleditorfield-form").entwine({Selection:null,Bookmark:null,Element:null,setSelection:function p(t){return this._super(e(t))
@ -1765,11 +1762,11 @@ this.getDialog().attr("title",e.text()),this._super()},onremove:function m(){thi
},fromDialog:{onssdialogopen:function v(){var e=this.getEditor()
this.setSelection(e.getSelectedNode()),this.setBookmark(e.createBookmark()),e.blur(),this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(":visible:enabled").eq(0).focus(),this.redraw(),
this.updateFromEditor()},onssdialogclose:function y(){var e=this.getEditor()
e.moveToBookmark(this.getBookmark()),this.setSelection(null),this.setBookmark(null),this.resetFields()}},getEditor:function b(){return this.getElement().getEditor()},modifySelection:function _(e){var t=this.getEditor()
this.updateFromEditor()},onssdialogclose:function b(){var e=this.getEditor()
e.moveToBookmark(this.getBookmark()),this.setSelection(null),this.setBookmark(null),this.resetFields()}},getEditor:function y(){return this.getElement().getEditor()},modifySelection:function w(e){var t=this.getEditor()
t.moveToBookmark(this.getBookmark()),e.call(this,t),this.setSelection(t.getSelectedNode()),this.setBookmark(t.createBookmark()),t.blur()},updateFromEditor:function w(){},redraw:function C(){},resetFields:function T(){
t.moveToBookmark(this.getBookmark()),e.call(this,t),this.setSelection(t.getSelectedNode()),this.setBookmark(t.createBookmark()),t.blur()},updateFromEditor:function _(){},redraw:function C(){},resetFields:function T(){
this.find(".tree-holder").empty()}}),e("form.htmleditorfield-linkform").entwine({onsubmit:function E(e){return this.insertLink(),this.getDialog().close(),!1},resetFields:function P(){this._super(),this[0].reset()
},redraw:function O(){this._super()
@ -1806,17 +1803,17 @@ if(o&&o.length)for(var a=0;a<o.length;a++){var s=o[a].indexOf("id=")==-1?7:5
i.push(o[a].substr(s).replace(/"$/,""))}}n.resolve(i)
break
case"internal":var l=this.find(":input[name=internal]").val()
l?e.ajax({url:e.path.addSearchParams(this.attr("action").replace("LinkForm","getanchors"),{PageID:parseInt(l)}),success:function u(t,i,r){n.resolve(e.parseJSON(t))},error:function d(e,t){n.reject(e.responseText)
l?e.ajax({url:e.path.addSearchParams(this.attr("action").replace("LinkForm","getanchors"),{PageID:parseInt(l)}),success:function u(t,i,r){n.resolve(e.parseJSON(t))},error:function c(e,t){n.reject(e.responseText)
}}):n.resolve([])
break
default:n.reject(_i18n2["default"]._t("HtmlEditorField.ANCHORSNOTSUPPORTED","Anchors are not supported for this link type."))}return n.promise()},updateAnchorSelector:function F(){var t=this,n=this.find(":input[name=AnchorSelector]"),i=this.getAnchors()
default:n.reject(_i18n2["default"]._t("HtmlEditorField.ANCHORSNOTSUPPORTED","Anchors are not supported for this link type."))}return n.promise()},updateAnchorSelector:function A(){var t=this,n=this.find(":input[name=AnchorSelector]"),i=this.getAnchors()
n.empty(),n.append(e('<option value="" selected="1">'+_i18n2["default"]._t("HtmlEditorField.LOOKINGFORANCHORS","Looking for anchors...")+"</option>")),i.done(function(t){if(n.empty(),n.append(e('<option value="" selected="1">'+_i18n2["default"]._t("HtmlEditorField.SelectAnchor")+"</option>")),
t)for(var i=0;i<t.length;i++)n.append(e('<option value="'+t[i]+'">'+t[i]+"</option>"))}).fail(function(t){n.empty(),n.append(e('<option value="" selected="1">'+t+"</option>"))}),e.browser.msie&&n.hide().show()
},updateFromEditor:function A(){var e=/<\S[^><]*>/g,t,n=this.getCurrentLink()
},updateFromEditor:function F(){var e=/<\S[^><]*>/g,t,n=this.getCurrentLink()
if(n)for(t in n){var i=this.find(":input[name="+t+"]"),r=n[t]
"string"==typeof r&&(r=r.replace(e,"")),i.is(":checkbox")?i.prop("checked",r).change():i.is(":radio")?i.val([r]).change():"file"==t?(i=this.find(':input[name="'+t+'[Uploads][]"]'),i=i.parents(".ss-uploadfield"),
function o(e,t){e.getConfig()?e.attachFiles([t]):setTimeout(function(){o(e,t)},50)}(i,r)):i.val(r).change()}},getCurrentLink:function D(){var e=this.getSelection(),t="",n="",i="",r="insert",o="",a=null
@ -1858,21 +1855,21 @@ r.replaceWith(l),n.redraw(),o.resolve(l)},error:function s(){r.remove(),o.reject
e.addClass("insertingURL"),e.redraw()}}),e("form.htmleditorfield-mediaform .htmleditorfield-mediaform-heading .back-button").entwine({onclick:function X(){var e=this.closest("form")
e.removeClass("insertingURL"),e.redraw()}}),e("form.htmleditorfield-mediaform .ss-gridfield-items").entwine({onselectableselected:function Q(t,n){var i=this.closest("form"),r=e(n.selected)
r.is(".ss-gridfield-item")&&(i.closest("form").showFileView(r.data("id")),i.redraw(),i.parent().trigger("scroll"))},onselectableunselected:function K(t,n){var i=this.closest("form"),r=e(n.unselected)
r.is(".ss-gridfield-item")&&(i.getFileView(r.data("id")).remove(),i.redraw())}}),e("form.htmleditorfield-form.htmleditorfield-mediaform div.ss-assetuploadfield").entwine({onfileuploadstop:function Y(t){
r.is(".ss-gridfield-item")&&(i.getFileView(r.data("id")).remove(),i.redraw())}}),e("form.htmleditorfield-form.htmleditorfield-mediaform div.ss-assetuploadfield").entwine({onfileuploadstop:function J(t){
var n=this.closest("form"),i=[]
n.find("div.content-edit").find("div.ss-htmleditorfield-file").each(function(){i.push(e(this).data("id"))})
var r=e(".ss-uploadfield-files",this).children(".ss-uploadfield-item")
r.each(function(){var t=e(this).data("fileid")
t&&e.inArray(t,i)==-1&&(e(this).remove(),n.showFileView(t))}),n.parent().trigger("scroll"),n.redraw()}}),e("form.htmleditorfield-form.htmleditorfield-mediaform input.remoteurl").entwine({onadd:function J(){
t&&e.inArray(t,i)==-1&&(e(this).remove(),n.showFileView(t))}),n.parent().trigger("scroll"),n.redraw()}}),e("form.htmleditorfield-form.htmleditorfield-mediaform input.remoteurl").entwine({onadd:function Y(){
this._super(),this.validate()},onkeyup:function Z(){this.validate()},onchange:function ee(){this.validate()},getAddButton:function te(){return this.closest(".CompositeField").find("button.add-url")},validate:function ne(){
var t=this.val(),n=t
return t=e.trim(t),t=t.replace(/^https?:\/\//i,""),n!==t&&this.val(t),this.getAddButton().button(t?"enable":"disable"),!!t}}),e("form.htmleditorfield-form.htmleditorfield-mediaform .add-url").entwine({
getURLField:function ie(){return this.closest(".CompositeField").find("input.remoteurl")},onclick:function re(e){var t=this.getURLField(),n=this.closest(".CompositeField"),i=this.closest("form")
return t.validate()&&(n.addClass("loading"),i.showFileView("http://"+t.val()).done(function(){n.removeClass("loading"),i.parent().trigger("scroll")}),i.redraw()),!1}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file").entwine({
getAttributes:function oe(){},getExtraData:function ae(){},getHTML:function se(){return e("<div>").append(e("<a/>").attr({href:this.data("url")}).text(this.find(".name").text())).html()},insertHTML:function le(e){
e.replaceContent(this.getHTML())},updateFromNode:function ue(e){},updateDimensions:function de(e,t,n){var i=this.find(":input[name=Width]"),r=this.find(":input[name=Height]"),o=i.val(),a=r.val(),s
e.replaceContent(this.getHTML())},updateFromNode:function ue(e){},updateDimensions:function ce(e,t,n){var i=this.find(":input[name=Width]"),r=this.find(":input[name=Height]"),o=i.val(),a=r.val(),s
o&&a&&(e?(s=r.getOrigVal()/i.getOrigVal(),"Width"==e?(t&&o>t&&(o=t),a=Math.floor(o*s)):"Height"==e&&(n&&a>n&&(a=n),o=Math.ceil(a/s))):(t&&o>t&&(o=t),n&&a>n&&(a=n)),i.val(o),r.val(a))}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file.image").entwine({
getAttributes:function ce(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val()
getAttributes:function de(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val()
return{src:this.find(":input[name=URL]").val(),alt:this.find(":input[name=AltText]").val(),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,title:this.find(":input[name=Title]").val(),"class":this.find(":input[name=CSSClass]").val(),
"data-id":this.find(":input[name=FileID]").val()}},getExtraData:function fe(){return{CaptionText:this.find(":input[name=CaptionText]").val()}},getHTML:function pe(){},insertHTML:function he(t){var n=this.closest("form"),i=n.getSelection()
@ -1886,22 +1883,22 @@ var l=s.parent(".captionImage"),u=l.find(".caption")
o.CaptionText?(l.length||(l=e("<div></div>")),l.attr("class","captionImage "+r["class"]).css("width",r.width),u.length||(u=e('<p class="caption"></p>').appendTo(l)),u.attr("class","caption "+r["class"]).text(o.CaptionText)):l=u=null
var d=l?l:s
a&&a.not(d).length&&a.replaceWith(d),l&&l.prepend(s),a||(t.repaint(),t.insertContent(e("<div />").append(d).html(),{skip_undo:1})),t.addUndo(),t.repaint()},updateFromNode:function me(e){this.find(":input[name=AltText]").val(e.attr("alt")),
var c=l?l:s
a&&a.not(c).length&&a.replaceWith(c),l&&l.prepend(s),a||(t.repaint(),t.insertContent(e("<div />").append(c).html(),{skip_undo:1})),t.addUndo(),t.repaint()},updateFromNode:function me(e){this.find(":input[name=AltText]").val(e.attr("alt")),
this.find(":input[name=Title]").val(e.attr("title")),this.find(":input[name=CSSClass]").val(e.attr("class")),this.find(":input[name=Width]").val(e.width()),this.find(":input[name=Height]").val(e.height()),
this.find(":input[name=CaptionText]").val(e.siblings(".caption:first").text()),this.find(":input[name=FileID]").val(e.data("id"))}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file.flash").entwine({
getAttributes:function ge(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val()
return{src:this.find(":input[name=URL]").val(),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,"data-fileid":this.find(":input[name=FileID]").val()}},getHTML:function ve(){var t=this.getAttributes(),n=tinyMCE.activeEditor.plugins.media.dataToImg({
type:"flash",width:t.width,height:t.height,params:{src:t.src},video:{sources:[]}})
return e("<div />").append(n).html()},updateFromNode:function ye(e){}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file.embed").entwine({getAttributes:function be(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val()
return e("<div />").append(n).html()},updateFromNode:function be(e){}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file.embed").entwine({getAttributes:function ye(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val()
return{src:this.find(".thumbnail-preview").attr("src"),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,"class":this.find(":input[name=CSSClass]").val(),alt:this.find(":input[name=AltText]").val(),
title:this.find(":input[name=Title]").val(),"data-fileid":this.find(":input[name=FileID]").val()}},getExtraData:function _e(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val()
title:this.find(":input[name=Title]").val(),"data-fileid":this.find(":input[name=FileID]").val()}},getExtraData:function we(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val()
return{CaptionText:this.find(":input[name=CaptionText]").val(),Url:this.find(":input[name=URL]").val(),thumbnail:this.find(".thumbnail-preview").attr("src"),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,
cssclass:this.find(":input[name=CSSClass]").val()}},getHTML:function we(){var t,n=this.getAttributes(),i=this.getExtraData(),r=e("<img />").attr(n).addClass("ss-htmleditorfield-file embed")
cssclass:this.find(":input[name=CSSClass]").val()}},getHTML:function _e(){var t,n=this.getAttributes(),i=this.getExtraData(),r=e("<img />").attr(n).addClass("ss-htmleditorfield-file embed")
return e.each(i,function(e,t){r.attr("data-"+e,t)}),t=i.CaptionText?e('<div style="width: '+n.width+'px;" class="captionImage '+n["class"]+'"><p class="caption">'+i.CaptionText+"</p></div>").prepend(r):r,
e("<div />").append(t).html()},updateFromNode:function Ce(e){this.find(":input[name=AltText]").val(e.attr("alt")),this.find(":input[name=Title]").val(e.attr("title")),this.find(":input[name=Width]").val(e.width()),
this.find(":input[name=Height]").val(e.height()),this.find(":input[name=Title]").val(e.attr("title")),this.find(":input[name=CSSClass]").val(e.data("cssclass")),this.find(":input[name=FileID]").val(e.data("fileid"))
@ -1922,7 +1919,7 @@ var e=this
this.bind("change",function(){var t=e.closest("form").find(".grid-field")
t.setState("ParentID",e.getValue()),t.reload()})}})})},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r)
n(87),n(122),n(118),o["default"].entwine("ss",function(e){e(".ss-tabset").entwine({IgnoreTabState:!1,onadd:function t(){var e=window.location.hash
n(89),n(124),n(120),o["default"].entwine("ss",function(e){e(".ss-tabset").entwine({IgnoreTabState:!1,onadd:function t(){var e=window.location.hash
this.redrawTabs(),""!==e&&this.openTabFromURL(e),this._super()},onremove:function n(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function i(){this.rewriteHashlinks(),this.tabs()},
openTabFromURL:function r(t){var n
e.each(this.find(".ui-tabs-anchor"),function(){if(this.href.indexOf(t)!==-1&&1===e(t).length)return n=e(this),!1}),void 0!==n&&e(document).ready("ajaxComplete",function(){n.click()})},rewriteHashlinks:function o(){
@ -1930,21 +1927,21 @@ e(this).find("ul a").each(function(){if(e(this).attr("href")){var t=e(this).attr
t&&e(this).attr("href",document.location.href.replace(/#.*/,"")+t[0])}})}}),e(".ui-tabs-active .ui-tabs-anchor").entwine({onmatch:function a(){this.addClass("nav-link active")},onunmatch:function s(){this.removeClass("active")
}})})},,function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r),a=n(94),s=i(a)
n(87),n(118),o["default"].entwine("ss",function(e){e(".grid-field").entwine({reload:function t(n,i){var r=this,o=this.closest("form"),a=this.find(":input:focus").attr("name"),l=o.find(":input").serializeArray()
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(1),o=i(r),a=n(96),s=i(a)
n(89),n(120),o["default"].entwine("ss",function(e){e(".grid-field").entwine({reload:function t(n,i){var r=this,o=this.closest("form"),a=this.find(":input:focus").attr("name"),l=o.find(":input").serializeArray()
n||(n={}),n.data||(n.data=[]),n.data=n.data.concat(l),window.location.search&&(n.data=window.location.search.replace(/^\?/,"")+"&"+e.param(n.data)),o.addClass("loading"),e.ajax(e.extend({},{headers:{"X-Pjax":"CurrentField"
},type:"POST",url:this.data("url"),dataType:"html",success:function u(t){if(r.empty().append(e(t).children()),a&&r.find(':input[name="'+a+'"]').focus(),r.find(".filter-header").length){var s
"show"==n.data[0].filter?(s='<span class="non-sortable"></span>',r.addClass("show-filter").find(".filter-header").show()):(s='<button type="button" name="showFilter" class="btn font-icon-search btn--no-text btn--icon-large grid-field__filter-open ss-gridfield-button-filter trigger"></button>',
r.removeClass("show-filter").find(".filter-header").hide()),r.find(".sortable-header th:last").html(s)}o.removeClass("loading"),i&&i.apply(this,arguments),r.trigger("reload",r)},error:function d(e){alert(s["default"]._t("GRIDFIELD.ERRORINTRANSACTION")),
r.removeClass("show-filter").find(".filter-header").hide()),r.find(".sortable-header th:last").html(s)}o.removeClass("loading"),i&&i.apply(this,arguments),r.trigger("reload",r)},error:function c(e){alert(s["default"]._t("GRIDFIELD.ERRORINTRANSACTION")),
o.removeClass("loading")}},n))},showDetailView:function n(e){window.location.href=e},getItems:function i(){return this.find(".ss-gridfield-item")},setState:function r(e,t){var n=this.getState()
n[e]=t,this.find(':input[name="'+this.data("name")+'[GridState]"]').val(JSON.stringify(n))},getState:function o(){return JSON.parse(this.find(':input[name="'+this.data("name")+'[GridState]"]').val())}}),
e(".grid-field *").entwine({getGridField:function a(){return this.closest(".grid-field")}}),e(".grid-field :button[name=showFilter]").entwine({onclick:function l(t){e(".filter-header").show("slow").find(":input:first").focus(),
this.closest(".grid-field").addClass("show-filter"),this.parent().html('<span class="non-sortable"></span>'),t.preventDefault()}}),e(".grid-field .ss-gridfield-item").entwine({onclick:function u(t){if(e(t.target).closest(".action").length)return this._super(t),
!1
var n=this.find(".edit-link")
n.length&&this.getGridField().showDetailView(n.prop("href"))},onmouseover:function d(){this.find(".edit-link").length&&this.css("cursor","pointer")},onmouseout:function c(){this.css("cursor","default")
n.length&&this.getGridField().showDetailView(n.prop("href"))},onmouseover:function c(){this.find(".edit-link").length&&this.css("cursor","pointer")},onmouseout:function d(){this.css("cursor","default")
}}),e(".grid-field .action:button").entwine({onclick:function f(e){var t="show"
return this.button("option","disabled")?void e.preventDefault():(!this.hasClass("ss-gridfield-button-close")&&this.closest(".grid-field").hasClass("show-filter")||(t="hidden"),this.getGridField().reload({
@ -1957,9 +1954,9 @@ return e.path.makeUrlAbsolute(n.data("url")+a+r,e("base").attr("href"))}}),e(".g
this.toggleDisabled(),this.find('input[type="text"]').on("keyup",function(){e.toggleDisabled()})},onunmatch:function m(){this.find('input[type="text"]').off("keyup")},toggleDisabled:function g(){var e=this.find(".ss-ui-button"),t=this.find('input[type="text"]'),n=""!==t.val(),i=e.is(":disabled")
;(n&&i||!n&&!i)&&e.button("option","disabled",!i)}}),e(".grid-field .grid-field__col-compact .action.gridfield-button-delete, .cms-edit-form .btn-toolbar button.action.action-delete").entwine({onclick:function v(e){
return confirm(s["default"]._t("TABLEFIELD.DELETECONFIRMMESSAGE"))?void this._super(e):(e.preventDefault(),!1)}}),e(".grid-field .action.gridfield-button-print").entwine({UUID:null,onmatch:function y(){
this._super(),this.setUUID((new Date).getTime())},onunmatch:function b(){this._super()},onclick:function _(e){var t=this.actionurl()
return window.open(t),e.preventDefault(),!1}}),e(".ss-gridfield-print-iframe").entwine({onmatch:function w(){this._super(),this.hide().bind("load",function(){this.focus()
return confirm(s["default"]._t("TABLEFIELD.DELETECONFIRMMESSAGE"))?void this._super(e):(e.preventDefault(),!1)}}),e(".grid-field .action.gridfield-button-print").entwine({UUID:null,onmatch:function b(){
this._super(),this.setUUID((new Date).getTime())},onunmatch:function y(){this._super()},onclick:function w(e){var t=this.actionurl()
return window.open(t),e.preventDefault(),!1}}),e(".ss-gridfield-print-iframe").entwine({onmatch:function _(){this._super(),this.hide().bind("load",function(){this.focus()
var e=this.contentWindow||this
e.print()})},onunmatch:function C(){this._super()}}),e(".grid-field .action.no-ajax").entwine({onclick:function T(e){return window.location.href=this.actionurl(),e.preventDefault(),!1}}),e(".grid-field .action-detail").entwine({
onclick:function E(){return this.getGridField().showDetailView(e(this).prop("href")),!1}}),e(".grid-field[data-selectable]").entwine({getSelectedItems:function P(){return this.find(".ss-gridfield-item.ui-selected")
@ -1982,45 +1979,45 @@ e.ajax({headers:{"X-Pjax":"Partial"},dataType:"json",type:"GET",url:e(r).data("s
}})},select:function i(t,n){var i=e('<input type="hidden" name="relationID" class="action_gridfield_relationfind" />')
i.val(n.item.id),e(this).closest(".grid-field").find(".action_gridfield_relationfind").replaceWith(i)
var r=e(this).closest(".grid-field").find(".action_gridfield_relationadd")
r.data("button")?r.button("enable"):r.removeAttr("disabled")}})}}),e(".grid-field .pagination-page-number input").entwine({onkeydown:function F(t){if(13==t.keyCode){var n=parseInt(e(this).val(),10),i=e(this).getGridField()
r.data("button")?r.button("enable"):r.removeAttr("disabled")}})}}),e(".grid-field .pagination-page-number input").entwine({onkeydown:function A(t){if(13==t.keyCode){var n=parseInt(e(this).val(),10),i=e(this).getGridField()
return i.setState("GridFieldPaginator",{currentPage:n}),i.reload(),!1}}})})},function(e,t,n){"use strict"
function i(e){if(e&&e.__esModule)return e
var t={}
if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])
return t["default"]=e,t}function r(e){return e&&e.__esModule?e:{"default":e}}function o(){h["default"].add("config",y["default"]),h["default"].add("form",_["default"]),h["default"].add("schemas",C["default"]),
h["default"].add("records",E["default"]),h["default"].add("campaign",O["default"]),h["default"].add("breadcrumbs",k["default"]),h["default"].add("routing",j.routerReducer),R["default"].start()
var e={},t=(0,l.combineReducers)(h["default"].getAll()),n=[d["default"]],i=f["default"].get("environment"),r=f["default"].get("debugging"),o=l.applyMiddleware.apply(void 0,n),a=window.devToolsExtension
return t["default"]=e,t}function r(e){return e&&e.__esModule?e:{"default":e}}function o(){g["default"].add("config",w["default"]),g["default"].add("form",d.reducer),g["default"].add("schemas",C["default"]),
g["default"].add("records",E["default"]),g["default"].add("campaign",O["default"]),g["default"].add("breadcrumbs",k["default"]),g["default"].add("routing",f.routerReducer),x["default"].start()
var e={},t=(0,l.combineReducers)(g["default"].getAll()),n=[c["default"]],i=h["default"].get("environment"),r=h["default"].get("debugging"),o=l.applyMiddleware.apply(void 0,n),a=window.devToolsExtension
"dev"===i&&r&&"function"==typeof a&&(o=(0,l.compose)(l.applyMiddleware.apply(void 0,n),a()))
var u=o(l.createStore),c=u(t,e)
c.dispatch(g.setConfig(f["default"].getAll())),window.ss=window.ss||{},window.ss.store=c
var p=new s["default"](c)
p.start(window.location.pathname)}var a=n(125),s=r(a),l=n(28),u=n(147),d=r(u),c=n(69),f=r(c),p=n(148),h=r(p),m=n(149),g=i(m),v=n(151),y=r(v),b=n(153),_=r(b),w=n(154),C=r(w),T=n(155),E=r(T),P=n(156),O=r(P),S=n(158),k=r(S),j=n(146),x=n(159),R=r(x),I=n(175),F=r(I)
var u=o(l.createStore),p=u(t,e)
p.dispatch(b.setConfig(h["default"].getAll())),window.ss=window.ss||{},window.ss.store=p
var m=new s["default"](p)
m.start(window.location.pathname)}var a=n(127),s=r(a),l=n(32),u=n(149),c=r(u),d=n(33),f=n(148),p=n(71),h=r(p),m=n(150),g=r(m),v=n(151),b=i(v),y=n(153),w=r(y),_=n(155),C=r(_),T=n(156),E=r(T),P=n(157),O=r(P),S=n(159),k=r(S),j=n(160),x=r(j),R=n(176),I=r(R),A=n(9),F=r(A)
window.onload=o},function(e,t,n){"use strict"
F["default"].polyfill(),window.onload=o},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0})
var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(1),s=i(a),l=n(4),u=i(l),d=n(102),c=i(d),f=n(27),p=n(64),h=n(126),m=i(h),g=n(69),v=i(g),y=n(143),b=i(y),_=n(144),w=i(_),C=n(145),T=i(C),E=n(146),P=function(){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(1),s=i(a),l=n(4),u=i(l),c=n(104),d=i(c),f=n(31),p=n(66),h=n(128),m=i(h),g=n(71),v=i(g),b=n(145),y=i(b),w=n(146),_=i(w),C=n(147),T=i(C),E=n(148),P=function(){
function e(t){r(this,e),this.store=t
var n=v["default"].get("absoluteBaseUrl")
b["default"].setAbsoluteBase(n)}return o(e,[{key:"start",value:function t(e){this.matchesLegacyRoute(e)?this.initLegacyRouter():this.initReactRouter()}},{key:"matchesLegacyRoute",value:function n(e){var t=v["default"].get("sections"),n=b["default"].resolveURLToBase(e).replace(/\/$/,"")
y["default"].setAbsoluteBase(n)}return o(e,[{key:"start",value:function t(e){this.matchesLegacyRoute(e)?this.initLegacyRouter():this.initReactRouter()}},{key:"matchesLegacyRoute",value:function n(e){var t=v["default"].get("sections"),n=y["default"].resolveURLToBase(e).replace(/\/$/,"")
return!!Object.keys(t).find(function(e){var i=t[e],r=b["default"].resolveURLToBase(i.url).replace(/\/$/,"")
return!i.reactRouter&&n.match(r)})}},{key:"initReactRouter",value:function i(){w["default"].updateRootRoute({component:T["default"]})
return!!Object.keys(t).find(function(e){var i=t[e],r=y["default"].resolveURLToBase(i.url).replace(/\/$/,"")
return!i.reactRouter&&n.match(r)})}},{key:"initReactRouter",value:function i(){_["default"].updateRootRoute({component:T["default"]})
var e=(0,E.syncHistoryWithStore)((0,p.useRouterHistory)(m["default"])({basename:v["default"].get("baseUrl")}),this.store)
c["default"].render(u["default"].createElement(f.Provider,{store:this.store},u["default"].createElement(p.Router,{history:e,routes:w["default"].getRootRoute()})),document.getElementsByClassName("cms-content")[0])
d["default"].render(u["default"].createElement(f.Provider,{store:this.store},u["default"].createElement(p.Router,{history:e,routes:_["default"].getRootRoute()})),document.getElementsByClassName("cms-content")[0])
}},{key:"initLegacyRouter",value:function a(){var e=v["default"].get("sections"),t=this.store;(0,b["default"])("*",function(e,n){e.store=t,n()})
}},{key:"initLegacyRouter",value:function a(){var e=v["default"].get("sections"),t=this.store;(0,y["default"])("*",function(e,n){e.store=t,n()})
var n=null
Object.keys(e).forEach(function(t){var i=b["default"].resolveURLToBase(e[t].url)
i=i.replace(/\/$/,""),i+="(/*?)?",(0,b["default"])(i,function(e,t){if("complete"!==document.readyState||e.init)return void t()
Object.keys(e).forEach(function(t){var i=y["default"].resolveURLToBase(e[t].url)
i=i.replace(/\/$/,""),i+="(/*?)?",(0,y["default"])(i,function(e,t){if("complete"!==document.readyState||e.init)return void t()
n||(n=window.location.pathname)
var i=e.data&&e.data.__forceReload;(e.path!==n||i)&&(n=e.path.replace(/#.*$/,""),(0,s["default"])(".cms-container").entwine("ss").handleStateChange(null,e.state))})}),b["default"].start()}}]),e}()
var i=e.data&&e.data.__forceReload;(e.path!==n||i)&&(n=e.path.replace(/#.*$/,""),(0,s["default"])(".cms-container").entwine("ss").handleStateChange(null,e.state))})}),y["default"].start()}}]),e}()
t["default"]=P},,,,,,,,,,,,,,,,,,function(e,t){e.exports=Router},function(e,t){e.exports=ReactRouteRegister},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -2029,91 +2026,77 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"render",value:function n(){var e=u["default"].Children.only(this.props.children)
return e}}]),t}(c["default"])
return e}}]),t}(d["default"])
t["default"]=f},function(e,t){e.exports=ReactRouterRedux},function(e,t){e.exports=ReduxThunk},function(e,t){e.exports=ReducerRegister},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e){return{type:a["default"].SET_CONFIG,payload:{config:e}}}Object.defineProperty(t,"__esModule",{value:!0}),t.setConfig=r
var o=n(150),a=i(o)},function(e,t){"use strict"
var o=n(152),a=i(o)},function(e,t){"use strict"
Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={SET_CONFIG:"SET_CONFIG"}},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments[1]
switch(t.type){case u["default"].SET_CONFIG:return(0,s["default"])(o({},e,t.payload.config))
default:return e}}Object.defineProperty(t,"__esModule",{value:!0})
var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a=n(152),s=i(a),l=n(150),u=i(l)
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a=n(154),s=i(a),l=n(152),u=i(l)
t["default"]=r},function(e,t){e.exports=DeepFreezeStrict},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(){var e=arguments.length<=0||void 0===arguments[0]?d:arguments[0],t=arguments[1],n=function i(t,n){
return a({},e,r({},t,a({},e[t],n)))}
switch(t.type){case u.ACTION_TYPES.SUBMIT_FORM_REQUEST:return(0,l["default"])(n(t.payload.formId,{error:!1,submitting:!0}))
case u.ACTION_TYPES.REMOVE_FORM:return(0,l["default"])(Object.keys(e).reduce(function(n,i){return i===t.payload.formId?n:a({},n,r({},i,e[i]))},{}))
case u.ACTION_TYPES.ADD_FORM:return(0,l["default"])(a({},e,r({},t.payload.formState.id,{fields:t.payload.formState.fields,error:!1,submitting:!1})))
case u.ACTION_TYPES.UPDATE_FIELD:return(0,l["default"])(n(t.payload.formId,{fields:e[t.payload.formId].fields.map(function(e){return e.id===t.payload.updates.id?a({},e,t.payload.updates):e})}))
case u.ACTION_TYPES.SUBMIT_FORM_SUCCESS:return(0,l["default"])(n(t.payload.response.id,{fields:t.payload.response.state.fields,error:!1,messages:t.payload.response.state.messages,submitting:!1}))
case u.ACTION_TYPES.SUBMIT_FORM_FAILURE:return(0,l["default"])(n(t.payload.formId,{error:!0,messages:t.payload.error,submitting:!1}))
case u.ACTION_TYPES.SET_SUBMIT_ACTION:return(0,l["default"])(n(t.payload.formId,{submitAction:t.payload.submitAction}))
default:return e}}Object.defineProperty(t,"__esModule",{value:!0})
var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s=n(152),l=i(s),u=n(30),d=(0,l["default"])({})
t["default"]=o},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(){var e=arguments.length<=0||void 0===arguments[0]?c:arguments[0],t=arguments.length<=1||void 0===arguments[1]?null:arguments[1]
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(){var e=arguments.length<=0||void 0===arguments[0]?d:arguments[0],t=arguments.length<=1||void 0===arguments[1]?null:arguments[1]
switch(t.type){case d["default"].SET_SCHEMA:var n=t.payload.schema.schema_url
return(0,l["default"])(a({},e,r({},n,t.payload)))
switch(t.type){case c["default"].SET_SCHEMA:return(0,l["default"])(a({},e,r({},t.payload.id,t.payload)))
default:return e}}Object.defineProperty(t,"__esModule",{value:!0})
var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}
t["default"]=o
var s=n(152),l=i(s),u=n(32),d=i(u),c=(0,l["default"])({})},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(){var e=arguments.length<=0||void 0===arguments[0]?c:arguments[0],t=arguments[1],n=null,i=null,o=null
var s=n(154),l=i(s),u=n(35),c=i(u),d=(0,l["default"])({})},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(){var e=arguments.length<=0||void 0===arguments[0]?d:arguments[0],t=arguments[1],n=null,i=null,o=null
switch(t.type){case d["default"].CREATE_RECORD:return(0,l["default"])(a({},e,{}))
case d["default"].UPDATE_RECORD:return(0,l["default"])(a({},e,{}))
case d["default"].DELETE_RECORD:return(0,l["default"])(a({},e,{}))
case d["default"].FETCH_RECORDS_REQUEST:return e
case d["default"].FETCH_RECORDS_FAILURE:return e
case d["default"].FETCH_RECORDS_SUCCESS:if(i=t.payload.recordType,!i)throw new Error("Undefined record type")
switch(t.type){case c["default"].CREATE_RECORD:return(0,l["default"])(a({},e,{}))
case c["default"].UPDATE_RECORD:return(0,l["default"])(a({},e,{}))
case c["default"].DELETE_RECORD:return(0,l["default"])(a({},e,{}))
case c["default"].FETCH_RECORDS_REQUEST:return e
case c["default"].FETCH_RECORDS_FAILURE:return e
case c["default"].FETCH_RECORDS_SUCCESS:if(i=t.payload.recordType,!i)throw new Error("Undefined record type")
return n=t.payload.data._embedded[i]||{},n=n.reduce(function(e,t){return a({},e,r({},t.ID,t))},{}),(0,l["default"])(a({},e,r({},i,n)))
case d["default"].FETCH_RECORD_REQUEST:return e
case d["default"].FETCH_RECORD_FAILURE:return e
case d["default"].FETCH_RECORD_SUCCESS:if(i=t.payload.recordType,o=t.payload.data,!i)throw new Error("Undefined record type")
case c["default"].FETCH_RECORD_REQUEST:return e
case c["default"].FETCH_RECORD_FAILURE:return e
case c["default"].FETCH_RECORD_SUCCESS:if(i=t.payload.recordType,o=t.payload.data,!i)throw new Error("Undefined record type")
return(0,l["default"])(a({},e,r({},i,a({},e[i],r({},o.ID,o)))))
case d["default"].DELETE_RECORD_REQUEST:return e
case d["default"].DELETE_RECORD_FAILURE:return e
case d["default"].DELETE_RECORD_SUCCESS:return i=t.payload.recordType,n=e[i],n=Object.keys(n).reduce(function(e,i){return parseInt(i,10)!==parseInt(t.payload.id,10)?a({},e,r({},i,n[i])):e},{}),(0,l["default"])(a({},e,r({},i,n)))
case c["default"].DELETE_RECORD_REQUEST:return e
case c["default"].DELETE_RECORD_FAILURE:return e
case c["default"].DELETE_RECORD_SUCCESS:return i=t.payload.recordType,n=e[i],n=Object.keys(n).reduce(function(e,i){return parseInt(i,10)!==parseInt(t.payload.id,10)?a({},e,r({},i,n[i])):e},{}),(0,l["default"])(a({},e,r({},i,n)))
default:return e}}Object.defineProperty(t,"__esModule",{value:!0})
var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s=n(152),l=i(s),u=n(48),d=i(u),c={}
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s=n(154),l=i(s),u=n(50),c=i(u),d={}
t["default"]=o},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(){var e=arguments.length<=0||void 0===arguments[0]?d:arguments[0],t=arguments[1]
function i(e){return e&&e.__esModule?e:{"default":e}}function r(){var e=arguments.length<=0||void 0===arguments[0]?c:arguments[0],t=arguments[1]
switch(t.type){case u["default"].SET_CAMPAIGN_SELECTED_CHANGESETITEM:return(0,s["default"])(o({},e,{changeSetItemId:t.payload.changeSetItemId}))
case u["default"].SET_CAMPAIGN_ACTIVE_CHANGESET:return(0,s["default"])(o({},e,{campaignId:t.payload.campaignId,view:t.payload.view,changeSetItemId:null}))
case u["default"].PUBLISH_CAMPAIGN_REQUEST:return(0,s["default"])(o({},e,{isPublishing:!0}))
case u["default"].PUBLISH_CAMPAIGN_SUCCESS:case u["default"].PUBLISH_CAMPAIGN_FAILURE:return(0,s["default"])(o({},e,{isPublishing:!1}))
default:return e}}Object.defineProperty(t,"__esModule",{value:!0})
var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a=n(152),s=i(a),l=n(157),u=i(l),d=(0,s["default"])({campaignId:null,changeSetItemId:null,isPublishing:!1,view:null})
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a=n(154),s=i(a),l=n(158),u=i(l),c=(0,s["default"])({campaignId:null,changeSetItemId:null,isPublishing:!1,view:null})
t["default"]=r},function(e,t){"use strict"
Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={SET_CAMPAIGN_ACTIVE_CHANGESET:"SET_CAMPAIGN_ACTIVE_CHANGESET",SET_CAMPAIGN_SELECTED_CHANGESETITEM:"SET_CAMPAIGN_SELECTED_CHANGESETITEM",PUBLISH_CAMPAIGN_REQUEST:"PUBLISH_CAMPAIGN_REQUEST",
PUBLISH_CAMPAIGN_SUCCESS:"PUBLISH_CAMPAIGN_SUCCESS",PUBLISH_CAMPAIGN_FAILURE:"PUBLISH_CAMPAIGN_FAILURE"}},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(){var e=arguments.length<=0||void 0===arguments[0]?d:arguments[0],t=arguments[1]
function i(e){return e&&e.__esModule?e:{"default":e}}function r(){var e=arguments.length<=0||void 0===arguments[0]?c:arguments[0],t=arguments[1]
switch(t.type){case u["default"].SET_BREADCRUMBS:return(0,s["default"])(o([],t.payload.breadcrumbs))
default:return e}}Object.defineProperty(t,"__esModule",{value:!0})
var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a=n(152),s=i(a),l=n(67),u=i(l),d=(0,s["default"])([])
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a=n(154),s=i(a),l=n(69),u=i(l),c=(0,s["default"])([])
t["default"]=r},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0})
var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(34),s=i(a),l=n(57),u=i(l),d=n(55),c=i(d),f=n(160),p=i(f),h=n(162),m=i(h),g=n(163),v=i(g),y=n(164),b=i(y),_=n(165),w=i(_),C=n(166),T=i(C),E=n(167),P=i(E),O=n(168),S=i(O),k=n(169),j=i(k),x=n(170),R=i(x),I=n(171),F=i(I),A=n(172),D=i(A),M=n(173),N=i(M),U=n(174),L=i(U),B=function(){
function e(){r(this,e)}return o(e,[{key:"start",value:function t(){s["default"].register("TextField",u["default"]),s["default"].register("HiddenField",c["default"]),s["default"].register("CheckboxField",p["default"]),
s["default"].register("CheckboxSetField",m["default"]),s["default"].register("OptionsetField",v["default"]),s["default"].register("GridField",b["default"]),s["default"].register("SingleSelectField",w["default"]),
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(28),s=i(a),l=n(59),u=i(l),c=n(57),d=i(c),f=n(161),p=i(f),h=n(163),m=i(h),g=n(164),v=i(g),b=n(165),y=i(b),w=n(166),_=i(w),C=n(167),T=i(C),E=n(168),P=i(E),O=n(169),S=i(O),k=n(170),j=i(k),x=n(171),R=i(x),I=n(172),A=i(I),F=n(173),D=i(F),M=n(174),N=i(M),U=n(175),L=i(U),B=function(){
function e(){r(this,e)}return o(e,[{key:"start",value:function t(){s["default"].register("TextField",u["default"]),s["default"].register("HiddenField",d["default"]),s["default"].register("CheckboxField",p["default"]),
s["default"].register("CheckboxSetField",m["default"]),s["default"].register("OptionsetField",v["default"]),s["default"].register("GridField",y["default"]),s["default"].register("SingleSelectField",_["default"]),
s["default"].register("PopoverField",T["default"]),s["default"].register("HeaderField",P["default"]),s["default"].register("LiteralField",S["default"]),s["default"].register("HtmlReadonlyField",j["default"]),
s["default"].register("LookupField",R["default"]),s["default"].register("CompositeField",F["default"]),s["default"].register("Tabs",D["default"]),s["default"].register("TabItem",N["default"]),s["default"].register("FormAction",L["default"])
s["default"].register("LookupField",R["default"]),s["default"].register("CompositeField",A["default"]),s["default"].register("Tabs",D["default"]),s["default"].register("TabItem",N["default"]),s["default"].register("FormAction",L["default"])
}}]),e}()
t["default"]=new B},function(e,t,n){"use strict"
@ -2125,9 +2108,9 @@ e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,wri
value:!0})
var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(4),d=i(u),c=n(161),f=i(c),p=n(58),h=i(p),m=n(20),g=i(m),v=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(4),c=i(u),d=n(162),f=i(d),p=n(60),h=i(p),m=n(20),g=i(m),v=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),l(t,[{key:"render",value:function n(){var e=(0,h["default"])(f["default"])
return d["default"].createElement(e,s({},this.props,{type:"checkbox",hideLabels:!0}))}}]),t}(g["default"])
return c["default"].createElement(e,s({},this.props,{type:"checkbox",hideLabels:!0}))}}]),t}(g["default"])
t["default"]=v},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -2136,7 +2119,7 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=n(59),p=i(f),h=n(37),m=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=n(61),p=i(f),h=n(39),m=function(e){
function t(e){r(this,t)
var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.handleChange=n.handleChange.bind(n),n}return a(t,e),s(t,[{key:"handleChange",value:function n(e){"function"==typeof this.props.onChange?this.props.onChange(e,{id:this.props.id,value:e.target.checked?1:0
@ -2148,7 +2131,7 @@ switch(this.props.type){case"checkbox":t=h.Checkbox
break
case"radio":t=h.Radio
break
default:throw new Error("Invalid OptionField type: "+this.props.type)}return(0,p["default"])(t,e,this.getInputProps())}}]),t}(c["default"])
default:throw new Error("Invalid OptionField type: "+this.props.type)}return(0,p["default"])(t,e,this.getInputProps())}}]),t}(d["default"])
m.propTypes={type:u["default"].PropTypes.oneOf(["checkbox","radio"]),leftTitle:u["default"].PropTypes.any,title:u["default"].PropTypes.any,extraClass:u["default"].PropTypes.string,id:u["default"].PropTypes.string,
name:u["default"].PropTypes.string.isRequired,onChange:u["default"].PropTypes.func,value:u["default"].PropTypes.oneOfType([u["default"].PropTypes.string,u["default"].PropTypes.number,u["default"].PropTypes.bool]),
readOnly:u["default"].PropTypes.bool,disabled:u["default"].PropTypes.bool},m.defaultProps={extraClass:"",className:"",type:"radio",leftTitle:null},t["default"]=m},function(e,t,n){"use strict"
@ -2159,19 +2142,19 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0}),t.CheckboxSetField=void 0
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=n(161),p=i(f),h=n(58),m=i(h),g=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=n(162),p=i(f),h=n(60),m=i(h),g=function(e){
function t(e){r(this,t)
var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.getItemKey=n.getItemKey.bind(n),n.getOptionProps=n.getOptionProps.bind(n),n.handleChange=n.handleChange.bind(n),n.getValues=n.getValues.bind(n),n}return a(t,e),s(t,[{key:"getItemKey",value:function n(e,t){
return this.props.id+"-"+(e.value||"empty"+t)}},{key:"getValues",value:function i(){var e=this.props.value
return Array.isArray(e)||!e&&"string"!=typeof e&&"number"!=typeof e||(e=[e]),e?e.map(function(e){return""+e}):[]}},{key:"handleChange",value:function l(e,t){var n=this
"function"==typeof this.props.onChange&&!function(){var i=n.getValues(),r=n.props.source.filter(function(e,r){return n.getItemKey(e,r)===t.id?1===t.value:i.indexOf(""+e.value)>-1}).map(function(e){return""+e.value
"function"==typeof this.props.onChange&&!function(){var e=n.getValues(),i=n.props.source.filter(function(i,r){return n.getItemKey(i,r)===t.id?1===t.value:e.indexOf(""+i.value)>-1}).map(function(e){return""+e.value
})
n.props.onChange(e,{id:n.props.id,value:r})}()}},{key:"getOptionProps",value:function d(e,t){var n=this.getValues(),i=this.getItemKey(e,t)
n.props.onChange(i)}()}},{key:"getOptionProps",value:function c(e,t){var n=this.getValues(),i=this.getItemKey(e,t)
return{key:i,id:i,name:this.props.name,className:this.props.itemClass,disabled:e.disabled||this.props.disabled,readOnly:this.props.readOnly,onChange:this.handleChange,value:n.indexOf(""+e.value)>-1,title:e.title,
type:"checkbox"}}},{key:"render",value:function c(){var e=this
return this.props.source?u["default"].createElement("div",null,this.props.source.map(function(t,n){return u["default"].createElement(p["default"],e.getOptionProps(t,n))})):null}}]),t}(c["default"])
type:"checkbox"}}},{key:"render",value:function d(){var e=this
return this.props.source?u["default"].createElement("div",null,this.props.source.map(function(t,n){return u["default"].createElement(p["default"],e.getOptionProps(t,n))})):null}}]),t}(d["default"])
g.propTypes={className:u["default"].PropTypes.string,extraClass:u["default"].PropTypes.string,itemClass:u["default"].PropTypes.string,id:u["default"].PropTypes.string,name:u["default"].PropTypes.string.isRequired,
source:u["default"].PropTypes.arrayOf(u["default"].PropTypes.shape({value:u["default"].PropTypes.oneOfType([u["default"].PropTypes.string,u["default"].PropTypes.number]),title:u["default"].PropTypes.any,
disabled:u["default"].PropTypes.bool})),onChange:u["default"].PropTypes.func,value:u["default"].PropTypes.any,readOnly:u["default"].PropTypes.bool,disabled:u["default"].PropTypes.bool},g.defaultProps={
@ -2183,17 +2166,17 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0}),t.OptionsetField=void 0
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=n(161),p=i(f),h=n(58),m=i(h),g=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=n(162),p=i(f),h=n(60),m=i(h),g=function(e){
function t(e){r(this,t)
var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.getItemKey=n.getItemKey.bind(n),n.getOptionProps=n.getOptionProps.bind(n),n.handleChange=n.handleChange.bind(n),n}return a(t,e),s(t,[{key:"getItemKey",value:function n(e,t){return this.props.id+"-"+(e.value||"empty"+t)
}},{key:"handleChange",value:function i(e,t){var n=this
if("function"==typeof this.props.onChange&&1===t.value){var i=this.props.source.find(function(e,i){return n.getItemKey(e,i)===t.id})
this.props.onChange(e,{id:this.props.id,value:""+i.value})}}},{key:"getOptionProps",value:function l(e,t){var n=this.getItemKey(e,t)
this.props.onChange(i.value)}}},{key:"getOptionProps",value:function l(e,t){var n=this.getItemKey(e,t)
return{key:n,id:n,name:this.props.name,className:this.props.itemClass,disabled:e.disabled||this.props.disabled,readOnly:this.props.readOnly,onChange:this.handleChange,value:""+this.props.value==""+e.value,
title:e.title,type:"radio"}}},{key:"render",value:function d(){var e=this
return this.props.source?u["default"].createElement("div",null,this.props.source.map(function(t,n){return u["default"].createElement(p["default"],e.getOptionProps(t,n))})):null}}]),t}(c["default"])
title:e.title,type:"radio"}}},{key:"render",value:function c(){var e=this
return this.props.source?u["default"].createElement("div",null,this.props.source.map(function(t,n){return u["default"].createElement(p["default"],e.getOptionProps(t,n))})):null}}]),t}(d["default"])
g.propTypes={extraClass:u["default"].PropTypes.string,itemClass:u["default"].PropTypes.string,id:u["default"].PropTypes.string,name:u["default"].PropTypes.string.isRequired,source:u["default"].PropTypes.arrayOf(u["default"].PropTypes.shape({
value:u["default"].PropTypes.oneOfType([u["default"].PropTypes.string,u["default"].PropTypes.number]),title:u["default"].PropTypes.oneOfType([u["default"].PropTypes.string,u["default"].PropTypes.number]),
disabled:u["default"].PropTypes.bool})),onChange:u["default"].PropTypes.func,value:u["default"].PropTypes.oneOfType([u["default"].PropTypes.string,u["default"].PropTypes.number]),readOnly:u["default"].PropTypes.bool,
@ -2206,27 +2189,27 @@ e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,wri
value:!0}),t.SingleSelectField=void 0
var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(4),d=i(u),c=n(20),f=i(c),p=n(58),h=i(p),m=n(94),g=i(m),v=n(37),y=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(4),c=i(u),d=n(20),f=i(d),p=n(60),h=i(p),m=n(96),g=i(m),v=n(39),b=function(e){
function t(e){r(this,t)
var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.handleChange=n.handleChange.bind(n),n}return a(t,e),l(t,[{key:"render",value:function n(){var e=null
return e=this.props.readOnly?this.getReadonlyField():this.getSelectField()}},{key:"getReadonlyField",value:function i(){var e=this,t=this.props.source&&this.props.source.find(function(t){return t.value===e.props.value
})
return t="string"==typeof t?t:this.props.value,d["default"].createElement(v.FormControl.Static,this.getInputProps(),t)}},{key:"getSelectField",value:function u(){var e=this,t=this.props.source?this.props.source.slice():[]
return t="string"==typeof t?t:this.props.value,c["default"].createElement(v.FormControl.Static,this.getInputProps(),t)}},{key:"getSelectField",value:function u(){var e=this,t=this.props.source?this.props.source.slice():[]
return this.props.data.hasEmptyDefault&&!t.find(function(e){return!e.value})&&t.unshift({value:"",title:this.props.data.emptyString,disabled:!1}),d["default"].createElement(v.FormControl,this.getInputProps(),t.map(function(t,n){
return this.props.data.hasEmptyDefault&&!t.find(function(e){return!e.value})&&t.unshift({value:"",title:this.props.data.emptyString,disabled:!1}),c["default"].createElement(v.FormControl,this.getInputProps(),t.map(function(t,n){
var i=e.props.name+"-"+(t.value||"empty"+n)
return d["default"].createElement("option",{key:i,value:t.value,disabled:t.disabled},t.title)}))}},{key:"getInputProps",value:function c(){var e={bsClass:this.props.bsClass,className:this.props.className+" "+this.props.extraClass,
return c["default"].createElement("option",{key:i,value:t.value,disabled:t.disabled},t.title)}))}},{key:"getInputProps",value:function d(){var e={bsClass:this.props.bsClass,className:this.props.className+" "+this.props.extraClass,
id:this.props.id,name:this.props.name,disabled:this.props.disabled}
return this.props.readOnly||s(e,{onChange:this.handleChange,value:this.props.value,componentClass:"select"}),e}},{key:"handleChange",value:function f(e){"function"==typeof this.props.onChange&&this.props.onChange(e,{
id:this.props.id,value:e.target.value})}}]),t}(f["default"])
y.propTypes={id:d["default"].PropTypes.string,name:d["default"].PropTypes.string.isRequired,onChange:d["default"].PropTypes.func,value:d["default"].PropTypes.oneOfType([d["default"].PropTypes.string,d["default"].PropTypes.number]),
readOnly:d["default"].PropTypes.bool,disabled:d["default"].PropTypes.bool,source:d["default"].PropTypes.arrayOf(d["default"].PropTypes.shape({value:d["default"].PropTypes.oneOfType([d["default"].PropTypes.string,d["default"].PropTypes.number]),
title:d["default"].PropTypes.oneOfType([d["default"].PropTypes.string,d["default"].PropTypes.number]),disabled:d["default"].PropTypes.bool})),data:d["default"].PropTypes.oneOfType([d["default"].PropTypes.array,d["default"].PropTypes.shape({
hasEmptyDefault:d["default"].PropTypes.bool,emptyString:d["default"].PropTypes.oneOfType([d["default"].PropTypes.string,d["default"].PropTypes.number])})])},y.defaultProps={source:[],extraClass:"",className:"",
data:{emptyString:g["default"]._t("Boolean.ANY","Any")}},t.SingleSelectField=y,t["default"]=(0,h["default"])(y)},function(e,t,n){"use strict"
b.propTypes={id:c["default"].PropTypes.string,name:c["default"].PropTypes.string.isRequired,onChange:c["default"].PropTypes.func,value:c["default"].PropTypes.oneOfType([c["default"].PropTypes.string,c["default"].PropTypes.number]),
readOnly:c["default"].PropTypes.bool,disabled:c["default"].PropTypes.bool,source:c["default"].PropTypes.arrayOf(c["default"].PropTypes.shape({value:c["default"].PropTypes.oneOfType([c["default"].PropTypes.string,c["default"].PropTypes.number]),
title:c["default"].PropTypes.oneOfType([c["default"].PropTypes.string,c["default"].PropTypes.number]),disabled:c["default"].PropTypes.bool})),data:c["default"].PropTypes.oneOfType([c["default"].PropTypes.array,c["default"].PropTypes.shape({
hasEmptyDefault:c["default"].PropTypes.bool,emptyString:c["default"].PropTypes.oneOfType([c["default"].PropTypes.string,c["default"].PropTypes.number])})])},b.defaultProps={source:[],extraClass:"",className:"",
data:{emptyString:g["default"]._t("Boolean.ANY","Any")}},t.SingleSelectField=b,t["default"]=(0,h["default"])(b)},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -2234,15 +2217,15 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(37),c=n(20),f=i(c),p=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(39),d=n(20),f=i(d),p=function(e){
function t(e){r(this,t)
var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.handleShow=n.handleShow.bind(n),n.handleHide=n.handleHide.bind(n),n.state={showing:!1},n}return a(t,e),s(t,[{key:"handleShow",value:function n(){this.setState({showing:!0})}},{key:"handleHide",
value:function i(){this.setState({showing:!1})}},{key:"render",value:function l(){var e=this.getPlacement(),t=u["default"].createElement(d.Popover,{id:this.props.id+"_Popover",className:"fade in popover-"+e,
value:function i(){this.setState({showing:!1})}},{key:"render",value:function l(){var e=this.getPlacement(),t=u["default"].createElement(c.Popover,{id:this.props.id+"_Popover",className:"fade in popover-"+e,
title:this.props.data.popoverTitle},this.props.children),n=["btn","btn-secondary"]
return this.state.showing&&n.push("btn--no-focus"),this.props.title||n.push("font-icon-dot-3 btn--no-text btn--icon-xl"),u["default"].createElement(d.OverlayTrigger,{rootClose:!0,trigger:"click",container:this,
return this.state.showing&&n.push("btn--no-focus"),this.props.title||n.push("font-icon-dot-3 btn--no-text btn--icon-xl"),u["default"].createElement(c.OverlayTrigger,{rootClose:!0,trigger:"click",container:this,
placement:e,overlay:t,onEnter:this.handleShow,onExited:this.handleHide},u["default"].createElement("button",{id:this.props.id,type:"button",className:n.join(" ")},this.props.title))}},{key:"getPlacement",
value:function c(){var e=this.props.data.placement
value:function d(){var e=this.props.data.placement
return e||"bottom"}}]),t}(f["default"])
p.propTypes={id:u["default"].PropTypes.string,title:u["default"].PropTypes.any,data:u["default"].PropTypes.oneOfType([u["default"].PropTypes.array,u["default"].PropTypes.shape({popoverTitle:u["default"].PropTypes.string,
placement:u["default"].PropTypes.oneOf(["top","right","bottom","left"])})])},t["default"]=p},function(e,t,n){"use strict"
@ -2253,10 +2236,10 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"render",value:function n(){var e="h"+(this.props.data.headingLevel||3)
return u["default"].createElement("div",{className:"field"},u["default"].createElement(e,this.getInputProps(),this.props.data.title))}},{key:"getInputProps",value:function i(){return{className:this.props.className+" "+this.props.extraClass,
id:this.props.id}}}]),t}(c["default"])
id:this.props.id}}}]),t}(d["default"])
f.propTypes={extraClass:u["default"].PropTypes.string,id:u["default"].PropTypes.string,data:u["default"].PropTypes.oneOfType([u["default"].PropTypes.array,u["default"].PropTypes.shape({headingLevel:u["default"].PropTypes.number,
title:u["default"].PropTypes.string.isRequired})]).isRequired},f.defaultProps={className:"",extraClass:""},t["default"]=f},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -2267,12 +2250,12 @@ e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,wri
value:!0})
var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(4),d=i(u),c=n(20),f=i(c),p=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),l(t,[{key:"getContent",value:function n(){return{__html:this.props.data.content}}},{key:"getInputProps",
value:function i(){return{className:this.props.className+" "+this.props.extraClass,id:this.props.id,name:this.props.name}}},{key:"render",value:function u(){return d["default"].createElement("div",s({},this.getInputProps(),{
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(4),c=i(u),d=n(20),f=i(d),p=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),l(t,[{key:"getContent",value:function n(){return{__html:this.props.value}}},{key:"getInputProps",
value:function i(){return{className:this.props.className+" "+this.props.extraClass,id:this.props.id,name:this.props.name}}},{key:"render",value:function u(){return c["default"].createElement("div",s({},this.getInputProps(),{
dangerouslySetInnerHTML:this.getContent()}))}}]),t}(f["default"])
p.propTypes={id:d["default"].PropTypes.string,name:d["default"].PropTypes.string.isRequired,extraClass:d["default"].PropTypes.string,data:d["default"].PropTypes.oneOfType([d["default"].PropTypes.array,d["default"].PropTypes.shape({
content:d["default"].PropTypes.string.isRequired})]).isRequired},p.defaultProps={extraClass:"",className:""},t["default"]=p},function(e,t,n){"use strict"
p.propTypes={id:c["default"].PropTypes.string,name:c["default"].PropTypes.string.isRequired,extraClass:c["default"].PropTypes.string,value:c["default"].PropTypes.string},p.defaultProps={extraClass:"",className:""
},t["default"]=p},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -2281,13 +2264,13 @@ e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,wri
value:!0}),t.HtmlReadonlyField=void 0
var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(4),d=i(u),c=n(20),f=i(c),p=n(58),h=i(p),m=n(37),g=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(4),c=i(u),d=n(20),f=i(d),p=n(60),h=i(p),m=n(39),g=function(e){
function t(e){r(this,t)
var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.getContent=n.getContent.bind(n),n}return a(t,e),l(t,[{key:"getContent",value:function n(){return{__html:this.props.value}}},{key:"getInputProps",value:function i(){return{bsClass:this.props.bsClass,
componentClass:this.props.componentClass,className:this.props.className+" "+this.props.extraClass,id:this.props.id,name:this.props.name}}},{key:"render",value:function u(){return d["default"].createElement(m.FormControl.Static,s({},this.getInputProps(),{
componentClass:this.props.componentClass,className:this.props.className+" "+this.props.extraClass,id:this.props.id,name:this.props.name}}},{key:"render",value:function u(){return c["default"].createElement(m.FormControl.Static,s({},this.getInputProps(),{
dangerouslySetInnerHTML:this.getContent()}))}}]),t}(f["default"])
g.propTypes={id:d["default"].PropTypes.string,name:d["default"].PropTypes.string.isRequired,extraClass:d["default"].PropTypes.string,value:d["default"].PropTypes.string},g.defaultProps={extraClass:"",className:""
g.propTypes={id:c["default"].PropTypes.string,name:c["default"].PropTypes.string.isRequired,extraClass:c["default"].PropTypes.string,value:c["default"].PropTypes.string},g.defaultProps={extraClass:"",className:""
},t.HtmlReadonlyField=g,t["default"]=(0,h["default"])(g)},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -2296,7 +2279,7 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0}),t.LookupField=void 0
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=n(37),p=n(58),h=i(p),m=n(94),g=i(m),v=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=n(39),p=n(60),h=i(p),m=n(96),g=i(m),v=function(e){
function t(e){r(this,t)
var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.getValueCSV=n.getValueCSV.bind(n),n}return a(t,e),s(t,[{key:"getValueCSV",value:function n(){var e=this,t=this.props.value
@ -2305,7 +2288,7 @@ return n?n.title:""}return t&&t.length?t.map(function(t){var n=e.props.source.fi
return n&&n.title}).filter(function(e){return(""+e).length}).join(", "):""}},{key:"getFieldProps",value:function i(){return{id:this.props.id,name:this.props.name,className:this.props.className+" "+this.props.extraClass
}}},{key:"render",value:function l(){if(!this.props.source)return null
var e="('"+g["default"]._t("FormField.NONE","None")+"')"
return u["default"].createElement(f.FormControl.Static,this.getFieldProps(),this.getValueCSV()||e)}}]),t}(c["default"])
return u["default"].createElement(f.FormControl.Static,this.getFieldProps(),this.getValueCSV()||e)}}]),t}(d["default"])
v.propTypes={extraClass:u["default"].PropTypes.string,id:u["default"].PropTypes.string,name:u["default"].PropTypes.string.isRequired,source:u["default"].PropTypes.arrayOf(u["default"].PropTypes.shape({
value:u["default"].PropTypes.oneOfType([u["default"].PropTypes.string,u["default"].PropTypes.number]),title:u["default"].PropTypes.any,disabled:u["default"].PropTypes.bool})),value:u["default"].PropTypes.any
},v.defaultProps={extraClass:"",className:"",value:[]},t.LookupField=v,t["default"]=(0,h["default"])(v)},function(e,t,n){"use strict"
@ -2316,10 +2299,10 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=n(59),p=i(f),h=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=n(61),p=i(f),h=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"getLegend",value:function n(){return"fieldset"===this.props.data.tag&&this.props.data.legend?(0,
p["default"])("legend",this.props.data.legend):null}},{key:"render",value:function i(){var e=this.getLegend(),t=this.props.data.tag||"div",n=this.props.className+" "+this.props.extraClass
return u["default"].createElement(t,{className:n},e,this.props.children)}}]),t}(c["default"])
return u["default"].createElement(t,{className:n},e,this.props.children)}}]),t}(d["default"])
h.propTypes={data:u["default"].PropTypes.oneOfType([u["default"].PropTypes.array,u["default"].PropTypes.shape({tag:u["default"].PropTypes.string,legend:u["default"].PropTypes.string})]),extraClass:u["default"].PropTypes.string
},h.defaultProps={className:"",extraClass:""},t["default"]=h},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -2329,18 +2312,18 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=n(37),p=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=n(39),p=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"getContainerProps",value:function n(){var e=this.props,t=e.activeKey,n=e.onSelect,i=e.className,r=e.extraClass,o=e.id,a=i+" "+r
return{activeKey:t,className:a,defaultActiveKey:this.getDefaultActiveKey(),onSelect:n,id:o}}},{key:"getDefaultActiveKey",value:function i(){var e=this,t=null
if("string"==typeof this.props.defaultActiveKey){var n=u["default"].Children.toArray(this.props.children).find(function(t){return t.props.name===e.props.defaultActiveKey})
n&&(t=n.props.name)}return"string"!=typeof t&&u["default"].Children.forEach(this.props.children,function(e){"string"!=typeof t&&(t=e.props.name)}),t}},{key:"renderTab",value:function l(e){return null===e.props.title?null:u["default"].createElement(f.NavItem,{
eventKey:e.props.name,disabled:e.props.disabled,className:e.props.tabClassName},e.props.title)}},{key:"renderNav",value:function d(){var e=u["default"].Children.map(this.props.children,this.renderTab)
return e.length<=1?null:u["default"].createElement(f.Nav,{bsStyle:this.props.bsStyle,role:"tablist"},e)}},{key:"render",value:function c(){var e=this.getContainerProps(),t=this.renderNav()
eventKey:e.props.name,disabled:e.props.disabled,className:e.props.tabClassName},e.props.title)}},{key:"renderNav",value:function c(){var e=u["default"].Children.map(this.props.children,this.renderTab)
return e.length<=1?null:u["default"].createElement(f.Nav,{bsStyle:this.props.bsStyle,role:"tablist"},e)}},{key:"render",value:function d(){var e=this.getContainerProps(),t=this.renderNav()
return u["default"].createElement(f.Tab.Container,e,u["default"].createElement("div",{className:"wrapper"},t,u["default"].createElement(f.Tab.Content,{animation:this.props.animation},this.props.children)))
}}]),t}(c["default"])
}}]),t}(d["default"])
p.propTypes={id:u["default"].PropTypes.string.isRequired,defaultActiveKey:u["default"].PropTypes.string,extraClass:u["default"].PropTypes.string},p.defaultProps={bsStyle:"tabs",className:"",extraClass:""
},t["default"]=p},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -2350,20 +2333,20 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=n(37),p=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"getTabProps",value:function n(){var e=this.props,t=e.name,n=e.className,i=e.extraClass,r=e.disabled,o=e.bsClass,a=e.onEnter,s=e.onEntering,l=e.onEntered,u=e.onExit,d=e.onExiting,c=e.onExited,f=e.animation,p=e.unmountOnExit
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=n(39),p=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"getTabProps",value:function n(){var e=this.props,t=e.name,n=e.className,i=e.extraClass,r=e.disabled,o=e.bsClass,a=e.onEnter,s=e.onEntering,l=e.onEntered,u=e.onExit,c=e.onExiting,d=e.onExited,f=e.animation,p=e.unmountOnExit
return{eventKey:t,className:n+" "+i,disabled:r,bsClass:o,onEnter:a,onEntering:s,onEntered:l,onExit:u,onExiting:d,onExited:c,animation:f,unmountOnExit:p}}},{key:"render",value:function i(){var e=this.getTabProps()
return{eventKey:t,className:n+" "+i,disabled:r,bsClass:o,onEnter:a,onEntering:s,onEntered:l,onExit:u,onExiting:c,onExited:d,animation:f,unmountOnExit:p}}},{key:"render",value:function i(){var e=this.getTabProps()
return u["default"].createElement(f.Tab.Pane,e,this.props.children)}}]),t}(c["default"])
return u["default"].createElement(f.Tab.Pane,e,this.props.children)}}]),t}(d["default"])
p.propTypes={name:u["default"].PropTypes.string.isRequired,extraClass:u["default"].PropTypes.string,tabClassName:u["default"].PropTypes.string},p.defaultProps={className:"",extraClass:""},t["default"]=p
},function(e,t){e.exports=FormAction},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(64),o=n(69),a=i(o),s=n(144),l=i(s),u=n(176),d=i(u)
function i(e){return e&&e.__esModule?e:{"default":e}}var r=n(66),o=n(71),a=i(o),s=n(146),l=i(s),u=n(177),c=i(u)
document.addEventListener("DOMContentLoaded",function(){var e=a["default"].getSection("SilverStripe\\Admin\\CampaignAdmin")
l["default"].add({path:e.url,component:(0,r.withRouter)(d["default"]),childRoutes:[{path:":type/:id/:view",component:d["default"]},{path:"set/:id/:view",component:d["default"]}]})})},function(e,t,n){"use strict"
l["default"].add({path:e.url,component:(0,r.withRouter)(c["default"]),childRoutes:[{path:":type/:id/:view",component:c["default"]},{path:"set/:id/:view",component:c["default"]}]})})},function(e,t,n){"use strict"
function i(e){if(e&&e.__esModule)return e
@ -2375,14 +2358,14 @@ return t["default"]=e,t}function r(e){return e&&e.__esModule?e:{"default":e}}fun
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):e.__proto__=t)}function l(e){return{config:e.config,
campaignId:e.campaign.campaignId,view:e.campaign.view,breadcrumbs:e.breadcrumbs,sectionConfig:e.config.sections["SilverStripe\\Admin\\CampaignAdmin"],securityId:e.config.SecurityID}}function u(e){return{
breadcrumbsActions:(0,m.bindActionCreators)(_,e)}}Object.defineProperty(t,"__esModule",{value:!0})
var d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),f=n(4),p=r(f),h=n(27),m=n(28),g=n(64),v=n(33),y=r(v),b=n(177),_=i(b),w=n(178),C=r(w),T=n(20),E=r(T),P=n(174),O=r(P),S=n(94),k=r(S),j=n(179),x=r(j),R=n(38),I=r(R),F=n(180),A=r(F),D=function(e){
breadcrumbsActions:(0,m.bindActionCreators)(w,e)}}Object.defineProperty(t,"__esModule",{value:!0})
var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},d=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),f=n(4),p=r(f),h=n(31),m=n(32),g=n(66),v=n(27),b=r(v),y=n(178),w=i(y),_=n(179),C=r(_),T=n(20),E=r(T),P=n(175),O=r(P),S=n(96),k=r(S),j=n(180),x=r(j),R=n(40),I=r(R),A=n(181),F=r(A),D=function(e){
function t(e){o(this,t)
var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.publishApi=y["default"].createEndpointFetcher({url:n.props.sectionConfig.publishEndpoint.url,method:n.props.sectionConfig.publishEndpoint.method,defaultData:{SecurityID:n.props.securityId},payloadSchema:{
id:{urlReplacement:":id",remove:!0}}}),n.handleBackButtonClick=n.handleBackButtonClick.bind(n),n}return s(t,e),c(t,[{key:"componentWillMount",value:function n(){0===this.props.breadcrumbs.length&&this.setBreadcrumbs(this.props.params.view,this.props.params.id)
return n.publishApi=b["default"].createEndpointFetcher({url:n.props.sectionConfig.publishEndpoint.url,method:n.props.sectionConfig.publishEndpoint.method,defaultData:{SecurityID:n.props.securityId},payloadSchema:{
id:{urlReplacement:":id",remove:!0}}}),n.handleBackButtonClick=n.handleBackButtonClick.bind(n),n}return s(t,e),d(t,[{key:"componentWillMount",value:function n(){0===this.props.breadcrumbs.length&&this.setBreadcrumbs(this.props.params.view,this.props.params.id)
}},{key:"componentWillReceiveProps",value:function i(e){var t=this.props.params.id!==e.params.id||this.props.params.view!==e.params.view
t&&this.setBreadcrumbs(e.params.view,e.params.id)}},{key:"setBreadcrumbs",value:function r(e,t){var n=[{text:k["default"]._t("Campaigns.CAMPAIGN","Campaigns"),href:this.props.sectionConfig.url}]
@ -2406,7 +2389,7 @@ crumbs:this.props.breadcrumbs})),p["default"].createElement("div",{className:"pa
}},{key:"renderItemListView",value:function h(){var e={sectionConfig:this.props.sectionConfig,campaignId:this.props.params.id,itemListViewEndpoint:this.props.sectionConfig.itemListViewEndpoint,publishApi:this.publishApi,
handleBackButtonClick:this.handleBackButtonClick.bind(this)}
return p["default"].createElement(A["default"],e)}},{key:"renderDetailEditView",value:function m(){var e=this.props.sectionConfig.form.DetailEditForm.schemaUrl,t=e
return p["default"].createElement(F["default"],e)}},{key:"renderDetailEditView",value:function m(){var e=this.props.sectionConfig.form.DetailEditForm.schemaUrl,t=e
this.props.params.id>0&&(t=e+"/"+this.props.params.id)
var n={createFn:this.campaignEditCreateFn.bind(this),schemaUrl:t}
return p["default"].createElement("div",null,p["default"].createElement(x["default"],{showBackButton:!0,handleBackButtonClick:this.handleBackButtonClick},p["default"].createElement(C["default"],{multiline:!0,
@ -2417,16 +2400,16 @@ var n={createFn:this.campaignAddCreateFn.bind(this),schemaUrl:t}
return p["default"].createElement("div",null,p["default"].createElement(x["default"],{showBackButton:!0,handleBackButtonClick:this.handleBackButtonClick},p["default"].createElement(C["default"],{multiline:!0,
crumbs:this.props.breadcrumbs})),p["default"].createElement("div",{className:"panel panel--padded panel--scrollable flexbox-area-grow form--inline"},p["default"].createElement(I["default"],n)))}},{key:"campaignEditCreateFn",
value:function v(e,t){var n=this,i=this.props.sectionConfig.url
if("action_cancel"===t.name){var r=d({},t,{handleClick:function o(e){e.preventDefault(),n.props.router.push(i)}})
return p["default"].createElement(e,d({key:t.id},r))}return p["default"].createElement(e,d({key:t.id},t))}},{key:"campaignAddCreateFn",value:function b(e,t){var n=this,i=this.props.sectionConfig.url
if("action_cancel"===t.name){var r=d({},t,{handleClick:function o(e){e.preventDefault(),n.props.router.push(i)}})
return p["default"].createElement(e,d({key:t.name},r))}return p["default"].createElement(e,d({key:t.name},t))}},{key:"campaignListCreateFn",value:function _(e,t){var n=this,i=this.props.sectionConfig.url,r="set"
if("action_cancel"===t.name){var r=c({},t,{handleClick:function o(e){e.preventDefault(),n.props.router.push(i)}})
return p["default"].createElement(e,c({key:t.id},r))}return p["default"].createElement(e,c({key:t.id},t))}},{key:"campaignAddCreateFn",value:function y(e,t){var n=this,i=this.props.sectionConfig.url
if("action_cancel"===t.name){var r=c({},t,{handleClick:function o(e){e.preventDefault(),n.props.router.push(i)}})
return p["default"].createElement(e,c({key:t.name},r))}return p["default"].createElement(e,c({key:t.name},t))}},{key:"campaignListCreateFn",value:function w(e,t){var n=this,i=this.props.sectionConfig.url,r="set"
if("GridField"===t.component){var o=d({},t,{data:d({},t.data,{handleDrillDown:function a(e,t){n.props.router.push(i+"/"+r+"/"+t.ID+"/show")},handleEditRecord:function s(e,t){n.props.router.push(i+"/"+r+"/"+t+"/edit")
if("GridField"===t.schemaComponent){var o=c({},t,{data:c({},t.data,{handleDrillDown:function a(e,t){n.props.router.push(i+"/"+r+"/"+t.ID+"/show")},handleEditRecord:function s(e,t){n.props.router.push(i+"/"+r+"/"+t+"/edit")
}})})
return p["default"].createElement(e,d({key:o.name},o))}return p["default"].createElement(e,d({key:t.name},t))}},{key:"addCampaign",value:function w(){var e=this.getActionRoute(0,"create")
return p["default"].createElement(e,c({key:o.name},o))}return p["default"].createElement(e,c({key:t.name},t))}},{key:"addCampaign",value:function _(){var e=this.getActionRoute(0,"create")
this.props.router.push(e)}},{key:"getActionRoute",value:function T(e,t){return this.props.sectionConfig.url+"/set/"+e+"/"+t}}]),t}(E["default"])
D.propTypes={breadcrumbsActions:p["default"].PropTypes.object.isRequired,campaignId:p["default"].PropTypes.string,sectionConfig:p["default"].PropTypes.object.isRequired,securityId:p["default"].PropTypes.string.isRequired,
view:p["default"].PropTypes.string},t["default"]=(0,g.withRouter)((0,h.connect)(l,u)(D))},function(e,t){e.exports=BreadcrumbsActions},function(e,t){e.exports=Breadcrumb},function(e,t){e.exports=Toolbar
@ -2443,9 +2426,9 @@ e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,wri
return e.records&&e.records[i]&&t.campaignId&&(n=e.records[i][parseInt(t.campaignId,10)]),{config:e.config,record:n||{},campaign:e.campaign,treeClass:i,breadcrumbs:e.breadcrumbs}}function u(e){return{breadcrumbsActions:(0,
m.bindActionCreators)(y,e),recordActions:(0,m.bindActionCreators)(_,e),campaignActions:(0,m.bindActionCreators)(C,e)}}Object.defineProperty(t,"__esModule",{value:!0})
var d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
m.bindActionCreators)(b,e),recordActions:(0,m.bindActionCreators)(w,e),campaignActions:(0,m.bindActionCreators)(C,e)}}Object.defineProperty(t,"__esModule",{value:!0})
var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},d=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),f=function q(e,t,n){null===e&&(e=Function.prototype)
@ -2453,10 +2436,10 @@ var i=Object.getOwnPropertyDescriptor(e,t)
if(void 0===i){var r=Object.getPrototypeOf(e)
return null===r?void 0:q(r,t,n)}if("value"in i)return i.value
var o=i.get
if(void 0!==o)return o.call(n)},p=n(4),h=r(p),m=n(28),g=n(27),v=n(177),y=i(v),b=n(47),_=i(b),w=n(181),C=i(w),T=n(20),E=r(T),P=n(182),O=r(P),S=n(183),k=r(S),j=n(185),x=r(j),R=n(179),I=r(R),F=n(174),A=r(F),D=n(186),M=r(D),N=n(178),U=r(N),L=n(187),B=r(L),H=n(94),$=r(H),V=function(e){
if(void 0!==o)return o.call(n)},p=n(4),h=r(p),m=n(32),g=n(31),v=n(178),b=i(v),y=n(49),w=i(y),_=n(182),C=i(_),T=n(20),E=r(T),P=n(183),O=r(P),S=n(184),k=r(S),j=n(186),x=r(j),R=n(180),I=r(R),A=n(175),F=r(A),D=n(187),M=r(D),N=n(179),U=r(N),L=n(188),B=r(L),H=n(96),$=r(H),V=function(e){
function t(e){o(this,t)
var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.handlePublish=n.handlePublish.bind(n),n.handleItemSelected=n.handleItemSelected.bind(n),n.setBreadcrumbs=n.setBreadcrumbs.bind(n),n}return s(t,e),c(t,[{key:"componentDidMount",value:function n(){
return n.handlePublish=n.handlePublish.bind(n),n.handleItemSelected=n.handleItemSelected.bind(n),n.setBreadcrumbs=n.setBreadcrumbs.bind(n),n}return s(t,e),d(t,[{key:"componentDidMount",value:function n(){
var e=this.props.itemListViewEndpoint.url.replace(/:id/,this.props.campaignId)
f(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this),this.setBreadcrumbs(),Object.keys(this.props.record).length||this.props.recordActions.fetchRecord(this.props.treeClass,"get",e).then(this.setBreadcrumbs)
@ -2464,14 +2447,14 @@ f(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",
e.push({text:this.props.record.Name,href:this.props.sectionConfig.url+"/set/"+this.props.campaignId+"/show"}),this.props.breadcrumbsActions.setBreadcrumbs(e)}}},{key:"render",value:function r(){var e=this,t=this.props.campaign.changeSetItemId,n=null,i=this.props.campaignId,r=this.props.record,o=this.groupItemsForSet(),a=[]
Object.keys(o).forEach(function(s){var l=o[s],u=l.items.length,d=[],c=u+" "+(1===u?l.singular:l.plural),f="Set_"+i+"_Group_"+s
Object.keys(o).forEach(function(s){var l=o[s],u=l.items.length,c=[],d=u+" "+(1===u?l.singular:l.plural),f="Set_"+i+"_Group_"+s
l.items.forEach(function(i){t||(t=i.ID)
var o=t===i.ID
o&&i._links&&(n=i._links)
var a=[]
"none"!==i.ChangeType&&"published"!==r.State||a.push("list-group-item--inactive"),o&&a.push("active"),d.push(h["default"].createElement(x["default"],{key:i.ID,className:a.join(" "),handleClick:e.handleItemSelected,
handleClickArg:i.ID},h["default"].createElement(M["default"],{item:i,campaign:e.props.record})))}),a.push(h["default"].createElement(k["default"],{key:f,groupid:f,title:c},d))})
var s=[this.props.config.baseUrl,this.props.config.sections["SilverStripe\\CMS\\Controllers\\CMSPagesController"].url].join("/"),l=a.length?h["default"].createElement(O["default"],null,a):h["default"].createElement("div",{
"none"!==i.ChangeType&&"published"!==r.State||a.push("list-group-item--inactive"),o&&a.push("active"),c.push(h["default"].createElement(x["default"],{key:i.ID,className:a.join(" "),handleClick:e.handleItemSelected,
handleClickArg:i.ID},h["default"].createElement(M["default"],{item:i,campaign:e.props.record})))}),a.push(h["default"].createElement(k["default"],{key:f,groupid:f,title:d},c))})
var s=[this.props.config.absoluteBaseUrl,this.props.config.sections["SilverStripe\\CMS\\Controllers\\CMSPagesController"].url].join(""),l=a.length?h["default"].createElement(O["default"],null,a):h["default"].createElement("div",{
className:"alert alert-warning",role:"alert"},h["default"].createElement("strong",null,"This campaign is empty.")," You can add pages by selecting"," ",h["default"].createElement("em",null,"Add to campaign")," from within the ",h["default"].createElement("em",null,"More Options")," popup on"," ","the ",h["default"].createElement("a",{
href:s},"edit page screen"),"."),u=["panel","panel--padded","panel--scrollable","flexbox-area-grow","campaign-items"]
return h["default"].createElement("div",{className:"fill-width campaigns"},h["default"].createElement("div",{className:"fill-height campaign-items cms-content__left cms-campaigns","aria-expanded":"true"
@ -2480,9 +2463,9 @@ className:u.join(" ")},l),h["default"].createElement("div",{className:"toolbar t
value:function l(e,t){this.props.campaignActions.selectChangeSetItem(t)}},{key:"renderButtonToolbar",value:function u(){var e=this.getItems()
if(!e||!e.length)return h["default"].createElement("div",{className:"btn-toolbar"})
var t={}
return"open"===this.props.record.State?t=d(t,{title:$["default"]._t("Campaigns.PUBLISHCAMPAIGN"),bootstrapButtonStyle:"primary",loading:this.props.campaign.isPublishing,handleClick:this.handlePublish,icon:"rocket"
}):"published"===this.props.record.State&&(t=d(t,{title:$["default"]._t("Campaigns.REVERTCAMPAIGN"),bootstrapButtonStyle:"default",icon:"back-in-time",disabled:!0})),h["default"].createElement("div",{className:"btn-toolbar"
},h["default"].createElement(A["default"],t))}},{key:"getItems",value:function p(){return this.props.record&&this.props.record._embedded?this.props.record._embedded.items:null}},{key:"groupItemsForSet",
return"open"===this.props.record.State?t=c(t,{title:$["default"]._t("Campaigns.PUBLISHCAMPAIGN"),bootstrapButtonStyle:"primary",loading:this.props.campaign.isPublishing,handleClick:this.handlePublish,icon:"rocket"
}):"published"===this.props.record.State&&(t=c(t,{title:$["default"]._t("Campaigns.REVERTCAMPAIGN"),bootstrapButtonStyle:"default",icon:"back-in-time",disabled:!0})),h["default"].createElement("div",{className:"btn-toolbar"
},h["default"].createElement(F["default"],t))}},{key:"getItems",value:function p(){return this.props.record&&this.props.record._embedded?this.props.record._embedded.items:null}},{key:"groupItemsForSet",
value:function m(){var e={},t=this.getItems()
return t?(t.forEach(function(t){var n=t.BaseClass
e[n]||(e[n]={singular:t.Singular,plural:t.Plural,items:[]}),e[n].items.push(t)}),e):e}},{key:"handlePublish",value:function g(e){e.preventDefault(),this.props.campaignActions.publishCampaign(this.props.publishApi,this.props.treeClass,this.props.campaignId)
@ -2493,9 +2476,9 @@ campaignActions:h["default"].PropTypes.object.isRequired,publishApi:h["default"]
sectionConfig:h["default"].PropTypes.object.isRequired,handleBackButtonClick:h["default"].PropTypes.func},t["default"]=(0,g.connect)(l,u)(V)},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e){return{type:l["default"].SET_CAMPAIGN_SELECTED_CHANGESETITEM,payload:{changeSetItemId:e}}}function o(e,t){return function(n){n({type:l["default"].SET_CAMPAIGN_ACTIVE_CHANGESET,
payload:{campaignId:e,view:t}})}}function a(e,t,n){return function(i){i({type:l["default"].PUBLISH_CAMPAIGN_REQUEST,payload:{campaignId:n}}),e({id:n}).then(function(e){i({type:l["default"].PUBLISH_CAMPAIGN_SUCCESS,
payload:{campaignId:n}}),i({type:d["default"].FETCH_RECORD_SUCCESS,payload:{recordType:t,data:e}})})["catch"](function(e){i({type:l["default"].PUBLISH_CAMPAIGN_FAILURE,payload:{error:e}})})}}Object.defineProperty(t,"__esModule",{
payload:{campaignId:n}}),i({type:c["default"].FETCH_RECORD_SUCCESS,payload:{recordType:t,data:e}})})["catch"](function(e){i({type:l["default"].PUBLISH_CAMPAIGN_FAILURE,payload:{error:e}})})}}Object.defineProperty(t,"__esModule",{
value:!0}),t.selectChangeSetItem=r,t.showCampaignView=o,t.publishCampaign=a
var s=n(157),l=i(s),u=n(48),d=i(u)},function(e,t,n){"use strict"
var s=n(158),l=i(s),u=n(50),c=i(u)},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -2503,9 +2486,9 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"render",value:function n(){return u["default"].createElement("div",{className:"accordion",
role:"tablist","aria-multiselectable":"true"},this.props.children)}}]),t}(c["default"])
role:"tablist","aria-multiselectable":"true"},this.props.children)}}]),t}(d["default"])
t["default"]=f},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -2514,14 +2497,14 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d)
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c)
n(184)
n(185)
var f=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"render",value:function n(){var e=this.props.groupid+"_Header",t=this.props.groupid+"_Items",n="#"+t,i={
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__block"},u["default"].createElement("a",{className:"accordion__title","data-toggle":"collapse",href:n,"aria-expanded":"true","aria-controls":t,
id:e,role:"tab"},this.props.title),u["default"].createElement("div",i,this.props.children))}}]),t}(c["default"])
id:e,role:"tab"},this.props.title),u["default"].createElement("div",i,this.props.children))}}]),t}(d["default"])
t["default"]=f},function(e,t){e.exports=BootstrapCollapse},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -2530,13 +2513,13 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=function(e){
function t(e){r(this,t)
var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))
return n.handleClick=n.handleClick.bind(n),n}return a(t,e),s(t,[{key:"render",value:function n(){var e="list-group-item "+this.props.className
return u["default"].createElement("a",{tabIndex:"0",className:e,onClick:this.handleClick},this.props.children)}},{key:"handleClick",value:function i(e){this.props.handleClick&&this.props.handleClick(e,this.props.handleClickArg)
}}]),t}(c["default"])
}}]),t}(d["default"])
f.propTypes={handleClickArg:u["default"].PropTypes.any,handleClick:u["default"].PropTypes.func},t["default"]=f},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -2545,7 +2528,7 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(20),c=i(d),f=n(94),p=i(f),h=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(20),d=i(c),f=n(96),p=i(f),h=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"render",value:function n(){var e=null,t={},n=this.props.item,i=this.props.campaign
@ -2559,7 +2542,7 @@ case"none":default:t.className="label label-success list-group-item__status",t.T
},"3 linked items")
return n.Thumbnail&&(e=u["default"].createElement("span",{className:"list-group-item__thumbnail"},u["default"].createElement("img",{alt:n.Title,src:n.Thumbnail}))),u["default"].createElement("div",null,e,u["default"].createElement("h4",{
className:"list-group-item-heading"},n.Title),u["default"].createElement("span",{className:"list-group-item__info campaign-admin__item-links--is-linked font-icon-link"}),r,t.className&&t.Title&&u["default"].createElement("span",{
className:t.className},t.Title))}}]),t}(c["default"])
className:t.className},t.Title))}}]),t}(d["default"])
h.propTypes={campaign:u["default"].PropTypes.object.isRequired,item:u["default"].PropTypes.object.isRequired},t["default"]=h},function(e,t,n){"use strict"
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
@ -2568,13 +2551,13 @@ return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("funct
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{
value:!0})
var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),d=n(94),c=i(d),f=n(20),p=i(f),h=function(e){
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(4),u=i(l),c=n(96),d=i(c),f=n(20),p=i(f),h=function(e){
function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"render",value:function n(){var e=null,t=null,n=""
this.props.itemLinks&&this.props.itemLinks.preview&&(this.props.itemLinks.preview.Stage?(t=this.props.itemLinks.preview.Stage.href,n=this.props.itemLinks.preview.Stage.type):this.props.itemLinks.preview.Live&&(t=this.props.itemLinks.preview.Live.href,
n=this.props.itemLinks.preview.Live.type))
var i=null,r="edit",o=[]
return this.props.itemLinks&&this.props.itemLinks.edit&&(i=this.props.itemLinks.edit.href,o.push(u["default"].createElement("a",{key:r,href:i,className:"btn btn-secondary-outline font-icon-edit"},u["default"].createElement("span",{
className:"btn__title"},c["default"]._t("Preview.EDIT","Edit"))))),e=this.props.itemId?t?n&&0===n.indexOf("image/")?u["default"].createElement("div",{className:"preview__file-container panel--scrollable"
className:"btn__title"},d["default"]._t("Preview.EDIT","Edit"))))),e=this.props.itemId?t?n&&0===n.indexOf("image/")?u["default"].createElement("div",{className:"preview__file-container panel--scrollable"
},u["default"].createElement("img",{alt:t,className:"preview__file--fits-space",src:t})):u["default"].createElement("iframe",{className:"flexbox-area-grow preview__iframe",src:t}):u["default"].createElement("div",{
className:"preview__overlay"},u["default"].createElement("h3",{className:"preview__overlay-text"},"There is no preview available for this item.")):u["default"].createElement("div",{className:"preview__overlay"
},u["default"].createElement("h3",{className:"preview__overlay-text"},"No preview available.")),u["default"].createElement("div",{className:"flexbox-area-grow fill-height cms-content__right preview"},e,u["default"].createElement("a",{

File diff suppressed because one or more lines are too long

View File

@ -1,25 +1,28 @@
import BootRoutes from './BootRoutes';
import { combineReducers, createStore, applyMiddleware, compose } from 'redux';
import thunkMiddleware from 'redux-thunk';
import { reducer as ReduxFormReducer } from 'redux-form';
import { routerReducer } from 'react-router-redux';
import Config from 'lib/Config';
import reducerRegister from 'lib/ReducerRegister';
import * as configActions from 'state/config/ConfigActions';
import ConfigReducer from 'state/config/ConfigReducer';
import FormReducer from 'state/form/FormReducer';
import SchemaReducer from 'state/schema/SchemaReducer';
import RecordsReducer from 'state/records/RecordsReducer';
import CampaignReducer from 'state/campaign/CampaignReducer';
import BreadcrumbsReducer from 'state/breadcrumbs/BreadcrumbsReducer';
import { routerReducer } from 'react-router-redux';
import bootInjector from 'boot/BootInjector';
// Sections
// eslint-disable-next-line no-unused-vars
import CampaignAdmin from 'containers/CampaignAdmin/controller';
import es6promise from 'es6-promise';
es6promise.polyfill();
function appBoot() {
reducerRegister.add('config', ConfigReducer);
reducerRegister.add('form', FormReducer);
reducerRegister.add('form', ReduxFormReducer);
reducerRegister.add('schemas', SchemaReducer);
reducerRegister.add('records', RecordsReducer);
reducerRegister.add('campaign', CampaignReducer);

View File

@ -5,6 +5,7 @@ require('expose?Form!components/Form/Form');
require('expose?FormConstants!components/Form/FormConstants');
require('expose?FormAction!components/FormAction/FormAction');
require('expose?FormBuilder!components/FormBuilder/FormBuilder');
require('expose?FormBuilderLoader!containers/FormBuilderLoader/FormBuilderLoader');
require('expose?FormBuilderModal!components/FormBuilderModal/FormBuilderModal');
require('expose?GridField!components/GridField/GridField');
require('expose?GridFieldCell!components/GridField/GridFieldCell');

View File

@ -17,6 +17,7 @@ require('expose?Tether!tether');
require('expose?ReactDom!react-dom');
require('expose?Redux!redux');
require('expose?ReactRedux!react-redux');
require('expose?ReduxForm!redux-form');
require('expose?ReduxThunk!redux-thunk');
require('expose?ReactRouter!react-router');
require('expose?ReactRouterRedux!react-router-redux');

View File

@ -65,7 +65,7 @@ class CheckboxSetField extends SilverStripeComponent {
})
.map((item) => `${item.value}`);
this.props.onChange(event, { id: this.props.id, value: newValue });
this.props.onChange(newValue);
}
}

View File

@ -90,8 +90,7 @@ describe('CheckboxSetField', () => {
checkboxSetField.handleChange(event, { id: 'checkbox-two', value: 1 });
expect(checkboxSetField.props.onChange).toBeCalledWith(
event,
{ id: 'checkbox', value: ['one', 'two', 'four'] }
['one', 'two', 'four']
);
});
@ -101,8 +100,7 @@ describe('CheckboxSetField', () => {
checkboxSetField.handleChange(event, { id: 'checkbox-one', value: 0 });
expect(checkboxSetField.props.onChange).toBeCalledWith(
event,
{ id: 'checkbox', value: ['four'] }
['four']
);
});
});

View File

@ -8,21 +8,15 @@ class Form extends SilverStripeComponent {
this.handleSubmit = this.handleSubmit.bind(this);
}
componentWillUnmount() {
if (typeof this.props.componentWillUnmount === 'undefined') {
return;
}
this.props.componentWillUnmount(this.props.formId);
}
render() {
const defaultFormProps = {
className: 'form',
onSubmit: this.handleSubmit,
};
const formProps = Object.assign({}, defaultFormProps, this.props.attributes);
const formProps = Object.assign(
{},
{
className: 'form',
onSubmit: this.handleSubmit,
},
this.props.attributes
);
const fields = this.props.mapFieldsToComponents(this.props.fields);
const actions = this.props.mapActionsToComponents(this.props.actions);
@ -62,10 +56,7 @@ Form.propTypes = {
id: React.PropTypes.string,
method: React.PropTypes.string.isRequired,
}),
componentWillUnmount: React.PropTypes.func,
data: React.PropTypes.array,
fields: React.PropTypes.array.isRequired,
formId: React.PropTypes.string.isRequired,
handleSubmit: React.PropTypes.func,
mapActionsToComponents: React.PropTypes.func.isRequired,
mapFieldsToComponents: React.PropTypes.func.isRequired,

View File

@ -1,8 +1,8 @@
# Form Component
The FormComponent is used to render forms in SilverStripe. The only time you should need to use `FormComponent` directly is when you're composing custom layouts. Forms can be automatically generated from a schema using the `FormBuilder` component.
This component should be moved to Framework when dependency injection is implemented.
The `Form` component is used to render forms in SilverStripe.
The only time you should need to use `FormComponent` directly is when you're composing custom layouts.
Forms can be automatically generated from a schema using the `FormBuilder` component.
## Properties
@ -19,8 +19,6 @@ attributes = {
}
```
* `componentWillUnmount` (func): Optional function which will be called in the component's 'native' `componentWillUnmount` method. This can be used to tidy up Redux state that's no longer required.
* `data` (object) (required): Extra data that helps define this field uniquely.
* `fields` (required): A list of field objects to display in the form. These objects should be transformed to Components using the `this.props.mapFieldsToComponents` method.
* `mapFieldsToComponents` (required): A function that maps each schema field (`this.props.fields`) to the component responsibe for render it.
* `handleSubmit` (func): Called then the form is submitted.

View File

@ -28,6 +28,7 @@ class FormAction extends SilverStripeComponent {
typeof this.props.attributes === 'undefined' ? {} : this.props.attributes,
{
id: this.props.id,
name: this.props.name,
className: this.getButtonClasses(),
disabled: this.props.disabled,
onClick: this.handleClick,

View File

@ -1,197 +1,45 @@
import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as formActions from 'state/form/FormActions';
import * as schemaActions from 'state/schema/SchemaActions';
import React, { PropTypes } from 'react';
import SilverStripeComponent from 'lib/SilverStripeComponent';
import Form from 'components/Form/Form';
import fetch from 'isomorphic-fetch';
import backend from 'lib/Backend';
import injector from 'lib/Injector';
import merge from 'merge';
import es6promise from 'es6-promise';
es6promise.polyfill();
export class FormBuilderComponent extends SilverStripeComponent {
class FormBuilder extends SilverStripeComponent {
constructor(props) {
super(props);
this.formSchemaPromise = null;
this.state = { isFetching: false };
const schemaStructure = props.schema.schema;
this.state = { submittingAction: null };
this.submitApi = backend.createEndpointFetcher({
url: schemaStructure.attributes.action,
method: schemaStructure.attributes.method,
});
this.mapActionsToComponents = this.mapActionsToComponents.bind(this);
this.mapFieldsToComponents = this.mapFieldsToComponents.bind(this);
this.handleFieldUpdate = this.handleFieldUpdate.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
this.handleAction = this.handleAction.bind(this);
this.removeForm = this.removeForm.bind(this);
this.getFormId = this.getFormId.bind(this);
this.getFormSchema = this.getFormSchema.bind(this);
this.findField = this.findField.bind(this);
}
/**
* Get the schema for this form
*
* @returns {array}
*/
getFormSchema() {
return this.props.schemas[this.props.schemaUrl];
}
/**
* Gets the ID for this form
*
* @returns {String}
*/
getFormId() {
const schema = this.getFormSchema();
if (schema) {
return schema.id;
}
return null;
}
componentDidMount() {
this.fetch();
}
componentDidUpdate(prevProps) {
if (this.props.schemaUrl !== prevProps.schemaUrl) {
this.fetch();
}
}
/**
* Fetches data used to generate a form. This can be form schema and or form state data.
* When the response comes back the data is saved to state.
*
* @param {Boolean} schema If form schema data should be returned in the response.
* @param {Boolean} state If form state data should be returned in the response.
*
* @return {Object} Promise from the AJAX request.
*/
fetch(schema = true, state = true) {
const headerValues = [];
if (this.state.isFetching === true) {
return this.formSchemaPromise;
}
if (schema === true) {
headerValues.push('schema');
}
if (state === true) {
headerValues.push('state');
}
this.formSchemaPromise = fetch(this.props.schemaUrl, {
headers: { 'X-FormSchema-Request': headerValues.join() },
credentials: 'same-origin',
})
.then(response => response.json())
.then(json => {
const formSchema = Object.assign({}, { id: json.id, schema: json.schema });
const formState = Object.assign({}, json.state);
// TODO See "Enable once <CampaignAdmin> ..." below
// this.setState({ isFetching: false });
if (typeof formSchema.id !== 'undefined') {
const defaultData = {
SecurityID: this.props.config.SecurityID,
};
this.submitApi = (...args) => {
const endPoint = backend.createEndpointFetcher({
url: formSchema.schema.attributes.action,
method: formSchema.schema.attributes.method,
defaultData,
});
// Ensure that schema changes are handled prior to updating state
return endPoint(...args)
.then((response) => {
if (response.schema) {
const newSchema = Object.assign({}, { id: response.id, schema: response.schema });
this.props.schemaActions.setSchema(newSchema);
}
return response;
});
};
this.props.schemaActions.setSchema(formSchema);
}
if (typeof formState.id !== 'undefined') {
this.props.formActions.addForm(formState);
}
});
// TODO Enable once <CampaignAdmin> is initialised via page.js route callbacks
// At the moment, it's running an Entwine onadd() rule which ends up
// rendering the index view, and only then calling route.start() to
// match the detail view (admin/campaigns/set/:id/show).
// This causes the form builder to be unmounted during a fetch() call.
// this.setState({ isFetching: true });
return this.formSchemaPromise;
}
/**
* Update handler passed down to each form field as a prop.
* Form fields call this method when their state changes.
*
* You can pass an optional callback as the third param. This can be used to
* implement custom behaviour. For example you can use `createFn` hook from
* your controller context like this.
*
* controller.js
* ...
* detailEditFormCreateFn(Component, props) {
* const extendedProps = Object.assign({}, props, {
* handleFieldUpdate: (event, updates) => {
* props.handleFieldUpdate(event, updates, (formId, updateFieldAction) => {
* const customUpdates = Object.assign({}, updates, {
* value: someCustomParsing(updates.value),
* };
*
* updateFieldAction(formId, customUpdates);
* });
* },
* });
*
* return <Component {...extendedProps} />;
* }
* ...
*
* @param {object} event - Change event from the form field component.
* @param {object} updates - Values to set in state.
* @param {string} updates.id - Field ID. Required to identify the field in the store.
* @param {function} [fn] - Optional function for custom behaviour. See example in description.
*/
handleFieldUpdate(event, updates, fn) {
if (typeof fn === 'function') {
fn(this.getFormId(), this.props.formActions.updateField);
} else {
this.props.formActions.updateField(this.getFormId(), updates);
}
this.buildComponent = this.buildComponent.bind(this);
}
/**
* When the action is clicked on, records which action was clicked on
* This can allow for preventing the submit action, such as a custom action for the button
*
* @param event
* @param submitAction
* @param {Event} event
*/
handleAction(event, submitAction) {
this.props.formActions.setSubmitAction(this.getFormId(), submitAction);
handleAction(event) {
// Custom handlers
if (typeof this.props.handleAction === 'function') {
this.props.handleAction(event, submitAction, this.getFieldValues());
this.props.handleAction(event, this.getFieldValues());
}
const name = event.currentTarget.name;
// Allow custom handlers to cancel event
if (!event.isPropagationStopped()) {
this.setState({ submittingAction: name });
}
}
@ -199,48 +47,45 @@ export class FormBuilderComponent extends SilverStripeComponent {
* Form submission handler passed to the Form Component as a prop.
* Provides a hook for controllers to access for state and provide custom functionality.
*
* For example:
*
* controller.js
* ```
* constructor(props) {
* super(props);
* this.handleSubmit = this.handleSubmit.bind(this);
* }
*
* handleSubmit(event, fieldValues, submitFn) {
* event.preventDefault();
*
* // Apply custom validation.
* if (!this.validate(fieldValues)) {
* return;
* }
*
* submitFn();
* }
*
* render() {
* return <FormBuilder handleSubmit={this.handleSubmit} />
* }
* ```
*
* @param {Object} event
* @param {Object} data Processed and validated data from redux-form
* (originally retrieved through getFieldValues())
* @return {Promise|null}
*/
handleSubmit(event) {
const fieldValues = this.getFieldValues();
handleSubmit(data) {
// Add form action data (or default to first action, same as browser behaviour)
const action = this.state.submittingAction
? this.state.submittingAction
: this.props.schema.schema.actions[0].name;
const submitFn = () => this.props.formActions.submitForm(
this.submitApi,
this.getFormId(),
fieldValues
);
const dataWithAction = Object.assign({}, data, {
[action]: 1,
});
const headers = {
'X-Formschema-Request': 'state,schema',
'X-Requested-With': 'XMLHttpRequest',
};
if (typeof this.props.handleSubmit !== 'undefined') {
return this.props.handleSubmit(event, fieldValues, submitFn);
const resetSubmittingFn = () => {
this.setState({ submittingAction: null });
};
const submitFn = (customData) =>
this.submitApi(customData || dataWithAction, headers)
.then(formSchema => {
resetSubmittingFn();
return formSchema;
})
.catch((reason) => {
// TODO Generic CMS error reporting
// TODO Handle validation errors
resetSubmittingFn();
return reason;
});
if (typeof this.props.handleSubmit === 'function') {
return this.props.handleSubmit(dataWithAction, action, submitFn);
}
event.preventDefault();
return submitFn();
}
@ -250,35 +95,31 @@ export class FormBuilderComponent extends SilverStripeComponent {
* @returns {Object}
*/
getFieldValues() {
const schema = this.props.schemas[this.props.schemaUrl];
// using state is more efficient and has the same fields, fallback to nested schema
const fields = (schema.state)
? schema.state.fields
: schema.schema.fields;
const schema = this.props.schema.schema;
const state = this.props.schema.state;
// Set action
const action = this.getSubmitAction();
const values = {};
if (action) {
values[action] = 1;
if (!state) {
return {};
}
// Reduce all other fields
return this.props.form[this.getFormId()].fields
return state.fields
.reduce((prev, curr) => {
const match = this.findField(fields, curr.id);
const match = this.findField(schema.fields, curr.id);
if (!match) {
return prev;
}
// Skip non-data fields
if (match.type === 'Structural' || match.readOnly === true) {
return prev;
}
return Object.assign({}, prev, {
[match.name]: curr.value,
});
}, values);
}
getSubmitAction() {
return this.props.form[this.getFormId()].submitAction;
}, {});
}
/**
@ -309,39 +150,42 @@ export class FormBuilderComponent extends SilverStripeComponent {
/**
* Common functionality for building a Field or Action from schema.
*
* @param field
* @param extraProps
* @param {Object} props Props which every form field receives. Leave it up to the
* schema and component to determine which props are required.
* @returns {*}
*/
buildComponent(field, extraProps = {}) {
const Component = field.component !== null
? injector.getComponentByName(field.component)
: injector.getComponentByDataType(field.type);
buildComponent(props) {
let componentProps = props;
// 'component' key is renamed to 'schemaComponent' in normalize*() methods
const SchemaComponent = componentProps.schemaComponent !== null
? injector.getComponentByName(componentProps.schemaComponent)
: injector.getComponentByDataType(componentProps.type);
if (Component === null) {
if (SchemaComponent === null) {
return null;
} else if (field.component !== null && Component === undefined) {
throw Error(`Component not found in injector: ${field.component}`);
} else if (componentProps.schemaComponent !== null && SchemaComponent === undefined) {
throw Error(`Component not found in injector: ${componentProps.schemaComponent}`);
}
// Props which every form field receives.
// Leave it up to the schema and component to determine
// which props are required.
const props = Object.assign({}, field, extraProps);
// if no value, it is better to unset it
if (props.value === null) {
delete props.value;
if (componentProps.value === null) {
delete componentProps.value;
}
// Inline `input` props into main field props
// (each component can pick and choose the props required for it's <input>
// See http://redux-form.com/6.0.5/docs/api/Field.md/#input-props
componentProps = Object.assign({}, componentProps, componentProps.input);
delete componentProps.input;
// Provides container components a place to hook in
// and apply customisations to scaffolded components.
const createFn = this.props.createFn;
if (typeof createFn === 'function') {
return createFn(Component, props);
return createFn(SchemaComponent, componentProps);
}
return <Component key={props.id} {...props} />;
return <SchemaComponent key={componentProps.id} {...componentProps} />;
}
/**
@ -353,16 +197,25 @@ export class FormBuilderComponent extends SilverStripeComponent {
* @return {Array}
*/
mapFieldsToComponents(fields) {
const FieldComponent = this.props.baseFieldComponent;
return fields.map((field) => {
// Events
const extraProps = { onChange: this.handleFieldUpdate };
let props = field;
// Build child nodes
if (field.children) {
extraProps.children = this.mapFieldsToComponents(field.children);
props = Object.assign(
{},
field,
{ children: this.mapFieldsToComponents(field.children) }
);
}
return this.buildComponent(field, extraProps);
// Don't wrap structural or readonly fields, since they don't need connected fields.
// The redux-form connected fields also messed up react-bootstrap's tab handling.
if (field.type === 'Structural' || field.readOnly === true) {
return this.buildComponent(props);
}
return <FieldComponent key={props.id} {...props} component={this.buildComponent} />;
});
}
@ -373,23 +226,21 @@ export class FormBuilderComponent extends SilverStripeComponent {
* @return {Array}
*/
mapActionsToComponents(actions) {
const form = this.props.form[this.getFormId()];
return actions.map((action) => {
const loading = (form && form.submitting && form.submitAction === action.name);
// Events
const extraProps = {
handleClick: this.handleAction,
loading,
disabled: loading || action.disabled,
};
const props = Object.assign({}, action);
// Build child nodes
if (action.children) {
extraProps.children = this.mapActionsToComponents(action.children);
props.children = this.mapActionsToComponents(action.children);
} else {
props.handleClick = this.handleAction;
// Reset through componentWillReceiveProps()
if (this.state.submittingAction === action.name) {
props.loading = true;
}
}
return this.buildComponent(action, extraProps);
return this.buildComponent(props);
});
}
@ -416,32 +267,54 @@ export class FormBuilderComponent extends SilverStripeComponent {
});
}
/**
* Cleans up Redux state used by the form when the Form component is unmonuted.
* If there is structural and state data available merge those data for each field.
* Otherwise just use the structural data. Ensure that keys don't conflict
* with redux-form expectations.
*
* @param {string} formId - ID of the form to clean up.
* @param {array} fields
* @param {Object} state Optional
* @return {array}
*/
removeForm(formId) {
this.props.formActions.removeForm(formId);
normalizeFields(fields, state) {
return fields.map((field) => {
const fieldState = (state && state.fields)
? state.fields.find((item) => item.id === field.id)
: {};
const data = merge.recursive(
true,
this.mergeFieldData(field, fieldState),
// Overlap with redux-form prop handling : createFieldProps filters out the 'component' key
{ schemaComponent: field.component }
);
if (field.children) {
data.children = this.normalizeFields(field.children, state);
}
return data;
});
}
/**
* If there is structural and state data availabe merge those data for each field.
* Otherwise just use the structural data.
* Ensure that keys don't conflict with redux-form expectations.
*
* @param {array} actions
* @return {array}
*/
getFieldData(formFields, formState) {
if (!formFields || !formState || !formState.fields) {
return formFields;
}
normalizeActions(actions) {
return actions.map((action) => {
const data = merge.recursive(
true,
action,
// Overlap with redux-form prop handling : createFieldProps filters out the 'component' key
{ schemaComponent: action.component }
);
return formFields.map((field) => {
const state = formState.fields.find((item) => item.id === field.id);
const data = this.mergeFieldData(field, state);
if (field.children) {
return Object.assign({}, data, {
children: this.getFieldData(field.children, formState),
});
if (action.children) {
data.children = this.normalizeActions(action.children);
}
return data;
@ -449,73 +322,89 @@ export class FormBuilderComponent extends SilverStripeComponent {
}
render() {
const formId = this.getFormId();
if (!formId) {
return null;
}
const formSchema = this.getFormSchema();
const formState = this.props.form[formId];
// If the response from fetching the initial data
// hasn't come back yet, don't render anything.
if (!formSchema || !formSchema.schema) {
return null;
}
const schema = this.props.schema.schema;
const state = this.props.schema.state;
const BaseFormComponent = this.props.baseFormComponent;
// Map form schema to React component attribute names,
// which requires renaming some of them (by unsetting the original keys)
const attributes = Object.assign({}, formSchema.schema.attributes, {
className: formSchema.schema.attributes.class,
encType: formSchema.schema.attributes.enctype,
const attributes = Object.assign({}, schema.attributes, {
className: schema.attributes.class,
encType: schema.attributes.enctype,
});
// these two still cause silent errors
delete attributes.class;
delete attributes.enctype;
const fieldData = this.getFieldData(formSchema.schema.fields, formState);
const actionData = this.getFieldData(formSchema.schema.actions, formState);
const {
asyncValidate,
onSubmitFail,
onSubmitSuccess,
shouldAsyncValidate,
touchOnBlur,
touchOnChange,
persistentSubmitErrors,
validate,
form,
} = this.props;
const formProps = {
actions: actionData,
const props = {
form, // required as redux-form identifier
fields: this.normalizeFields(schema.fields, state),
actions: this.normalizeActions(schema.actions),
attributes,
componentWillUnmount: this.removeForm,
data: formSchema.schema.data,
fields: fieldData,
formId,
handleSubmit: this.handleSubmit,
data: schema.data,
initialValues: this.getFieldValues(),
onSubmit: this.handleSubmit,
mapActionsToComponents: this.mapActionsToComponents,
mapFieldsToComponents: this.mapFieldsToComponents,
asyncValidate,
onSubmitFail,
onSubmitSuccess,
shouldAsyncValidate,
touchOnBlur,
touchOnChange,
persistentSubmitErrors,
validate,
};
return <Form {...formProps} />;
return <BaseFormComponent {...props} />;
}
}
FormBuilderComponent.propTypes = {
config: React.PropTypes.object,
createFn: React.PropTypes.func,
form: React.PropTypes.object.isRequired,
formActions: React.PropTypes.object.isRequired,
handleSubmit: React.PropTypes.func,
handleAction: React.PropTypes.func,
schemas: React.PropTypes.object.isRequired,
schemaActions: React.PropTypes.object.isRequired,
schemaUrl: React.PropTypes.string.isRequired,
const schemaPropType = PropTypes.shape({
id: PropTypes.string.isRequired,
schema: PropTypes.shape({
attributes: PropTypes.shape({
class: PropTypes.string,
enctype: PropTypes.string,
}),
fields: PropTypes.array.isRequired,
}).isRequired,
state: PropTypes.shape({
fields: PropTypes.array,
}),
});
const basePropTypes = {
createFn: PropTypes.func,
handleSubmit: PropTypes.func,
handleAction: PropTypes.func,
asyncValidate: PropTypes.func,
onSubmitFail: PropTypes.func,
onSubmitSuccess: PropTypes.func,
shouldAsyncValidate: PropTypes.func,
touchOnBlur: PropTypes.bool,
touchOnChange: PropTypes.bool,
persistentSubmitErrors: PropTypes.bool,
validate: PropTypes.func,
baseFormComponent: PropTypes.func.isRequired,
baseFieldComponent: PropTypes.func.isRequired,
};
function mapStateToProps(state) {
return {
config: state.config,
form: state.form,
schemas: state.schemas,
};
}
FormBuilder.propTypes = Object.assign({}, basePropTypes, {
form: PropTypes.string.isRequired,
schema: schemaPropType.isRequired,
});
function mapDispatchToProps(dispatch) {
return {
formActions: bindActionCreators(formActions, dispatch),
schemaActions: bindActionCreators(schemaActions, dispatch),
};
}
export default connect(mapStateToProps, mapDispatchToProps)(FormBuilderComponent);
export { basePropTypes, schemaPropType };
export default FormBuilder;

View File

@ -1,15 +1,90 @@
# FormBuilder Component
Used to generate forms, made up of field components and actions, from FormFieldSchema data.
Used to generate forms, made up of field components and actions, from form schema data.
This component will be moved to Framweork or CMS when dependency injection is implemented.
Forms are usually rendered through [redux-form](http://redux-form.com/),
although this can be controlled through the `baseFormComponent`
and `baseFieldComponent` props.
If you want to load the schema from a server via XHR, use the
[FormBuilderLoader](../../containers/FormBuilderLoader/README.md] instead.
## Properties
* `createFn` (function): Gives container components a chance to access a form component before it's constructed. Use this as an opportunity to pass a custom click handler to to a field for example.
* `schemaUrl` (string): The schema URL where the form will be scaffolded from e.g. '/admin/pages/schema/1'.
* `handleSubmit` (function): Event handler passed to the Form Component as a prop. Parameters received are:
* `event` (Event): The submit event, it is strongly recommended to call `preventDefault()`
* `fieldValues` (object): An object containing the field values captured by the Submit handler
* `submitFn` (function): A callback for when the submission was successful, if submission fails, this function should not be called. (e.g. validation error)
* `handleAction` (function): Event handler when a form action is clicked on, allows preventing submit and know which action was clicked on.
* `form` (string): Form identifier (useful to reference this form through redux selectors)
* `baseFormComponent` (function): A React component to render the form
* `baseFieldComponent` (function): A React component to render each field. Should be a HOC which receives
the actual field builder through a `component` prop.
* `schema` (object): A form schema (see "Schema Structure" below)
* `createFn` (function): Gives container components a chance to access a form component before it's constructed.
Use this as an opportunity to pass a custom click handler to to a field for example.
* `handleSubmit` (function): Event handler passed to the Form Component as a prop.
Should return a promise (usually the result of the `submitFn` argument). Parameters received are:
* `data` (object): An object containing the field values captured by the submit handler
* `action` (string): The name of the button clicked to perform this action.
Defaults to first button when form is submitted by pressing the "enter" key.
* `submitFn` (function): A callback for when the submission was successful, if submission fails,
this function should not be called. (e.g. validation error). Pass in your modified `data`
to influence the data being sent through.
* `handleAction` (function): Event handler when a form action is clicked on, allows preventing submit and know which action was clicked on. Arguments:
* `event` (function) Allows cancellation of the submission through `event.stopPropagation()`.
The action can be identified via `event.currentTarget.name`.
* `data` (object): Validated and processed field values, ready for submission
* `asyncValidate` (function): See [redux-form](http://redux-form.com/6.0.5/docs/api/ReduxForm.md/)
* `onSubmitFail` (function): See [redux-form](http://redux-form.com/6.0.5/docs/api/ReduxForm.md/)
* `onSubmitSuccess` (function): See [redux-form](http://redux-form.com/6.0.5/docs/api/ReduxForm.md/)
* `shouldAsyncValidate` (function): See [redux-form](http://redux-form.com/6.0.5/docs/api/ReduxForm.md/)
* `touchOnBlur` (bool): See [redux-form](http://redux-form.com/6.0.5/docs/api/ReduxForm.md/)
* `touchOnChange` (bool): See [redux-form](http://redux-form.com/6.0.5/docs/api/ReduxForm.md/)
* `persistentSubmitErrors` (bool): See [redux-form](http://redux-form.com/6.0.5/docs/api/ReduxForm.md/)
* `validate` (function): See [redux-form](http://redux-form.com/6.0.5/docs/api/ReduxForm.md/)
## Schema Structure
The `schema` prop expects a particular structure, containing the form structure
in a `schema` key, and the form values in a `state` key.
See [RFC: FormField React Integration API](https://github.com/silverstripe/silverstripe-framework/issues/4938) for details.
## Example
```js
import { Field as ReduxFormField, reduxForm } from 'redux-form';
class MyComponent extends Component {
constructor(props) {
super(props);
this.handleSubmit = this.handleSubmit.bind(this);
}
handleSubmit(data, action, submitFn) {
// You can implement custom submission handling and data processing here.
// Ensure to always return a promise if you want execution to continue.
if (!this.myCheck(data)) {
return;
}
return submitFn();
}
render() {
const props = {
form: 'MyForm',
schema: { /* ... */ },
baseFormComponent: reduxForm()(Form),
baseFieldComponent: ReduxFormField,
handleSubmit: this.handleSubmit
};
return <FormBuilder {...props} />
}
}
```
With the default implementation of [redux-form](http://http://redux-form.com)
(passed in through `baseFormComponent` and `baseFieldComponent`),
the submission process works as follows:
1. `<FormBuilder>` passes it's `handleSubmit` to `reduxForm()` as an `onSubmit` prop
1. `reduxForm()` passes it's own `handleSubmit` to `<Form>`
1. `<Form>` sets `<Form onSubmit={this.props.handleSubmit}>`
1. `<Form>` calls `reduxForm()` own `handleSubmit()`, which does normalisation and validation
1. `reduxForm()` calls its `onSubmit` prop, which is set to `<FormBuilder>` `handleSubmit()`
1. `<FormBuilder>` either submits the form, or calls it's own overloaded `handleSubmit()` prop
See [handleSubmit](http://redux-form.com/6.0.5/docs/api/Props.md#-handlesubmit-eventorsubmit-function-)
in the redux-form docs for more details.

View File

@ -3,23 +3,39 @@
jest.unmock('merge');
jest.unmock('lib/SilverStripeComponent');
jest.unmock('../FormBuilder');
jest.unmock('redux-form');
import { FormBuilderComponent } from '../FormBuilder';
const React = require('react');
import ReactTestUtils from 'react-addons-test-utils';
import FormBuilder from '../FormBuilder';
describe('FormBuilder', () => {
const baseProps = {
form: 'MyForm',
baseFormComponent: () => <form />,
baseFieldComponent: (props) => {
// eslint-disable-next-line react/prop-types
const Component = props.component;
return <Component {...props} />;
},
schema: {
id: 'MyForm',
schema: {
attributes: {},
fields: [],
actions: [],
},
state: {
fields: [],
},
},
};
describe('FormBuilderComponent', () => {
describe('mergeFieldData()', () => {
let formBuilder = null;
beforeEach(() => {
const props = {
form: {},
formActions: {},
schemas: {},
schemaActions: {},
schemaUrl: 'admin/assets/schema/1',
};
formBuilder = new FormBuilderComponent(props);
formBuilder = new FormBuilder(baseProps);
});
it('should deep merge properties on the originalobject', () => {
@ -57,40 +73,22 @@ describe('FormBuilderComponent', () => {
describe('getFieldValues()', () => {
let formBuilder = null;
let fieldValues = null;
let props = null;
const props = Object.assign({}, baseProps);
it('should retrieve field values based on schema', () => {
props = {
form: {
MyForm: {
submitAction: 'action_save',
fields: [
{ id: 'fieldOne', value: 'valOne' },
{ id: 'fieldTwo', value: null },
{ id: 'notInSchema', value: 'invalid' },
],
},
},
formActions: {},
schemas: {
'admin/assets/schema/1': {
id: 'MyForm',
schema: {
fields: [
{ id: 'fieldOne', name: 'fieldOne' },
{ id: 'fieldTwo', name: 'fieldTwo' },
],
},
},
},
schemaActions: {},
schemaUrl: 'admin/assets/schema/1',
};
formBuilder = new FormBuilderComponent(props);
props.schema.schema.fields = [
{ id: 'fieldOne', name: 'fieldOne' },
{ id: 'fieldTwo', name: 'fieldTwo' },
];
props.schema.state.fields = [
{ id: 'fieldOne', value: 'valOne' },
{ id: 'fieldTwo', value: null },
{ id: 'notInSchema', value: 'invalid' },
];
formBuilder = new FormBuilder(baseProps);
fieldValues = formBuilder.getFieldValues();
expect(fieldValues).toEqual({
action_save: 1,
fieldOne: 'valOne',
fieldTwo: null,
});
@ -100,23 +98,9 @@ describe('FormBuilderComponent', () => {
describe('findField()', () => {
let formBuilder = null;
let fields = null;
const props = {
form: {
myForm: {},
formActions: {},
schemas: {
'admin/assets/schema/1': {
id: 'myForm',
schema: {},
},
},
schemaActions: {},
schemaUrl: 'admin/assets/schema/1',
},
};
beforeEach(() => {
formBuilder = new FormBuilderComponent(props);
formBuilder = new FormBuilder(baseProps);
});
it('should retrieve the field in the shallow fields list', () => {
@ -152,4 +136,61 @@ describe('FormBuilderComponent', () => {
expect(field.id).toBe('fieldTwoThree');
});
});
describe('handleSubmit', () => {
let formBuilder = null;
const props = baseProps;
beforeEach(() => {
formBuilder = ReactTestUtils.renderIntoDocument(<FormBuilder {...props} />);
props.schema.schema.fields = [
{ id: 'fieldOne', name: 'fieldOne' },
{ id: 'fieldTwo', name: 'fieldTwo' },
];
props.schema.schema.actions = [
{ id: 'actionOne', name: 'actionOne' },
{ id: 'actionTwo', name: 'actionTwo' },
];
props.schema.state.fields = [
{ id: 'fieldOne', value: 'valOne' },
{ id: 'fieldTwo', value: null },
{ id: 'notInSchema', value: 'invalid' },
];
});
it('should include submitted action from schema', () => {
formBuilder.setState({ submittingAction: 'actionTwo' });
const submitApiMock = jest.genMockFunction();
submitApiMock.mockImplementation(() => Promise.resolve({}));
formBuilder.submitApi = submitApiMock;
formBuilder.handleSubmit(formBuilder.getFieldValues());
expect(formBuilder.submitApi.mock.calls[0][0]).toEqual(
{
fieldOne: 'valOne',
fieldTwo: null,
actionTwo: 1,
}
);
});
it('should default to first button when none is specified', () => {
const submitApiMock = jest.genMockFunction();
submitApiMock.mockImplementation(() => Promise.resolve({}));
formBuilder.submitApi = submitApiMock;
formBuilder.handleSubmit(formBuilder.getFieldValues());
expect(formBuilder.submitApi.mock.calls[0][0]).toEqual(
{
fieldOne: 'valOne',
fieldTwo: null,
actionOne: 1,
}
);
});
});
});

View File

@ -1,7 +1,7 @@
import React from 'react';
import { Modal } from 'react-bootstrap-ss';
import SilverStripeComponent from 'lib/SilverStripeComponent';
import FormBuilder from 'components/FormBuilder/FormBuilder';
import FormBuilderLoader from 'containers/FormBuilderLoader/FormBuilderLoader';
class FormBuilderModal extends SilverStripeComponent {
constructor(props) {
@ -19,7 +19,7 @@ class FormBuilderModal extends SilverStripeComponent {
*/
getForm() {
return (
<FormBuilder
<FormBuilderLoader
schemaUrl={this.props.schemaUrl}
handleSubmit={this.handleSubmit}
handleAction={this.props.handleAction}
@ -74,17 +74,16 @@ class FormBuilderModal extends SilverStripeComponent {
/**
* Handle submitting the form in the Modal
*
* @param {Event} event
* @param {object} fieldValues
* @param {function} submitFn
* @param {Object} data
* @param {String} action
* @param {Function} submitFn The original submit function
* @returns {Promise}
*/
handleSubmit(event, fieldValues, submitFn) {
handleSubmit(data, action, submitFn) {
let promise = null;
if (typeof this.props.handleSubmit === 'function') {
promise = this.props.handleSubmit(event, fieldValues, submitFn);
promise = this.props.handleSubmit(data, action, submitFn);
} else {
event.preventDefault();
promise = submitFn();
}
@ -106,6 +105,7 @@ class FormBuilderModal extends SilverStripeComponent {
});
});
}
return promise;
}

View File

@ -8,7 +8,7 @@ class LiteralField extends SilverStripeComponent {
* @returns {object} innerHtml
*/
getContent() {
return { __html: this.props.data.content };
return { __html: this.props.value };
}
/**
@ -41,12 +41,7 @@ LiteralField.propTypes = {
id: React.PropTypes.string,
name: React.PropTypes.string.isRequired,
extraClass: React.PropTypes.string,
data: React.PropTypes.oneOfType([
React.PropTypes.array,
React.PropTypes.shape({
content: React.PropTypes.string.isRequired,
}),
]).isRequired,
value: React.PropTypes.string,
};
LiteralField.defaultProps = {

View File

@ -35,7 +35,7 @@ class OptionsetField extends SilverStripeComponent {
const sourceItem = this.props.source
.find((item, index) => this.getItemKey(item, index) === field.id);
this.props.onChange(event, { id: this.props.id, value: `${sourceItem.value}` });
this.props.onChange(sourceItem.value);
}
}
}

View File

@ -47,8 +47,7 @@ describe('OptionsetField', () => {
setField.handleChange(event, { id: 'set-one', value: 1 });
expect(setField.props.onChange).toBeCalledWith(
event,
{ id: 'set', value: 'one' }
'one'
);
});
});

View File

@ -9,7 +9,7 @@ import SilverStripeComponent from 'lib/SilverStripeComponent';
import FormAction from 'components/FormAction/FormAction';
import i18n from 'i18n';
import Toolbar from 'components/Toolbar/Toolbar';
import FormBuilder from 'components/FormBuilder/FormBuilder';
import FormBuilderLoader from 'containers/FormBuilderLoader/FormBuilderLoader';
import CampaignAdminList from './CampaignAdminList';
class CampaignAdmin extends SilverStripeComponent {
@ -56,7 +56,7 @@ class CampaignAdmin extends SilverStripeComponent {
// NOOP - Lazy loaded in CampaignAdminList.js
break;
case 'edit':
// @todo - Lazy load in FormBuilder / GridField
// @todo - Lazy load in FormBuilderLoader / GridField
breadcrumbs.push({
text: i18n._t('Campaigns.EDIT_CAMPAIGN', 'Editing Campaign'),
href: this.getActionRoute(id, view),
@ -137,7 +137,7 @@ class CampaignAdmin extends SilverStripeComponent {
</div>
</div>
<div className="campaign-admin">
<FormBuilder {...formBuilderProps} />
<FormBuilderLoader {...formBuilderProps} />
</div>
</div>
</div>
@ -184,7 +184,7 @@ class CampaignAdmin extends SilverStripeComponent {
</Toolbar>
<div className="panel panel--padded panel--scrollable flexbox-area-grow form--inline">
<FormBuilder {...formBuilderProps} />
<FormBuilderLoader {...formBuilderProps} />
</div>
</div>
);
@ -210,7 +210,7 @@ class CampaignAdmin extends SilverStripeComponent {
<BreadcrumbComponent multiline crumbs={this.props.breadcrumbs} />
</Toolbar>
<div className="panel panel--padded panel--scrollable flexbox-area-grow form--inline">
<FormBuilder {...formBuilderProps} />
<FormBuilderLoader {...formBuilderProps} />
</div>
</div>
);
@ -218,10 +218,10 @@ class CampaignAdmin extends SilverStripeComponent {
/**
* Hook to allow customisation of components being constructed
* by the Campaign DetailEdit FormBuilder.
* by the Campaign DetailEdit FormBuilderLoader.
*
* @param {Object} Component - Component constructor.
* @param {Object} props - Props passed from FormBuilder.
* @param {Object} props - Props passed from FormBuilderLoader.
*
* @return {Object} - Instanciated React component
*/
@ -245,10 +245,10 @@ class CampaignAdmin extends SilverStripeComponent {
/**
* Hook to allow customisation of components being constructed
* by the Campaign creation FormBuilder.
* by the Campaign creation FormBuilderLoader.
*
* @param {Object} Component - Component constructor.
* @param {Object} props - Props passed from FormBuilder.
* @param {Object} props - Props passed from FormBuilderLoader.
*
* @return {Object} - Instanciated React component
*/
@ -272,10 +272,10 @@ class CampaignAdmin extends SilverStripeComponent {
/**
* Hook to allow customisation of components being constructed
* by the Campaign list FormBuilder.
* by the Campaign list FormBuilderLoader.
*
* @param object Component - Component constructor.
* @param object props - Props passed from FormBuilder.
* @param object props - Props passed from FormBuilderLoader.
*
* @return object - Instanciated React component
*/
@ -283,7 +283,7 @@ class CampaignAdmin extends SilverStripeComponent {
const sectionUrl = this.props.sectionConfig.url;
const typeUrlParam = 'set';
if (props.component === 'GridField') {
if (props.schemaComponent === 'GridField') {
const extendedProps = Object.assign({}, props, {
data: Object.assign({}, props.data, {
handleDrillDown: (event, record) => {

View File

@ -133,9 +133,10 @@ class CampaignAdminList extends SilverStripeComponent {
// Set body
const pagesLink = [
this.props.config.baseUrl,
this.props.config.absoluteBaseUrl,
this.props.config.sections['SilverStripe\\CMS\\Controllers\\CMSPagesController'].url,
].join('/');
].join('');
const body = accordionBlocks.length
? (<Accordion>{accordionBlocks}</Accordion>)
: (

View File

@ -0,0 +1,103 @@
import React, { PropTypes, Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import fetch from 'isomorphic-fetch';
import { Field as ReduxFormField, reduxForm } from 'redux-form';
import * as schemaActions from 'state/schema/SchemaActions';
import Form from 'components/Form/Form';
import FormBuilder, { basePropTypes, schemaPropType } from 'components/FormBuilder/FormBuilder';
class FormBuilderLoader extends Component {
constructor(props) {
super(props);
this.handleSubmitSuccess = this.handleSubmitSuccess.bind(this);
}
componentDidMount() {
this.fetch();
}
componentDidUpdate(prevProps) {
if (this.props.schemaUrl !== prevProps.schemaUrl) {
this.fetch();
}
}
handleSubmitSuccess(result) {
this.props.schemaActions.setSchema(result);
if (this.props.onSubmitSuccess) {
this.props.onSubmitSuccess(result);
}
}
/**
* Fetches data used to generate a form. This can be form schema and or form state data.
* When the response comes back the data is saved to state.
*
* @param {Boolean} schema If form schema data should be returned in the response.
* @param {Boolean} state If form state data should be returned in the response.
* @return {Object} Promise from the AJAX request.
*/
fetch(schema = true, state = true) {
const headerValues = [];
if (schema === true) {
headerValues.push('schema');
}
if (state === true) {
headerValues.push('state');
}
return fetch(this.props.schemaUrl, {
headers: { 'X-FormSchema-Request': headerValues.join() },
credentials: 'same-origin',
})
.then(response => response.json())
.then(formSchema => {
if (typeof formSchema.id !== 'undefined') {
this.props.schemaActions.setSchema(formSchema);
}
});
}
render() {
// If the response from fetching the initial data
// hasn't come back yet, don't render anything.
if (!this.props.schema) {
return null;
}
const props = Object.assign({}, this.props, {
onSubmitSuccess: this.handleSubmitSuccess,
});
return <FormBuilder {...props} />;
}
}
FormBuilderLoader.propTypes = Object.assign({}, basePropTypes, {
schemaActions: PropTypes.object.isRequired,
schemaUrl: PropTypes.string.isRequired,
schema: schemaPropType,
form: PropTypes.string,
});
FormBuilderLoader.defaultProps = {
// Perform this *outside* of render() to avoid re-rendering of the whole DOM structure
// every time render() is triggered.
baseFormComponent: reduxForm()(Form),
baseFieldComponent: ReduxFormField,
};
export default connect(
(state, ownProps) => {
const schema = state.schemas[ownProps.schemaUrl];
const form = schema ? schema.id : null;
return { schema, form };
},
(dispatch) => ({
schemaActions: bindActionCreators(schemaActions, dispatch),
})
)(FormBuilderLoader);

View File

@ -0,0 +1,12 @@
# FormBuilderLoader Component
Used to retrieve a schema for FormBuilder to generate forms made up of field components and actions.
Wraps a [FormBuilder](../../components/FormBuilder/README.md] component with async loading logic,
and stores the loaded schemas in a Redux store.
## Properties
* `schemaUrl` (string): The schema URL where the form will be scaffolded from e.g. '/admin/pages/schema/1'.
* `schemaActions` (object): A `setSchema()` function to interact with the redux store.
See [FormBuilder](../../components/FormBuilder/README.md] for more properties.

View File

@ -1,6 +0,0 @@
import { reduxForm } from 'redux-form';
import Form from 'components/Form/Form';
export default reduxForm({
// configured at runtime
})(Form);

View File

@ -1,9 +0,0 @@
export const ACTION_TYPES = {
ADD_FORM: 'ADD_FORM',
REMOVE_FORM: 'REMOVE_FORM',
SUBMIT_FORM_FAILURE: 'SUBMIT_FORM_FAILURE',
SUBMIT_FORM_REQUEST: 'SUBMIT_FORM_REQUEST',
SUBMIT_FORM_SUCCESS: 'SUBMIT_FORM_SUCCESS',
UPDATE_FIELD: 'UPDATE_FIELD',
SET_SUBMIT_ACTION: 'SET_SUBMIT_ACTION',
};

View File

@ -1,96 +0,0 @@
import { ACTION_TYPES } from './FormActionTypes';
/**
* Removes a form from state.
* This action should be called when a Redux managed Form component unmounts.
*
* @param {string} formId - ID of the form you want to remove.
* @return {function}
*/
export function removeForm(formId) {
return (dispatch) => {
dispatch({
type: ACTION_TYPES.REMOVE_FORM,
payload: { formId },
});
};
}
/**
* Sets one or more values on an existing form field.
*
* @param {string} formId - Id of the form where the field lives.
* @param {object} updates - The values to update on the field.
* @param {string} updates.id - Field ID.
* @return {function}
*/
export function updateField(formId, updates) {
return (dispatch) => {
dispatch({
type: ACTION_TYPES.UPDATE_FIELD,
payload: { formId, updates },
});
};
}
/**
* Adds a form to the store.
*
* @param {object} formState
* @param {string} formState.id - The ID the form will be keyed as in state.
* @return {function}
*/
export function addForm(formState) {
return (dispatch) => {
dispatch({
type: ACTION_TYPES.ADD_FORM,
payload: { formState },
});
};
}
/**
* Submits a form and handles the response.
*
* @param {Function} submitApi
* @param {String} formId
*/
export function submitForm(submitApi, formId, fieldValues) {
return (dispatch) => {
const headers = {
'X-Formschema-Request': 'schema,state',
'X-Requested-With': 'XMLHttpRequest',
};
dispatch({
type: ACTION_TYPES.SUBMIT_FORM_REQUEST,
payload: { formId },
});
return submitApi(Object.assign({ ID: formId }, fieldValues), headers)
.then((response) => {
dispatch({
type: ACTION_TYPES.SUBMIT_FORM_SUCCESS,
payload: { response },
});
return response;
})
.catch((error) => {
throw error.response.text().then((errorText) => {
dispatch({
type: ACTION_TYPES.SUBMIT_FORM_FAILURE,
payload: { formId, error: errorText },
});
return errorText;
});
});
};
}
export function setSubmitAction(formId, submitAction) {
return (dispatch) => {
dispatch({
type: ACTION_TYPES.SET_SUBMIT_ACTION,
payload: { formId, submitAction },
});
};
}

View File

@ -1,78 +0,0 @@
import deepFreeze from 'deep-freeze-strict';
import { ACTION_TYPES } from './FormActionTypes';
const initialState = deepFreeze({});
function formReducer(state = initialState, action) {
const updateForm = (formId, data) => Object.assign({},
state, {
[formId]: Object.assign({},
state[formId],
data
),
});
switch (action.type) {
case ACTION_TYPES.SUBMIT_FORM_REQUEST:
return deepFreeze(updateForm(action.payload.formId, {
error: false,
submitting: true,
}));
case ACTION_TYPES.REMOVE_FORM:
return deepFreeze(Object.keys(state).reduce((previous, current) => {
if (current === action.payload.formId) {
return previous;
}
return Object.assign({}, previous, {
[current]: state[current],
});
}, {}));
case ACTION_TYPES.ADD_FORM:
return deepFreeze(Object.assign({}, state, {
[action.payload.formState.id]: {
fields: action.payload.formState.fields,
error: false,
submitting: false,
},
}));
case ACTION_TYPES.UPDATE_FIELD:
return deepFreeze(updateForm(action.payload.formId, {
fields: state[action.payload.formId].fields.map((field) => {
if (field.id === action.payload.updates.id) {
return Object.assign({}, field, action.payload.updates);
}
return field;
}),
}));
case ACTION_TYPES.SUBMIT_FORM_SUCCESS:
return deepFreeze(updateForm(action.payload.response.id, {
fields: action.payload.response.state.fields,
error: false,
messages: action.payload.response.state.messages,
submitting: false,
}));
case ACTION_TYPES.SUBMIT_FORM_FAILURE:
return deepFreeze(updateForm(action.payload.formId, {
error: true,
messages: action.payload.error,
submitting: false,
}));
case ACTION_TYPES.SET_SUBMIT_ACTION:
return deepFreeze(updateForm(action.payload.formId, {
submitAction: action.payload.submitAction,
}));
default:
return state;
}
}
export default formReducer;

View File

@ -1,24 +0,0 @@
# form
This state key holds form and form field data. Forms built using the `FormBuilder` component
have their state stored in child keys of `form` (keyed by form ID) automatically.
```js
{
form: {
DetailEditForm: {
fields: [
{
data: [],
id: "Form_DetailEditForm_Name",
messages: [],
valid: true,
value: "My Campaign"
}
]
}
}
}
```
Forms built using `FormBuilder` will tidy up their state when unmounted.

View File

@ -1,233 +0,0 @@
/* global jest, describe, expect, it, beforeEach */
jest.unmock('deep-freeze-strict');
jest.unmock('../FormReducer');
jest.unmock('../FormActionTypes');
import deepFreeze from 'deep-freeze-strict';
import { ACTION_TYPES } from '../FormActionTypes';
import formReducer from '../FormReducer';
describe('formReducer', () => {
describe('ADD_FORM', () => {
const initialState = deepFreeze({
DetailEditForm: {
fields: [
{
data: [],
id: 'Form_DetailEditForm_Name',
messages: [],
valid: true,
value: 'Test',
},
],
submitting: false,
},
});
it('should add a form', () => {
const payload = {
formState: {
fields: [
{
data: [],
id: 'Form_EditForm_Name',
messages: [],
valid: true,
value: 'Test',
},
],
id: 'EditForm',
messages: [],
},
};
const nextState = formReducer(initialState, {
type: ACTION_TYPES.ADD_FORM,
payload,
});
expect(nextState.DetailEditForm).toBeDefined();
expect(nextState.EditForm).toBeDefined();
expect(nextState.EditForm.fields).toBeDefined();
expect(nextState.EditForm.fields[0].data).toBeDefined();
expect(nextState.EditForm.fields[0].id).toBe('Form_EditForm_Name');
expect(nextState.EditForm.fields[0].messages).toBeDefined();
expect(nextState.EditForm.fields[0].valid).toBe(true);
expect(nextState.EditForm.fields[0].value).toBe('Test');
expect(nextState.EditForm.submitting).toBe(false);
});
});
describe('REMOVE_FORM', () => {
const initialState = deepFreeze({
DetailEditForm: {
fields: [
{
data: [],
id: 'Form_DetailEditForm_Name',
messages: [],
valid: true,
value: 'Test',
},
],
},
EditForm: {
fields: [
{
data: [],
id: 'Form_EditForm_Name',
messages: [],
valid: true,
value: 'Test',
},
],
},
});
it('should remove the form', () => {
const nextState = formReducer(initialState, {
type: ACTION_TYPES.REMOVE_FORM,
payload: { formId: 'DetailEditForm' },
});
expect(nextState.DetailEditForm).toBeUndefined();
expect(nextState.EditForm).toBeDefined();
});
});
describe('UPDATE_FIELD', () => {
const initialState = deepFreeze({
DetailEditForm: {
fields: [
{
data: [],
id: 'Form_DetailEditForm_Name',
messages: [],
valid: true,
value: 'Test',
},
],
},
});
it('should update properties of a form field', () => {
const nextState = formReducer(initialState, {
type: ACTION_TYPES.UPDATE_FIELD,
payload: {
formId: 'DetailEditForm',
updates: {
id: 'Form_DetailEditForm_Name',
value: 'Updated',
},
},
});
expect(nextState.DetailEditForm.fields[0].value).toBe('Updated');
});
});
describe('SUBMIT_FORM_SUCCESS', () => {
const initialState = deepFreeze({
DetailEditForm: {
fields: [
{
data: [],
id: 'Form_DetailEditForm_Name',
messages: [],
valid: true,
value: 'Test',
},
],
submitting: true,
},
});
it('should add top level form messages', () => {
const nextState = formReducer(initialState, {
type: ACTION_TYPES.SUBMIT_FORM_SUCCESS,
payload: {
id: 'DetailEditForm',
response: {
id: 'DetailEditForm',
state: {
fields: [
{
data: [],
id: 'Form_DetailEditForm_Name',
messages: [],
valid: true,
value: 'Test',
},
],
messages: [
{
type: 'good',
value: 'Saved.',
},
],
},
},
},
});
expect(nextState.DetailEditForm.messages).toBeDefined();
expect(nextState.DetailEditForm.messages.length).toBe(1);
expect(nextState.DetailEditForm.messages[0].type).toBe('good');
expect(nextState.DetailEditForm.messages[0].value).toBe('Saved.');
expect(nextState.DetailEditForm.submitting).toBe(false);
});
});
describe('SUBMIT_FORM_REQUEST', () => {
it('should set submitting to true', () => {
const initialState = deepFreeze({
DetailEditForm: {
fields: [
{
data: [],
id: 'Form_DetailEditForm_Name',
messages: [],
valid: true,
value: 'Test',
},
],
submitting: false,
},
});
const nextState = formReducer(initialState, {
type: ACTION_TYPES.SUBMIT_FORM_REQUEST,
payload: { formId: 'DetailEditForm' },
});
expect(nextState.DetailEditForm.submitting).toBe(true);
});
});
describe('SUBMIT_FORM_FAILURE', () => {
it('should set submitting to false', () => {
const initialState = deepFreeze({
DetailEditForm: {
fields: [
{
data: [],
id: 'Form_DetailEditForm_Name',
messages: [],
valid: true,
value: 'Test',
},
],
submitting: true,
},
});
const nextState = formReducer(initialState, {
type: ACTION_TYPES.SUBMIT_FORM_FAILURE,
payload: { formId: 'DetailEditForm' },
});
expect(nextState.DetailEditForm.submitting).toBe(false);
});
});
});

View File

@ -2,6 +2,8 @@ import ACTION_TYPES from './SchemaActionTypes';
/**
* Sets the schema being used to generate the current form layout.
* Note that the `state` key just determines the initial form field values,
* and is overruled by redux-form behaviour (stored in separate reducer key)
*
* @param string schema - JSON schema for the layout.
*/

View File

@ -7,8 +7,7 @@ export default function schemaReducer(state = initialState, action = null) {
switch (action.type) {
case ACTION_TYPES.SET_SCHEMA: {
const id = action.payload.schema.schema_url;
return deepFreeze(Object.assign({}, state, { [id]: action.payload }));
return deepFreeze(Object.assign({}, state, { [action.payload.id]: action.payload }));
}
default:

View File

@ -11,14 +11,17 @@ describe('schemaReducer', () => {
describe('SET_SCHEMA', () => {
it('should create a new form', () => {
const initialState = { };
const serverResponse = { id: 'TestForm', schema_url: 'URL' };
const schema = {
id: 'MySchema',
schema: { id: 'TestForm' },
};
const nextState = schemaReducer(initialState, {
type: ACTION_TYPES.SET_SCHEMA,
payload: { schema: serverResponse },
payload: schema,
});
expect(nextState.URL.schema.id).toBe('TestForm');
expect(nextState.MySchema).toBe(schema);
});
});
});

View File

@ -98,13 +98,12 @@ class CampaignAdmin extends LeftAndMain implements PermissionProvider {
$adminURL = Convert::raw2js(AdminRootController::admin_url());
$json = <<<JSON
{
"id": "Form_EditForm",
"id": "{$adminURL}campaigns\/schema\/EditForm",
"schema": {
"name": "EditForm",
"id": "Form_EditForm",
"action": "schema",
"method": "GET",
"schema_url": "{$adminURL}campaigns\/schema\/EditForm",
"attributes": {
"id": "Form_EditForm",
"action": "{$adminURL}campaigns\/EditForm",
@ -539,8 +538,9 @@ JSON;
// Configure form to respond to validation errors with form schema
// if requested via react.
$form->setValidationResponseCallback(function() use ($form) {
return $this->getSchemaResponse($form);
$form->setValidationResponseCallback(function() use ($form, $record) {
$schemaId = Controller::join_links($this->Link('schema/DetailEditForm'), $record->exists() ? $record->ID : '');
return $this->getSchemaResponse($form, $schemaId);
});
return $form;

View File

@ -333,12 +333,13 @@ class LeftAndMain extends Controller implements PermissionProvider {
* schema if X-Formschema-Request header is set.
*
* @param Form $form
* @param String $id Optional, will default to the current request URL
* @return HTTPResponse
*/
protected function getSchemaResponse($form) {
protected function getSchemaResponse($form, $id = null) {
$request = $this->getRequest();
if($request->getHeader('X-Formschema-Request')) {
$data = $this->getSchemaForForm($form);
$data = $this->getSchemaForForm($form, $id);
$response = new HTTPResponse(Convert::raw2json($data));
$response->addHeader('Content-Type', 'application/json');
@ -355,10 +356,12 @@ class LeftAndMain extends Controller implements PermissionProvider {
* based on the request data.
*
* @param Form $form
* @param String $id Optional, will default to the current request URL
* @return array
*/
protected function getSchemaForForm(Form $form) {
protected function getSchemaForForm(Form $form, $id = null) {
$request = $this->getRequest();
$id = $id ? $id : $request->getURL();
$return = null;
// Valid values for the "X-Formschema-Request" header are "schema" and "state".
@ -373,11 +376,10 @@ class LeftAndMain extends Controller implements PermissionProvider {
$schemaParts = ['schema'];
}
$return = ['id' => $form->FormName()];
$return = ['id' => $id];
if (in_array('schema', $schemaParts)) {
$schemaLink = $this->getSchemaLinkForForm($form);
$return['schema'] = $this->schema->getSchema($form, $schemaLink);
$return['schema'] = $this->schema->getSchema($form);
}
if (in_array('state', $schemaParts)) {
@ -1302,10 +1304,11 @@ class LeftAndMain extends Controller implements PermissionProvider {
$message = _t('LeftAndMain.SAVEDUP', 'Saved.');
if($request->getHeader('X-Formschema-Request')) {
$schemaId = Controller::join_links($this->Link('schema/DetailEditForm'), $id);
// Ensure that newly created records have all their data loaded back into the form.
$form->loadDataFrom($record);
$form->setMessage($message, 'good');
$data = $this->getSchemaForForm($form);
$data = $this->getSchemaForForm($form, $schemaId);
$response = new HTTPResponse(Convert::raw2json($data));
$response->addHeader('Content-Type', 'application/json');
} else {

70
npm-shrinkwrap.json generated
View File

@ -8388,6 +8388,76 @@
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/redux/-/redux-3.0.5.tgz"
},
"redux-form": {
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/redux-form/-/redux-form-6.0.5.tgz",
"dependencies": {
"array-findindex-polyfill": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/array-findindex-polyfill/-/array-findindex-polyfill-0.1.0.tgz"
},
"es6-error": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/es6-error/-/es6-error-3.1.0.tgz"
},
"hoist-non-react-statics": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz"
},
"invariant": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.1.tgz",
"dependencies": {
"loose-envify": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.2.0.tgz",
"dependencies": {
"js-tokens": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-1.0.3.tgz"
}
}
}
}
},
"is-promise": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz"
},
"lodash": {
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.16.0.tgz"
},
"lodash-es": {
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.16.0.tgz"
},
"shallowequal": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-0.2.2.tgz",
"dependencies": {
"lodash.keys": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz",
"dependencies": {
"lodash._getnative": {
"version": "3.9.1",
"resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz"
},
"lodash.isarguments": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz"
},
"lodash.isarray": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz"
}
}
}
}
}
}
},
"redux-logger": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/redux-logger/-/redux-logger-2.6.1.tgz"

View File

@ -58,6 +58,7 @@
"react-router": "^2.4.1",
"react-router-redux": "^4.0.5",
"redux": "https://registry.npmjs.org/redux/-/redux-3.0.5.tgz",
"redux-form": "^6.0.2",
"redux-thunk": "^2.1.0",
"tether": "^1.3.2",
"url": "^0.11.0"
@ -104,7 +105,8 @@
"mocksPattern": "mocks",
"unmockedModulePathPatterns": [
"<rootDir>/node_modules/react",
"<rootDir>/node_modules/qs"
"<rootDir>/node_modules/qs",
"<rootDir>/node_modules/redux-form"
],
"bail": true,
"testRunner": "<rootDir>/node_modules/jest-cli/src/testRunners/jasmine/jasmine2.js"

View File

@ -20,7 +20,6 @@ class FormSchemaTest extends SapphireTest {
'id' => 'Form_TestForm',
'action' => 'Controller/TestForm',
'method' => 'POST',
'schema_url' => 'admin/mysection/schema',
'attributes' => [
'id' => 'Form_TestForm',
'action' => 'Controller/TestForm',
@ -53,7 +52,7 @@ class FormSchemaTest extends SapphireTest {
'actions' => []
];
$schema = $formSchema->getSchema($form, 'admin/mysection/schema');
$schema = $formSchema->getSchema($form);
$this->assertInternalType('array', $schema);
$this->assertJsonStringEqualsJsonString(json_encode($expected), json_encode($schema));
}
@ -171,7 +170,6 @@ class FormSchemaTest extends SapphireTest {
'id' => 'Form_TestForm',
'action' => 'Controller/TestForm',
'method' => 'POST',
'schema_url' => 'admin/mysection/schema',
'attributes' => [
'id' => 'Form_TestForm',
'action' => 'Controller/TestForm',
@ -336,7 +334,7 @@ class FormSchemaTest extends SapphireTest {
]
];
$schema = $formSchema->getSchema($form, 'admin/mysection/schema');
$schema = $formSchema->getSchema($form);
$this->assertInternalType('array', $schema);
$this->assertJsonStringEqualsJsonString(json_encode($expected), json_encode($schema));

View File

@ -68,6 +68,7 @@ const config = [
'components/FormBuilderModal/FormBuilderModal': 'FormBuilderModal',
'components/GridField/GridField': 'GridField',
'components/Toolbar/Toolbar': 'Toolbar',
'containers/FormBuilderLoader/FormBuilderLoader': 'FormBuilderLoader',
'deep-freeze-strict': 'DeepFreezeStrict',
i18n: 'i18n',
jQuery: 'jQuery',
@ -85,6 +86,7 @@ const config = [
'react-router': 'ReactRouter',
'react-addons-css-transition-group': 'ReactAddonsCssTransitionGroup',
react: 'React',
'redux-form': 'ReduxForm',
'redux-thunk': 'ReduxThunk',
redux: 'Redux',
config: 'Config',