@viswa-test/test-citation 0.0.258 → 0.0.259
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("lucide-react"),n=require("../../../assests/svg/ButtonCognitiveIcon.js"),o=require("../CognitiveComparehelpers.js"),s=require("../CognitiveCompareConstants.js"),l=require("./ThreeDotsLoader.js"),a=require("./connectedLines.js"),r=require("@mui/material");exports.default=function(c){var d=c.svgContainerRef,u=c.svgDimensions,g=c.isResizing,p=c.overallConnector,v=c.rootDeviationStyle,x=c.lines,h=c.isSideBySide,y=c.activeSideBySideSection,b=c.isArrowVisible,f=c.maintainRelativeOrder,S=c.proposedSections,_=c.existingSections,j=c.cognitivePopup,m=c.activeBadgeId,I=c.closeCognitivePopup,C=c.setActiveBadgeId,B=c.openCognitivePopupFromState,R=c.buildSectionPopupState,A=c.connectedLines,P=c.pathRefs,D=c.isGuidelineMode;return i.jsxs("svg",e.__assign({ref:d,style:{position:"absolute",top:0,left:0,width:u.width||"100%",height:u.height||"100%",pointerEvents:"none",zIndex:10,overflow:"visible",opacity:g?0:1,transition:"opacity 0.15s ease-in-out"}},{children:[p&&i.jsx("g",{children:i.jsx("line",{x1:p.x1,y1:p.y,x2:p.x2,y2:p.y,stroke:v.badgeBorder,strokeWidth:"1.5"})}),x.map(function(a){var c,d,u,g,p,v,x,A=a.x1+.5*(a.x2-a.x1),P=(a.y1+a.y2)/2,D=A+75;if("Not Defined"===a.style.label&&!a.hasCognitive)return null;if(a.isSubSection?h&&y===a.subSectionKeyPath&&b:h&&y===a.sectionIdx&&b)return null;if(f)return null;var w=a.isMappingContinuation?"M ".concat(D," ").concat(a.y1," L ").concat(D," ").concat(a.y2," L ").concat(a.x2," ").concat(a.y2):a.isSubSection?o.getBentArrowPath(a.x1,a.y1,a.x2,a.y2):"M ".concat(a.x1," ").concat(a.y1," L ").concat(a.x2," ").concat(a.y2),E=S[a.sectionIdx]||{title:"",content:""},O=_[null!==(c=a.targetRightIdx)&&void 0!==c?c:a.sectionIdx]||{title:"",content:""};if(a.isSubSection&&a.subSectionKeyPath){var T=a.subSectionKeyPath.includes(o.DEVIATION_BADGE_SEPARATOR)?a.subSectionKeyPath.split(o.DEVIATION_BADGE_SEPARATOR):[],q=T[2]||a.subSectionKeyPath,L=T[3]||q,M=q.split("-").map(Number),N=L.split("-").map(Number),k=null,K=null;M.length>0&&(k=S[M[0]]||null),N.length>0&&(K=_[N[0]]||null);for(var z=(null==k?void 0:k.title)||"",G=(null==K?void 0:K.title)||"",V=1;V<M.length;V+=1)(null==k?void 0:k.subsections)&&(k=k.subsections[M[V]]||null);for(V=1;V<N.length;V+=1)(null==K?void 0:K.subsections)&&(K=K.subsections[N[V]]||null);k&&(E=e.__assign(e.__assign({},k),{title:z||k.title})),K&&(O=e.__assign(e.__assign({},K),{title:G||K.title}))}var F=!(null===(d=E.cognitiveData)||void 0===d?void 0:d.isMissingRationale)||Boolean(null===(g=null===(u=E.cognitiveData)||void 0===u?void 0:u.decisioning)||void 0===g?void 0:g.length),W=(null===(x=null===(v=null===(p=E.evaluationResult)||void 0===p?void 0:p.cognitive_decisioning)||void 0===v?void 0:v.decisioning_factors)||void 0===x?void 0:x.length)||!1,U=F||W;return i.jsxs("g",{children:[i.jsx("path",{d:w,fill:"none",stroke:a.style.badgeBorder||"#E2E8F0",strokeWidth:"1.5"}),!a.isMappingContinuation&&i.jsx("foreignObject",e.__assign({x:A-100,y:P-14,width:"200",height:"28",style:{pointerEvents:"auto",overflow:"visible"}},{children:i.jsx(r.Box,e.__assign({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:i.jsxs(r.Box,e.__assign({onClick:function(e){e.stopPropagation(),U&&(j.open&&m===a.id?I():(C(a.id),B(R(e.currentTarget,E,O,a.sectionIdx,!1,a.style))))},sx:{display:"inline-flex",alignItems:"center",gap:"4px",fontSize:"11px",bgcolor:a.style.badgeBg,color:a.style.badgeText,border:"1px solid ".concat(a.style.badgeBorder),borderRadius:"12px",px:1.5,py:.5,fontWeight:600,textAlign:"center",whiteSpace:"nowrap",cursor:U?"pointer":"default"}},{children:[a.style.badgeText===s.DEFAULT_DEVIAION_COLOR&&null==a.style.label?i.jsx(l.default,{color:a.style.badgeText}):null==a.style.label?null:"0"===String(a.style.label)?"Same":a.style.label,i.jsx(r.Box,e.__assign({component:"span",sx:{width:14,height:14,display:"flex",alignItems:"center","& svg":{width:"14px",height:"14px"}}},{children:i.jsx(n.ButtonCognitiveIcon,{})})),U&&i.jsx(t.ChevronDown,{size:11,style:{transform:j.open&&m===a.id?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.25s ease"}})]}))}))}))]},a.id)}),i.jsx(a.default,{maintainRelativeOrder:f,connectedLines:A,pathRefs:P,isGuidelineMode:D})]}))};
|
|
2
2
|
//# sourceMappingURL=SvgConnectors.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as t,jsx as i}from"react/jsx-runtime";import{ChevronDown as n}from"lucide-react";import{ButtonCognitiveIcon as o}from"../../../assests/svg/ButtonCognitiveIcon.js";import{getBentArrowPath as l,DEVIATION_BADGE_SEPARATOR as s}from"../CognitiveComparehelpers.js";import{DEFAULT_DEVIAION_COLOR as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as t,jsx as i}from"react/jsx-runtime";import{ChevronDown as n}from"lucide-react";import{ButtonCognitiveIcon as o}from"../../../assests/svg/ButtonCognitiveIcon.js";import{getBentArrowPath as l,DEVIATION_BADGE_SEPARATOR as s}from"../CognitiveComparehelpers.js";import{DEFAULT_DEVIAION_COLOR as r}from"../CognitiveCompareConstants.js";import a from"./ThreeDotsLoader.js";import c from"./connectedLines.js";import{Box as d}from"@mui/material";function u(u){var p=u.svgContainerRef,g=u.svgDimensions,v=u.isResizing,h=u.overallConnector,y=u.rootDeviationStyle,f=u.lines,m=u.isSideBySide,x=u.activeSideBySideSection,b=u.isArrowVisible,S=u.maintainRelativeOrder,C=u.proposedSections,I=u.existingSections,w=u.cognitivePopup,B=u.activeBadgeId,P=u.closeCognitivePopup,R=u.setActiveBadgeId,j=u.openCognitivePopupFromState,L=u.buildSectionPopupState,M=u.connectedLines,D=u.pathRefs,k=u.isGuidelineMode;return t("svg",e({ref:p,style:{position:"absolute",top:0,left:0,width:g.width||"100%",height:g.height||"100%",pointerEvents:"none",zIndex:10,overflow:"visible",opacity:v?0:1,transition:"opacity 0.15s ease-in-out"}},{children:[h&&i("g",{children:i("line",{x1:h.x1,y1:h.y,x2:h.x2,y2:h.y,stroke:y.badgeBorder,strokeWidth:"1.5"})}),f.map(function(c){var u,p,g,v,h,y,f,M=c.x1+.5*(c.x2-c.x1),D=(c.y1+c.y2)/2,k=M+75;if("Not Defined"===c.style.label&&!c.hasCognitive)return null;if(c.isSubSection?m&&x===c.subSectionKeyPath&&b:m&&x===c.sectionIdx&&b)return null;if(S)return null;var K=c.isMappingContinuation?"M ".concat(k," ").concat(c.y1," L ").concat(k," ").concat(c.y2," L ").concat(c.x2," ").concat(c.y2):c.isSubSection?l(c.x1,c.y1,c.x2,c.y2):"M ".concat(c.x1," ").concat(c.y1," L ").concat(c.x2," ").concat(c.y2),T=C[c.sectionIdx]||{title:"",content:""},z=I[null!==(u=c.targetRightIdx)&&void 0!==u?u:c.sectionIdx]||{title:"",content:""};if(c.isSubSection&&c.subSectionKeyPath){var E=c.subSectionKeyPath.includes(s)?c.subSectionKeyPath.split(s):[],A=E[2]||c.subSectionKeyPath,N=E[3]||A,O=A.split("-").map(Number),W=N.split("-").map(Number),F=null,G=null;O.length>0&&(F=C[O[0]]||null),W.length>0&&(G=I[W[0]]||null);for(var _=(null==F?void 0:F.title)||"",V=(null==G?void 0:G.title)||"",q=1;q<O.length;q+=1)(null==F?void 0:F.subsections)&&(F=F.subsections[O[q]]||null);for(q=1;q<W.length;q+=1)(null==G?void 0:G.subsections)&&(G=G.subsections[W[q]]||null);F&&(T=e(e({},F),{title:_||F.title})),G&&(z=e(e({},G),{title:V||G.title}))}var H=!(null===(p=T.cognitiveData)||void 0===p?void 0:p.isMissingRationale)||Boolean(null===(v=null===(g=T.cognitiveData)||void 0===g?void 0:g.decisioning)||void 0===v?void 0:v.length),J=(null===(f=null===(y=null===(h=T.evaluationResult)||void 0===h?void 0:h.cognitive_decisioning)||void 0===y?void 0:y.decisioning_factors)||void 0===f?void 0:f.length)||!1,Q=H||J;return t("g",{children:[i("path",{d:K,fill:"none",stroke:c.style.badgeBorder||"#E2E8F0",strokeWidth:"1.5"}),!c.isMappingContinuation&&i("foreignObject",e({x:M-100,y:D-14,width:"200",height:"28",style:{pointerEvents:"auto",overflow:"visible"}},{children:i(d,e({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:t(d,e({onClick:function(e){e.stopPropagation(),Q&&(w.open&&B===c.id?P():(R(c.id),j(L(e.currentTarget,T,z,c.sectionIdx,!1,c.style))))},sx:{display:"inline-flex",alignItems:"center",gap:"4px",fontSize:"11px",bgcolor:c.style.badgeBg,color:c.style.badgeText,border:"1px solid ".concat(c.style.badgeBorder),borderRadius:"12px",px:1.5,py:.5,fontWeight:600,textAlign:"center",whiteSpace:"nowrap",cursor:Q?"pointer":"default"}},{children:[c.style.badgeText===r&&null==c.style.label?i(a,{color:c.style.badgeText}):null==c.style.label?null:"0"===String(c.style.label)?"Same":c.style.label,i(d,e({component:"span",sx:{width:14,height:14,display:"flex",alignItems:"center","& svg":{width:"14px",height:"14px"}}},{children:i(o,{})})),Q&&i(n,{size:11,style:{transform:w.open&&B===c.id?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.25s ease"}})]}))}))}))]},c.id)}),i(c,{maintainRelativeOrder:S,connectedLines:M,pathRefs:D,isGuidelineMode:k})]}))}export{u as default};
|
|
2
2
|
//# sourceMappingURL=SvgConnectors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SvgConnectors.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CognitiveCompare/components/SvgConnectors.tsx"],"names":[],"mappings":";AAOA,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACb,MAAM,0BAA0B,CAAC;AAiBlC,KAAK,kBAAkB,GAAG;IACxB,eAAe,EAAE,KAAK,CAAC,gBAAgB,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IAC9D,aAAa,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACjD,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC/D,kBAAkB,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;IAC7B,YAAY,EAAE,OAAO,CAAC;IACtB,uBAAuB,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAChD,cAAc,EAAE,OAAO,CAAC;IACxB,qBAAqB,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3C,gBAAgB,EAAE,YAAY,EAAE,CAAC;IACjC,gBAAgB,EAAE,YAAY,EAAE,CAAC;IACjC,cAAc,EAAE,iBAAiB,CAAC;IAClC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IACtE,2BAA2B,EAAE,CAAC,SAAS,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACpE,sBAAsB,EAAE,CACtB,QAAQ,EAAE,WAAW,GAAG,IAAI,EAC5B,OAAO,EAAE,YAAY,GAAG,IAAI,EAC5B,MAAM,EAAE,YAAY,GAAG,IAAI,EAC3B,UAAU,EAAE,MAAM,GAAG,MAAM,EAC3B,QAAQ,CAAC,EAAE,OAAO,EAClB,KAAK,CAAC,EAAE,YAAY,GAAG,IAAI,EAC3B,QAAQ,CAAC,EAAE,OAAO,KACf,iBAAiB,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;IACtC,QAAQ,EAAE,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC,CAAC,CAAC;IACxE,eAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,eAAe,EACf,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EACL,YAAY,EACZ,uBAAuB,EACvB,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,gBAAgB,EAChB,2BAA2B,EAC3B,sBAAsB,EACtB,cAAc,EACd,QAAQ,EACR,eAAe,GAChB,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"SvgConnectors.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CognitiveCompare/components/SvgConnectors.tsx"],"names":[],"mappings":";AAOA,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACb,MAAM,0BAA0B,CAAC;AAiBlC,KAAK,kBAAkB,GAAG;IACxB,eAAe,EAAE,KAAK,CAAC,gBAAgB,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IAC9D,aAAa,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,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