@viswa-test/test-citation 0.0.239 → 0.0.240
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.
- package/dist/cjs/features/CognitiveCompare/components/RHSSectionRow.js +1 -1
- package/dist/features/CognitiveCompare/components/RHSSectionRow.js +1 -1
- package/dist/types/src/features/CognitiveCompare/Guidelines/constants/guidelines.mockData.d.ts +3498 -24195
- package/dist/types/src/features/CognitiveCompare/Guidelines/constants/guidelines.mockData.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/components/RHSSectionRow.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),o=require("@mui/material"),t=require("lucide-react"),r=require("./SectionAccordion.js"),l=require("./ThreeDotsLoader.js"),a=require("./ScrollLockToggle.js"),d=require("../CognitiveComparehelpers.js"),s=require("../CompareContext.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=c(i),x=u.default.memo(function(i){var c,x,p,g=i.section,f=i.idx,v=s.useCompareContext(),h=v.maintainRelativeOrder;v.existingSections;var m=v.proposedSections,b=v.connectedSections,S=v.expandedSections,_=v.displayConfig,I=v.treeData;v.deviationNumberRegistry;var j=v.getSectionCompareStyle;v.getBadgeRef;var y=v.getSectionRowRef,B=v.sectionRightRefs,R=v.rhsBadgeRefs,w=v.openMoreFunctionsPopup,C=v.handleOpenSummaryPopup,N=v.handleCloseSummaryPopup,T=v.toggleSection;v.showDeviationBadges,v.renderSubSectionAccordion,v.isProposingFix,v.proposingFixNodeId,v.isRedlineFlow;var k=v.isSideBySide,q=v.activeSideBySideSection,P=v.scrollSyncLocked,M=v.toggleScrollSyncLocked,z=v.summaryPopupAnchorEl;v.deviationNodeIdToView,v.deviationTargetParentId;var A=v.showDeviationNavigation;v.showOpenNodeRef,v.resolvedMarkdownStyles;var D=v.unifiedNumbering,F=g,L=!1,O=null,E=-1,U=-1;h?(U=m.findIndex(function(e){var n;return(null===(n=e.refIndexes)||void 0===n?void 0:n.includes(F.selfIndex))&&e.selfIndex>=0}),E=m.findIndex(function(e,n){var i;return b.has(n)&&(null===(i=e.refIndexes)||void 0===i?void 0:i.includes(F.selfIndex))}),(L=-1!==E)&&(O=j(E,"left"))):(L=b.has(f))&&(O=j(f,"right"));var V=h&&-1!==U?j(U,"left"):j(f,"right"),W=O||V,H=h?-1!==U||!(null===(c=F.refIndexes)||void 0===c?void 0:c.length)&&m.some(function(e){return e.id&&e.id===F.id}):Boolean(m[f]),K=h?F.selfIndex<0||!H:!m[f],X=u.default.useMemo(function(){var e=D.rightNums.get(F.id);return h&&F.id?d.getRhsMappedSectionNumber({section:F,proposedSections:m,leftNums:D.leftNums,fallbackNumber:e}):e},[h,m,F.id,F.selfIndex,D]),Y=u.default.useMemo(function(){if(!h||null==F.selfIndex)return null!=X?[{label:String(X),title:F.title||"Untitled Section",lhsIdx:-1}]:[];var n=m.map(function(e,n){var i=Array.isArray(null==e?void 0:e.refIndexes)?e.refIndexes:[],o=i.findIndex(function(e){return e===F.selfIndex});if(-1===o)return null;var t=(null==e?void 0:e.id)?D.leftNums.get(e.id):void 0;return null==t?null:{label:i.length>1?"".concat(t).concat(d.getAlphabeticSuffix(o)):String(t),title:(null==e?void 0:e.title)||"Untitled Section",lhsIdx:n}}).filter(Boolean);return-1===E?n:e.__spreadArray([],n,!0).sort(function(e,n){return e.lhsIdx===E?-1:n.lhsIdx===E?1:0})},[h,m,F.selfIndex,F.title,X,D.leftNums,E]),G=u.default.useMemo(function(){var e,n=null===(e=Y[0])||void 0===e?void 0:e.label;if(!n)return null!=X?String(X):"";var i=Y.length-1;return i>0?"".concat(n," +").concat(i):n},[Y,X]),J=u.default.useMemo(function(){return 0===Y.length?"":Y.map(function(e){return"".concat(e.label,": ").concat(e.title)}).join("\n")},[Y]),Q=null===(x=R.current[f])||void 0===x?void 0:x.current,Z=L||k&&(q===f||q===U)||!!z&&z===Q;return n.jsx(o.Box,e.__assign({ref:y(f),sx:{mb:1,width:"100%"}},{children:n.jsx(o.Box,e.__assign({ref:B.current[f],sx:e.__assign({width:"100%",display:"flex"},L&&O&&{borderRadius:"6px",outline:"2px solid ".concat(O.badgeBorder),outlineOffset:"1px"})},{children:n.jsxs(o.Box,e.__assign({sx:{position:"relative",width:"100%"}},{children:[n.jsx(r.default,{section:g,idx:f,columnKey:"right",colRef:y("right-accordion-".concat(f)),mb:0,parentNodeId:(null===(p=null==I?void 0:I.input_index_map)||void 0===p?void 0:p[1])||"",isExpanded:h?!!S["right-".concat(f)]:!!S[String(f)],onToggle:function(){N(),T(f,"right")},navigation:g.id?A[g.id]:null}),h&&W&&n.jsx(o.Tooltip,e.__assign({title:J?n.jsx(o.Box,e.__assign({sx:{whiteSpace:"pre-line"}},{children:n.jsx(o.Typography,e.__assign({component:"span",sx:{fontSize:"11px",lineHeight:1.5}},{children:J}))})):"",placement:"top",arrow:!0},{children:n.jsx(o.Box,e.__assign({ref:R.current[f],"data-section-id":F.id,onClick:function(e){var n,i,o;if(K){var t=_.enableDeviationSchemaBackwardCompatibility?null!==(n=F.evaluationResult)&&void 0!==n?n:null:null!==(o=null===(i=F.evaluationResult)||void 0===i?void 0:i[0])&&void 0!==o?o:null;C(e,String(f),K,t)}},sx:{position:"absolute",top:"18px",left:0,transform:"translateY(-50%) translateX(calc(-100% - 8px))",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:K?"4px":"0px",fontSize:"11px",bgcolor:W.badgeBg,color:W.badgeText,border:"1px solid ".concat(W.badgeBorder),borderRadius:K?"12px":"10px",px:K?1.2:1,py:.3,fontWeight:K?600:700,cursor:K?"pointer":"default",whiteSpace:"nowrap",zIndex:20,boxShadow:K?"0 1px 3px rgba(0,0,0,0.07)":"none"}},{children:K?n.jsxs(n.Fragment,{children:[n.jsxs(o.Box,e.__assign({component:"span",onClick:function(e){var n,i,o;e.stopPropagation();var t=_.enableDeviationSchemaBackwardCompatibility?null!==(n=F.evaluationResult)&&void 0!==n?n:null:null!==(o=null===(i=F.evaluationResult)||void 0===i?void 0:i[0])&&void 0!==o?o:null;C(e,String(f),K,t)},sx:{display:"inline-flex",alignItems:"center",gap:"4px",px:.2,cursor:"pointer",borderRight:"1px solid ".concat(W.badgeBorder),"&:hover":{bgcolor:"".concat(W.badgeBorder,"22")}}},{children:[null!=X&&n.jsx(o.Box,e.__assign({component:"span",sx:{fontSize:"11px",fontWeight:700,pr:.5,borderRight:"1px solid ".concat(W.badgeBorder)}},{children:X})),n.jsx(o.Box,e.__assign({component:"span",sx:{fontSize:"11px",px:.25}},{children:!_.isLoading||null!=F.evaluationResult&&void 0!==F.evaluationResult?W.label?"".concat(W.label):"100% Deviation":n.jsx(l.default,{color:W.badgeText})}))]})),n.jsxs(o.Box,e.__assign({component:"span",onClick:function(e){e.stopPropagation();var n=h?m.find(function(e){var n;return null===(n=e.refIndexes)||void 0===n?void 0:n.includes(F.selfIndex)})||{title:"",content:""}:m[f]||{title:"",content:""};w(e,n,K,F,f,W)},sx:{display:"inline-flex",alignItems:"center",px:.2,cursor:"pointer","&:hover":{bgcolor:"".concat(W.badgeBorder,"22")}}},{children:[n.jsx(t.EllipsisVertical,{size:11,color:W.badgeText}),Z&&n.jsx(a.default,{locked:P,onToggle:M,color:W.badgeText,borderColor:W.badgeBorder,size:11})]}))]}):n.jsx(n.Fragment,{children:n.jsx(o.Box,e.__assign({component:"span",sx:{px:.2}},{children:G}))})}))}))]}))}))}),"right-row-".concat(f))});exports.default=x;
|
|
2
2
|
//# sourceMappingURL=RHSSectionRow.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as
|
|
1
|
+
import{__spreadArray as e,__assign as n}from"tslib";import{jsx as o,jsxs as i,Fragment as t}from"react/jsx-runtime";import r from"react";import{Box as l,Tooltip as d,Typography as a}from"@mui/material";import{EllipsisVertical as c}from"lucide-react";import s from"./SectionAccordion.js";import u from"./ThreeDotsLoader.js";import p from"./ScrollLockToggle.js";import{getRhsMappedSectionNumber as f,getAlphabeticSuffix as x}from"../CognitiveComparehelpers.js";import{useCompareContext as g}from"../CompareContext.js";var v=r.memo(function(v){var m,h,b,S=v.section,I=v.idx,y=g(),R=y.maintainRelativeOrder;y.existingSections;var w=y.proposedSections,B=y.connectedSections,C=y.expandedSections,N=y.displayConfig,k=y.treeData;y.deviationNumberRegistry;var T=y.getSectionCompareStyle;y.getBadgeRef;var j=y.getSectionRowRef,P=y.sectionRightRefs,z=y.rhsBadgeRefs,D=y.openMoreFunctionsPopup,M=y.handleOpenSummaryPopup,A=y.handleCloseSummaryPopup,L=y.toggleSection;y.showDeviationBadges,y.renderSubSectionAccordion,y.isProposingFix,y.proposingFixNodeId,y.isRedlineFlow;var F=y.isSideBySide,O=y.activeSideBySideSection,E=y.scrollSyncLocked,U=y.toggleScrollSyncLocked,W=y.summaryPopupAnchorEl;y.deviationNodeIdToView,y.deviationTargetParentId;var _=y.showDeviationNavigation;y.showOpenNodeRef,y.resolvedMarkdownStyles;var H=y.unifiedNumbering,K=S,V=!1,X=null,Y=-1,q=-1;R?(q=w.findIndex(function(e){var n;return(null===(n=e.refIndexes)||void 0===n?void 0:n.includes(K.selfIndex))&&e.selfIndex>=0}),Y=w.findIndex(function(e,n){var o;return B.has(n)&&(null===(o=e.refIndexes)||void 0===o?void 0:o.includes(K.selfIndex))}),(V=-1!==Y)&&(X=T(Y,"left"))):(V=B.has(I))&&(X=T(I,"right"));var G=R&&-1!==q?T(q,"left"):T(I,"right"),J=X||G,Q=R?-1!==q||!(null===(m=K.refIndexes)||void 0===m?void 0:m.length)&&w.some(function(e){return e.id&&e.id===K.id}):Boolean(w[I]),Z=R?K.selfIndex<0||!Q:!w[I],$=r.useMemo(function(){var e=H.rightNums.get(K.id);return R&&K.id?f({section:K,proposedSections:w,leftNums:H.leftNums,fallbackNumber:e}):e},[R,w,K.id,K.selfIndex,H]),ee=r.useMemo(function(){if(!R||null==K.selfIndex)return null!=$?[{label:String($),title:K.title||"Untitled Section",lhsIdx:-1}]:[];var n=w.map(function(e,n){var o=Array.isArray(null==e?void 0:e.refIndexes)?e.refIndexes:[],i=o.findIndex(function(e){return e===K.selfIndex});if(-1===i)return null;var t=(null==e?void 0:e.id)?H.leftNums.get(e.id):void 0;return null==t?null:{label:o.length>1?"".concat(t).concat(x(i)):String(t),title:(null==e?void 0:e.title)||"Untitled Section",lhsIdx:n}}).filter(Boolean);return-1===Y?n:e([],n,!0).sort(function(e,n){return e.lhsIdx===Y?-1:n.lhsIdx===Y?1:0})},[R,w,K.selfIndex,K.title,$,H.leftNums,Y]),ne=r.useMemo(function(){var e,n=null===(e=ee[0])||void 0===e?void 0:e.label;if(!n)return null!=$?String($):"";var o=ee.length-1;return o>0?"".concat(n," +").concat(o):n},[ee,$]),oe=r.useMemo(function(){return 0===ee.length?"":ee.map(function(e){return"".concat(e.label,": ").concat(e.title)}).join("\n")},[ee]),ie=null===(h=z.current[I])||void 0===h?void 0:h.current,te=V||F&&(O===I||O===q)||!!W&&W===ie;return o(l,n({ref:j(I),sx:{mb:1,width:"100%"}},{children:o(l,n({ref:P.current[I],sx:n({width:"100%",display:"flex"},V&&X&&{borderRadius:"6px",outline:"2px solid ".concat(X.badgeBorder),outlineOffset:"1px"})},{children:i(l,n({sx:{position:"relative",width:"100%"}},{children:[o(s,{section:S,idx:I,columnKey:"right",colRef:j("right-accordion-".concat(I)),mb:0,parentNodeId:(null===(b=null==k?void 0:k.input_index_map)||void 0===b?void 0:b[1])||"",isExpanded:R?!!C["right-".concat(I)]:!!C[String(I)],onToggle:function(){A(),L(I,"right")},navigation:S.id?_[S.id]:null}),R&&J&&o(d,n({title:oe?o(l,n({sx:{whiteSpace:"pre-line"}},{children:o(a,n({component:"span",sx:{fontSize:"11px",lineHeight:1.5}},{children:oe}))})):"",placement:"top",arrow:!0},{children:o(l,n({ref:z.current[I],"data-section-id":K.id,onClick:function(e){var n,o,i;if(Z){var t=N.enableDeviationSchemaBackwardCompatibility?null!==(n=K.evaluationResult)&&void 0!==n?n:null:null!==(i=null===(o=K.evaluationResult)||void 0===o?void 0:o[0])&&void 0!==i?i:null;M(e,String(I),Z,t)}},sx:{position:"absolute",top:"18px",left:0,transform:"translateY(-50%) translateX(calc(-100% - 8px))",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:Z?"4px":"0px",fontSize:"11px",bgcolor:J.badgeBg,color:J.badgeText,border:"1px solid ".concat(J.badgeBorder),borderRadius:Z?"12px":"10px",px:Z?1.2:1,py:.3,fontWeight:Z?600:700,cursor:Z?"pointer":"default",whiteSpace:"nowrap",zIndex:20,boxShadow:Z?"0 1px 3px rgba(0,0,0,0.07)":"none"}},{children:Z?i(t,{children:[i(l,n({component:"span",onClick:function(e){var n,o,i;e.stopPropagation();var t=N.enableDeviationSchemaBackwardCompatibility?null!==(n=K.evaluationResult)&&void 0!==n?n:null:null!==(i=null===(o=K.evaluationResult)||void 0===o?void 0:o[0])&&void 0!==i?i:null;M(e,String(I),Z,t)},sx:{display:"inline-flex",alignItems:"center",gap:"4px",px:.2,cursor:"pointer",borderRight:"1px solid ".concat(J.badgeBorder),"&:hover":{bgcolor:"".concat(J.badgeBorder,"22")}}},{children:[null!=$&&o(l,n({component:"span",sx:{fontSize:"11px",fontWeight:700,pr:.5,borderRight:"1px solid ".concat(J.badgeBorder)}},{children:$})),o(l,n({component:"span",sx:{fontSize:"11px",px:.25}},{children:!N.isLoading||null!=K.evaluationResult&&void 0!==K.evaluationResult?J.label?"".concat(J.label):"100% Deviation":o(u,{color:J.badgeText})}))]})),i(l,n({component:"span",onClick:function(e){e.stopPropagation();var n=R?w.find(function(e){var n;return null===(n=e.refIndexes)||void 0===n?void 0:n.includes(K.selfIndex)})||{title:"",content:""}:w[I]||{title:"",content:""};D(e,n,Z,K,I,J)},sx:{display:"inline-flex",alignItems:"center",px:.2,cursor:"pointer","&:hover":{bgcolor:"".concat(J.badgeBorder,"22")}}},{children:[o(c,{size:11,color:J.badgeText}),te&&o(p,{locked:E,onToggle:U,color:J.badgeText,borderColor:J.badgeBorder,size:11})]}))]}):o(t,{children:o(l,n({component:"span",sx:{px:.2}},{children:ne}))})}))}))]}))}))}),"right-row-".concat(I))});export{v as default};
|
|
2
2
|
//# sourceMappingURL=RHSSectionRow.js.map
|