@viswa-test/test-citation 0.0.25 → 0.0.26
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/CitationAnchor.js +1 -1
- package/dist/features/CognitiveCompare/CitationAnchor.js +1 -1
- package/dist/types/src/CommonConstants/CommonConstants.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CitationAnchor.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("tslib"),n=require("react/jsx-runtime"),e=require("lucide-react"),l=require("react"),t=require("./ResizableSplitPane.js"),o=require("../PdfViewer/PdfViewer.js");exports.default=function(r){var a,u,d,s=r.href,c=r.children,g=r.metaData,h=r.chevronUpComponent,v=void 0===h?null:h,p=r.chevronDownComponent,f=void 0===p?null:p,m=r.customStyle,_=void 0===m?{}:m,x=r.defaultState,j=void 0!==x&&x,b=l.useState(j),y=b[0],w=b[1],C="string"==typeof c&&(null===(a=null==c?void 0:c.split("\n"))||void 0===a?void 0:a.length)>1?c.split("\n").join(" "):c,P=null!=v?v:function(i){var l,t;return n.jsx(e.ChevronUp,{size:null!==(l=null==i?void 0:i.fontSize)&&void 0!==l?l:16,color:null!==(t=null==i?void 0:i.color)&&void 0!==t?t:"rgb(214, 51, 132)"})}(null!==(u=null==_?void 0:_.arrow)&&void 0!==u?u:{}),D=null!=f?f:function(i){var l,t;return n.jsx(e.ChevronDown,{size:null!==(l=null==i?void 0:i.fontSize)&&void 0!==l?l:16,color:null!==(t=null==i?void 0:i.color)&&void 0!==t?t:"rgb(214, 51, 132)"})}(null!==(d=null==_?void 0:_.arrow)&&void 0!==d?d:{}),S=["contract","clause"];return n.jsxs("span",i.__assign({style:i.__assign({display:"inline"},_.relativeWrapper||{})},{children:[n.jsx("div",i.__assign({style:i.__assign({display:"inline",marginTop:0},_.citationButtonWrapper||{})},{children:n.jsxs("button",i.__assign({type:"button",onClick:function(){return w(function(i){return!i})},style:i.__assign({display:"inline-flex",alignItems:"center",gap:"3px",fontFamily:'"Inter", sans-serif',backgroundColor:"transparent",padding:0,margin:0,fontSize:"13px",borderRadius:9999,cursor:"pointer",fontWeight:700,color:"rgb(214, 51, 132)",border:"none",textDecoration:"none",wordBreak:"break-word",whiteSpace:"normal"},_.citationButton||{})},{children:[n.jsx("span",{children:C}),n.jsx("span",i.__assign({style:{display:"flex",alignItems:"center"}},{children:y?P:D}))]}))})),y&&n.jsx(n.Fragment,{children:n.jsx(function(){var i,e,l,r,a,u,d;console.log("citation details ->","href ->",s,"children ->",c,"metaData ->",g,"citationDisplayTitle ->",C);var h=function(i){try{return new URL(i,window.location.origin).searchParams.get("citationNumber")}catch(i){return null}}(s);if(!h)return null;var v=(null===(i=null==g?void 0:g.citations)||void 0===i?void 0:i[h])||{},p=(null===(e=null==g?void 0:g.docData)||void 0===e?void 0:e.documents)||{},f=(null===(l=null==g?void 0:g.docData)||void 0===l?void 0:l.input_index_map)||{},m=null==f?void 0:f[0],_=null==f?void 0:f[1],x=m?p[m]:null,j=_?p[_]:null,b=m?v[m]:null,y=_?v[_]:null;if(S.includes(C[0])){console.log("leftDocument",x,"rightDocument",j);var w=b?n.jsx(o.default,{defaultScale:"PageWidth",showHighlightsAction:!1,pdfName:x.title,pdfUrl:x.signed_url,highlightText:[null!==(r=null==b?void 0:b.highlighted_text)&&void 0!==r?r:""],highlightPages:{1:null===(a=null==b?void 0:b.custom_metadata)||void 0===a?void 0:a.pdf_start_page_number},jumpToPageValue:1,highlightCordinatePages:[],useCoordinates:!1}):null,P=y?n.jsx(o.default,{defaultScale:"PageWidth",showHighlightsAction:!1,pdfName:j.title,pdfUrl:j.signed_url,jumpToPageValue:1,highlightText:[null!==(u=null==y?void 0:y.highlighted_text)&&void 0!==u?u:""],highlightPages:{1:null===(d=null==y?void 0:y.custom_metadata)||void 0===d?void 0:d.pdf_start_page_number},highlightCordinatePages:[],useCoordinates:!1}):null;return b||y?n.jsx("div",{children:n.jsx(t.default,{leftComponent:w,rightComponent:P})}):n.jsx(n.Fragment,{children:"Missing Citation"})}return n.jsx(n.Fragment,{children:"No Citation"})},{})})]}))};
|
|
2
2
|
//# sourceMappingURL=CitationAnchor.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as
|
|
1
|
+
import{__assign as i}from"tslib";import{jsxs as n,jsx as l,Fragment as t}from"react/jsx-runtime";import{ChevronUp as o,ChevronDown as e}from"lucide-react";import{useState as r}from"react";import a from"./ResizableSplitPane.js";import d from"../PdfViewer/PdfViewer.js";var u=function(u){var c,s,h,v=u.href,g=u.children,p=u.metaData,m=u.chevronUpComponent,f=void 0===m?null:m,b=u.chevronDownComponent,y=void 0===b?null:b,_=u.customStyle,w=void 0===_?{}:_,x=u.defaultState,C=r(void 0!==x&&x),P=C[0],D=C[1],S="string"==typeof g&&(null===(c=null==g?void 0:g.split("\n"))||void 0===c?void 0:c.length)>1?g.split("\n").join(" "):g,j=null!=f?f:function(i){var n,t;return l(o,{size:null!==(n=null==i?void 0:i.fontSize)&&void 0!==n?n:16,color:null!==(t=null==i?void 0:i.color)&&void 0!==t?t:"rgb(214, 51, 132)"})}(null!==(s=null==w?void 0:w.arrow)&&void 0!==s?s:{}),z=null!=y?y:function(i){var n,t;return l(e,{size:null!==(n=null==i?void 0:i.fontSize)&&void 0!==n?n:16,color:null!==(t=null==i?void 0:i.color)&&void 0!==t?t:"rgb(214, 51, 132)"})}(null!==(h=null==w?void 0:w.arrow)&&void 0!==h?h:{}),T=["contract","clause"];return n("span",i({style:i({display:"inline"},w.relativeWrapper||{})},{children:[l("div",i({style:i({display:"inline",marginTop:0},w.citationButtonWrapper||{})},{children:n("button",i({type:"button",onClick:function(){return D(function(i){return!i})},style:i({display:"inline-flex",alignItems:"center",gap:"3px",fontFamily:'"Inter", sans-serif',backgroundColor:"transparent",padding:0,margin:0,fontSize:"13px",borderRadius:9999,cursor:"pointer",fontWeight:700,color:"rgb(214, 51, 132)",border:"none",textDecoration:"none",wordBreak:"break-word",whiteSpace:"normal"},w.citationButton||{})},{children:[l("span",{children:S}),l("span",i({style:{display:"flex",alignItems:"center"}},{children:P?j:z}))]}))})),P&&l(t,{children:l(function(){var i,n,o,e,r,u,c;console.log("citation details ->","href ->",v,"children ->",g,"metaData ->",p,"citationDisplayTitle ->",S);var s=function(i){try{return new URL(i,window.location.origin).searchParams.get("citationNumber")}catch(i){return null}}(v);if(!s)return null;var h=(null===(i=null==p?void 0:p.citations)||void 0===i?void 0:i[s])||{},m=(null===(n=null==p?void 0:p.docData)||void 0===n?void 0:n.documents)||{},f=(null===(o=null==p?void 0:p.docData)||void 0===o?void 0:o.input_index_map)||{},b=null==f?void 0:f[0],y=null==f?void 0:f[1],_=b?m[b]:null,w=y?m[y]:null,x=b?h[b]:null,C=y?h[y]:null;if(T.includes(S[0])){console.log("leftDocument",_,"rightDocument",w);var P=x?l(d,{defaultScale:"PageWidth",showHighlightsAction:!1,pdfName:_.title,pdfUrl:_.signed_url,highlightText:[null!==(e=null==x?void 0:x.highlighted_text)&&void 0!==e?e:""],highlightPages:{1:null===(r=null==x?void 0:x.custom_metadata)||void 0===r?void 0:r.pdf_start_page_number},jumpToPageValue:1,highlightCordinatePages:[],useCoordinates:!1}):null,D=C?l(d,{defaultScale:"PageWidth",showHighlightsAction:!1,pdfName:w.title,pdfUrl:w.signed_url,jumpToPageValue:1,highlightText:[null!==(u=null==C?void 0:C.highlighted_text)&&void 0!==u?u:""],highlightPages:{1:null===(c=null==C?void 0:C.custom_metadata)||void 0===c?void 0:c.pdf_start_page_number},highlightCordinatePages:[],useCoordinates:!1}):null;return x||C?l("div",{children:l(a,{leftComponent:P,rightComponent:D})}):l(t,{children:"Missing Citation"})}return l(t,{children:"No Citation"})},{})})]}))};export{u as default};
|
|
2
2
|
//# sourceMappingURL=CitationAnchor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommonConstants.d.ts","sourceRoot":"","sources":["../../../../src/CommonConstants/CommonConstants.tsx"],"names":[],"mappings":"AACA,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,OAAO,CAAC;AAC5C,eAAO,MAAM,OAAO,EAAE,aAAqB,CAAC;AAC5C,eAAO,MAAM,SAAS,EAAE,aAAuB,CAAC;AAChD,eAAO,MAAM,6BAA6B,yCAAwC,CAAA;AAElF,eAAO,MAAM,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"CommonConstants.d.ts","sourceRoot":"","sources":["../../../../src/CommonConstants/CommonConstants.tsx"],"names":[],"mappings":"AACA,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,OAAO,CAAC;AAC5C,eAAO,MAAM,OAAO,EAAE,aAAqB,CAAC;AAC5C,eAAO,MAAM,SAAS,EAAE,aAAuB,CAAC;AAChD,eAAO,MAAM,6BAA6B,yCAAwC,CAAA;AAElF,eAAO,MAAM,iBAAiB,EAAE,GAsxG/B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CitationAnchor.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CitationAnchor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EACV,aAAa,EAKhB,MAAM,OAAO,CAAC;AAIf,UAAU,mBAAmB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,GAAG,CAAC;IACd,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACrC,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,WAAW,CAAC,EAAE;QACV,qBAAqB,CAAC,EAAE,aAAa,CAAC;QACtC,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,cAAc,CAAC,EAAE,aAAa,CAAC;QAC/B,iBAAiB,CAAC,EAAE,aAAa,CAAC;QAClC,UAAU,CAAC,E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,aAAa,CAAC;QAChC,oBAAoB,CAAC,EAAE,aAAa,CAAC;QACrC,eAAe,CAAC,EAAE,aAAa,CAAC;KACnC,CAAC;IACF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,GAAG,CAAC;CAClB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA2MjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|