From f6d62c5ac90528c67028083fbad7bfe199ddd1af Mon Sep 17 00:00:00 2001 From: uuinnk Date: Mon, 7 May 2018 16:15:48 +0700 Subject: [PATCH 1/8] fix css --- src/css/menu.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/css/menu.css b/src/css/menu.css index d0db7586..852969eb 100644 --- a/src/css/menu.css +++ b/src/css/menu.css @@ -43,6 +43,6 @@ a.rootMenuItem.inactive + div + ul { text-decoration: underline; } -.nav-link { +.navbar .nav-link { font-size: 16px; } \ No newline at end of file From 00ce0389cb9f4756177a3ac83e30f28f55d52628 Mon Sep 17 00:00:00 2001 From: uuinnk Date: Thu, 10 May 2018 18:30:57 +0700 Subject: [PATCH 2/8] support newWindowUrl --- src/scripts/be5/services/forms.js | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/src/scripts/be5/services/forms.js b/src/scripts/be5/services/forms.js index 33213aca..aa6589d0 100644 --- a/src/scripts/be5/services/forms.js +++ b/src/scripts/be5/services/forms.js @@ -88,27 +88,41 @@ export default switch (attributes.status) { case 'redirect': bus.fire("alert", {msg: json.data.attributes.message || be5.messages.successfullyCompleted, type: 'success'}); - if(attributes.details.startsWith("http://") - || attributes.details.startsWith("https://") - || attributes.details.startsWith("ftp://")) + + let url; + let newWindowUrl = null; + if(typeof(attributes.details) !== 'object'){ + url = attributes.details.url; + newWindowUrl = attributes.details.newWindowUrl; + }else{ + url = attributes.details; + } + + if(newWindowUrl !== null){ + window.open(newWindowUrl, '_blank'); + } + + if(url.startsWith("http://") + || url.startsWith("https://") + || url.startsWith("ftp://")) { - window.location.href = attributes.details; + window.location.href = url; } else { if (documentName === be5.MAIN_DOCUMENT) { - be5.url.set(attributes.details); + be5.url.set(url); } else { - if(be5.url.parse(attributes.details).positional[0] === 'form') + if(be5.url.parse(url).positional[0] === 'form') { - this.load(this.getOperationParams(attributes.details, {}), frontendParams); + this.load(this.getOperationParams(url, {}), frontendParams); } else { - be5.url.process(documentName, '#!' + attributes.details); + be5.url.process(documentName, '#!' + url); } } } From b205afde01268950e83d230d5ae1f98b24d365ed Mon Sep 17 00:00:00 2001 From: uuinnk Date: Thu, 10 May 2018 18:42:27 +0700 Subject: [PATCH 3/8] add redirectGoBack --- src/scripts/be5/services/forms.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/scripts/be5/services/forms.js b/src/scripts/be5/services/forms.js index aa6589d0..80f801fa 100644 --- a/src/scripts/be5/services/forms.js +++ b/src/scripts/be5/services/forms.js @@ -91,6 +91,7 @@ export default let url; let newWindowUrl = null; + if(typeof(attributes.details) !== 'object'){ url = attributes.details.url; newWindowUrl = attributes.details.newWindowUrl; @@ -102,9 +103,11 @@ export default window.open(newWindowUrl, '_blank'); } - if(url.startsWith("http://") - || url.startsWith("https://") - || url.startsWith("ftp://")) + if(url === 'goBack()'){ + window.history.back(); + } + + if(url.startsWith("http://") || url.startsWith("https://") || url.startsWith("ftp://")) { window.location.href = url; } From 51201266a0886629b0d8e1aef85addd404679d3f Mon Sep 17 00:00:00 2001 From: uuinnk Date: Fri, 11 May 2018 13:39:52 +0700 Subject: [PATCH 4/8] refactoring frontend actions to array of FrontendAction (or one value) --- src/scripts/be5/services/forms.js | 62 +++++++++++++++++-------- test/scripts/be5/services/forms.test.js | 18 ++++--- 2 files changed, 55 insertions(+), 25 deletions(-) diff --git a/src/scripts/be5/services/forms.js b/src/scripts/be5/services/forms.js index 80f801fa..9ef54dc9 100644 --- a/src/scripts/be5/services/forms.js +++ b/src/scripts/be5/services/forms.js @@ -89,23 +89,24 @@ export default case 'redirect': bus.fire("alert", {msg: json.data.attributes.message || be5.messages.successfullyCompleted, type: 'success'}); - let url; - let newWindowUrl = null; - - if(typeof(attributes.details) !== 'object'){ - url = attributes.details.url; - newWindowUrl = attributes.details.newWindowUrl; - }else{ - url = attributes.details; - } - - if(newWindowUrl !== null){ - window.open(newWindowUrl, '_blank'); - } - - if(url === 'goBack()'){ - window.history.back(); - } + const url = attributes.details; + // let url; + // let newWindowUrl = null; + // + // if(typeof(attributes.details) !== 'object'){ + // url = attributes.details.url; + // newWindowUrl = attributes.details.newWindowUrl; + // }else{ + // url = attributes.details; + // } + // + // if(newWindowUrl !== null){ + // window.open(newWindowUrl, '_blank'); + // } + // + // if(url === 'goBack()'){ + // window.history.back(); + // } if(url.startsWith("http://") || url.startsWith("https://") || url.startsWith("ftp://")) { @@ -175,9 +176,9 @@ export default return attributes.status === 'finished' && attributes.details !== undefined }, - executeActions: function (actions, json, frontendParams, applyParams) + executeActions: function (actionsArrayOrOneObject, json, frontendParams, applyParams) { - Preconditions.passed(typeof actions === 'object', "actions must be object:" + actions); + const actions = this.getActionsMap(actionsArrayOrOneObject) if(actions[UPDATE_USER_INFO] !== undefined) { @@ -195,9 +196,32 @@ export default changeDocument(frontendParams.parentDocumentName, {value: tableJson}); } + //todo rename executeFrontendActions bus.fire("actionsAfterFinished", {actions, json, frontendParams, applyParams}); }, + getActionsMap(actionsArrayOrOneObject) { + let map = {}; + if(Array.isArray(actionsArrayOrOneObject)) + { + for (let i = 0; i < actionsArrayOrOneObject.length; i++) { + Preconditions.passed(typeof actionsArrayOrOneObject[i].type === "string", + "Actions must be object with string type:" + actionsArrayOrOneObject); + + map[actionsArrayOrOneObject[i].type] = actionsArrayOrOneObject[i].value; + } + } + else + { + Preconditions.passed(typeof actionsArrayOrOneObject.type === "string", + "Actions must be object with string type:" + actionsArrayOrOneObject); + + map[actionsArrayOrOneObject.type] = actionsArrayOrOneObject.value; + } + + return map; + }, + _performForm(json, frontendParams) { let operationResult = json.data.attributes.operationResult; diff --git a/test/scripts/be5/services/forms.test.js b/test/scripts/be5/services/forms.test.js index 3b192c0a..4d607ae7 100644 --- a/test/scripts/be5/services/forms.test.js +++ b/test/scripts/be5/services/forms.test.js @@ -93,9 +93,9 @@ test('performOperationResult UPDATE_USER_INFO', () => { const res = { data: { type: "operationResult", - attributes: {"status":"finished", details: { - UPDATE_USER_INFO: getTestUser() - }}, + attributes: {"status":"finished", details: + new FrontendAction("UPDATE_USER_INFO", getTestUser()) + }, links: {"self":"form/categories/Doc categories/Edit"}, }, meta: {"_ts_":"1503244989281"}, @@ -118,9 +118,9 @@ test('actionsAfterFinished TEST', () => { const res = { data: { type: "operationResult", - attributes: {"status":"finished", details: { - TEST: "test data" - }}, + attributes: {"status":"finished", details: + [new FrontendAction("TEST", "test data")] + }, links: {"self":"form/categories/Doc categories/Edit"}, }, meta: {"_ts_":"1503244989281"}, @@ -191,3 +191,9 @@ test('load and _performForm test', () => { expect(component.toJSON()).toMatchSnapshot(); }); +class FrontendAction { + constructor(type, value) { + this.type = type; + this.value = value; + } +} From 6e4913f9ed08fc71c448b1ceb5be74e5f47f2db4 Mon Sep 17 00:00:00 2001 From: uuinnk Date: Fri, 11 May 2018 14:38:56 +0700 Subject: [PATCH 5/8] add GO_BACK, OPEN_NEW_WINDOW actions --- src/scripts/be5/constants.js | 2 ++ src/scripts/be5/services/forms.js | 31 ++++++++++++------------------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/src/scripts/be5/constants.js b/src/scripts/be5/constants.js index 6ca13de5..c8a15004 100644 --- a/src/scripts/be5/constants.js +++ b/src/scripts/be5/constants.js @@ -5,5 +5,7 @@ export const ROLE_SYSTEM_DEVELOPER = "SystemDeveloper"; export const ROLE_GUEST = "Guest"; export const OPEN_DEFAULT_ROUTE = 'OPEN_DEFAULT_ROUTE'; +export const OPEN_NEW_WINDOW = 'OPEN_NEW_WINDOW'; +export const GO_BACK = 'GO_BACK'; export const UPDATE_PARENT_DOCUMENT = 'UPDATE_PARENT_DOCUMENT'; \ No newline at end of file diff --git a/src/scripts/be5/services/forms.js b/src/scripts/be5/services/forms.js index 9ef54dc9..ffccb2d1 100644 --- a/src/scripts/be5/services/forms.js +++ b/src/scripts/be5/services/forms.js @@ -4,7 +4,7 @@ import Preconditions from '../utils/preconditions'; import changeDocument from '../core/changeDocument'; import {updateUserInfo} from "../store/actions/user.actions"; import {UPDATE_USER_INFO} from "../store/constants/user.constants"; -import {OPEN_DEFAULT_ROUTE, UPDATE_PARENT_DOCUMENT} from "../constants"; +import {GO_BACK, OPEN_DEFAULT_ROUTE, OPEN_NEW_WINDOW, UPDATE_PARENT_DOCUMENT} from "../constants"; import {getDefaultRoute} from "../store/selectors/user.selectors"; @@ -90,23 +90,6 @@ export default bus.fire("alert", {msg: json.data.attributes.message || be5.messages.successfullyCompleted, type: 'success'}); const url = attributes.details; - // let url; - // let newWindowUrl = null; - // - // if(typeof(attributes.details) !== 'object'){ - // url = attributes.details.url; - // newWindowUrl = attributes.details.newWindowUrl; - // }else{ - // url = attributes.details; - // } - // - // if(newWindowUrl !== null){ - // window.open(newWindowUrl, '_blank'); - // } - // - // if(url === 'goBack()'){ - // window.history.back(); - // } if(url.startsWith("http://") || url.startsWith("https://") || url.startsWith("ftp://")) { @@ -178,7 +161,7 @@ export default executeActions: function (actionsArrayOrOneObject, json, frontendParams, applyParams) { - const actions = this.getActionsMap(actionsArrayOrOneObject) + const actions = this.getActionsMap(actionsArrayOrOneObject); if(actions[UPDATE_USER_INFO] !== undefined) { @@ -190,6 +173,16 @@ export default be5.url.set(getDefaultRoute(be5.getStoreState())); } + if(actions[OPEN_NEW_WINDOW] !== undefined) + { + window.open(actions[OPEN_NEW_WINDOW]); + } + + if(actions[GO_BACK] !== undefined) + { + window.history.back(); + } + if(actions[UPDATE_PARENT_DOCUMENT] !== undefined) { const tableJson = Object.assign({}, actions[UPDATE_PARENT_DOCUMENT], {meta: json.meta}); From c96046f31e66e3d78a94eefd5115e5dfff0993c4 Mon Sep 17 00:00:00 2001 From: uuinnk Date: Fri, 11 May 2018 15:16:13 +0700 Subject: [PATCH 6/8] fix - use actions.hasOwnProperty --- src/scripts/be5/services/forms.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/scripts/be5/services/forms.js b/src/scripts/be5/services/forms.js index ffccb2d1..180f8fb9 100644 --- a/src/scripts/be5/services/forms.js +++ b/src/scripts/be5/services/forms.js @@ -168,17 +168,17 @@ export default be5.store.dispatch(updateUserInfo(actions[UPDATE_USER_INFO])); } - if(actions[OPEN_DEFAULT_ROUTE] !== undefined) + if(actions[OPEN_NEW_WINDOW] !== undefined) { - be5.url.set(getDefaultRoute(be5.getStoreState())); + window.open(actions[OPEN_NEW_WINDOW]); } - if(actions[OPEN_NEW_WINDOW] !== undefined) + if(actions.hasOwnProperty(OPEN_DEFAULT_ROUTE)) { - window.open(actions[OPEN_NEW_WINDOW]); + be5.url.set(getDefaultRoute(be5.getStoreState())); } - if(actions[GO_BACK] !== undefined) + if(actions.hasOwnProperty(GO_BACK)) { window.history.back(); } From c4739a91a0edfcb4df5da1f397dc6a9f2dea3a7b Mon Sep 17 00:00:00 2001 From: uuinnk Date: Fri, 11 May 2018 15:22:16 +0700 Subject: [PATCH 7/8] rename actionsAfterFinished -> executeFrontendActions --- src/scripts/be5/services/forms.js | 3 +-- test/scripts/be5/services/forms.test.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/scripts/be5/services/forms.js b/src/scripts/be5/services/forms.js index 180f8fb9..000cbe27 100644 --- a/src/scripts/be5/services/forms.js +++ b/src/scripts/be5/services/forms.js @@ -189,8 +189,7 @@ export default changeDocument(frontendParams.parentDocumentName, {value: tableJson}); } - //todo rename executeFrontendActions - bus.fire("actionsAfterFinished", {actions, json, frontendParams, applyParams}); + bus.fire("executeFrontendActions", {actions, json, frontendParams, applyParams}); }, getActionsMap(actionsArrayOrOneObject) { diff --git a/test/scripts/be5/services/forms.test.js b/test/scripts/be5/services/forms.test.js index 4d607ae7..e54563fa 100644 --- a/test/scripts/be5/services/forms.test.js +++ b/test/scripts/be5/services/forms.test.js @@ -105,10 +105,10 @@ test('performOperationResult UPDATE_USER_INFO', () => { expect(getUser(store.getState())).toEqual(getTestUser()); }); -test('actionsAfterFinished TEST', () => { +test('executeFrontendActions TEST', () => { let out = ''; - bus.listen("actionsAfterFinished", ({actions, json, frontendParams, applyParams}) => { + bus.listen("executeFrontendActions", ({actions, json, frontendParams, applyParams}) => { if(actions["TEST"] !== undefined) { out = actions["TEST"] + ' 1' From 409bddefeec81295da7af1420af81aed070b55f4 Mon Sep 17 00:00:00 2001 From: uuinnk Date: Fri, 11 May 2018 15:23:50 +0700 Subject: [PATCH 8/8] 0.2.17 --- dist/compressed/static/be5-react.min.js | 6 +- dist/lib/be5-react.js | 51 +++++++++++++---- dist/uncompressed/static/be5-react.js | 75 ++++++++++++++++++------- package.json | 2 +- 4 files changed, 99 insertions(+), 35 deletions(-) diff --git a/dist/compressed/static/be5-react.min.js b/dist/compressed/static/be5-react.min.js index 281b04e1..38306f3f 100644 --- a/dist/compressed/static/be5-react.min.js +++ b/dist/compressed/static/be5-react.min.js @@ -3,13 +3,13 @@ Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ -!function(){"use strict";function n(){for(var e=[],t=0;t0?r:n)(e)}},function(e,t,n){var r=n(0),i=n(33),o=n(5);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],s={};s[e]=t(n),r(r.S+r.F*o(function(){n(1)}),"Object",s)}},function(e,t,n){var r=n(27),i=n(77),o=n(15),s=n(12),a=n(128);e.exports=function(e,t){var n=1==e,l=2==e,c=3==e,u=4==e,d=6==e,h=5==e||d,f=t||a;return function(t,a,p){for(var m,g,v=o(t),b=i(v),y=r(a,p,3),w=s(b.length),E=0,C=n?f(t,w):l?f(t,0):void 0;w>E;E++)if((h||E in b)&&(m=b[E],g=y(m,E,v),e))if(n)C[E]=g;else if(g)switch(e){case 3:return!0;case 5:return m;case 6:return E;case 2:C.push(m)}else if(u)return!1;return d?-1:c||u?u:C}}},function(e,t,n){"use strict";var r=n(48),i=n(101),o=function(e,t){i.a.passed(e),r.a.fire(e,t)},s=o;t.a=s;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(o,"changeDocument","/home/uuinnk/workspace/github/be5-react/src/scripts/be5/core/changeDocument.js"),__REACT_HOT_LOADER__.register(s,"default","/home/uuinnk/workspace/github/be5-react/src/scripts/be5/core/changeDocument.js"))}()},function(e,t,n){"use strict";if(n(10)){var r=n(52),i=n(4),o=n(5),s=n(0),a=n(97),l=n(134),c=n(27),u=n(58),d=n(50),h=n(19),f=n(60),p=n(36),m=n(12),g=n(201),v=n(54),b=n(34),y=n(18),w=n(79),E=n(6),C=n(15),_=n(125),S=n(55),A=n(24),k=n(56).f,x=n(127),O=n(51),F=n(8),T=n(38),M=n(88),R=n(95),D=n(130),B=n(69),L=n(92),P=n(57),I=n(129),$=n(191),N=n(11),j=n(23),z=N.f,W=j.f,H=i.RangeError,V=i.TypeError,U=i.Uint8Array,G=Array.prototype,K=l.ArrayBuffer,q=l.DataView,Y=T(0),Q=T(2),X=T(3),Z=T(4),J=T(5),ee=T(6),te=M(!0),ne=M(!1),re=D.values,ie=D.keys,oe=D.entries,se=G.lastIndexOf,ae=G.reduce,le=G.reduceRight,ce=G.join,ue=G.sort,de=G.slice,he=G.toString,fe=G.toLocaleString,pe=F("iterator"),me=F("toStringTag"),ge=O("typed_constructor"),ve=O("def_constructor"),be=a.CONSTR,ye=a.TYPED,we=a.VIEW,Ee=T(1,function(e,t){return ke(R(e,e[ve]),t)}),Ce=o(function(){return 1===new U(new Uint16Array([1]).buffer)[0]}),_e=!!U&&!!U.prototype.set&&o(function(){new U(1).set({})}),Se=function(e,t){var n=p(e);if(n<0||n%t)throw H("Wrong offset!");return n},Ae=function(e){if(E(e)&&ye in e)return e;throw V(e+" is not a typed array!")},ke=function(e,t){if(!(E(e)&&ge in e))throw V("It is not a typed array constructor!");return new e(t)},xe=function(e,t){return Oe(R(e,e[ve]),t)},Oe=function(e,t){for(var n=0,r=t.length,i=ke(e,r);r>n;)i[n]=t[n++];return i},Fe=function(e,t,n){z(e,t,{get:function(){return this._d[n]}})},Te=function(e){var t,n,r,i,o,s,a=C(e),l=arguments.length,u=l>1?arguments[1]:void 0,d=void 0!==u,h=x(a);if(void 0!=h&&!_(h)){for(s=h.call(a),r=[],t=0;!(o=s.next()).done;t++)r.push(o.value);a=r}for(d&&l>2&&(u=c(u,arguments[2],2)),t=0,n=m(a.length),i=ke(this,n);n>t;t++)i[t]=d?u(a[t],t):a[t];return i},Me=function(){for(var e=0,t=arguments.length,n=ke(this,t);t>e;)n[e]=arguments[e++];return n},Re=!!U&&o(function(){fe.call(new U(1))}),De=function(){return fe.apply(Re?de.call(Ae(this)):Ae(this),arguments)},Be={copyWithin:function(e,t){return $.call(Ae(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return Z(Ae(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return I.apply(Ae(this),arguments)},filter:function(e){return xe(this,Q(Ae(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return J(Ae(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Ae(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Y(Ae(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Ae(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Ae(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ce.apply(Ae(this),arguments)},lastIndexOf:function(e){return se.apply(Ae(this),arguments)},map:function(e){return Ee(Ae(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return ae.apply(Ae(this),arguments)},reduceRight:function(e){return le.apply(Ae(this),arguments)},reverse:function(){for(var e,t=this,n=Ae(t).length,r=Math.floor(n/2),i=0;i1?arguments[1]:void 0)},sort:function(e){return ue.call(Ae(this),e)},subarray:function(e,t){var n=Ae(this),r=n.length,i=v(e,r);return new(R(n,n[ve]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,m((void 0===t?r:v(t,r))-i))}},Le=function(e,t){return xe(this,de.call(Ae(this),e,t))},Pe=function(e){Ae(this);var t=Se(arguments[1],1),n=this.length,r=C(e),i=m(r.length),o=0;if(i+t>n)throw H("Wrong length!");for(;o255?255:255&r),i.v[f](n*t+i.o,r,Ce)},F=function(e,t){z(e,t,{get:function(){return x(this,t)},set:function(e){return O(this,t,e)},enumerable:!0})};y?(p=n(function(e,n,r,i){u(e,p,c,"_d");var o,s,a,l,d=0,f=0;if(E(n)){if(!(n instanceof K||"ArrayBuffer"==(l=w(n))||"SharedArrayBuffer"==l))return ye in n?Oe(p,n):Te.call(p,n);o=n,f=Se(r,t);var v=n.byteLength;if(void 0===i){if(v%t)throw H("Wrong length!");if((s=v-f)<0)throw H("Wrong length!")}else if((s=m(i)*t)+f>v)throw H("Wrong length!");a=s/t}else a=g(n),s=a*t,o=new K(s);for(h(e,"_d",{b:o,o:f,l:s,e:a,v:new q(o)});d1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.url.parse(e);return{entity:n.positional[1],query:n.positional[2],operation:n.positional[3],values:t,operationParams:n.named}}};t.a=h;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(h,"default","/home/uuinnk/workspace/github/be5-react/src/scripts/be5/services/forms.js")}()},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(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)}var s=n(1),a=n.n(s),l=n(2),c=n.n(l),u=n(7),d=n(48),h=n(220),f=n(80),p=n(71),m=n(142),g=n(17),v=n(218),b=n.n(v),y=n(143),w=n(61),E=function(){function e(e,t){for(var n=0;nthis.props.value.meta._ts_)&&this.setState({value:e.value||"",frontendParams:e.frontendParams})}},{key:"componentDidMount",value:function(){var e=this;d.a.replaceListeners(this.props.frontendParams.documentName,function(t){e.state.value&&e.state.value.meta&&!Number.isInteger(Number.parseInt(e.state.value.meta._ts_))&&console.error("meta._ts_ mast be string of Integer "+e.state.value.meta._ts_),e.state.value&&e.state.value.meta&&t.value&&t.value.meta&&!(t.value.meta._ts_>e.state.value.meta._ts_)||e.setState(Object.assign({value:{},frontendParams:{}},t))}),d.a.replaceListeners(this.props.frontendParams.documentName+u.a.DOCUMENT_REFRESH_SUFFIX,function(){e.refresh()})}},{key:"componentWillUnmount",value:function(){d.a.replaceListeners(this.props.frontendParams.documentName,function(e){}),d.a.replaceListeners(this.props.frontendParams.documentName+u.a.DOCUMENT_REFRESH_SUFFIX,function(e){})}},{key:"render",value:function(){h.a.set(this.props.frontendParams.documentName,this.state);var e=this.getDocument();return null===e?null:a.a.createElement("div",{className:"document-content",id:"document-content___"+this.props.frontendParams.documentName},null,e)}},{key:"getDocument",value:function(){var e=this.getDocumentName();if(null===e)return null;var t=Object(g.b)(e);if(void 0===t){var n=Object(w.a)(u.a.messages.componentForTypeNotRegistered.replace("$type",e),"");return a.a.createElement(y.a,{value:n,frontendParams:this.getComponentFrontendParams()})}return a.a.createElement("div",null,this.getDevTools(),a.a.createElement(t,{value:this.state.value,frontendParams:this.getComponentFrontendParams()}))}},{key:"getDocumentName",value:function(){return this.state.value?this.props.type?this.props.type:this.state.frontendParams.type?this.state.frontendParams.type:this.props.frontendParams.documentName===u.a.MAIN_MODAL_DOCUMENT?"modalForm":this.state.value.data?this.state.value.data.attributes&&this.state.value.data.attributes.layout&&void 0!==this.state.value.data.attributes.layout.type?this.state.value.data.attributes.layout.type:this.state.value.data.type:this.state.value.errors?"errorPane":void 0:null}},{key:"getDevTools",value:function(){return this.props.hasDevRole&&Object(w.c)(this.state.value)?a.a.createElement("span",{onClick:this.refresh,className:"document-reload float-right"},a.a.createElement("img",{src:b.a,alt:u.a.messages.reload,title:u.a.messages.reload+" "+this.props.frontendParams.documentName+" - "+Object(w.c)(this.state.value)})):null}},{key:"refresh",value:function(){u.a.url.process(this.props.frontendParams.documentName,Object(w.c)(this.state.value))}},{key:"getComponentFrontendParams",value:function(){return Object.assign({},this.state.frontendParams,this.props.frontendParams)}}]),t}(a.a.Component);C.propTypes={frontendParams:c.a.shape({documentName:c.a.string.isRequired,operationDocumentName:c.a.string,parentDocumentName:c.a.string,onSuccess:c.a.function}),value:c.a.object,type:c.a.string};var _=function(e){return{hasDevRole:-1!==Object(p.a)(e).indexOf(m.b)}},S=Object(f.b)(_)(C);t.a=S;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(C,"Document","/home/uuinnk/workspace/github/be5-react/src/scripts/be5/containers/Document.js"),__REACT_HOT_LOADER__.register(_,"mapStateToProps","/home/uuinnk/workspace/github/be5-react/src/scripts/be5/containers/Document.js"),__REACT_HOT_LOADER__.register(S,"default","/home/uuinnk/workspace/github/be5-react/src/scripts/be5/containers/Document.js"))}()},function(e,t,n){"use strict";function r(e,t,n){return n?[e,t]:e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(635);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r(i).default}}),Object.defineProperty(t,"Grid",{enumerable:!0,get:function(){return r(i).default}});var o=n(648);Object.defineProperty(t,"accessibilityOverscanIndicesGetter",{enumerable:!0,get:function(){return r(o).default}});var s=n(247);Object.defineProperty(t,"defaultCellRangeRenderer",{enumerable:!0,get:function(){return r(s).default}});var a=n(246);Object.defineProperty(t,"defaultOverscanIndicesGetter",{enumerable:!0,get:function(){return r(a).default}})},function(e,t,n){var r=n(51)("meta"),i=n(6),o=n(18),s=n(11).f,a=0,l=Object.isExtensible||function(){return!0},c=!n(5)(function(){return l(Object.preventExtensions({}))}),u=function(e){s(e,r,{value:{i:"O"+ ++a,w:{}}})},d=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!l(e))return"F";if(!t)return"E";u(e)}return e[r].i},h=function(e,t){if(!o(e,r)){if(!l(e))return!0;if(!t)return!1;u(e)}return e[r].w},f=function(e){return c&&p.NEED&&l(e)&&!o(e,r)&&u(e),e},p=e.exports={KEY:r,NEED:!1,fastKey:d,getWeak:h,onFreeze:f}},function(e,t,n){var r=n(8)("unscopables"),i=Array.prototype;void 0==i[r]&&n(19)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){"use strict";function r(e,t){s(e).push(t)}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s(e).forEach(function(e){return e(t)})}function o(e,t){s(e,[t])}var s=function(){var e={};return function(t,n){return n&&(e[t]=n),e[t]||(e[t]=[]),e[t]}}(),a={listen:r,fire:i,replaceListeners:o};t.a=a;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(r,"listen","/home/uuinnk/workspace/github/be5-react/src/scripts/be5/core/bus.js"),__REACT_HOT_LOADER__.register(i,"fire","/home/uuinnk/workspace/github/be5-react/src/scripts/be5/core/bus.js"),__REACT_HOT_LOADER__.register(o,"replaceListeners","/home/uuinnk/workspace/github/be5-react/src/scripts/be5/core/bus.js"),__REACT_HOT_LOADER__.register(s,"listeners","/home/uuinnk/workspace/github/be5-react/src/scripts/be5/core/bus.js"),__REACT_HOT_LOADER__.register(a,"default","/home/uuinnk/workspace/github/be5-react/src/scripts/be5/core/bus.js"))}()},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports=!1},function(e,t,n){var r=n(177),i=n(112);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(36),i=Math.max,o=Math.min;e.exports=function(e,t){return e=r(e),e<0?i(e+t,0):o(e,t)}},function(e,t,n){var r=n(3),i=n(178),o=n(112),s=n(111)("IE_PROTO"),a=function(){},l=function(){var e,t=n(109)("iframe"),r=o.length;for(t.style.display="none",n(113).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("