/*! * 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([[7],{1015:function(e,t,i){"use strict";function r(e,t){for(var i=0;i'});a.a.add(l),t.a=l},"3865314c5959606874d4":function(t,i){t.exports=e}},["10eed102fbc488d5f846"])}(i(15))},1214:function(e,t,i){"use strict";i.d(t,"a",function(){return oe}),i.d(t,"b",function(){return ae});var r,n,o,a,l,c,s,u,d,p,h,f,g,b,y,m,j,_,O,S,v,E,T,I,R,w,L,M,C,Q,k,F,N=i(736),D=i.n(N),x=i(0),A=i.n(x),P=i(6),V=i(5),G=i(2),H=i(42),J=i(120),B=i(1015),z=i(4),Y=i(8),U=i(14),q=i(266),Z=i(775),W=i(1581),X=i(1215);function K(e,t){for(var i=0;i0){var i=(Object(U.h)(e)||[]).filter(function(e){return Object(z.isMoserObjectTypeOf)(e,A.a.MoserObjectTypes.QUERY_ITEM)}),r=[];return t.forEach(function(e){var t=i.find(function(t){return t.getIdentifier()===e});t&&r.push(t)}),r.length>0?new Z.default({context:this.context},this.moduleId,null,r):null}return null},i.removeRelationship=function(){if(this.leftQuerySubject&&this.rightQuerySubject){var e=Object(Y.getRelationship)(this.leftQuerySubject,this.rightQuerySubject,this.clonedModule.getRelationship(),!1);e&&Object(Y.removeItems)(e)}},i.restoreRelationship=function(){if(this.leftQuerySubject&&this.rightQuerySubject){this.removeRelationship();var e=Object(Y.getRelationship)(this.leftQuerySubject,this.rightQuerySubject,this.module.getRelationship(),!1);e&&this.clonedModule.addRelationship(e.clone())}},i.setRelationshipSettings=function(){var e=this;this.links.clear(),this.relationship.getLink().forEach(function(t){var i=e.isSwitched?t.getReferencedObjectRight()||t.getRightRef():t.getReferencedObjectLeft()||t.getLeftRef(),r=e.isSwitched?t.getReferencedObjectLeft()||t.getLeftRef():t.getReferencedObjectRight()||t.getRightRef(),n=t.getComparisonOperator();e.links.push(new re(i,r,n))}),this.setJoinFilterTypeRelation(),this.setMapping()},i.setJoinFilterTypeRelation=function(e){var t=e||this.relationship;this.joinFilterType=t.getJoinFilterType()||A.a.JoinFilterType.NONE},i.setMapping=function(e){var t=e||this.relationship,i=this.isSwitched?[t.getRight(),t.getLeft()]:[t.getLeft(),t.getRight()],r=q.relationshipMappingMinMax.apply(void 0,i);this.cardinality=this.cardinalityEdit||r.card,this.joinType=r.type},i.hasLink=function(e,t){return!!this.links.find(function(i){return i.left===e&&i.right===t})},i.addLink=function(e,t,i){this.links.push(new re(e,t,i))},i._createJoinGridStore=function(){var e=null;if(this.queryModuleId&&this.links.length>0){var t=this._createQueryRelationship(),i=this._getComplementaryQueryItems(t);i.length&&((e=new W.a({context:this.context},this.queryModuleId,i,t)).initialIndex=this.leftQueryItems.length-1,this.cardinality,e.dirty=!0)}return e},i._createQueryRelationship=function(){var e=A.a.createObjectFactory(),t=e.createRelationship();this.removeRelationship(),this.clonedModule.addRelationship(t);var i=e.createCardinalityType();t.setLeft(i);var r=e.createCardinalityType();return t.setRight(r),this.leftQuerySubject&&i.setRef(Object(z.resolveRelationshipQuerySubjectId)(this.leftQuerySubject)),this.rightQuerySubject&&r.setRef(Object(z.resolveRelationshipQuerySubjectId)(this.rightQuerySubject)),this.links.forEach(function(i){var r=e.createRelationshipLink();r.setLeftRef("string"==typeof i.left?null:i.left.getIdentifier()),r.setRightRef("string"==typeof i.right?null:i.right.getIdentifier()),r.setComparisonOperator(i.operator),t.addLink(r)}),t},i._getComplementaryQueryItems=function(e){var t=this,i=[],r=[],n=[],o=[],a=e.getLeft().getReferencedObject(),l=e.getRight().getReferencedObject();return e.getLink().forEach(function(e){n.push(e.getReferencedObjectLeft()),o.push(e.getReferencedObjectRight())}),a&&Object(z.getChildQueryItem)(a).forEach(function(e){var o=n.indexOf(e),a=new B.d(e);o>-1?(a.rightQueryItem=t.links[o].right,e.setUsage(A.a.UsageType.IDENTIFIER),e.setRegularAggregate(A.a.RegularAggregateType.NONE),r.push({queryItem:e,complementaryQueryItem:a})):i.push(a)}),r.forEach(function(e){i.push(e.complementaryQueryItem)}),l&&Object(z.getChildQueryItem)(l).forEach(function(e){-1===o.indexOf(e)&&i.push(new B.d(null,e))}),i},i._switchLinks=function(){this.links.forEach(function(e){var t=e.left;switch(e.left=e.right,e.right=t,e.operator){case A.a.ComparisonOperatorType.GREATER_THAN:e.operator=A.a.ComparisonOperatorType.LESS_THAN;break;case A.a.ComparisonOperatorType.LESS_THAN:e.operator=A.a.ComparisonOperatorType.GREATER_THAN;break;case A.a.ComparisonOperatorType.GREATER_THAN_OR_EQUAL_TO:e.operator=A.a.ComparisonOperatorType.LESS_THAN_OR_EQUAL_TO;break;case A.a.ComparisonOperatorType.LESS_THAN_OR_EQUAL_TO:e.operator=A.a.ComparisonOperatorType.GREATER_THAN_OR_EQUAL_TO}})},i.deleteJoinSession=function(){this.queryModuleId&&Object(J.a)(this.context,{moduleId:this.queryModuleId})},i.initSession=function(){var e=this;Object(H.b)(this.context,this.clonedModule).then(function(t){e.action(function(){e.queryModuleId=t.sessionModuleId})})},i.updateRelationship=function(){var e=A.a.createObjectFactory(),t=this.relationship;for(t.setLabel(this.leftQuerySubject.getIdentifier()+"<--\x3e"+this.rightQuerySubject.getIdentifier()),t.getLeft().setRef(Object(z.resolveRelationshipQuerySubjectId)(this.leftQuerySubject)),t.getRight().setRef(Object(z.resolveRelationshipQuerySubjectId)(this.rightQuerySubject)),t.getLeft().setReferencedObject(this.leftQuerySubject),t.getRight().setReferencedObject(this.rightQuerySubject);t.getLink().length>0;)t.removeLinkAt(0);this.links.forEach(function(i){var r=e.createRelationshipLink();r.setLeftRef("string"==typeof i.left?i.left:i.left.getIdentifier()),r.setRightRef("string"==typeof i.right?i.right:i.right.getIdentifier()),r.setComparisonOperator(i.operator),t.addLink(r)}),t.setJoinFilterType(this.joinFilterType);var i=Object(q.relationshipMappingCard)(this.joinType,this.cardinality),r=t.getLeft();r.setMincard(i.leftMincard),r.setMaxcard(i.leftMaxcard);var n=t.getRight();n.setMincard(i.rightMincard),n.setMaxcard(i.rightMaxcard),null==t.getIdentifier()&&A.a.ModuleUtils.generateObjectId(this.module,t),(t.getLink()||[]).forEach(function(e){e.getReferencedObjectLeft(),e.getReferencedObjectRight()}),t.getLeft().getReferencedObject(),t.getRight().getReferencedObject()},i.createEditRelationship=function(){this.updateRelationship(),null==this.relationship.getParent()&&this.module.addRelationship(this.relationship)},i.setJoinType=function(e){this.joinType=e},i.setCardinality=function(e){this.cardinality=e,this.cardinalityEdit=e},i.setJoinFilterType=function(e){this.joinFilterType=e},i.setLeftQuerySubject=function(e){this.leftQuerySubject=e},i.setRightQuerySubject=function(e){this.rightQuerySubject=e},i.removeLinkAt=function(e){this.links.splice(e,1)},i.updateLinkOperator=function(e,t){this.links[e].operator=t},i.removeLinkAtCol=function(e){var t=this.links.length+e-Object(z.getChildQueryItem)(this.relationship.getLeft().getReferencedObject()).length;this.removeLinkAt(t)},i.switchLeftAndRight=function(){var e=this.leftQuerySubject;this._leftQuerySubject=this.rightQuerySubject,this._rightQuerySubject=e,e=this.selectedLeftQueryItemIds,this.selectedLeftQueryItemIds=this.selectedRightQueryItemIds,this.selectedRightQueryItemIds=e,e=this.leftFilter,this.leftFilter=this.rightFilter,this.rightFilter=e,e=this.leftLocked,this.leftLocked=this.rightLocked,this.rightLocked=e,e=this.leftPackage,this.leftPackage=this.rightPackage,this.rightPackage=e,this._switchLinks(),this.joinType===q.JOIN_TYPE.LEFT?this.joinType=q.JOIN_TYPE.RIGHT:this.joinType===q.JOIN_TYPE.RIGHT&&(this.joinType=q.JOIN_TYPE.LEFT),this.cardinality===q.CARDINALITY.ONE_TO_MANY?this.cardinality=q.CARDINALITY.MANY_TO_ONE:this.cardinality===q.CARDINALITY.MANY_TO_ONE&&(this.cardinality=q.CARDINALITY.ONE_TO_MANY)},i.addLinksFromSelection=function(){var e=this,t=this.selectedLeftQueryItemIdsArray,i=this.selectedRightQueryItemIdsArray;t.forEach(function(t,r){var n=i[r],o=e.leftQueryItems.find(function(e){return e.getIdentifier()===t}),a=e.rightQueryItems.find(function(e){return e.getIdentifier()===n});e.hasLink(o,a)||e.addLink(o,a)}),this.selectedLeftQueryItemIds={},this.selectedRightQueryItemIds={}},i.setLeftFilter=function(e){this.leftFilter=e},i.setRightFilter=function(e){this.rightFilter=e},i.setSelectedLeftQueryItemIds=function(e){this.selectedLeftQueryItemIds=e},i.setSelectedRightQueryItemIds=function(e){this.selectedRightQueryItemIds=e},function(e,t,i){t&&K(e.prototype,t),i&&K(e,i)}(t,[{key:"isDetailsVisible",get:function(){return this.provider.isDetailsVisible()}},{key:"leftQuerySubject",get:function(){return this._leftQuerySubject},set:function(e){this.leftQuerySubject!==e&&(this.restoreRelationship(),this._leftQuerySubject=e,this.setRelationshipSettings(),this.selectedLeftQueryItemIds={},this.originalDirtyObject=this.dirtyObject,this.removeRelationship())}},{key:"rightQuerySubject",get:function(){return this._rightQuerySubject},set:function(e){this.rightQuerySubject!==e&&(this.restoreRelationship(),this._rightQuerySubject=e,this.setRelationshipSettings(),this.selectedRightQueryItemIds={},this.originalDirtyObject=this.dirtyObject,this.removeRelationship())}},{key:"leftQueryItemGridStore",get:function(){return this._getQueryItemGridStore(this.leftQuerySubject,this.selectedLeftQueryItemIdsArray)}},{key:"rightQueryItemGridStore",get:function(){return this._getQueryItemGridStore(this.rightQuerySubject,this.selectedRightQueryItemIdsArray)}},{key:"leftQueryItems",get:function(){return this.leftQuerySubject?Object(z.getChildQueryItem)(this.leftQuerySubject):[]}},{key:"rightQueryItems",get:function(){return this.rightQuerySubject?Object(z.getChildQueryItem)(this.rightQuerySubject):[]}},{key:"dirtyObject",get:function(){return{links:this.links.map(function(e){return{left:e.left,right:e.right,operator:e.operator}}),otherOptions:{left:this.leftQuerySubject,right:this.rightQuerySubject,joinType:this.joinType,joinFilterType:this.joinFilterType,cardinality:this.cardinality}}}},{key:"isDirty",get:function(){return this.joinMode!==X.e&&(!D()(this.originalDirtyObject.links,this.dirtyObject.links)||this.dirtyObject.links.length&&!D()(this.originalDirtyObject.otherOptions,this.dirtyObject.otherOptions))}},{key:"isValid",get:function(){return this.leftQuerySubject&&this.rightQuerySubject&&this.links.length}},{key:"canMatch",get:function(){var e=this.selectedLeftQueryItemIdsArray.length;return this.joinMode!==X.e&&e>0&&e===this.selectedRightQueryItemIdsArray.length}},{key:"selectedLeftQueryItemIdsArray",get:function(){var e=this;return Object.keys(this.selectedLeftQueryItemIds).map(function(t){return e.selectedLeftQueryItemIds[t].getIdentifier()})}},{key:"selectedRightQueryItemIdsArray",get:function(){var e=this;return Object.keys(this.selectedRightQueryItemIds).map(function(t){return e.selectedRightQueryItemIds[t].getIdentifier()})}},{key:"leftToRightRelationship",get:function(){return Object(Y.getRelationship)(this.leftQuerySubject,this.rightQuerySubject,this.module.getRelationship())}},{key:"rightToLeftRelationship",get:function(){return Object(Y.getRelationship)(this.rightQuerySubject,this.leftQuerySubject,this.module.getRelationship())}},{key:"isSwitched",get:function(){return!!this.rightToLeftRelationship}},{key:"relationship",get:function(){return this.passedRelationship||this.leftToRightRelationship||this.rightToLeftRelationship||this.newRelationship}},{key:"joinMode",get:function(){var e=this.relationship;return e===this.newRelationship?X.c:e.getInstanceType()===A.a.InstanceType.REFERENCE?X.e:X.d}},{key:"isViewMode",get:function(){return this.joinMode===X.e}},{key:"leftGridStore",get:function(){return this.leftQuerySubject?new Z.default({},this.moduleId,this.leftQuerySubject):null}},{key:"rightGridStore",get:function(){return this.rightQuerySubject?new Z.default({},this.moduleId,this.rightQuerySubject):null}},{key:"mapping",get:function(){return Object(q.relationshipMappingCard)(this.joinType,this.cardinality)}},{key:"isLeftMincardZero",get:function(){return this.mapping.leftMincard===A.a.CardinalityEnum.ZERO}},{key:"isRightMincardZero",get:function(){return this.mapping.rightMincard===A.a.CardinalityEnum.ZERO}},{key:"joinGridStore",get:function(){var e=this._createJoinGridStore();if(e){e===this._lastBaseGridStore?e=this._createJoinGridStore():this._lastBaseGridStore=e,e.relationship.setJoinFilterType(this.joinFilterType);var t=e.relationship.getLeft(),i=e.relationship.getRight();t.setMincard(this.mapping.leftMincard),t.setMaxcard(this.mapping.leftMaxcard),i.setMincard(this.mapping.rightMincard),i.setMaxcard(this.mapping.rightMaxcard)}else this._lastBaseGridStore=e;return e}}]),t}(V.a),m=te(y.prototype,"leftLocked",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),j=te(y.prototype,"rightLocked",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),_=te(y.prototype,"leftPackage",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),O=te(y.prototype,"rightPackage",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),S=te(y.prototype,"queryModuleId",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),v=te(y.prototype,"fetchJoinData",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),E=te(y.prototype,"leftFilter",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),T=te(y.prototype,"rightFilter",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),I=te(y.prototype,"selectedLeftQueryItemIds",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),R=te(y.prototype,"selectedRightQueryItemIds",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),w=te(y.prototype,"_leftQuerySubject",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),L=te(y.prototype,"_rightQuerySubject",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),M=te(y.prototype,"links",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),C=te(y.prototype,"joinType",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return q.JOIN_TYPE.INNER}}),Q=te(y.prototype,"joinFilterType",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return A.a.JoinFilterType.NONE}}),k=te(y.prototype,"cardinality",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return q.CARDINALITY.ONE_TO_MANY}}),F=te(y.prototype,"cardinalityEdit",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),te(y.prototype,"isDetailsVisible",[P.computed],Object.getOwnPropertyDescriptor(y.prototype,"isDetailsVisible"),y.prototype),te(y.prototype,"leftQueryItemGridStore",[V.d],Object.getOwnPropertyDescriptor(y.prototype,"leftQueryItemGridStore"),y.prototype),te(y.prototype,"rightQueryItemGridStore",[V.d],Object.getOwnPropertyDescriptor(y.prototype,"rightQueryItemGridStore"),y.prototype),te(y.prototype,"leftQueryItems",[P.computed],Object.getOwnPropertyDescriptor(y.prototype,"leftQueryItems"),y.prototype),te(y.prototype,"rightQueryItems",[P.computed],Object.getOwnPropertyDescriptor(y.prototype,"rightQueryItems"),y.prototype),te(y.prototype,"dirtyObject",[P.computed],Object.getOwnPropertyDescriptor(y.prototype,"dirtyObject"),y.prototype),te(y.prototype,"isDirty",[P.computed],Object.getOwnPropertyDescriptor(y.prototype,"isDirty"),y.prototype),te(y.prototype,"isValid",[P.computed],Object.getOwnPropertyDescriptor(y.prototype,"isValid"),y.prototype),te(y.prototype,"canMatch",[P.computed],Object.getOwnPropertyDescriptor(y.prototype,"canMatch"),y.prototype),te(y.prototype,"selectedLeftQueryItemIdsArray",[P.computed],Object.getOwnPropertyDescriptor(y.prototype,"selectedLeftQueryItemIdsArray"),y.prototype),te(y.prototype,"selectedRightQueryItemIdsArray",[P.computed],Object.getOwnPropertyDescriptor(y.prototype,"selectedRightQueryItemIdsArray"),y.prototype),te(y.prototype,"leftToRightRelationship",[P.computed],Object.getOwnPropertyDescriptor(y.prototype,"leftToRightRelationship"),y.prototype),te(y.prototype,"rightToLeftRelationship",[P.computed],Object.getOwnPropertyDescriptor(y.prototype,"rightToLeftRelationship"),y.prototype),te(y.prototype,"isSwitched",[P.computed],Object.getOwnPropertyDescriptor(y.prototype,"isSwitched"),y.prototype),te(y.prototype,"relationship",[P.computed],Object.getOwnPropertyDescriptor(y.prototype,"relationship"),y.prototype),te(y.prototype,"joinMode",[P.computed],Object.getOwnPropertyDescriptor(y.prototype,"joinMode"),y.prototype),te(y.prototype,"isViewMode",[P.computed],Object.getOwnPropertyDescriptor(y.prototype,"isViewMode"),y.prototype),te(y.prototype,"leftGridStore",[V.d],Object.getOwnPropertyDescriptor(y.prototype,"leftGridStore"),y.prototype),te(y.prototype,"rightGridStore",[V.d],Object.getOwnPropertyDescriptor(y.prototype,"rightGridStore"),y.prototype),te(y.prototype,"mapping",[P.computed],Object.getOwnPropertyDescriptor(y.prototype,"mapping"),y.prototype),te(y.prototype,"isLeftMincardZero",[P.computed],Object.getOwnPropertyDescriptor(y.prototype,"isLeftMincardZero"),y.prototype),te(y.prototype,"isRightMincardZero",[P.computed],Object.getOwnPropertyDescriptor(y.prototype,"isRightMincardZero"),y.prototype),te(y.prototype,"joinGridStore",[V.d],Object.getOwnPropertyDescriptor(y.prototype,"joinGridStore"),y.prototype),te(y.prototype,"deleteJoinSession",[V.c],Object.getOwnPropertyDescriptor(y.prototype,"deleteJoinSession"),y.prototype),te(y.prototype,"initSession",[V.c],Object.getOwnPropertyDescriptor(y.prototype,"initSession"),y.prototype),te(y.prototype,"updateRelationship",[V.c],Object.getOwnPropertyDescriptor(y.prototype,"updateRelationship"),y.prototype),te(y.prototype,"createEditRelationship",[l],Object.getOwnPropertyDescriptor(y.prototype,"createEditRelationship"),y.prototype),te(y.prototype,"setJoinType",[c],Object.getOwnPropertyDescriptor(y.prototype,"setJoinType"),y.prototype),te(y.prototype,"setCardinality",[s],Object.getOwnPropertyDescriptor(y.prototype,"setCardinality"),y.prototype),te(y.prototype,"setJoinFilterType",[u],Object.getOwnPropertyDescriptor(y.prototype,"setJoinFilterType"),y.prototype),te(y.prototype,"setLeftQuerySubject",[d],Object.getOwnPropertyDescriptor(y.prototype,"setLeftQuerySubject"),y.prototype),te(y.prototype,"setRightQuerySubject",[p],Object.getOwnPropertyDescriptor(y.prototype,"setRightQuerySubject"),y.prototype),te(y.prototype,"removeLinkAt",[h],Object.getOwnPropertyDescriptor(y.prototype,"removeLinkAt"),y.prototype),te(y.prototype,"updateLinkOperator",[f],Object.getOwnPropertyDescriptor(y.prototype,"updateLinkOperator"),y.prototype),te(y.prototype,"removeLinkAtCol",[V.c],Object.getOwnPropertyDescriptor(y.prototype,"removeLinkAtCol"),y.prototype),te(y.prototype,"switchLeftAndRight",[g],Object.getOwnPropertyDescriptor(y.prototype,"switchLeftAndRight"),y.prototype),te(y.prototype,"addLinksFromSelection",[b],Object.getOwnPropertyDescriptor(y.prototype,"addLinksFromSelection"),y.prototype),te(y.prototype,"setLeftFilter",[V.c],Object.getOwnPropertyDescriptor(y.prototype,"setLeftFilter"),y.prototype),te(y.prototype,"setRightFilter",[V.c],Object.getOwnPropertyDescriptor(y.prototype,"setRightFilter"),y.prototype),te(y.prototype,"setSelectedLeftQueryItemIds",[V.c],Object.getOwnPropertyDescriptor(y.prototype,"setSelectedLeftQueryItemIds"),y.prototype),te(y.prototype,"setSelectedRightQueryItemIds",[V.c],Object.getOwnPropertyDescriptor(y.prototype,"setSelectedRightQueryItemIds"),y.prototype),y);function oe(e,t,i,r,n,o,a,l){var c=function(e,t,i){var r=A.a.createObjectFactory(),n=r.createRelationship(),o=r.createCardinalityType();o.setMincard(A.a.CardinalityEnum.ONE),o.setMaxcard(A.a.CardinalityEnum.ONE),n.setLeft(o);var a=r.createCardinalityType();return a.setMincard(A.a.CardinalityEnum.ONE),a.setMaxcard(A.a.CardinalityEnum.MANY),n.setRight(a),t&&(n.getLeft().setRef(Object(z.resolveRelationshipQuerySubjectId)(t)),n.getLeft().setReferencedObject(t)),i&&(n.getRight().setRef(Object(z.resolveRelationshipQuerySubjectId)(i)),n.getRight().setReferencedObject(i)),n.setJoinFilterType(t&&i?ie(e,t,i):A.a.JoinFilterType.NONE),n}(t,i,r),s=new ne({},e,t,c);return s.leftQuerySubject=i,s.rightQuerySubject=r,s.leftLocked=!!i,s.rightLocked=!!r,s.rightPackage=l,s.leftPackage=a,i&&r&&(s.joinFilterType=ie(t,i,r)),s.originalDirtyObject=s.dirtyObject,n&&o&&s.addLink(n,o),s}function ae(e,t,i){var r=new ne({},e,t,null,i);return r.leftQuerySubject=i.getLeft().getReferencedObject(),r.rightQuerySubject=i.getRight().getReferencedObject(),r.setJoinFilterTypeRelation(i),r.setMapping(i),r.leftLocked=r.rightLocked=!0,r}},1215:function(e,t,i){"use strict";i.d(t,"c",function(){return l}),i.d(t,"d",function(){return c}),i.d(t,"e",function(){return s}),i.d(t,"a",function(){return u}),i.d(t,"f",function(){return d}),i.d(t,"b",function(){return p});var r=i(0),n=i.n(r),o=i(2),a=i(266),l="Create",c="Edit",s="View",u=[{value:a.CARDINALITY.ONE_TO_ONE,label:Object(o.getString)("cardinality_oneToOne")},{value:a.CARDINALITY.ONE_TO_MANY,label:Object(o.getString)("cardinality_oneToMany")},{value:a.CARDINALITY.MANY_TO_ONE,label:Object(o.getString)("cardinality_manyToMany")}],d=[{value:a.JOIN_TYPE.INNER,label:Object(o.getString)("joinType_inner")},{value:a.JOIN_TYPE.LEFT,label:Object(o.getString)("joinType_left")},{value:a.JOIN_TYPE.RIGHT,label:Object(o.getString)("joinType_right")},{value:a.JOIN_TYPE.FULL,label:Object(o.getString)("joinType_full")}],p=[{value:n.a.JoinFilterType.NONE,label:Object(o.getString)("joinFilterType_none")},{value:n.a.JoinFilterType.IN,label:Object(o.getString)("joinFilterType_in")},{value:n.a.JoinFilterType.BETWEEN,label:Object(o.getString)("joinFilterType_between")},{value:n.a.JoinFilterType.TABLE,label:Object(o.getString)("joinFilterType_table")},{value:n.a.JoinFilterType.FLEXIBLE,label:Object(o.getString)("joinFilterType_flexible")}]},1216:function(e,t,i){"use strict";i.d(t,"a",function(){return Oe});var r,n,o,a,l,c,s,u,d,p,h,f,g,b,y,m,j,_,O,S=i(54),v=i.n(S),E=i(1),T=i.n(E),I=i(20),R=i(16),w=i(0),L=i.n(w),M=i(3),C=i(826),Q=i.n(C),k=i(152),F=i.n(k),N=i(323),D=i.n(N),x=i(1016),A=i.n(x),P=i(69),V=i.n(P),G=i(25),H=i(161),J=i(17),B=i(821),z=i(5),Y=i(263),U=i(2),q=i(119),Z=i(4),W=i(266),X=i(41),K=i(1015),$=i(49),ee=i.n($),te=i(1582),ie=i(1215);i(1585);function re(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function ne(){return(ne=Object.assign||function(e){for(var t=1;t0&&T.a.createElement(M.Flyout,{triggerNode:Object(I.findDOMNode)(this._buttonRef),domNodeToAttachTo:Object(I.findDOMNode)(this._buttonRef).parentNode,placement:"top",onClose:function(){return e.setState({openFlyout:!1})},showX:!0,padding:"default",style:{width:"auto",height:"auto"},title:this._getDefinedMatchesTitle()},T.a.createElement(M.Container,{textAlign:"left",gutter:[2,0,0,0]},T.a.createElement(M.Container,{className:"bi-mui-joinView__matchesList","data-tid":"definedMatchesSection"},T.a.createElement(M.List,{"aria-label":Object(U.getString)("joinDefinedMatches"),ref:function(t){return(e._matchesList=t)&&t.focus()},length:t.length,itemRenderer:this._definedMatchesRenderer,fullHeight:!0,onKeyDown:this._onDefinedMatchesKeyDown,onActiveChange:this._onDefinedMatchesActiveChange})))))},t}(E.Component))||c)||c,he=Object(z.e)(function(e,t){return{removeLinkAtCol:t.joinStore.removeLinkAtCol}})(s=Object(R.observer)((d=u=function(e){function t(){for(var i,r=arguments.length,n=new Array(r),o=0;o0?t.joinGridStore&&T.a.createElement(z.b,{store:t.joinGridStore},T.a.createElement(B.default,{headerCellRenderer:this._headerRenderer,initialHeadersVisible:!0,manualRefresh:!0,useRowOptionsColumn:!1,onHeaderContextMenu:i?void 0:function(t,i,r,n){return e._toggleHeaderMenu(!0,t,i,n)}})):T.a.createElement(M.FlexLayout,{fullHeight:!0,direction:"row"},T.a.createElement(M.FlexItem,{grow:!0,"data-tid":"leftGridSection",relative:!0},t.leftGridStore&&T.a.createElement(z.b,{store:t.leftGridStore},T.a.createElement(B.default,{useRowOptionsColumn:!1}))),T.a.createElement(M.FlexItem,{grow:!0,"data-tid":"rightGridSection",relative:!0},t.rightGridStore&&T.a.createElement(z.b,{store:t.rightGridStore},T.a.createElement(B.default,{useRowOptionsColumn:!1}))))),this.state.isHeaderMenuOpen&&T.a.createElement(M.ContextMenu,{placement:"right",onClose:this._onHeaderMenuClose,onChange:this._onHeaderMenuClick,fixedPosition:{x:this.state.headerMenuX,y:this.state.headerMenuY},"data-tid":Object(G.a)("JoinGridItem","contextMenu")},T.a.createElement(M.ContextMenu.List,{content:this.headerContextMenuOptions,name:"headerContextMenu","data-tid":Object(G.a)("JoinGridItem","contextMenuList")})))},t}(E.Component),u.HEADER_ACTION_REMOVE="headerActionRemove",s=d))||s)||s,fe=Object(z.e)(function(e,t){return{addLinksFromSelection:t.joinStore.addLinksFromSelection}})(p=Object(R.observer)(p=function(e){function t(){return e.apply(this,arguments)||this}return re(t,e),t.prototype.render=function(){var e=this.props,t=e.joinStore,i=e.addLinksFromSelection,r=e.onClick,n=t.canMatch;return T.a.createElement(M.Button,{intent:"primary",label:Object(U.getString)("joinMatch"),onClick:function(){i(),r()},disabled:!n,"data-tid":"matchClickable"})},t}(E.Component))||p)||p,ge=Object(z.e)(function(e,t){return{setLeftQuerySubject:t.joinStore.setLeftQuerySubject}})(h=Object(R.observer)(h=function(e){function t(t){var i;return(i=e.call(this,t)||this).state={leftTableFlyoutOpen:!1},i._leftTreeProvider=void 0,i._buttonRef=void 0,i._leftJoinTableButtonId=v()("__joinView-ljtb_"),i._leftTreeProvider=ae(t.joinStore,"rightQuerySubject","rightPackage","leftPackage"),i}return re(t,e),t.prototype.render=function(){var e=this,t=this.props,i=t.joinStore,r=t.setLeftQuerySubject,n=i.module,o=i.leftQuerySubject,a=i.rightQuerySubject,l=this.state.leftTableFlyoutOpen,c=J.getTextDirPref();return T.a.createElement("div",{className:"bi-mui-joinView__bg bi-mui-joinView__line is-left","data-tid":"leftQuerySubjectFlyout"},T.a.createElement(M.Button,{id:this._leftJoinTableButtonId,fullWidth:!0,variant:"bar",ref:function(t){return e._buttonRef=t},label:o?o.getLabel():Object(U.getString)("joinSelectTable"),textAlign:"left",textDir:c,iconRight:T.a.createElement(M.SVGIcon,{size:"tiny",rotate:l?-90:90,iconId:Q.a.id}),size:"small",onClick:function(){return e.setState({leftTableFlyoutOpen:!l})},"data-tid":"leftQuerySubjectClickable",disabled:i.leftLocked}),l&&T.a.createElement(M.Flyout,{onClose:function(){return e.setState({leftTableFlyoutOpen:!l})},triggerNode:Object(I.findDOMNode)(this._buttonRef),placement:"bottomCentred"},T.a.createElement(se,{treeProvider:this._leftTreeProvider,module:n,querySubject:o,onChange:function(t){t&&t.getObjectType()===L.a.MoserObjectTypes.QUERY_SUBJECT&&t!==a&&(r(t),e.setState({leftTableFlyoutOpen:!1}))}})))},t}(E.Component))||h)||h,be=Object(z.e)(function(e,t){return{setRightQuerySubject:t.joinStore.setRightQuerySubject}})(f=Object(R.observer)(f=function(e){function t(t){var i;return(i=e.call(this,t)||this).state={rightTableFlyoutOpen:!1},i._rightTreeProvider=void 0,i._buttonRef=void 0,i._rightJoinTableButtonId=v()("__joinView-rjtb_"),i._rightTreeProvider=ae(t.joinStore,"leftQuerySubject","leftPackage","rightPackage"),i}return re(t,e),t.prototype.render=function(){var e=this,t=this.props,i=t.joinStore,r=t.setRightQuerySubject,n=i.module,o=i.rightQuerySubject,a=i.leftQuerySubject,l=this.state.rightTableFlyoutOpen,c=J.getTextDirPref();return T.a.createElement("div",{className:"bi-mui-joinView__bg bi-mui-joinView__line is-right","data-tid":"rightQuerySubjectFlyout"},T.a.createElement(M.Button,{id:this._rightJoinTableButtonId,fullWidth:!0,variant:"bar",ref:function(t){return e._buttonRef=t},label:o?o.getLabel():Object(U.getString)("joinSelectTable"),textAlign:"left",textDir:c,iconRight:T.a.createElement(M.SVGIcon,{size:"tiny",rotate:l?-90:90,iconId:Q.a.id}),size:"small",onClick:function(){return e.setState({rightTableFlyoutOpen:!l})},"data-tid":"rightQuerySubjectClickable",disabled:i.rightLocked}),l&&T.a.createElement(M.Flyout,{onClose:function(){return e.setState({rightTableFlyoutOpen:!l})},placement:"bottomCentred",triggerNode:Object(I.findDOMNode)(this._buttonRef)},T.a.createElement(se,{treeProvider:this._rightTreeProvider,module:n,querySubject:o,onChange:function(t){t&&t.getObjectType()===L.a.MoserObjectTypes.QUERY_SUBJECT&&t!==a&&(r(t),e.setState({rightTableFlyoutOpen:!1}))}})))},t}(E.Component))||f)||f,ye=Object(R.observer)(g=function(e){function t(){return e.apply(this,arguments)||this}return re(t,e),t.prototype.render=function(){var e=this.props.joinStore.leftQueryItemGridStore;return e?T.a.createElement(M.FlexItem,{height:200,relative:!0},T.a.createElement(z.b,{store:e},T.a.createElement(B.default,{"data-tid":"leftQueryItemValuesGrid",fullWidth:!0,useRowOptionsColumn:!1}))):null},t}(E.Component))||g,me=Object(R.observer)(b=function(e){function t(){return e.apply(this,arguments)||this}return re(t,e),t.prototype.render=function(){var e=this.props.joinStore.rightQueryItemGridStore;return e?T.a.createElement(M.FlexItem,{height:200,relative:!0},T.a.createElement(z.b,{store:e},T.a.createElement(B.default,{"data-tid":"rightQueryItemValuesGrid",fullWidth:!0,useRowOptionsColumn:!1}))):null},t}(E.Component))||b,je=Object(z.e)(function(e,t){return{setSelectedLeftQueryItemIds:t.joinStore.setSelectedLeftQueryItemIds,setLeftFilter:t.joinStore.setLeftFilter}})(y=Object(R.observer)(y=function(e){function t(){for(var t,i=arguments.length,r=new Array(i),n=0;n'});a.a.add(l),t.a=l},"3865314c5959606874d4":function(t,i){t.exports=e},"5863da78ae10546f8ae3":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i("3865314c5959606874d4"),n=(i.n(r),i("11851ffb8d2b05d6700a"));t.default=n.a}},["5863da78ae10546f8ae3"])}(i(15))}}]); //# sourceMappingURL=commonAsyncShared__buildQS__relationship.js.map