12345678 |
- /*!
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: Modeling UI
- * (C) Copyright IBM Corp. 2020
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- (window.caModellingPerspective=window.caModellingPerspective||[]).push([[31],{1205:function(t,e,n){"use strict";n.d(e,"b",function(){return c}),n.d(e,"c",function(){return s}),n.d(e,"a",function(){return u});var r=n(1010),o=n.n(r),i=n(41),a=n(774);function c(t){return t?Object(i.d)(t):o.a}function s(t,e){var n=t[0],r=t[1],o=e.x,i=e.y,a=e.width,c=e.height;return o<=n&&o+a>=n&&i<=r&&i+c>=r}function u(t){return a.COLUMN_WIDTH-2*a.MARGIN-(t.isFact?a.MARGIN:t.isKey?3*a.MARGIN+2*a.ICON_SIZE:2*a.MARGIN+a.ICON_SIZE)}},1206:function(t,e,n){var r=n(1414);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0};n(36)(r,o);r.locals&&(t.exports=r.locals)},1409:function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return k});var r,o,i,a,c,s,u,p,l,d,m,y,f,g,O,_,b,v=n(90),h=n.n(v),I=n(6),T=n(1896),N=n(0),S=n.n(N),z=n(1204),A=n.n(z),C=n(5),R=n(14),E=n(2),j=n(9),D=n(8),G=n(4),L=n(1205),P=n(774);function w(){return(w=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function x(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function M(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function K(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function H(t,e,n,r,o){var i={};return Object.keys(r).forEach(function(t){i[t]=r[t]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(n,r){return r(t,e,n)||n},i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var k=(r=I.observable.ref,o=C.c.undoable(Object(E.getString)("normalizationUACreateLink")),i=C.c.undoable(Object(E.getString)("normalizationUARemoveLink")),a=C.c.undoable(Object(E.getString)("normalizationUACreateGroup")),c=C.c.undoable(Object(E.getString)("normalizationUARemoveGroup")),s=C.c.undoable(Object(E.getString)("normalizationUARemoveGroups")),u=C.c.undoable(Object(E.getString)("normalizationUAAddAttributeToGroup")),p=C.c.undoable(Object(E.getString)("normalizationUARemoveAttributeFromGroup")),l=C.c.undoable(Object(E.getString)("normalizationUASetCompositionType")),d=C.c.undoable(Object(E.getString)("normalizationUASetConstraintType")),m=C.c.undoable(Object(E.getString)("normalizationUASetSqlOperator")),b=_=function(t){function e(e,n){var r;return x(r=t.apply(this,arguments)||this,"querySubject",f,K(r)),x(r,"currentDropTarget",g,K(r)),x(r,"allowHoverStates",O,K(r)),r.querySubject=n,r}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var n=e.prototype;return n.prepareDataForLayout=function(){var t=this,e={children:[],edges:[]};return this.querySubject.getItemNormalization().getItemNormalizationGroup().forEach(function(n){var r={id:n.getIdentifier(),items:[]};if(n.getKey()&&n.getKey().getItemRef()){var o=S.a.QuerySubjectUtils.getQueryItemById(n.getKey().getItemRef(),t.querySubject);r.items.push({id:n.getKey().getItemRef(),label:o?o.getLabel():n.getKey().getItemRef(),isKey:!0,isFact:!1,keyConstraint:n.getKey().getKeyConstraint()||S.a.KeyConstraintType.REPEATING,keyComposition:n.getKey().getKeyComposition()||S.a.KeyCompositionType.USE_PARENT,isValid:null!=o&&o.getUsage()!==S.a.UsageType.FACT,icon:Object(L.b)(o)})}n.getAttribute().forEach(function(e){var n=S.a.QuerySubjectUtils.getQueryItemById(e.getItemRef(),t.querySubject),o=null!=n&&n.getUsage()===S.a.UsageType.FACT,i=e.getSqlOperator()||S.a.SqlOperatorType.MINIMUM,a=n&&(i===S.a.SqlOperatorType.MINIMUM||i===S.a.SqlOperatorType.MAXIMUM||!o&&i===S.a.SqlOperatorType.GROUP_BY||o&&i===S.a.SqlOperatorType.AVERAGE);r.items.push({id:e.getItemRef(),label:n?n.getLabel():e.getItemRef(),isKey:!1,isFact:o,sqlOperator:i,isValid:a,icon:Object(L.b)(n)})});var i=n.getParentGroupRef();i.length>0?i.forEach(function(t){return e.edges.push({id:""+t+P.EDGE_SEPARATOR+n.getIdentifier(),sources:[t],targets:[n.getIdentifier()]})}):e.edges.push({id:""+P.ROOT_GROUP+P.EDGE_SEPARATOR+n.getIdentifier(),sources:[P.ROOT_GROUP],targets:[n.getIdentifier()]}),e.children.push(r)}),e},n.generateDataForLayout=function(t){var e={},n={id:P.ROOT_GROUP,height:this.layoutOptions.ROOT_HEIGHT,width:this.layoutOptions.ROOT_WIDTH};return e.id="NormalizationLayoutData",e.properties={"elk.algorithm":"layered","elk.direction":this.layoutOptions.DIRECTION},e.children=[n],t&&t.children&&(e.children=e.children.concat(t.children.map(function(t){var e=t.items.map(function(t){return w({width:P.COLUMN_WIDTH,height:P.COLUMN_HEIGHT},t)});return{id:t.id,width:P.GROUP_WIDTH,height:P.GROUP_HEIGHT+P.EXTRA_COLUMN_HEIGHT*(t.items.length-1),items:e}}))),e.edges=[],t&&t.edges&&(e.edges=t.edges.map(function(t){return{id:t.id,sources:t.sources,targets:t.targets}})),e},n.sortLayoutData=function(t){var e=this;return t.children.sort(function(t,n){var r=e.layoutOptions.DIRECTION===P.LAYOUT_OPTIONS.HORIZONTAL.DIRECTION?t:n,o=e.layoutOptions.DIRECTION===P.LAYOUT_OPTIONS.HORIZONTAL.DIRECTION?n:t;return r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:1}),t.edges.sort(function(t,n){var r=e.layoutOptions.DIRECTION===P.LAYOUT_OPTIONS.HORIZONTAL.DIRECTION?t:n,o=e.layoutOptions.DIRECTION===P.LAYOUT_OPTIONS.HORIZONTAL.DIRECTION?n:t;return r.sections[0].startPoint.x<o.sections[0].startPoint.x?-1:r.sections[0].startPoint.x>o.sections[0].startPoint.x?1:r.sections[0].startPoint.y<o.sections[0].startPoint.y?-1:1}),t},n.getLinkedGroupIds=function(t){return t.split(P.EDGE_SEPARATOR)},n.getNormalizationGroup=function(t){return this.querySubject.getItemNormalization()&&this.querySubject.getItemNormalization().getItemNormalizationGroup().find(function(e){return e.getKey()&&e.getKey().getItemRef()===t.getIdentifier()||e.getAttribute().some(function(e){return e.getItemRef()===t.getIdentifier()})})},n.getAttributeIndex=function(t){var e=this.getNormalizationGroup(t);if(e){var n=!!e.getKey();return n&&t.getIdentifier()===e.getKey().getItemRef()?0:e.getAttribute().findIndex(function(e){return e.getItemRef()===t.getIdentifier()})+(n?1:0)}return-1},n.getValidSelection=function(t){return h()(t,function(t){return t.getObjectType()===S.a.MoserObjectTypes.FOLDER?Object(R.s)(t):t}).filter(function(t){return t.getObjectType()===S.a.MoserObjectTypes.QUERY_ITEM&&!Object(G.isFromLookupReference)(t)})},n.hasExistingLink=function(t,e){return!!e&&e.getParentGroupRef().indexOf(t.getIdentifier())>-1},n.getAncestorGroups=function(t,e){for(var n=this,r=[],o=e.getParentGroupRef(),i=function(e){var i=o[e],a=t.find(function(t){return t.getIdentifier()===i}),c=n.getAncestorGroups(t,a);r.push(i),c&&c.length>0&&(r=r.concat(c))},a=0;a<o.length;a++)i(a);return r},n.isAncestorGroup=function(t,e,n){return this.getAncestorGroups(t,n).indexOf(e.getIdentifier())>-1},n.canCreateLinkToGroup=function(t,e){var n=this.querySubject.getItemNormalization().getItemNormalizationGroup(),r=n.find(function(e){return e.getIdentifier()===t}),o=n.find(function(t){return t.getIdentifier()===e});return r&&o&&r!==o&&!this.hasExistingLink(r,o)&&!this.isAncestorGroup(n,o,r)},n.isLinkedToDummy=function(t){return!!t&&0===t.indexOf(P.ROOT_GROUP)},n.getItemLabel=function(t){var e=S.a.QuerySubjectUtils.getQueryItemById(t,this.querySubject);return e&&e.getLabel()||t},n.isFactItem=function(t){var e=S.a.QuerySubjectUtils.getQueryItemById(t,this.querySubject);return e&&e.getUsage()===S.a.UsageType.FACT||!1},n.getQueryItemById=function(t){return S.a.QuerySubjectUtils.getQueryItemById(t,this.querySubject)},n._addNormalizationGroup=function(t,e){t.getItemNormalization()||t.setItemNormalization(this.provider.getObjectFactory().createItemNormalizationType()),t.getItemNormalization().addItemNormalizationGroup(e)},n._generateNormalizationKey=function(t){return this.provider.getJSONObjectFactory().createItemNormalizationGroupTypeKey({itemRef:t,keyConstraint:S.a.KeyConstraintType.REPEATING,keyComposition:S.a.KeyCompositionType.USE_PARENT})},n._generateNormalizationAttribute=function(t,e){return this.provider.getJSONObjectFactory().createItemNormalizationGroupTypeAttribute({itemRef:e,sqlOperator:S.a.SqlOperatorType.MINIMUM})},n._generateNormalizationGroup=function(t,e){var n=this.provider.getObjectFactory().createItemNormalizationGroupType();return n.setLabel(e),S.a.ModuleUtils.generateObjectId(t,n),this.isFactItem(e)?n.addAttribute(this._generateNormalizationAttribute(t,e)):n.setKey(this._generateNormalizationKey(e)),n},n._swapKeyAndAttribute=function(t,e,n){var r=this._generateNormalizationAttribute(e,t.getKey().getItemRef()),o=this._generateNormalizationKey(n.getItemRef());t.removeAttribute(n),t.addAttributeAt(0,r),t.setKey(o)},n._addAttribute=function(t,e,n){var r=this.querySubject,o=r.getItemNormalization().getItemNormalizationGroup(),i=o.find(function(e){return e.getIdentifier()===t}),a="string"==typeof e?this._generateNormalizationAttribute(r,e):e;if(i){o.some(function(t){return t.getKey()&&t.getKey().getItemRef()===e||t.getAttribute().some(function(t){return t.getItemRef()===e})})&&Object(G.deleteNormalizationAttribute)(r,e);var c=!!i.getKey();0===n?c?this._swapKeyAndAttribute(i,r,a):i.setKey(this._generateNormalizationKey(e)):null!=n?i.addAttributeAt(n-(c?1:0),a):i.addAttribute(a)}},n.createLink=function(t,e){var n=this.querySubject.getItemNormalization().getItemNormalizationGroup(),r=n.find(function(e){return e.getIdentifier()===t}),o=n.find(function(t){return t.getIdentifier()===e});this.canCreateLinkToGroup(t,e)&&o.addParentGroupRef(r.getIdentifier())},n.removeLink=function(t,e){var n=this.querySubject.getItemNormalization().getItemNormalizationGroup().find(function(t){return t.getIdentifier()===e}),r=n.getParentGroupRef().indexOf(t);r>-1&&n.removeParentGroupRefAt(r)},n.createGroup=function(t){var e=this;if(void 0===t&&(t=[]),0!==t.length){var n,r=this.querySubject,o=t.slice(),i=t.findIndex(function(t){return t.getUsage()===S.a.UsageType.IDENTIFIER});if(-1===i&&(i=t.findIndex(function(t){return t.getUsage()===S.a.UsageType.ATTRIBUTE})),i>-1)n=o.splice(i,1)[0];else n=o.splice(0,1)[0];r.getItemNormalization()&&r.getItemNormalization().getItemNormalizationGroup().length&&Object(G.deleteNormalizationAttribute)(r,n.getIdentifier());var a=this._generateNormalizationGroup(r,n.getIdentifier());this._addNormalizationGroup(r,a),o.forEach(function(t){Object(G.deleteNormalizationAttribute)(e.querySubject,t.getIdentifier()),e._addAttribute(a.getIdentifier(),t.getIdentifier())})}},n.createGroupFromDnD=function(t){if(this){var e=this.getValidSelection(t);this.createGroup(e)}},n.removeGroup=function(t){var e=this.querySubject.getItemNormalization().getItemNormalizationGroup().find(function(e){return t===e.getIdentifier()});e&&Object(G.deleteNormalizationGroup)(this.querySubject,e)},n.removeGroups=function(){for(var t=this.querySubject.getItemNormalization(),e=t.getItemNormalizationGroup();e.length>0;)t.removeItemNormalizationGroupAt(0);this.querySubject.setItemNormalization(null)},n.addAttributesToGroup=function(t,e,n){var r=this,o=[];e.forEach(function(t){var e=r.getQueryItemById(t);if(r.getNormalizationGroup(e)){var n=Object(G.deleteNormalizationAttribute)(r.querySubject,t,!0);n&&o.push(n)}}),e.forEach(function(e,i){var a=o.find(function(t){return t.getItemRef()===e});r._addAttribute(t,a||e,n+i)})},n.removeAttributes=function(t){var e=this;t.forEach(function(t){Object(G.deleteNormalizationAttribute)(e.querySubject,t)})},n.onItemMenu=function(t){var e=t.coordinates,n=e[0],r=e[1],o=t.ids,i=t.action;(i!==P.NORMALIZATION_ACTION.LINK||i===P.NORMALIZATION_ACTION.LINK&&o.length>0)&&this.provider.showContextMenu(this,P.NORMALIZATION,{ids:o,action:i,activeElement:document.activeElement},n,r)},n._setKeyComposition=function(t,e){var n=this.querySubject.getItemNormalization().getItemNormalizationGroup().find(function(e){return e.getKey()&&e.getKey().getItemRef()===t});n&&n.getKey().setKeyComposition(e)},n.setKeyCompositions=function(t,e){var n=this;t.forEach(function(t){n._setKeyComposition(t,e)})},n._setKeyConstraint=function(t,e){var n=this.querySubject.getItemNormalization().getItemNormalizationGroup().find(function(e){return e.getKey()&&e.getKey().getItemRef()===t});n&&n.getKey().setKeyConstraint(e)},n.setKeyConstraints=function(t,e){var n=this;t.forEach(function(t){n._setKeyConstraint(t,e)})},n._setAttributeSqlOperator=function(t,e){var n=this.querySubject.getItemNormalization().getItemNormalizationGroup().find(function(e){return e.getAttribute().some(function(e){return e.getItemRef()===t})});n&&n.getAttribute().find(function(e){return e.getItemRef()===t}).setSqlOperator(e)},n.setAttributeSqlOperators=function(t,e){var n=this;t.forEach(function(t){n._setAttributeSqlOperator(t,e)})},n.setCurrentDropTarget=function(t,e){var n=this.currentDropTarget;t?n&&n.attributeRef===t&&n.hoveredBelow===e||(this.currentDropTarget={attributeRef:t,hoveredBelow:e}):this.currentDropTarget=null},n.setAllowHoverStates=function(t){void 0===t&&(t=!1),this.allowHoverStates=t},n.setLayoutOptions=function(t){this.layoutOptions=t},n.setSelection=function(t){this.selectedItems=t},function(t,e,n){e&&M(t.prototype,e),n&&M(t,n)}(e,[{key:"layoutOptions",get:function(){if(!this.querySubject)return P.LAYOUT_OPTIONS.HORIZONTAL;var t=Object(D.getObjectProperty)(this.querySubject,j.m);return t?(t.ROOT_HEIGHT||(t.ROOT_HEIGHT=t.DIRECTION===P.LAYOUT_OPTIONS.VERTICAL.DIRECTION?P.LAYOUT_OPTIONS.VERTICAL.ROOT_HEIGHT:P.LAYOUT_OPTIONS.HORIZONTAL.ROOT_HEIGHT),t.ROOT_WIDTH||(t.ROOT_WIDTH=t.DIRECTION===P.LAYOUT_OPTIONS.VERTICAL.DIRECTION?P.LAYOUT_OPTIONS.VERTICAL.ROOT_WIDTH:P.LAYOUT_OPTIONS.HORIZONTAL.ROOT_WIDTH),t):P.LAYOUT_OPTIONS.HORIZONTAL},set:function(t){Object(D.setObjectProperty)(this.querySubject,j.m,t)}},{key:"isHorizontalLayout",get:function(){return this.layoutOptions.DIRECTION===P.LAYOUT_OPTIONS.HORIZONTAL.DIRECTION}},{key:"selectedQuerySubject",get:function(){return this.querySubject}},{key:"layoutDataPromise",get:function(){var t=this,e=new A.a;return Object(T.a)(e.layout(this.generateDataForLayout(this.prepareDataForLayout())).then(function(e){return t.sortLayoutData(e)}))}},{key:"layoutData",get:function(){var t=this.querySubject&&this.querySubject.getItemNormalization()&&this.querySubject.getItemNormalization().getItemNormalizationGroup().length&&this.layoutDataPromise.value;return t&&t.children&&t.children.forEach(function(t){t.items&&t.items.forEach(function(e,n){e.x=t.x+P.MARGIN,e.y=t.y+P.MARGIN+P.EXTRA_COLUMN_HEIGHT*n})}),t}},{key:"layoutDataPending",get:function(){return!!(this.querySubject&&this.querySubject.getItemNormalization()&&this.querySubject.getItemNormalization().getItemNormalizationGroup().length&&this.layoutDataPromise.isPending())}},{key:"selectedItems",get:function(){return this.getValidSelection(this.provider.getSelection())},set:function(t){this.provider.setSelection(t)}},{key:"selectedItemsRefs",get:function(){return this.selectedItems.map(function(t){return t.getIdentifier()})}}]),e}(C.a),_.defaultProvider={getSelection:function(){return[]},setSelection:function(){}},f=H((y=b).prototype,"querySubject",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),g=H(y.prototype,"currentDropTarget",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),O=H(y.prototype,"allowHoverStates",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),H(y.prototype,"layoutOptions",[I.computed],Object.getOwnPropertyDescriptor(y.prototype,"layoutOptions"),y.prototype),H(y.prototype,"isHorizontalLayout",[I.computed],Object.getOwnPropertyDescriptor(y.prototype,"isHorizontalLayout"),y.prototype),H(y.prototype,"selectedQuerySubject",[I.computed],Object.getOwnPropertyDescriptor(y.prototype,"selectedQuerySubject"),y.prototype),H(y.prototype,"layoutDataPromise",[I.computed],Object.getOwnPropertyDescriptor(y.prototype,"layoutDataPromise"),y.prototype),H(y.prototype,"layoutData",[I.computed],Object.getOwnPropertyDescriptor(y.prototype,"layoutData"),y.prototype),H(y.prototype,"selectedItems",[I.computed],Object.getOwnPropertyDescriptor(y.prototype,"selectedItems"),y.prototype),H(y.prototype,"selectedItemsRefs",[I.computed],Object.getOwnPropertyDescriptor(y.prototype,"selectedItemsRefs"),y.prototype),H(y.prototype,"getLinkedGroupIds",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"getLinkedGroupIds"),y.prototype),H(y.prototype,"getNormalizationGroup",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"getNormalizationGroup"),y.prototype),H(y.prototype,"getAttributeIndex",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"getAttributeIndex"),y.prototype),H(y.prototype,"getValidSelection",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"getValidSelection"),y.prototype),H(y.prototype,"hasExistingLink",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"hasExistingLink"),y.prototype),H(y.prototype,"getAncestorGroups",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"getAncestorGroups"),y.prototype),H(y.prototype,"isAncestorGroup",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"isAncestorGroup"),y.prototype),H(y.prototype,"canCreateLinkToGroup",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"canCreateLinkToGroup"),y.prototype),H(y.prototype,"isLinkedToDummy",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"isLinkedToDummy"),y.prototype),H(y.prototype,"getItemLabel",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"getItemLabel"),y.prototype),H(y.prototype,"isFactItem",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"isFactItem"),y.prototype),H(y.prototype,"getQueryItemById",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"getQueryItemById"),y.prototype),H(y.prototype,"createLink",[o],Object.getOwnPropertyDescriptor(y.prototype,"createLink"),y.prototype),H(y.prototype,"removeLink",[i],Object.getOwnPropertyDescriptor(y.prototype,"removeLink"),y.prototype),H(y.prototype,"createGroup",[a],Object.getOwnPropertyDescriptor(y.prototype,"createGroup"),y.prototype),H(y.prototype,"createGroupFromDnD",[C.c],Object.getOwnPropertyDescriptor(y.prototype,"createGroupFromDnD"),y.prototype),H(y.prototype,"removeGroup",[c],Object.getOwnPropertyDescriptor(y.prototype,"removeGroup"),y.prototype),H(y.prototype,"removeGroups",[s],Object.getOwnPropertyDescriptor(y.prototype,"removeGroups"),y.prototype),H(y.prototype,"addAttributesToGroup",[u],Object.getOwnPropertyDescriptor(y.prototype,"addAttributesToGroup"),y.prototype),H(y.prototype,"removeAttributes",[p],Object.getOwnPropertyDescriptor(y.prototype,"removeAttributes"),y.prototype),H(y.prototype,"onItemMenu",[C.c],Object.getOwnPropertyDescriptor(y.prototype,"onItemMenu"),y.prototype),H(y.prototype,"setKeyCompositions",[l],Object.getOwnPropertyDescriptor(y.prototype,"setKeyCompositions"),y.prototype),H(y.prototype,"setKeyConstraints",[d],Object.getOwnPropertyDescriptor(y.prototype,"setKeyConstraints"),y.prototype),H(y.prototype,"setAttributeSqlOperators",[m],Object.getOwnPropertyDescriptor(y.prototype,"setAttributeSqlOperators"),y.prototype),H(y.prototype,"setCurrentDropTarget",[C.c],Object.getOwnPropertyDescriptor(y.prototype,"setCurrentDropTarget"),y.prototype),H(y.prototype,"setAllowHoverStates",[C.c],Object.getOwnPropertyDescriptor(y.prototype,"setAllowHoverStates"),y.prototype),H(y.prototype,"setLayoutOptions",[C.c],Object.getOwnPropertyDescriptor(y.prototype,"setLayoutOptions"),y.prototype),H(y.prototype,"setSelection",[C.c],Object.getOwnPropertyDescriptor(y.prototype,"setSelection"),y.prototype),y)},1413:function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return h});var r,o=n(1),i=n.n(o),a=n(20),c=n.n(a),s=n(16),u=n(19),p=n(3),l=n(278),d=n.n(l),m=n(5),y=n(63),f=n(2),g=n(774),O=(n(1206),n(1415));function _(){return(_=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function b(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var v=Object(p.itemDnD)(function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.render=function(){var t=this.props,e=t.hoveredActive,n=t.className,r=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,["hoveredActive","className"]);return i.a.createElement(p.Container,_({},r,{className:Object(p.classnames)(n,{active:e})}))},e}(o.Component),{dropItemType:[y.d,y.f],scrollable:!0,simpleHoverStates:!1}),h=Object(m.e)(function(t){return{selectedQuerySubject:t.selectedQuerySubject,layoutData:t.layoutData,layoutDataPending:t.layoutDataPending,isHorizontalLayout:t.isHorizontalLayout,allowHoverStates:t.allowHoverStates,getValidSelection:t.getValidSelection,selectedItems:t.selectedItems.slice(),setCurrentDropTarget:t.setCurrentDropTarget,createGroup:t.createGroup,setLayoutOptions:t.setLayoutOptions}})(r=Object(u.withErrorHandling)()(r=Object(s.observer)(r=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this)._node=void 0,e._canDrop=function(t,n,r){var o=n.items,i=r.getItemType();return r.isOver({shallow:!0})&&(i===y.f||e.props.getValidSelection(o).length>0)},e._onDrop=function(t,n,r){var o=n.items,i=r.getItemType(),a=[];i===y.f?a=e.props.selectedItems:i===y.d&&(a=e.props.getValidSelection(o)),e.props.createGroup(a)},e._onHover=function(){e.props.setCurrentDropTarget(null)},e._renderEmpty=function(){return i.a.createElement(u.EmptyState,{icon:d.a,header:Object(f.getString)("normalizeTable"),body:Object(f.getString)("normalizeTableDetails")})},e._ref=function(t){e._node=c.a.findDOMNode(t)},e._renderNormalizationCanvas=function(t){return i.a.createElement(p.FlexLayout,{direction:"column"},i.a.createElement(p.FlexLayout,{direction:"row"},t&&i.a.createElement(p.FlexItem,{className:"bi-mui-normalization-title",gutter:[3,2,3,2],"aria-label":t,shrink:!0},i.a.createElement(p.TruncatedText,{value:t})),i.a.createElement(p.FlexItem,{align:"right",gutter:[2,1]},i.a.createElement(p.Button,{intent:"primary",variant:e.props.isHorizontalLayout?"solid":"frameless",label:Object(f.getString)("normalizationViewHorizontal"),"aria-label":Object(f.getString)("normalizationViewHorizontal"),onClick:function(){return e.props.setLayoutOptions(g.LAYOUT_OPTIONS.HORIZONTAL)}})),i.a.createElement(p.FlexItem,{gutter:[2,2,2,1]},i.a.createElement(p.Button,{intent:"primary",variant:e.props.isHorizontalLayout?"frameless":"solid",label:Object(f.getString)("normalizationViewVertical"),"aria-label":Object(f.getString)("normalizationViewVertical"),onClick:function(){return e.props.setLayoutOptions(g.LAYOUT_OPTIONS.VERTICAL)}}))),i.a.createElement(p.Separator,null),i.a.createElement(p.FlexItem,{gutter:[0,0,0,.5]},i.a.createElement(O.a,null)))},e}return b(e,t),e.prototype.render=function(){var t=this.props,e=t.selectedQuerySubject,n=t.allowHoverStates,r=t.layoutData,o=!t.layoutDataPending&&(null==r||null!=r&&r.children&&1===r.children.length),a=e&&e.getLabel&&Object(f.getString)("normalizeTable")+" - "+e.getLabel(),c=e&&!o&&null!=r&&r.children&&r.children.length>1;return i.a.createElement(v,{className:Object(p.classnames)("bi-mui-normalization-container",{disabledHovers:!n}),ref:this._ref,id:"NormalizationTab","aria-label":c&&Object(f.getString)("normalizationALGroups",{groups:r.children.length-1})||"",height:"100%",width:"100%",onDrop:this._onDrop,canDrop:this._canDrop,onHover:this._onHover,tabIndex:0},o?this._renderEmpty():this._renderNormalizationCanvas(a))},e}(o.Component))||r)||r)||r},1414:function(t,e,n){(t.exports=n(32)(void 0)).push([t.i,'.bi-mui-normalization-title{font-size:14px;font-weight:700;color:#343334}.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__attribute:focus,.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__attribute:hover,.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__border:focus,.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__border:hover,.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__fact:focus,.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__fact:hover{stroke:#5392ff;stroke-width:2px}.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__action:focus,.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__action:hover{stroke:#5392ff;stroke-width:1px}.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__path:focus,.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__path:hover{stroke-width:4px}.bi-mui-normalization-container{overflow:auto}.bi-mui-normalization-container.is-active:after{border:2px dashed;content:"";position:absolute;left:0;top:0;right:0;bottom:0;border-color:blue}.bi-mui-normalization-container__canvas{min-width:100%;min-height:100%;stroke-width:2px}.bi-mui-normalization-container__canvas.is-connecting .bi-mui-normalization-container__canvas__path,.bi-mui-normalization-container__canvas.is-connecting .bi-mui-normalization-container__canvas__path__aligner{opacity:.5}.bi-mui-normalization-container__canvas__attribute{fill:#e1ebf7}.bi-mui-normalization-container__canvas__attribute.selected{stroke:#5392ff;stroke-width:2px}.bi-mui-normalization-container__canvas__fact{fill:#f7e4fb}.bi-mui-normalization-container__canvas__fact.selected{stroke:#5392ff;stroke-width:2px}.bi-mui-normalization-container__canvas__dropZone{fill:none}.bi-mui-normalization-container__canvas__dropZone:hover{pointer-events:none}.bi-mui-normalization-container__canvas__dropZoneHighlight{stroke:#5392ff;stroke-dasharray:4}.bi-mui-normalization-container__canvas__dropZoneHighlight:hover{pointer-events:none}.bi-mui-normalization-container__canvas__action rect{cursor:pointer;fill:transparent}.bi-mui-normalization-container__canvas__icon,.bi-mui-normalization-container__canvas__label{fill:#000;pointer-events:none;user-select:none}.bi-mui-normalization-container__canvas__icon.invalid,.bi-mui-normalization-container__canvas__label.invalid{fill:#e62325}.bi-mui-normalization-container__canvas__border{fill:#fff;stroke:#a6a5a6;stroke-width:1px}.bi-mui-normalization-container__canvas__border__aligner{fill:none;stroke:#1f57a4}.bi-mui-normalization-container__canvas__border.validForLinkCreation{stroke:#00aa5e;stroke-width:2px}.bi-mui-normalization-container__canvas__border.validForLinkCreation:hover{stroke-width:4px}.bi-mui-normalization-container__canvas__border.validForLinkCreation~*{pointer-events:none}.bi-mui-normalization-container__canvas__border.invalidForLinkCreation{cursor:no-drop}.bi-mui-normalization-container__canvas__border.invalidForLinkCreation~*{pointer-events:none}.bi-mui-normalization-container__canvas__path,.bi-mui-normalization-container__canvas__path__aligner{fill:none;stroke:#1f57a4}.bi-mui-normalization-container__canvas__connector circle{stroke:#1f57a4;stroke-width:1px;fill:#fff}.bi-mui-normalization-container__canvas__connector circle:hover{stroke-width:2px}.bi-mui-normalization-container__canvas__connector svg{fill:#1d3458}.bi-mui-normalization-container__canvas__drawing{fill:none;stroke-width:3px;stroke:#00aa5e}',""])},1415:function(t,e,n){"use strict";n.d(e,"a",function(){return At});var r,o,i=n(0),a=n.n(i),c=n(1),s=n.n(c),u=n(759),p=n(16),l=n(3),d=n(1416),m=n.n(d),y=n(1010),f=n.n(y),g=n(123),O=n.n(g),_=n(1417),b=n.n(_),v=n(1418),h=n.n(v),I=n(1419),T=n.n(I),N=n(1420),S=n.n(N),z=n(1421),A=n.n(z),C=n(1422),R=n.n(C),E=n(302),j=n.n(E),D=n(5),G=n(2),L=n(1207),P=n(277),w=n(1205),x=n(774),M=(n(1206),n(1423)),K=n(1424);var H=1e3,k=150,U="NormalizationContainer__columnGroups",q="NormalizationContainer__links",B="columnGroup",F="columnGroupBorder",Q="columnGroupLink",V="columnGroupConnector",Z="columnContainer",Y="Attribute",W="Icon",J="Label",X="DropZone",$="DrawingConnector",tt="bi-mui-normalization-container__canvas",et=tt+"__attribute",nt=tt+"__columnContainer",rt=tt+"__fact",ot=tt+"__icon",it=tt+"__action",at=tt+"__label",ct=tt+"__dropZone",st=tt+"__path",ut=tt+"__drawing",pt=tt+"__border",lt=it+"__title",dt=pt+"__aligner",mt=st+"__aligner",yt="selected",ft="invalid",gt="invalidForLinkCreation",Ot="validForLinkCreation",_t=tt+"__connector",bt="data-d3-id",vt="data-d3-type",ht="KEY_ACTION_CONSTRAINT",It="KEY_ACTION_COMPOSITION",Tt="ATTRIBUTE_ACTION_OPERATOR",Nt=((r={})[a.a.SqlOperatorType.GROUP_BY.toString()]=O.a,r[a.a.SqlOperatorType.MINIMUM.toString()]=h.a,r[a.a.SqlOperatorType.MAXIMUM.toString()]=T.a,r[a.a.SqlOperatorType.AVERAGE.toString()]=S.a,r[a.a.KeyConstraintType.REPEATING.toString()]=A.a,r[a.a.KeyConstraintType.UNIQUE.toString()]=R.a,r[a.a.KeyCompositionType.USE_PARENT.toString()]=m.a,r[a.a.KeyCompositionType.INDEPENDENT.toString()]=b.a,r);function St(t){return"["+bt+"="+t+"]"}function zt(t){return"["+vt+"="+t+"]"}var At=Object(D.e)(function(t){return{normalizationStore:t,selectedQuerySubject:t.selectedQuerySubject,selectedItems:t.selectedItems,selectedItemsRefs:t.selectedItemsRefs,layoutData:t.layoutData,layoutOptions:t.layoutOptions,isLinkedToDummy:t.isLinkedToDummy,isHorizontalLayout:t.isHorizontalLayout,getQueryItemById:t.getQueryItemById,canCreateLinkToGroup:t.canCreateLinkToGroup,getLinkedGroupIds:t.getLinkedGroupIds,createLink:t.createLink,onItemMenu:t.onItemMenu,setSelection:t.setSelection,setAllowHoverStates:t.setAllowHoverStates,setAttributeSqlOperators:t.setAttributeSqlOperators,setKeyConstraints:t.setKeyConstraints,setKeyCompositions:t.setKeyCompositions,removeAttributes:t.removeAttributes,removeGroup:t.removeGroup,removeGroups:t.removeGroups,removeLink:t.removeLink}})(o=Object(P.a)(function(t){return t.normalizationStore&&!t.normalizationStore.layoutDataPending})(o=Object(p.observer)(o=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).state={columns:null,actionMenu:null},e._node=void 0,e._startingLinePoint=void 0,e._activeConnectGroup=void 0,e._onMenu=function(t,n){var r=t.filter(function(t){return!e.props.isLinkedToDummy(t)}),o={coordinates:Object(L.b)(u.event),action:n,ids:r};e.props.onItemMenu(o)},e._onSqlOperatorMenu=function(t){var n=[{icon:Nt[a.a.SqlOperatorType.MINIMUM.toString()],value:a.a.SqlOperatorType.MINIMUM,label:Object(G.getString)("normalizationAttributeSQLOperatorMinimum")},{icon:Nt[a.a.SqlOperatorType.MAXIMUM.toString()],value:a.a.SqlOperatorType.MAXIMUM,label:Object(G.getString)("normalizationAttributeSQLOperatorMaximum")}];e.setState({actionMenu:{node:u.event.target,callback:function(t){e.props.setAttributeSqlOperators(e.props.selectedItemsRefs,t)},attributeId:t.id,content:[].concat(n,[t.isFact?{icon:Nt[a.a.SqlOperatorType.AVERAGE.toString()],value:a.a.SqlOperatorType.AVERAGE,label:Object(G.getString)("normalizationAttributeSQLOperatorAverage")}:{icon:Nt[a.a.SqlOperatorType.GROUP_BY.toString()],value:a.a.SqlOperatorType.GROUP_BY,label:Object(G.getString)("normalizationAttributeSQLOperatorGroupBy")}])}}),u.event.stopPropagation()},e._onKeyConstraintMenu=function(t){e.setState({actionMenu:{node:u.event.target,callback:function(t){e.props.setKeyConstraints(e.props.selectedItemsRefs,t)},attributeId:t.id,content:[{icon:Nt[a.a.KeyConstraintType.UNIQUE.toString()],value:a.a.KeyConstraintType.UNIQUE,label:Object(G.getString)("normalizationKeyConstraintUnique")},{icon:Nt[a.a.KeyConstraintType.REPEATING.toString()],value:a.a.KeyConstraintType.REPEATING,label:Object(G.getString)("normalizationKeyConstraintRepeating")}]}}),u.event.stopPropagation()},e._onKeyCompositionMenu=function(t){e.setState({actionMenu:{node:u.event.target,callback:function(t){e.props.setKeyCompositions(e.props.selectedItemsRefs,t)},attributeId:t.id,content:[{icon:Nt[a.a.KeyCompositionType.INDEPENDENT.toString()],value:a.a.KeyCompositionType.INDEPENDENT,label:Object(G.getString)("normalizationKeyCompositionIndependent")},{icon:Nt[a.a.KeyCompositionType.USE_PARENT.toString()],value:a.a.KeyCompositionType.USE_PARENT,label:Object(G.getString)("normalizationKeyCompositionUseParent")}]}}),u.event.stopPropagation()},e._clearDiagram=function(){e._select().html(null),e.setState({columns:null})},e._renderColumn=function(t,n){var r=n.selectAll(zt(Z)).filter(Object(L.c)(St(t.id))),o=r.select(zt(Y)),i=r.select(zt(W)),c=r.select(zt(J)),s=r.select(zt(X)),p=function(t,e,n){var o=r.append("g").classed(it,!0).attr(bt,n+"__"+t).attr(vt,t);o.append("rect").classed(it,!0).on("click",e).on("contextmenu",function(){return u.event.stopPropagation()}).on("keydown",function(t){13===u.event.keyCode&&e(t)}),o.append("svg").classed(ot,!0),o.append("title").classed(lt,!0)},l=function(t,e,n,o){void 0===o&&(o=0);var i=r.select(zt(t)).attr("style","display: "+(n?"auto":"none")),c=function(t){return t.x+x.COLUMN_WIDTH-2*x.MARGIN-o},s=function(t){return t.y+.6*x.MARGIN},u=x.ICON_SIZE,p=x.ICON_SIZE;i.select("svg").attr("width",u).attr("height",p).transition().duration(H).attr("x",c).attr("y",s),e&&Object(L.d)(i.select("svg"),e),i.select("rect").attr("tabindex",n?0:-1).attr("focusable",n).attr("aria-label",function(e){if(n){if(t===It)return Object(G.getString)("normalizationALAction",{actionType:e.keyComposition===a.a.KeyCompositionType.INDEPENDENT?Object(G.getString)("normalizationKeyCompositionIndependent"):Object(G.getString)("normalizationKeyCompositionUseParent")});if(t===ht)return Object(G.getString)("normalizationALAction",{actionType:e.keyConstraint===a.a.KeyConstraintType.REPEATING?Object(G.getString)("normalizationKeyConstraintRepeating"):Object(G.getString)("normalizationKeyConstraintUnique")});if(t===Tt)return Object(G.getString)("normalizationALAction",{actionType:e.sqlOperator===a.a.SqlOperatorType.GROUP_BY?Object(G.getString)("normalizationAttributeSQLOperatorGroupBy"):Object(G.getString)("normalizationAttributeSQLOperatorMinimum")})}return""}).transition().duration(H).attr("x",c).attr("y",s).attr("width",u).attr("height",p),i.select("title").text(function(e){if(t===It)return e.keyComposition===a.a.KeyCompositionType.INDEPENDENT?Object(G.getString)("normalizationKeyCompositionIndependent"):Object(G.getString)("normalizationKeyCompositionUseParent");if(t===ht)return e.keyConstraint===a.a.KeyConstraintType.REPEATING?Object(G.getString)("normalizationKeyConstraintRepeating"):Object(G.getString)("normalizationKeyConstraintUnique");if(t===Tt){var n;switch(e.sqlOperator){case a.a.SqlOperatorType.GROUP_BY:n=Object(G.getString)("normalizationAttributeSQLOperatorGroupBy");break;case a.a.SqlOperatorType.MAXIMUM:n=Object(G.getString)("normalizationAttributeSQLOperatorMaximum");break;case a.a.SqlOperatorType.AVERAGE:n=Object(G.getString)("normalizationAttributeSQLOperatorAverage");break;default:n=Object(G.getString)("normalizationAttributeSQLOperatorMinimum")}return n}return""})};o.empty()&&(o=r.append("rect").attr("tabindex",0).attr("focusable",!0).attr(vt,Y),i=r.append("svg").classed(ot,!0).attr(vt,W),c=r.append("text").classed(at,!0).attr(vt,J),s=r.append("rect").classed(ct,!0).attr(vt,X)),p(ht,e._onKeyConstraintMenu,t.id),p(It,e._onKeyCompositionMenu,t.id),p(Tt,e._onSqlOperatorMenu,t.id),o.classed(rt,t.isFact).classed(et,!t.isFact).attr("aria-label",function(){return t.isFact?"":t.isKey?Object(G.getString)("normalizationALKey",{id:t.id,keyComposition:t.keyComposition===a.a.KeyCompositionType.INDEPENDENT?Object(G.getString)("normalizationKeyCompositionIndependent"):Object(G.getString)("normalizationKeyCompositionUseParent"),keyConstraint:t.keyConstraint===a.a.KeyConstraintType.REPEATING?Object(G.getString)("normalizationKeyConstraintRepeating"):Object(G.getString)("normalizationKeyConstraintUnique")}):Object(G.getString)("normalizationALAttribute",{id:t.id,sqlOperator:t.sqlOperator===a.a.SqlOperatorType.GROUP_BY?Object(G.getString)("normalizationAttributeSQLOperatorGroupBy"):Object(G.getString)("normalizationAttributeSQLOperatorMinimum")})}),o.select("title").remove(),o.classed(yt,e.props.selectedItems.some(function(e){return t.id===e.getIdentifier()})).transition().duration(H).attr("x",function(t){return t.x}).attr("y",function(t){return t.y}).attr("width",function(t){return t.id===x.ROOT_GROUP?0:x.COLUMN_WIDTH}).attr("height",function(t){return t.id===x.ROOT_GROUP?0:x.COLUMN_HEIGHT}),i.classed(ft,!t.isValid).attr("width",x.ICON_SIZE).attr("height",x.ICON_SIZE).transition().duration(H).attr("x",function(t){return t.x+x.MARGIN/2}).attr("y",function(t){return t.y+.6*x.MARGIN}),Object(L.d)(i,t.isValid?t.icon:f.a),c.text(function(t){return t.label});var d=c.node().getComputedTextLength?c.node().getComputedTextLength():k,m=Object(w.a)(t);d>m&&(c.text(function(t){return Object(L.e)(t.label,d,m)}),o.append("title").text(function(t){return t.label})),c.transition().duration(H).attr("x",function(t){return t.x+2*x.MARGIN}).attr("y",function(t){return t.y+1.5*x.MARGIN}),s.transition().duration(H).attr("x",function(t){return t.x-x.MARGIN}).attr("y",function(t){return t.y-x.MARGIN/2}).attr("width",function(t){return t.id===x.ROOT_GROUP?0:x.COLUMN_WIDTH+2*x.MARGIN}).attr("height",function(t){return t.id===x.ROOT_GROUP?0:x.COLUMN_HEIGHT+x.MARGIN}),l(It,Nt[t.keyComposition],t.isKey),l(ht,Nt[t.keyConstraint],t.isKey,24),l(Tt,Nt[t.sqlOperator],!t.isKey)},e._handleColumnMouseDown=function(t){var n=e.props.getQueryItemById(t.id,e.props.selectedQuerySubject);if(n){var r=u.event;if(r.ctrlKey||r.metaKey){var o=e.props.selectedItems.slice(),i=o.findIndex(function(t){return t.getIdentifier()===n.getIdentifier()});i>-1&&o.length>1?o.splice(i,1):-1===i&&o.push(n),e.props.setSelection(o)}else e.props.setSelection([n])}else e.props.setSelection([])},e._renderColumns=function(t,n){var r=n.items,o=t.selectAll("g").filter(Object(L.c)(zt(Z))).data(r,function(t){return t.id});o.exit().transition().duration(H).style("opacity",0).remove(),o.enter().append("g").attr(bt,function(t){return t.id}).attr(vt,Z).classed(nt,!0).attr("data-column",function(t){return t.id}).on("contextmenu",function(t){var n=e.props.getQueryItemById(t.id);if(!e.props.selectedItems.find(function(t){return t.getIdentifier()===n.getIdentifier()})){var r=e.props.selectedItems.slice();r.push(n),e.props.setSelection(r)}var o=e.props.selectedItems;e._onMenu(o.map(function(t){return t.getIdentifier()}),x.NORMALIZATION_ACTION.ATTRIBUTE),u.event.preventDefault()}).on("mousedown",function(t){e._handleColumnMouseDown(t)}).on("keydown",function(t){32===u.event.keyCode&&e._handleColumnMouseDown(t),46===u.event.keyCode&&e.props.removeAttributes(e.props.selectedItemsRefs)}).style("opacity",0).each(function(n){return e._renderColumn(n,t)}).style("opacity",1),o.transition().duration(H).each(function(n){return e._renderColumn(n,t)})},e._handleConnectorMouseDown=function(t){var n=e._select(U).selectAll("rect").filter(Object(L.c)(zt(F)));n.classed(Ot,function(n){return e.props.canCreateLinkToGroup(t.id,n.id)}),n.classed(gt,function(n){return!e.props.canCreateLinkToGroup(t.id,n.id)}),e._select(U).selectAll("g").filter(Object(L.c)(zt(B))).filter(function(n){return n.id!==t.id&&!e.props.canCreateLinkToGroup(t.id,n.id)}).style("opacity",.5),e._startConnectorDrawing(t),e.props.setAllowHoverStates(!1)},e._getGroupDimensions=function(t){var n=e._select(B,t).select("rect");return{x:parseFloat(n.attr("x")),y:parseFloat(n.attr("y")),width:parseFloat(n.attr("width")),height:parseFloat(n.attr("height"))}},e._handleMouseMove=function(){if(e._activeConnectGroup){var t=u.mouse(u.event.currentTarget),n=t[0],r=t[1];e._select($).attr("d",e._generateConnectorPath(e._startingLinePoint,{x:n,y:r})),u.event.preventDefault()}},e._handleMouseUp=function(){if(e._activeConnectGroup){var t=u.mouse(u.event.currentTarget),n=e._select(U).selectAll("rect").filter(Object(L.c)(zt(F))),r=n.filter(function(e){return Object(w.c)(t,e)}),o=r.empty()?null:r.data()[0].id;n.classed(Ot,!1),n.classed(gt,!1),e._select(U).selectAll("g").filter(Object(L.c)(zt(B))).style("opacity",1),o&&e.props.createLink(e._activeConnectGroup,o),e._endConnectorDrawing(),e.props.setAllowHoverStates(!0),u.event.preventDefault(),e._select(V).remove()}},e._handleGroupMouseMove=function(t){if(t.id!==x.ROOT_GROUP)if(e._activeConnectGroup&&e.props.canCreateLinkToGroup(e._activeConnectGroup,t.id)){var n=e.props.isHorizontalLayout?t.x:u.mouse(u.event.currentTarget)[0],r=e.props.isHorizontalLayout?u.mouse(u.event.currentTarget)[1]:t.y;e._select($).attr("d",e._generateConnectorPath(e._startingLinePoint,{x:n,y:r})),u.event.stopPropagation()}else if(!e._activeConnectGroup){var o=e._select(V);if(o.empty()){(o=e._select().append("g").attr(vt,V).classed(_t,!0)).append("circle").attr("r",x.CONNECTOR_RADIUS);var i=o.append("svg").classed(ot,!0).attr("width",x.ICON_SIZE).attr("height",x.ICON_SIZE);Object(L.d)(i,j.a)}o.select("circle").attr("cx",e.props.isHorizontalLayout?t.x+t.width:t.x+t.width/2).attr("cy",e.props.isHorizontalLayout?t.y+t.height/2:t.y+t.height).on("mousedown",e._handleConnectorMouseDown.bind(null,t)),o.select("svg").attr("x",e.props.isHorizontalLayout?t.x+t.width-x.ICON_SIZE/2:t.x+t.width/2-x.ICON_SIZE/2).attr("y",e.props.isHorizontalLayout?t.y+t.height/2-x.ICON_SIZE/2:t.y+t.height-x.ICON_SIZE/2)}},e._renderColumnGroup=function(t){var n=e._select(B,t.id),r=n.select(zt(F));r.empty()&&(r=n.append("rect").classed(t.id===x.ROOT_GROUP?dt:pt,!0).attr(vt,F).on("mousemove",e._handleGroupMouseMove).on("contextmenu",function(t){e._onMenu([t.id],t.id===x.ROOT_GROUP?x.NORMALIZATION_ACTION.GROUPS:x.NORMALIZATION_ACTION.GROUP),u.event.preventDefault()}).on("keydown",function(t){46===u.event.keyCode&&(t.id===x.ROOT_GROUP?e.props.removeGroups():e.props.removeGroup(t.id))})),r.attr("aria-label",function(){return t.id===x.ROOT_GROUP?"":Object(G.getString)("normalizationALGroup",{id:t.id,key:t.items?t.items.filter(function(t){return t.isKey}).length:0,attributes:t.items?t.items.filter(function(t){return!t.isKey}).length:0})}).attr("tabindex",0).attr("focusable",!0).transition().duration(H).attr("x",function(t){return t.x}).attr("y",function(t){return t.y}).attr("width",function(t){return t.width}).attr("height",function(t){return t.height}),t.id!==x.ROOT_GROUP&&e._renderColumns(n,t)},e._renderColumnGroups=function(t){var n=e._select(),r=e._select(U);r.empty()&&(r=n.append("svg").classed(tt,!0).attr(vt,U)),r.attr("width",n.width).attr("height",n.height);var o=r.selectAll("g").filter(Object(L.c)(zt(B))).data(t,function(t){return t.id});o.exit().transition().duration(H).style("opacity",0).remove(),o.enter().append("g").style("opacity",0).attr(bt,function(t){return t.id}).attr(vt,B).attr("style",function(t){return"width:"+t.width+";height:"+t.height}).each(function(t){e._renderColumnGroup(t)}).style("opacity",1),o.transition().duration(H).each(function(t){e._renderColumnGroup(t)})},e._generateConnectorPath=function(t,n){var r,o=t.x,i=t.y,a=n.x,c=n.y,s=o<a-2*x.LINK_BREAKPOINT_OFFSET_CONNECTOR,u=i<c-2*x.LINK_BREAKPOINT_OFFSET_CONNECTOR,p=x.MARGIN/2;if(e.props.isHorizontalLayout)if(s)r=[{x:o+x.LINK_BREAKPOINT_OFFSET_CONNECTOR,y:i},{x:a-x.LINK_BREAKPOINT_OFFSET_CONNECTOR-p,y:i},{x:a-x.LINK_BREAKPOINT_OFFSET_CONNECTOR-p,y:c}];else{var l=e._getGroupDimensions(e._activeConnectGroup),d=(i<c?1:-1)*(l.height/2+x.LINK_BREAKPOINT_OFFSET_GROUP);r=[{x:o+x.LINK_BREAKPOINT_OFFSET_CONNECTOR,y:i},{x:o+x.LINK_BREAKPOINT_OFFSET_CONNECTOR,y:i+d},{x:a-x.LINK_BREAKPOINT_OFFSET_CONNECTOR-p,y:i+d},{x:a-x.LINK_BREAKPOINT_OFFSET_CONNECTOR-p,y:c}]}else if(u)r=[{x:o,y:i+x.LINK_BREAKPOINT_OFFSET_CONNECTOR},{x:o,y:c-x.LINK_BREAKPOINT_OFFSET_CONNECTOR-p},{x:a,y:c-x.LINK_BREAKPOINT_OFFSET_CONNECTOR-p}];else{var m=e._getGroupDimensions(e._activeConnectGroup),y=(o<c?1:-1)*(m.width/2+x.LINK_BREAKPOINT_OFFSET_GROUP);r=[{x:o,y:i+x.LINK_BREAKPOINT_OFFSET_CONNECTOR},{x:o+y,y:i+x.LINK_BREAKPOINT_OFFSET_CONNECTOR},{x:o+y,y:c-x.LINK_BREAKPOINT_OFFSET_CONNECTOR-p},{x:a,y:c-x.LINK_BREAKPOINT_OFFSET_CONNECTOR-p}]}return Object(L.a)({x:e.props.isHorizontalLayout?o+x.CONNECTOR_RADIUS:o,y:e.props.isHorizontalLayout?i:i+x.CONNECTOR_RADIUS},{x:e.props.isHorizontalLayout?a-p:a,y:e.props.isHorizontalLayout?c:c-p},r)},e._generateLink=function(t){var n=e._select(Q,t.id),r=t.sections[0],o=r.startPoint,i=r.endPoint,a=r.bendPoints,c=Object(L.a)(o,i,a);n.append("path").classed(0===t.id.indexOf(x.ROOT_GROUP)?mt:st,!0).attr("tabindex",0===t.id.indexOf(x.ROOT_GROUP)?-1:0).attr("focusable",0!==t.id.indexOf(x.ROOT_GROUP)).attr("d",c).attr(bt,function(t){return t.id}).on("contextmenu",function(t){e._onMenu([t.id],x.NORMALIZATION_ACTION.LINK),u.event.preventDefault()}).on("keydown",function(t){46===u.event.keyCode&&e.props.removeLink(e.props.normalizationStore.getLinkedGroupIds(t.id)[0],e.props.normalizationStore.getLinkedGroupIds(t.id)[1])})},e._renderLinks=function(t){var n=e._select(),r=e._select(q);r.empty()&&(r=n.append("svg").classed(tt,!0).attr(vt,q)),r.transition().duration(H).attr("width",n.width).attr("height",n.height);var o=r.selectAll("g").data(t,function(t){return t.id});o.exit().transition().duration(H).style("opacity",0).remove(),o.enter().append("g").attr(vt,Q).attr(bt,function(t){return t.id}).attr("aria-label",function(t){return e.props.isLinkedToDummy(t.id)||!e.props.normalizationStore.getLinkedGroupIds?"":Object(G.getString)("normalizationALLink",{idFrom:e.props.normalizationStore.getLinkedGroupIds(t.id)[0],idTo:e.props.normalizationStore.getLinkedGroupIds(t.id)[1]})}).style("opacity",0).each(function(t){return e._generateLink(t)}).transition().delay(H/2).duration(H).style("opacity",1),o.each(function(t){var n=e._select(Q,t.id),r=t.sections[0],o=r.startPoint,i=r.endPoint,a=r.bendPoints,c=Object(L.a)(o,i,a);n.select("path").transition().duration(H).attr("d",c)})},e._renderDiagram=function(){if(e.props.layoutData)if(e.props.layoutData.children&&1===e.props.layoutData.children.length)e._clearDiagram();else{var t=e.props.layoutData;e._select().on("mousemove",e._handleMouseMove).on("mouseup",e._handleMouseUp).transition().duration(H).attr("width",t.width+x.MARGIN).attr("height",t.height+x.MARGIN),e._renderColumnGroups(t.children),e._renderLinks(t.edges),e._updateDnDNodes(),e._select(V).remove()}},e._updateDnDNodes=function(){var t=Array.prototype.slice.call(e._select(Z).nodes()).map(function(t){return s.a.createElement(K.a,{key:t.getAttribute(bt),dragNode:t,dropNode:t.querySelector("."+ct),attributeId:t.getAttribute(bt)})});e.setState({columns:t})},e._select=function(t,n){var r=u.select(e._node);return(n||t)&&(r=r.selectAll(""+(n?St(n):"")+(t?zt(t):""))),r},e}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var n=e.prototype;return n.componentDidMount=function(){this.props.selectedQuerySubject&&this._renderDiagram()},n.componentWillReceiveProps=function(t){t.selectedQuerySubject&&this.props.selectedQuerySubject===t.selectedQuerySubject||this._clearDiagram()},n.componentDidUpdate=function(t){t===this.props||!this.props.selectedQuerySubject||this.props.layoutData===t.layoutData&&this.props.selectedItems===t.selectedItems||this._renderDiagram()},n._startConnectorDrawing=function(t){this._select().classed("is-connecting",!0).append("path").classed(ut,!0).attr(vt,$);var e=this._getGroupDimensions(t.id);this._startingLinePoint={x:this.props.isHorizontalLayout?e.x+e.width:e.x+e.width/2,y:this.props.isHorizontalLayout?e.y+e.height/2:e.y+e.height},this._activeConnectGroup=t.id},n._endConnectorDrawing=function(){this._select().classed("is-connecting",!1),this._select($).remove(),this._startingLinePoint=this._activeConnectGroup=null},n.render=function(){var t=this;return s.a.createElement(s.a.Fragment,null,s.a.createElement("svg",{id:"NormalizationContainer",className:tt,ref:function(e){return t._node=e}},this.state.columns,s.a.createElement(M.a,{attachNode:this._node})),this.state.actionMenu&&s.a.createElement(l.ContextMenu,{fixedPosition:{x:this.state.actionMenu.node.getBoundingClientRect().left,y:this.state.actionMenu.node.getBoundingClientRect().top+x.ICON_SIZE},onClose:function(){return t.setState({actionMenu:null})},onChange:function(e,n){t.state.actionMenu.callback(n),t.setState({actionMenu:null})}},s.a.createElement(l.ContextMenu.List,{content:this.state.actionMenu.content,name:"Options"})))},e}(c.Component))||o)||o)||o},1416:function(t,e,n){"undefined"!=typeof self&&self,t.exports=function(t){return webpackJsonPBaGraphics([1341],{"3865314c5959606874d4":function(e,n){e.exports=t},"5739814cfde0a40ab6ad":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("3865314c5959606874d4"),o=(n.n(r),n("64aa1bb49765361871a8"));e.default=o.a},"64aa1bb49765361871a8":function(t,e,n){"use strict";var r=n("9689a9c94ae38b47fa2c"),o=n.n(r),i=n("9ce58a7deea14f49ef01"),a=n.n(i),c=new o.a({id:"dependent_16_v7",use:"dependent_16_v7-usage",viewBox:"0 0 16 16",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="dependent_16_v7"><path d="M13 11c-.4 0-.7.1-1 .3l-1.5-1.6c.7-1 .7-2.4 0-3.5L12 4.7c.3.2.6.3 1 .3 1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2c0 .4.1.7.3 1L9.7 5.6c-1-.7-2.4-.7-3.5 0L4.7 4c.2-.3.3-.6.3-1 0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2c.4 0 .7-.1 1-.3l1.6 1.6c-.7 1-.7 2.4 0 3.5L4 11.3c-.3-.2-.6-.3-1-.3-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2c0-.4-.1-.7-.3-1l1.5-1.5c1 .7 2.4.7 3.5 0l1.6 1.5c-.2.3-.3.6-.3 1 0 1.1.9 2 2 2s2-.9 2-2-.9-2-2-2zm-5-1c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z" /></symbol>'});a.a.add(c),e.a=c}},["5739814cfde0a40ab6ad"])}(n(15))},1417:function(t,e,n){"undefined"!=typeof self&&self,t.exports=function(t){return webpackJsonPBaGraphics([1053],{"3865314c5959606874d4":function(e,n){e.exports=t},"953f9b1fe60969330d49":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("3865314c5959606874d4"),o=(n.n(r),n("a0111354117be1ca7043"));e.default=o.a},a0111354117be1ca7043:function(t,e,n){"use strict";var r=n("9689a9c94ae38b47fa2c"),o=n.n(r),i=n("9ce58a7deea14f49ef01"),a=n.n(i),c=new o.a({id:"independent_16_v7",use:"independent_16_v7-usage",viewBox:"0 0 16 16",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="independent_16_v7"><path d="M8 1C5.8 1 4 2.8 4 5s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 7C6.3 8 5 6.7 5 5s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3zm-3 5c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm5 0c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm5 0c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2z" /></symbol>'});a.a.add(c),e.a=c}},["953f9b1fe60969330d49"])}(n(15))},1418:function(t,e,n){"undefined"!=typeof self&&self,t.exports=function(t){return webpackJsonPBaGraphics([855],{"227b249cf771cbead25c":function(t,e,n){"use strict";var r=n("9689a9c94ae38b47fa2c"),o=n.n(r),i=n("9ce58a7deea14f49ef01"),a=n.n(i),c=new o.a({id:"min_16_v7",use:"min_16_v7-usage",viewBox:"0 0 16 16",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="min_16_v7"><path d="M2 14h13v1H2c-.6 0-1-.4-1-1V1h1v11h1v1H2v1zm6.5-2c4.3 0 5.4-9.4 5.5-10.4l-1-.1c-.3 2.6-1.6 9.5-4.5 9.5S4.3 4.1 4 1.5l-1 .1C3.1 2.6 4.2 12 8.5 12zM5 13v-1H4v1h1zm8 0v-1h-1v1h1zm-5 0h1v-1H8v1zm-2 0h1v-1H6v1zm4 0h1v-1h-1v1zm4-1v1h1v-1h-1z" /></symbol>'});a.a.add(c),e.a=c},"3865314c5959606874d4":function(e,n){e.exports=t},"60d4136ea9155d86a7a6":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("3865314c5959606874d4"),o=(n.n(r),n("227b249cf771cbead25c"));e.default=o.a}},["60d4136ea9155d86a7a6"])}(n(15))},1419:function(t,e,n){"undefined"!=typeof self&&self,t.exports=function(t){return webpackJsonPBaGraphics([904],{"3865314c5959606874d4":function(e,n){e.exports=t},"936f6f10cc2536ec2d77":function(t,e,n){"use strict";var r=n("9689a9c94ae38b47fa2c"),o=n.n(r),i=n("9ce58a7deea14f49ef01"),a=n.n(i),c=new o.a({id:"max_16_v7",use:"max_16_v7-usage",viewBox:"0 0 16 16",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="max_16_v7"><path d="M8.5 4c-4 0-5.2 7.9-5.4 10H2V4h1V3H2V1H1v13c0 .6.4 1 1 1h13v-1h-1c-.3-2.1-1.5-10-5.5-10zm0 1c2.7 0 4.1 6.1 4.4 9H4.1c.3-2.9 1.7-9 4.4-9zM7 4H6V3h1v1zm6 0h-1V3h1v1zm-2 0h-1V3h1v1zM5 4H4V3h1v1zm4 0H8V3h1v1zm6-1v1h-1V3h1z" /></symbol>'});a.a.add(c),e.a=c},f9b8bee3eb1aac63fb0d:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("3865314c5959606874d4"),o=(n.n(r),n("936f6f10cc2536ec2d77"));e.default=o.a}},["f9b8bee3eb1aac63fb0d"])}(n(15))},1420:function(t,e,n){"undefined"!=typeof self&&self,t.exports=function(t){return webpackJsonPBaGraphics([1898],{"0cf6f2dadae640648c4c":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("3865314c5959606874d4"),o=(n.n(r),n("66db74487f8eb4882271"));e.default=o.a},"3865314c5959606874d4":function(e,n){e.exports=t},"66db74487f8eb4882271":function(t,e,n){"use strict";var r=n("9689a9c94ae38b47fa2c"),o=n.n(r),i=n("9ce58a7deea14f49ef01"),a=n.n(i),c=new o.a({id:"average_16_v7",use:"average_16_v7-usage",viewBox:"0 0 16 16",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="average_16_v7"><defs><clipPath id="average_16_v7_clip-path"><path d="M218-10v-15h24v15zm8-24v7h-8v-7zm16 7h-14v-7h14zm0-9h-24a2 2 0 00-2 2v24a2 2 0 002 2h24a2 2 0 002-2v-24a2 2 0 00-2-2zm-17 24a5 5 0 01-5-5h2a3 3 0 003 3 3 3 0 003-3 3 3 0 00-3-3v-2a5 5 0 015 5 5 5 0 01-5 5zm9-10h2v10h-2zm4 5h2v5h-2z" style="fill:none;clip-rule:evenodd" /></clipPath><clipPath id="average_16_v7_clip-path-2"><path d="M475-37.72h-18v-21h3v3h12v-3h3zm-13-24h8v4h-8zm13 1h-3v-1a2 2 0 00-2-2h-8a2 2 0 00-2 2v1h-3a2 2 0 00-2 2v21a2 2 0 002 2h18a2 2 0 002-2v-21a2 2 0 00-2-2zm-15 9h2v10h-2zm10 4h2v6h-2zm-5 2h2v4h-2z" style="fill:none;clip-rule:evenodd" /></clipPath><clipPath id="average_16_v7_clip-path-3"><path d="M566.31-160.72a5.5 5.5 0 00-5.5 5.5 5.5 5.5 0 005.5 5.5 5.5 5.5 0 005.5-5.5 5.5 5.5 0 00-5.5-5.5zm0 2a3.5 3.5 0 013.5 3.5 3.5 3.5 0 01-3.5 3.5 3.5 3.5 0 01-3.5-3.5 3.5 3.5 0 013.5-3.5zm-15-2a5.5 5.5 0 00-5.5 5.5 5.5 5.5 0 005.5 5.5 5.5 5.5 0 005.5-5.5 5.5 5.5 0 00-5.5-5.5zm0 2a3.5 3.5 0 013.5 3.5 3.5 3.5 0 01-3.5 3.5 3.5 3.5 0 01-3.5-3.5 3.5 3.5 0 013.5-3.5zm0-16a5.5 5.5 0 00-5.5 5.5 5.5 5.5 0 005.5 5.5 5.5 5.5 0 005.5-5.5 5.5 5.5 0 00-1.61-3.89 5.5 5.5 0 00-3.89-1.61zm0 2a3.5 3.5 0 013.5 3.5 3.5 3.5 0 01-3.5 3.5 3.5 3.5 0 01-3.5-3.5 3.5 3.5 0 013.5-3.5zm16.5 7v-9h-2v2h-3v2h3v5h-3v2h8v-2z" style="fill:none;clip-rule:evenodd" /></clipPath><clipPath id="average_16_v7_clip-path-4"><path d="M511.41-153.72v-18h11v18zm-13-18h11v18h-11zm24-2h-24a2 2 0 00-2 2v18a2 2 0 002 2h24a2 2 0 002-2v-18a2 2 0 00-2-2zm-9 15h7v2h-7zm0-5h7v2h-7zm0-5h7v2h-7z" style="fill:none;clip-rule:evenodd" /></clipPath><clipPath id="average_16_v7_clip-path-5"><path d="M814.31-366v-18h11v18zm-13-18h11v18h-11zm24-2h-24a2 2 0 00-2 2v18a2 2 0 002 2h24a2 2 0 002-2v-18a2 2 0 00-2-2zm-9 15h7v2h-7zm0-5h7v2h-7zm0-5h7v2h-7z" style="fill:none;clip-rule:evenodd" /></clipPath><style></style></defs><path d="M2 8.5h1v-1H2V1H1v13a.94.94 0 001 1h13v-1H2zm12-1v1h1v-1zm-9 1v-1H4v1zm1 0h1v-1H6zm5-1h-1v1h1zm2 0h-1v1h1zM5.71 4a1.14 1.14 0 01.64.2 3.11 3.11 0 01.94 1.15 10.88 10.88 0 01.83 2.14H8v1h.44a9.27 9.27 0 00.92 2 3.27 3.27 0 00.9 1 2 2 0 001.21.4 3.46 3.46 0 001.33-.25 1.84 1.84 0 00.89-.83l-.88-.47a.92.92 0 01-.43.39 2.28 2.28 0 01-.91.16 1.12 1.12 0 01-.64-.22 3.37 3.37 0 01-.94-1.24 12.94 12.94 0 01-.81-2.21A10.06 10.06 0 007.8 4.27a3.47 3.47 0 00-.91-.92A2.23 2.23 0 005.71 3a3.47 3.47 0 00-2.57 1.06l.72.7A2.5 2.5 0 015.71 4zm3.37 3.2z" /></symbol>'});a.a.add(c),e.a=c}},["0cf6f2dadae640648c4c"])}(n(15))},1421:function(t,e,n){"undefined"!=typeof self&&self,t.exports=function(t){return webpackJsonPBaGraphics([542],{"3865314c5959606874d4":function(e,n){e.exports=t},"4172c49fbc6f3b54eea8":function(t,e,n){"use strict";var r=n("9689a9c94ae38b47fa2c"),o=n.n(r),i=n("9ce58a7deea14f49ef01"),a=n.n(i),c=new o.a({id:"repeating_16_v7",use:"repeating_16_v7-usage",viewBox:"0 0 16 16",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="repeating_16_v7"><path d="M4 6.8L1.2 4 4 1.2 6.8 4 4 6.8zM6.8 12L4 9.2 1.2 12 4 14.8 6.8 12zm8-8L12 1.2 9.2 4 12 6.8 14.8 4zm0 8L12 9.2 9.2 12l2.8 2.8 2.8-2.8z" /></symbol>'});a.a.add(c),e.a=c},b98c292b3ae01727db0a:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("3865314c5959606874d4"),o=(n.n(r),n("4172c49fbc6f3b54eea8"));e.default=o.a}},["b98c292b3ae01727db0a"])}(n(15))},1422:function(t,e,n){"undefined"!=typeof self&&self,t.exports=function(t){return webpackJsonPBaGraphics([130],{"124b0419aac12c7c6e77":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("3865314c5959606874d4"),o=(n.n(r),n("579ddfa0e0934b7cd1dd"));e.default=o.a},"3865314c5959606874d4":function(e,n){e.exports=t},"579ddfa0e0934b7cd1dd":function(t,e,n){"use strict";var r=n("9689a9c94ae38b47fa2c"),o=n.n(r),i=n("9ce58a7deea14f49ef01"),a=n.n(i),c=new o.a({id:"unique_16_v7",use:"unique_16_v7-usage",viewBox:"0 0 16 16",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="unique_16_v7"><path d="M4 1.2L6.8 4 4 6.8 1.2 4 4 1.2zm0 8L6.8 12 4 14.8 1.2 12 4 9.2zM5.4 12L4 10.6 2.6 12 4 13.4 5.4 12zM12 6.8L9.2 4 12 1.2 14.8 4 12 6.8zM10.6 4L12 5.4 13.4 4 12 2.6 10.6 4zM12 9.2l2.8 2.8-2.8 2.8L9.2 12 12 9.2zm1.4 2.8L12 10.6 10.6 12l1.4 1.4 1.4-1.4z" /></symbol>'});a.a.add(c),e.a=c}},["124b0419aac12c7c6e77"])}(n(15))},1423:function(t,e,n){"use strict";n.d(e,"a",function(){return p});var r,o=n(1),i=n(759),a=n(16),c=n(46),s=n(5),u=n(774);var p=Object(s.e)(function(t){return{normalizationStore:t,currentDropTarget:t.currentDropTarget,layoutData:t.layoutData,setCurrentDropTarget:t.setCurrentDropTarget,setAllowHoverStates:t.setAllowHoverStates}})(r=Object(c.DragLayer)(function(t){return{isDragging:t.isDragging()}})(r=Object(a.observer)(r=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this)._d3Selector=void 0,e}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var n=e.prototype;return n.componentWillReceiveProps=function(t){this._clearIndicator(),t.currentDropTarget&&t.layoutData&&this._drawIndicator(t.currentDropTarget,t.layoutData),!t.isDragging&&this.props.isDragging?(this.props.setCurrentDropTarget(null),this.props.setAllowHoverStates(!0)):t.isDragging&&!this.props.isDragging&&this.props.setAllowHoverStates(!1)},n._clearIndicator=function(){this._d3Selector&&this._d3Selector.remove()},n._drawIndicator=function(t,e){var n=t.attributeRef,r=t.hoveredBelow,o=function(t){return t.items&&t.items.find(function(t){return t.id===n})},a=o(e.children.find(o)),c=a.x,s=c+u.COLUMN_WIDTH,p=r?a.y+a.height+u.MARGIN/2:a.y-u.MARGIN/2,l=p+u.DROP_INDICATOR_HEIGHT;this._d3Selector=i.select(this.props.attachNode).append("line").classed("bi-mui-normalization-container__canvas__dropZoneHighlight",!0).attr("id","DropZoneHighlight").attr("x1",c).attr("y1",p).attr("x2",s).attr("y2",l)},n.render=function(){return null},e}(o.Component))||r)||r)||r},1424:function(t,e,n){"use strict";n.d(e,"a",function(){return f});var r,o=n(1),i=n.n(o),a=n(0),c=n.n(a),s=n(3),u=n(5),p=n(63),l=n(275);function d(){return(d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var m=Object(s.itemDnD)(function(){return null},{dropItemType:[p.d,p.f]}),y=Object(s.itemDnD)(function(){return null},{dragItemType:p.f}),f=Object(u.e)(function(t){return{selectedQuerySubject:t.selectedQuerySubject,getQueryItemById:t.getQueryItemById,getAttributeIndex:t.getAttributeIndex,getNormalizationGroup:t.getNormalizationGroup,selectedItems:t.selectedItems.slice(),setCurrentDropTarget:t.setCurrentDropTarget,addAttributesToGroup:t.addAttributesToGroup}})(r=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this)._dragLayerRenderer=function(t){var n=t.currentOffset,r=t.droppable;return i.a.createElement(s.DragLayer,{droppable:r,currentOffset:n},i.a.createElement(l.a,{moserObjects:e.props.selectedItems}))},e._onBeginDrag=function(){return{dragLayerRenderer:e._dragLayerRenderer,queryItem:e.props.getQueryItemById(e.props.attributeId,e.props.selectedQuerySubject)}},e._canDrop=function(t){var n=e.props.selectedItems,r=e.props.getAttributeIndex(t.queryItem),o=0===r&&!t.hoveredBelow,i=n[0],a=!1;if(1===n.length&&!(a=i===t.queryItem)&&e.props.getNormalizationGroup(i)===e.props.getNormalizationGroup(t.queryItem)){var s=e.props.getAttributeIndex(i);a=t.hoveredBelow?s===r+1:s===r-1}return!a&&i&&(!o||i.getUsage()!==c.a.UsageType.FACT)},e._getDropProps=function(t,n){return d({},t,{hoveredBelow:n,queryItem:e.props.getQueryItemById(e.props.attributeId,e.props.selectedQuerySubject)})},e._onHover=function(t,n,r){r.canDrop()?e.props.setCurrentDropTarget(t.queryItem.getIdentifier(),t.hoveredBelow):e.props.setCurrentDropTarget(null)},e._onDrop=function(t){var n=t.hoveredBelow,r=e.props.selectedItems,o=e.props.getNormalizationGroup(t.queryItem),i=e.props.getAttributeIndex(t.queryItem),a=i;r.forEach(function(t){var n=e.props.getNormalizationGroup(t);o===n&&(e.props.getAttributeIndex(t)<i&&(a-=1))}),n&&(a+=1),e.props.addAttributesToGroup(o.getIdentifier(),r.map(function(t){return t.getIdentifier()}),a)},e}return function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t),e.prototype.render=function(){var t=this.props,e=t.dropNode,n=t.dragNode;return[i.a.createElement(m,{customDnDNode:e,canDrop:this._canDrop,getDropProps:this._getDropProps,onDrop:this._onDrop,onHover:this._onHover}),i.a.createElement(y,{customDnDNode:n,onBeginDrag:this._onBeginDrag})]},e}(o.Component))||r},699:function(t,e,n){"use strict";n.r(e);var r=n(774),o=n(1409),i=n(1413);e.default={"constants/normalization":r,"stores/NormalizationStore":o,"components/NormalizationView":i}},774:function(t,e,n){"use strict";n.r(e),n.d(e,"MARGIN",function(){return r}),n.d(e,"ICON_SIZE",function(){return o}),n.d(e,"CONNECTOR_RADIUS",function(){return i}),n.d(e,"LINK_BREAKPOINT_OFFSET_CONNECTOR",function(){return a}),n.d(e,"LINK_BREAKPOINT_OFFSET_GROUP",function(){return c}),n.d(e,"DROP_INDICATOR_HEIGHT",function(){return s}),n.d(e,"COLUMN_WIDTH",function(){return u}),n.d(e,"COLUMN_HEIGHT",function(){return p}),n.d(e,"GROUP_WIDTH",function(){return l}),n.d(e,"GROUP_HEIGHT",function(){return d}),n.d(e,"EXTRA_COLUMN_HEIGHT",function(){return m}),n.d(e,"ROOT_GROUP",function(){return y}),n.d(e,"COLUMN_SEPARATOR",function(){return f}),n.d(e,"EDGE_SEPARATOR",function(){return g}),n.d(e,"NORMALIZATION",function(){return O}),n.d(e,"NORMALIZATION_ACTION",function(){return _}),n.d(e,"LAYOUT_OPTIONS",function(){return b});var r=15,o=16,i=12,a=15,c=8,s=1,u=240,p=35,l=u+2*r,d=p+2*r,m=p+r,y="mui_n0",f="__",g="___",O="normalization",_={ATTRIBUTE:"attribute",GROUP:"group",GROUPS:"groups",LINK:"link"},b={VERTICAL:{DIRECTION:"DOWN",ROOT_HEIGHT:1,ROOT_WIDTH:1e3},HORIZONTAL:{DIRECTION:"RIGHT",ROOT_HEIGHT:500,ROOT_WIDTH:1}}}}]);
- //# sourceMappingURL=normalization.js.map
|