@e-llm-studio/citation 0.0.80 → 0.0.82
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/BookCitation/BookCitation.js +1 -1
- package/dist/cjs/features/BookCitation/BookCitation.module.css.js +1 -1
- package/dist/cjs/features/Bookemon/BookElementsCard/BookElementsCard.js +1 -1
- package/dist/cjs/features/Bookemon/BookPreview/BookPreview.js +1 -1
- package/dist/cjs/features/Bookemon/Bookemon.js +1 -1
- package/dist/features/BookCitation/BookCitation.js +1 -1
- package/dist/features/BookCitation/BookCitation.module.css.js +1 -1
- package/dist/features/Bookemon/BookElementsCard/BookElementsCard.js +1 -1
- package/dist/features/Bookemon/BookPreview/BookPreview.js +1 -1
- package/dist/features/Bookemon/Bookemon.js +1 -1
- package/dist/types/src/BookemonTest.d.ts.map +1 -1
- package/dist/types/src/features/BookCitation/BookCitation.d.ts +2 -0
- package/dist/types/src/features/BookCitation/BookCitation.d.ts.map +1 -1
- package/dist/types/src/features/Bookemon/BookElementsCard/BookElementsCard.d.ts.map +1 -1
- package/dist/types/src/features/Bookemon/BookPreview/BookPreview.d.ts +1 -0
- package/dist/types/src/features/Bookemon/BookPreview/BookPreview.d.ts.map +1 -1
- package/dist/types/src/features/Bookemon/Bookemon.d.ts +2 -1
- package/dist/types/src/features/Bookemon/Bookemon.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.mjs.js"),a=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.mjs.js"),a=require("react/jsx-runtime"),t=require("react"),n=require("./BookCitation.module.css.js"),i=require("./text-cleaner.js");exports.default=function(s){var o=s.title,c=s.author,r=s.paragraphs,l=s.chevronUpComponent,d=s.chevronDownComponent,u=s.externalLinkComponent,f=s.textToHighlight,h=s.pageNumber,v=s.totalPageNumber,m=void 0===v?null:v,p=s.citationTitle;s.customStyle;var g=s.handleExternalLinkClick,x=s.bookCoverImage,_=s.partialMatch,j=void 0!==_&&_,N=s.citationNumber,b=void 0===N?1:N,C=s.defaultState,k=void 0!==C&&C,E=s.isNonHighlightedBlur,y=void 0!==E&&E,L=s.toggleBlur,T=void 0===L?y:L,q=s.fixedWidth,A=void 0===q||q,I=s.isBookemon,w=void 0!==I&&I,B=t.useState(k),M=B[0],W=B[1],H=["address","article","aside","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","li","main","nav","noscript","ol","p","pre","section","table","tfoot","ul","video"];t.useEffect((function(){if(M){var e=document.getElementById("quotes-citations-".concat(null!=b?b:""));e&&e.scrollIntoView({behavior:"smooth",block:"center"})}}),[M,f,b]);var S=function(e){void 0===e&&(e="");var a=document.createElement("div");a.innerHTML=e;var t=a.textContent||a.innerText||"";return(t=(t=t.replace(/<\/?[^>]+(>|$)/g,"")).replace(/\s+/g," ")).trim()};function O(e){var a=document.createElement("div");a.innerHTML=e;var t=n.default.highlighted,i=function(e,a){var s,o;if(void 0===a&&(a=!1),e.nodeType===Node.TEXT_NODE){if(!a&&(null===(s=e.textContent)||void 0===s?void 0:s.trim())){var c=document.createElement("span");c.classList.add(n.default.blurred),c.textContent=e.textContent,null===(o=e.parentNode)||void 0===o||o.replaceChild(c,e)}}else if(e.nodeType===Node.ELEMENT_NODE){var r=e,l=r.classList.contains(t);Array.from(r.childNodes).forEach((function(e){return i(e,a||l)}))}};return Array.from(a.childNodes).forEach((function(e){return i(e)})),a.innerHTML}function $(e,a,t,i,s,o){void 0===s&&(s=[]),void 0===o&&(o=!1);var c,r=n.default.highlighted,l=n.default.highlightedInline,d=n.default.highlightedBlock,u="".concat(r," ").concat(l),f="".concat(r," ").concat(d),h=a,v=(c=document.createElement("textarea"),function(e){return c.innerHTML=e,c.value});if(s.length>0){if(o){return s.forEach((function(e){e&&(h=function(e,a,t){for(var n='<span id="'.concat(t,'" class="').concat(u,'">'),i="</span>",s=e,o=0,c=new RegExp("(<(?:".concat(H.join("|"),")[^>]*>.*?)(?=<(?:").concat(H.join("|"),")|$)"),"gi"),r=(a.match(c)||[a]).map((function(e){var a=e.match(/^<([a-zA-Z0-9]+)([^>]*)>/);if(a&&H.includes(a[1].toLowerCase())){var t=a[0].length;return a[0]+n+e.slice(t)+i}return n+e+i})).join("");;){var l=s.indexOf(a,o);if(-1===l)break;s=s.slice(0,l)+r+s.slice(l+a.length),o=l+r.length}var f=d;return s.replace(/<span([^>]*)>([\s\S]*?)<\/span>/gi,(function(e,a,t){if(H.some((function(e){return new RegExp("<".concat(e,"\\b[^>]*>"),"i").test(t)}))){var n=a.match(/\sclass\s*=\s*(['"])(.*?)\1/);if(n){var i=n[2],s=i.split(/\s+/).includes(f)?i:"".concat(i," ").concat(f);a=a.replace(n[0],' class="'.concat(s,'"'))}else a+=' class="'.concat(f,'"')}return"<span".concat(a,">").concat(t,"</span>")}))}(h,e,"Annotation"===t?"quotes-annotations-".concat(null!=i?i:""):"quotes-citations-".concat(null!=i?i:"")))})),y&&T?O(h):h}return s.forEach((function(e){var n=v(e).trim();if(n&&v(a).trim().toLowerCase()===n.toLowerCase()){var s="Annotation"===t?"quotes-annotations-".concat(null!=i?i:""):"quotes-citations-".concat(null!=i?i:"");h='<span id="'.concat(s,'" class="').concat(f,'">').concat(a,"</span>")}})),y&&T?O(h):h}var m=f;if(!e||!a)return"Annotation"===t?a:'<span id="quotes-citations" class="'.concat(m,'">').concat(a,"</span>");var p=Array.from(e.matchAll(/`([^`]+)`/g));if(0===p.length)return"Annotation"===t?a:'<span id="quotes-citations" class="'.concat(m,'">').concat(a,"</span>");h=a;var g=!1;return p.forEach((function(e){var a=v(e[1]).trim();if(a){var n=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=new RegExp("(".concat(n,")"),"gi");h.match(i)&&(g=!0,h=h.replace(i,'<span id="'.concat("Annotation"===t?"quotes-annotations":"quotes-citations",'" class="').concat(m,'">$1</span>')))}})),g?h:"Annotation"===t?a:'<span id="quotes-citations" class="'.concat(m,'">').concat(a,"</span>")}return a.jsx(a.Fragment,{children:a.jsxs("span",e.__assign({className:"".concat(n.default.relativeWrapper," ").concat(w?n.default.height95percent+" "+n.default.displayFlex:n.default.height100percent)},{children:[!k&&a.jsx("div",e.__assign({className:n.default.citationButtonWrapper},{children:a.jsxs("div",e.__assign({onClick:function(){return W((function(e){return!e}))},className:n.default.citationButton},{children:[a.jsx("span",e.__assign({className:n.default.citationText},{children:p})),M?l:d]}))})),M&&a.jsx("div",e.__assign({className:n.default.expandedWrapper},{children:a.jsx("div",e.__assign({className:"".concat(n.default.expandableContainer," ").concat(A?n.default.expandableContainerWidth:"")},{children:a.jsx("div",e.__assign({className:n.default.expandableContent},{children:a.jsxs("div",e.__assign({className:n.default.bookBodyContent},{children:[!k&&a.jsx("div",e.__assign({className:n.default.header},{children:a.jsxs("div",e.__assign({className:n.default.bookInfo},{children:[x&&a.jsx("div",e.__assign({className:n.default.bookImageWrapper},{children:a.jsx("img",{src:x,alt:o||"Book cover",className:n.default.bookImage})})),a.jsxs("div",e.__assign({className:n.default.bookTextInfo},{children:[a.jsx("h1",e.__assign({className:n.default.bookTitle},{children:o})),c||Array.isArray(c)&&a.jsxs("p",e.__assign({className:n.default.bookAuthor},{children:["by"," ",Array.isArray(c)?c.join(", "):c||""]}))]})),a.jsx("div",e.__assign({onClick:g,className:n.default.externalLink},{children:u}))]}))})),a.jsx("div",e.__assign({className:n.default.relativeContainer},{children:a.jsx("div",e.__assign({className:n.default.container},{children:a.jsxs("div",e.__assign({className:"".concat(n.default.contentWrapper," ").concat(n.default.customScrollbarClass," ").concat(w?"":n.default.maxheight38rem)},{children:[a.jsx("div",{className:n.default.gradientOverlayLeft}),a.jsx("div",{className:n.default.gradientOverlayRight}),a.jsxs("div",e.__assign({className:n.default.contentWrapper},{children:[r.map((function(e,t){i.cleanScannedText(e);var s=(j?e.includes(f[0]):f.some((function(a){return S(e).toLowerCase()===S(a).toLowerCase()})))?$(r.join("\n"),e,"Citation",b,f,j):e;return a.jsx("div",{className:"".concat(n.default.paragraph," ").concat(0!==t?n.default.textIndent:""),dangerouslySetInnerHTML:{__html:s}},t)})),h&&a.jsx("div",e.__assign({className:n.default.pageIndex},{children:a.jsxs("div",e.__assign({className:n.default.pageLabel},{children:[h," ",m&&"of ".concat(m)]}))}))]}))]}))}))}))]}))}))}))}))]}))})};
|
|
2
2
|
//# sourceMappingURL=BookCitation.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});require("../../node_modules/style-inject/dist/style-inject.es.js").default(".BookCitation-module_relativeWrapper__jFpTh{position:relative}.BookCitation-module_relativeContainer__HLngm{min-height:0;position:relative}.BookCitation-module_citationButtonWrapper__einPL{color:#be87ff;cursor:pointer;display:inline-block;margin-right:.25rem}.BookCitation-module_citationButton__8U9MO{align-items:center;background-color:initial;border:none;border-radius:9999px;color:#d63384;cursor:pointer;display:inline-flex;font-family:Plus Jakarta Sans,sans-serif;font-size:16px;font-weight:700;margin:0;padding:0;text-decoration:none;white-space:normal;word-break:break-word}.BookCitation-module_citationText__aH2j-{align-items:center;display:flex;justify-content:center;text-align:center}.BookCitation-module_pageText__nEM69{margin-left:6px}.BookCitation-module_expandedWrapper__roHmf{align-items:center;display:flex;justify-content:start;min-height:0}.BookCitation-module_expandableContainer__yNmEx{left:0;margin-top:.5rem;min-height:0;top:100%;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});require("../../node_modules/style-inject/dist/style-inject.es.js").default(".BookCitation-module_relativeWrapper__jFpTh{position:relative;width:100%}.BookCitation-module_displayFlex__iMb2e{align-items:center;display:flex;justify-content:center}.BookCitation-module_height95percent__kWGUx{height:90%}.BookCitation-module_height100percent__zQeLG{height:100%}.BookCitation-module_relativeContainer__HLngm{height:100%;min-height:0;position:relative}.BookCitation-module_citationButtonWrapper__einPL{color:#be87ff;cursor:pointer;display:inline-block;height:100%;margin-right:.25rem}.BookCitation-module_citationButton__8U9MO{align-items:center;background-color:initial;border:none;border-radius:9999px;color:#d63384;cursor:pointer;display:inline-flex;font-family:Plus Jakarta Sans,sans-serif;font-size:16px;font-weight:700;margin:0;padding:0;text-decoration:none;white-space:normal;width:fit-content;word-break:break-word}.BookCitation-module_citationText__aH2j-{align-items:center;display:flex;justify-content:center;text-align:center}.BookCitation-module_pageText__nEM69{margin-left:6px}.BookCitation-module_expandedWrapper__roHmf{align-items:center;display:flex;height:100%;justify-content:start;min-height:0}.BookCitation-module_expandableContainer__yNmEx{height:100%;left:0;margin-top:.5rem;min-height:0;top:100%;z-index:49}.BookCitation-module_expandableContainerWidth__O7mEU{width:32rem}.BookCitation-module_expandableContent__AvgFX{background-color:#fff;border:1px solid #60a3f8;border-radius:8px;box-shadow:0 1.694px 6.775px 0 #0000000d,0 37.262px 40.65px -10.162px #00000026,0 0 20.325px 3.387px #0000000d;color:#fff;height:fit-content;height:100%;margin-bottom:1.5rem;min-height:0;padding:.75rem}.BookCitation-module_bookBodyContent__a20pD{height:100%;margin:0 auto;min-height:0}.BookCitation-module_header__kMSfc{display:flex;justify-content:space-between;margin-bottom:1rem}.BookCitation-module_bookInfo__AzKFV{align-items:center;display:flex;gap:1rem;justify-content:center;width:100%}.BookCitation-module_bookImageWrapper__JNna7{flex-shrink:0}.BookCitation-module_bookImage__CXga1{height:70px;object-fit:cover;width:70px}.BookCitation-module_bookTextInfo__zVuts{display:flex;flex-direction:column;gap:.1rem}.BookCitation-module_bookTitle__lHfz0{color:#60a3f8;font-family:Inter,sans-serif;font-size:1rem;font-weight:700;line-height:1;margin:0}.BookCitation-module_bookAuthor__Chqif{color:#60a3f8;font-family:Inter,sans-serif;font-size:.8rem;font-weight:500;line-height:1;margin:0}.BookCitation-module_externalLink__cQ3aM{margin-left:auto}.BookCitation-module_audioHover__XquBK{border-radius:.5rem;transition:background-color .2s}.BookCitation-module_audioHover__XquBK:hover{background-color:#fff3}.BookCitation-module_audioIcon__hoXWS{width:5rem}.BookCitation-module_container__msLn5{background-color:#fff;border-radius:.75rem;box-shadow:0 4px 6px #0000001a;display:flex;flex-direction:column;height:100%;margin-left:auto;margin-right:auto;max-width:100%;position:relative;width:100%}.BookCitation-module_gradientOverlayLeft__vKN9H{background:linear-gradient(270deg,#000 0,#000000b3 40%,#0006 70%,#0000);bottom:0;box-shadow:-4px 0 8px #0000001a;opacity:.5;pointer-events:none;position:absolute;right:20px;top:0;width:16px;z-index:0}.BookCitation-module_gradientOverlayRight__lElq0{background:linear-gradient(90deg,#000 0,#0009 40%,#0003 70%,#0000);bottom:0;box-shadow:4px 0 8px #0000001a;opacity:.5;pointer-events:none;position:absolute;right:5px;top:0;width:16px;z-index:0}.BookCitation-module_contentWrapper__2y1ae{display:flex;flex-direction:column;height:100%;overflow-y:auto;padding-right:.94rem;position:relative;word-break:break-word;z-index:0}.BookCitation-module_paragraph__9gQDG{height:100%;margin-bottom:1rem;text-align:justify}.BookCitation-module_textIndent__ejJaC{text-indent:1rem}.BookCitation-module_pageIndex__wUixS{margin-top:auto;padding:.5rem 0;text-align:right}.BookCitation-module_pageLabel__NZ6CE{border-radius:9999px;color:#4b5563;display:inline-block;font-size:1rem;font-weight:500;padding:.25rem .75rem}.BookCitation-module_highlighted__n9p6V{background-color:#eaea79;font-weight:700}.BookCitation-module_highlightedInline__Vaoms{display:inline}.BookCitation-module_highlightedBlock__c-R3J{display:block}.BookCitation-module_blurred__E0v59{filter:blur(2px);pointer-events:none;user-select:none}.BookCitation-module_customScrollbarClass__mwGyt{background-color:#f5f4f4;border:1px solid #cbd5e1;border-radius:.5rem;color:#181b1f;font-family:Times New Roman,Times,serif;font-size:14.4px;font-weight:400;letter-spacing:0;line-height:100%;overflow:auto;padding:40px 50px 0 20px}.BookCitation-module_maxheight38rem__8icW1{max-height:38rem}.BookCitation-module_customScrollbarClass__mwGyt::-webkit-scrollbar{height:0;width:0}.BookCitation-module_customScrollbarClass__mwGyt::-webkit-scrollbar-track{background:#0000}.BookCitation-module_customScrollbarClass__mwGyt::-webkit-scrollbar-thumb{background-color:#a3a4ae;border-radius:10px}.BookCitation-module_customScrollbarClass__mwGyt::-webkit-scrollbar-button{display:none}"),exports.default={relativeWrapper:"BookCitation-module_relativeWrapper__jFpTh",displayFlex:"BookCitation-module_displayFlex__iMb2e",height95percent:"BookCitation-module_height95percent__kWGUx",height100percent:"BookCitation-module_height100percent__zQeLG",relativeContainer:"BookCitation-module_relativeContainer__HLngm",citationButtonWrapper:"BookCitation-module_citationButtonWrapper__einPL",citationButton:"BookCitation-module_citationButton__8U9MO",citationText:"BookCitation-module_citationText__aH2j-",pageText:"BookCitation-module_pageText__nEM69",expandedWrapper:"BookCitation-module_expandedWrapper__roHmf",expandableContainer:"BookCitation-module_expandableContainer__yNmEx",expandableContainerWidth:"BookCitation-module_expandableContainerWidth__O7mEU",expandableContent:"BookCitation-module_expandableContent__AvgFX",bookBodyContent:"BookCitation-module_bookBodyContent__a20pD",header:"BookCitation-module_header__kMSfc",bookInfo:"BookCitation-module_bookInfo__AzKFV",bookImageWrapper:"BookCitation-module_bookImageWrapper__JNna7",bookImage:"BookCitation-module_bookImage__CXga1",bookTextInfo:"BookCitation-module_bookTextInfo__zVuts",bookTitle:"BookCitation-module_bookTitle__lHfz0",bookAuthor:"BookCitation-module_bookAuthor__Chqif",externalLink:"BookCitation-module_externalLink__cQ3aM",audioHover:"BookCitation-module_audioHover__XquBK",audioIcon:"BookCitation-module_audioIcon__hoXWS",container:"BookCitation-module_container__msLn5",gradientOverlayLeft:"BookCitation-module_gradientOverlayLeft__vKN9H",gradientOverlayRight:"BookCitation-module_gradientOverlayRight__lElq0",contentWrapper:"BookCitation-module_contentWrapper__2y1ae",paragraph:"BookCitation-module_paragraph__9gQDG",textIndent:"BookCitation-module_textIndent__ejJaC",pageIndex:"BookCitation-module_pageIndex__wUixS",pageLabel:"BookCitation-module_pageLabel__NZ6CE",highlighted:"BookCitation-module_highlighted__n9p6V",highlightedInline:"BookCitation-module_highlightedInline__Vaoms",highlightedBlock:"BookCitation-module_highlightedBlock__c-R3J",blurred:"BookCitation-module_blurred__E0v59",customScrollbarClass:"BookCitation-module_customScrollbarClass__mwGyt",maxheight38rem:"BookCitation-module_maxheight38rem__8icW1"};
|
|
2
2
|
//# sourceMappingURL=BookCitation.module.css.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.mjs.js"),t=require("react/jsx-runtime"),n=require("../../../node_modules/@material-ui/lab/esm/Pagination/Pagination.js");require("../../../node_modules/@material-ui/utils/esm/elementAcceptingRef.js"),require("../../../node_modules/@material-ui/utils/esm/elementTypeAcceptingRef.js"),require("../../../_virtual/index.js"),require("../../../node_modules/@material-ui/utils/esm/ponyfillGlobal.js"),require("../../../node_modules/@material-ui/utils/esm/refType.js");var s=require("react");require("../../../node_modules/@material-ui/core/esm/SvgIcon/SvgIcon.js"),require("react-dom");var a=require("../../../node_modules/@material-ui/lab/esm/Skeleton/Skeleton.js"),i={sectionTitle:{fontSize:"14px",fontWeight:600,color:"#667085",marginBottom:"12px"},quotesPadding:{paddingLeft:"12px"},quoteCard:{border:"1px solid #CBD5E1",borderRadius:"8px",padding:"16px",backgroundColor:"#F8FAFC",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",marginBottom:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},quoteText:{fontStyle:"italic",color:"#475569",fontSize:"14px",fontWeight:400,marginBottom:"12px"},quoteMeta:{color:"#475569",fontSize:"12px",fontWeight:400},quoteAuthor:{fontSize:"10px",fontWeight:600,color:"#475569",marginTop:"8px",marginBottom:"18px"},button:{color:"#5928ED",fontSize:"14px",fontWeight:600,background:"none",border:"none",cursor:"pointer",padding:0,textDecoration:"none",paddingLeft:"12px"},geoLocationsContainer:{marginTop:"24px",marginBottom:"24px"},geoText:{fontSize:"14px",fontWeight:500,cursor:"pointer",color:"#532BED"},geoDivider:{margin:"0 8px",color:"#475abb",backgroundColor:"#475abb",width:"1px",height:"18px",display:"inline-block"},geoLocationFlex:{display:"inline-flex",alignItems:"center",gap:"8px",marginBottom:"8px"},charactersContainer:{marginTop:"16px"},charactersGrid:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"16px",marginBottom:"16px",paddingLeft:"12px"},characterCard:{border:"1px solid #E5E7EB",borderRadius:"8px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",display:"flex",alignItems:"flex-start",gap:"12px",padding:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},avatar:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"9999px",fontSize:"14px",fontWeight:600,flexShrink:0},charName:{fontStyle:"normal",fontWeight:600,color:"#101827",fontSize:"16px"},charDesc:{fontStyle:"normal",fontWeight:400,fontSize:"14px",color:"#6B7280"},retryButton:{backgroundColor:"#5928EC",color:"#fff",padding:"6px 10px",border:"none",borderRadius:"6px",cursor:"pointer",fontSize:"12px",fontWeight:"500"}};exports.default=function(r){r.data;var o=r.updateQuotesToHighLight,l=r.handleFetchManuscriptElements,d=r.BookIsbn,u=s.useState([]),c=u[0],g=u[1],x=s.useState(1),p=x[0],h=x[1],f=s.useState(!1),_=f[0],y=f[1],v=s.useState(!0),m=v[0],b=v[1],j=s.useState(0),S=j[0],C=j[1],T=s.useState([]),k=T[0],w=T[1],q=s.useState(1),B=q[0],D=q[1],L=s.useState(!1),F=L[0],E=L[1],M=s.useState(!0),P=M[0],W=M[1],I=s.useState(0),z=I[0],R=I[1],H=s.useState([]),N=H[0],G=H[1],A=s.useState(1),K=A[0],Y=A[1],O=s.useState(!1),Q=O[0],J=O[1],U=s.useState(!0),V=U[0],X=U[1],Z=s.useState(0),$=Z[0],ee=Z[1],te=s.useState({list:"",index:-1,page:1}),ne=te[0],se=te[1],ae=function(t){var n=t.endpoint,s=t.page,a=t.isbn,i=t.setData,r=t.setLoading,o=t.setHasMore,d=t.setTotalPage;return e.__awaiter(void 0,void 0,void 0,(function(){var t,u,c,g;return e.__generator(this,(function(e){switch(e.label){case 0:return r(!0),[4,l({endpoint:n,page:s,pageSize:10,isbn:a})];case 1:return t=e.sent(),o(!(null===(u=null==t?void 0:t.pagination)||void 0===u?void 0:u.hasNext)&&!(null===(c=null==t?void 0:t.pagination)||void 0===c?void 0:c.hasPrevious)),d((null===(g=null==t?void 0:t.pagination)||void 0===g?void 0:g.totalPages)||0),i((null==t?void 0:t.data)||[]),r(!1),[2]}}))}))};return s.useEffect((function(){ae({endpoint:"notable-quotes",page:p,isbn:d,setData:g,setLoading:y,setHasMore:b,setTotalPage:C})}),[p]),s.useEffect((function(){ae({endpoint:"notable-characters",page:B,isbn:d,setData:w,setLoading:E,setHasMore:W,setTotalPage:R})}),[B]),s.useEffect((function(){ae({endpoint:"geo-locations",page:K,isbn:d,setData:G,setLoading:J,setHasMore:X,setTotalPage:ee})}),[K]),t.jsxs("div",{children:[t.jsxs("div",e.__assign({style:{marginBottom:"24px"}},{children:[t.jsx("p",e.__assign({style:i.sectionTitle},{children:"Notable Quotes"})),t.jsxs("div",e.__assign({style:i.quotesPadding},{children:[_?t.jsx("div",e.__assign({style:{display:"flex",flexDirection:"column",rowGap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(n){return t.jsxs("div",e.__assign({style:i.quoteCard},{children:[t.jsx(a.default,{variant:"text",width:"60%",height:28}),t.jsx(a.default,{variant:"text",width:"40%",height:20}),t.jsx(a.default,{variant:"text",width:"25%",height:20}),t.jsx(a.default,{variant:"text",width:"30%",height:20})]}),n)}))})):0===c.length?t.jsxs("p",e.__assign({style:{color:"#6B7280",fontStyle:"italic"}},{children:["No notable quotes found. ",t.jsx("button",e.__assign({style:i.retryButton,onClick:function(){return ae({endpoint:"notable-quotes",page:p,isbn:d,setData:g,setLoading:y,setHasMore:b,setTotalPage:C})}},{children:"Retry"}))]})):t.jsx(t.Fragment,{children:c.map((function(n,s){var a="notable"===ne.list&&ne.page===p&&ne.index===s;return t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},i.quoteCard),{borderColor:a?"rgb(83, 43, 237)":"#CBD5E1"}),onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,a;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),se({list:"notable",page:p,index:s}),(null===(a=null==n?void 0:n.chunkIds)||void 0===a?void 0:a.length)>0?[4,o(n.text,"Notable Quotes",n.chunkIds,0)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[3,4];case 3:return t=e.sent(),console.error("Failed to highlight quote:",t),[3,4];case 4:return[2]}}))}))}},{children:[t.jsx("p",e.__assign({style:i.quoteText},{children:null==n?void 0:n.text})),t.jsxs("p",e.__assign({style:i.quoteMeta},{children:[n.chapter," ",t.jsx("br",{})," ",n.page]})),t.jsxs("p",e.__assign({style:i.quoteAuthor},{children:["— ",null==n?void 0:n.author]}))]}),s)}))}),t.jsx("div",e.__assign({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!m&&t.jsx(n.default,{disabled:_,count:S,page:p,onChange:function(e,t){return h(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),t.jsxs("div",e.__assign({style:i.geoLocationsContainer},{children:[t.jsx("p",e.__assign({style:i.sectionTitle},{children:"Key Geo Locations"})),t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},i.quotesPadding),{marginBottom:"8px"})},{children:[Q?t.jsx("div",e.__assign({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(e){return t.jsx(a.default,{variant:"rect",width:100,height:20,style:{borderRadius:"8px"}},e)}))})):0===N.length?t.jsxs("p",e.__assign({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key geo locations found. ",t.jsx("button",e.__assign({style:i.retryButton,onClick:function(){return ae({endpoint:"geo-locations",page:K,isbn:d,setData:G,setLoading:J,setHasMore:X,setTotalPage:ee})}},{children:"Retry"}))]})):t.jsx(t.Fragment,{children:N.map((function(n,s){var a="geo_location"===ne.list&&ne.page===K&&ne.index===s;return t.jsxs("span",e.__assign({style:i.geoLocationFlex},{children:[t.jsx("span",e.__assign({style:e.__assign(e.__assign({},i.geoText),{fontWeight:a?"700":"",textDecoration:a?"underline":""}),onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,a;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),se({list:"geo_location",page:K,index:s}),(null===(a=null==n?void 0:n.chunkIds)||void 0===a?void 0:a.length)>0?[4,o(n.name,"Key Geo Locations",n.chunkIds,0)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[3,4];case 3:return t=e.sent(),console.error("Failed to highlight location:",t),[3,4];case 4:return[2]}}))}))},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:null==n?void 0:n.name})),s<N.length-1&&t.jsx("span",{style:i.geoDivider})]}),s)}))}),t.jsx("div",e.__assign({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!V&&t.jsx(n.default,{disabled:Q,count:$,page:K,onChange:function(e,t){return Y(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),t.jsxs("div",e.__assign({style:i.charactersContainer},{children:[t.jsx("p",e.__assign({style:i.sectionTitle},{children:"Key Characters"})),F?t.jsx("div",e.__assign({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(n){return t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},i.characterCard),{flexBasis:"40%"})},{children:[t.jsx(a.default,{variant:"circle",style:e.__assign(e.__assign({},i.avatar),{flexShrink:0})}),t.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",flex:1}},{children:[t.jsx(a.default,{variant:"text",style:{flex:"1",flexShrink:0}}),t.jsx(a.default,{variant:"text",style:{flex:"1"}}),t.jsx(a.default,{variant:"text",style:{flex:"1"}}),t.jsx(a.default,{variant:"text",style:{flex:"1"}})]}))]}),n)}))})):0===k.length?t.jsxs("p",e.__assign({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key characters found. ",t.jsx("button",e.__assign({style:i.retryButton,onClick:function(){return ae({endpoint:"notable-characters",page:B,isbn:d,setData:w,setLoading:E,setHasMore:W,setTotalPage:R})}},{children:"Retry"}))]})):t.jsx(t.Fragment,{children:t.jsx("div",e.__assign({style:i.charactersGrid},{children:k.map((function(n,s){var a=e.__assign(e.__assign({},i.avatar),{backgroundColor:n.bg,color:n.color}),r="key_character"===ne.list&&ne.page===B&&ne.index===s;return t.jsxs("div",e.__assign({onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},style:e.__assign(e.__assign({},i.characterCard),{borderColor:r?"rgb(83, 43, 237)":"#E5E7EB"}),onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,a;return e.__generator(this,(function(e){switch(e.label){case 0:se({list:"key_character",page:B,index:s}),e.label=1;case 1:return e.trys.push([1,4,,5]),(null===(a=null==n?void 0:n.chunkIds)||void 0===a?void 0:a.length)>0?[4,o(n.name,"Key Characters",n.chunkIds,0)]:[3,3];case 2:e.sent(),e.label=3;case 3:return[3,5];case 4:return t=e.sent(),console.error("Failed to highlight character:",t),[3,5];case 5:return[2]}}))}))}},{children:[t.jsx("div",e.__assign({style:a},{children:n.initials})),t.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column"}},{children:[t.jsx("p",e.__assign({style:e.__assign(e.__assign({},i.charName),{margin:0})},{children:n.name})),t.jsx("p",e.__assign({style:e.__assign(e.__assign({},i.charDesc),{margin:0,marginTop:"4px"})},{children:n.description}))]}))]}),s)}))}))}),t.jsx("div",e.__assign({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!P&&t.jsx(n.default,{count:z,disabled:F,page:B,onChange:function(e,t){return D(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.mjs.js"),t=require("react/jsx-runtime"),n=require("../../../node_modules/@material-ui/lab/esm/Pagination/Pagination.js");require("../../../node_modules/@material-ui/utils/esm/elementAcceptingRef.js"),require("../../../node_modules/@material-ui/utils/esm/elementTypeAcceptingRef.js"),require("../../../_virtual/index.js"),require("../../../node_modules/@material-ui/utils/esm/ponyfillGlobal.js"),require("../../../node_modules/@material-ui/utils/esm/refType.js");var s=require("react");require("../../../node_modules/@material-ui/core/esm/SvgIcon/SvgIcon.js"),require("react-dom");var a=require("../../../node_modules/@material-ui/lab/esm/Skeleton/Skeleton.js"),i=require("../../../node_modules/react-markdown/lib/react-markdown.js"),r={sectionTitle:{fontSize:"14px",fontWeight:600,color:"#667085",marginBottom:"12px"},quotesPadding:{paddingLeft:"12px"},quoteCard:{border:"1px solid #CBD5E1",borderRadius:"8px",padding:"16px",backgroundColor:"#F8FAFC",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",marginBottom:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},quoteText:{fontStyle:"italic",color:"#475569",fontSize:"14px",fontWeight:400,marginBottom:"12px"},quoteMeta:{color:"#475569",fontSize:"12px",fontWeight:400},quoteAuthor:{fontSize:"10px",fontWeight:600,color:"#475569",marginTop:"8px",marginBottom:"18px"},button:{color:"#5928ED",fontSize:"14px",fontWeight:600,background:"none",border:"none",cursor:"pointer",padding:0,textDecoration:"none",paddingLeft:"12px"},geoLocationsContainer:{marginTop:"24px",marginBottom:"24px"},geoText:{fontSize:"14px",fontWeight:500,cursor:"pointer",color:"#532BED"},geoDivider:{margin:"0 8px",color:"#475abb",backgroundColor:"#475abb",width:"1px",height:"18px",display:"inline-block"},geoLocationFlex:{display:"inline-flex",alignItems:"center",gap:"8px",marginBottom:"8px"},charactersContainer:{marginTop:"16px"},charactersGrid:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"16px",marginBottom:"16px",paddingLeft:"12px"},characterCard:{border:"1px solid #E5E7EB",borderRadius:"8px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",display:"flex",alignItems:"flex-start",gap:"12px",padding:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},avatar:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"9999px",fontSize:"14px",fontWeight:600,flexShrink:0},charName:{fontStyle:"normal",fontWeight:600,color:"#101827",fontSize:"16px"},charDesc:{fontStyle:"normal",fontWeight:400,fontSize:"14px",color:"#6B7280"},retryButton:{backgroundColor:"#5928EC",color:"#fff",padding:"6px 10px",border:"none",borderRadius:"6px",cursor:"pointer",fontSize:"12px",fontWeight:"500"}};exports.default=function(o){o.data;var l=o.updateQuotesToHighLight,d=o.handleFetchManuscriptElements,u=o.BookIsbn,c=s.useState([]),g=c[0],x=c[1],p=s.useState(1),h=p[0],_=p[1],f=s.useState(!1),y=f[0],m=f[1],v=s.useState(!0),b=v[0],j=v[1],S=s.useState(0),C=S[0],T=S[1],k=s.useState([]),w=k[0],q=k[1],B=s.useState(1),D=B[0],L=B[1],F=s.useState(!1),M=F[0],E=F[1],P=s.useState(!0),W=P[0],I=P[1],z=s.useState(0),R=z[0],H=z[1],N=s.useState([]),G=N[0],A=N[1],K=s.useState(1),Y=K[0],O=K[1],Q=s.useState(!1),J=Q[0],U=Q[1],V=s.useState(!0),X=V[0],Z=V[1],$=s.useState(0),ee=$[0],te=$[1],ne=s.useState({list:"",index:-1,page:1}),se=ne[0],ae=ne[1],ie=function(t){var n=t.endpoint,s=t.page,a=t.isbn,i=t.setData,r=t.setLoading,o=t.setHasMore,l=t.setTotalPage;return e.__awaiter(void 0,void 0,void 0,(function(){var t,u,c,g;return e.__generator(this,(function(e){switch(e.label){case 0:return r(!0),[4,d({endpoint:n,page:s,pageSize:10,isbn:a})];case 1:return t=e.sent(),o(!(null===(u=null==t?void 0:t.pagination)||void 0===u?void 0:u.hasNext)&&!(null===(c=null==t?void 0:t.pagination)||void 0===c?void 0:c.hasPrevious)),l((null===(g=null==t?void 0:t.pagination)||void 0===g?void 0:g.totalPages)||0),i((null==t?void 0:t.data)||[]),r(!1),[2]}}))}))};return s.useEffect((function(){ie({endpoint:"notable-quotes",page:h,isbn:u,setData:x,setLoading:m,setHasMore:j,setTotalPage:T})}),[h]),s.useEffect((function(){ie({endpoint:"notable-characters",page:D,isbn:u,setData:q,setLoading:E,setHasMore:I,setTotalPage:H})}),[D]),s.useEffect((function(){ie({endpoint:"geo-locations",page:Y,isbn:u,setData:A,setLoading:U,setHasMore:Z,setTotalPage:te})}),[Y]),t.jsxs("div",{children:[t.jsxs("div",e.__assign({style:{marginBottom:"24px"}},{children:[t.jsx("p",e.__assign({style:r.sectionTitle},{children:"Notable Quotes"})),t.jsxs("div",e.__assign({style:r.quotesPadding},{children:[y?t.jsx("div",e.__assign({style:{display:"flex",flexDirection:"column",rowGap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(n){return t.jsxs("div",e.__assign({style:r.quoteCard},{children:[t.jsx(a.default,{variant:"text",width:"60%",height:28}),t.jsx(a.default,{variant:"text",width:"40%",height:20}),t.jsx(a.default,{variant:"text",width:"25%",height:20}),t.jsx(a.default,{variant:"text",width:"30%",height:20})]}),n)}))})):0===g.length?t.jsxs("p",e.__assign({style:{color:"#6B7280",fontStyle:"italic"}},{children:["No notable quotes found. ",t.jsx("button",e.__assign({style:r.retryButton,onClick:function(){return ie({endpoint:"notable-quotes",page:h,isbn:u,setData:x,setLoading:m,setHasMore:j,setTotalPage:T})}},{children:"Retry"}))]})):t.jsx(t.Fragment,{children:g.map((function(n,s){var a="notable"===se.list&&se.page===h&&se.index===s;return t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},r.quoteCard),{borderColor:a?"rgb(83, 43, 237)":"#CBD5E1"}),onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,a;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),ae({list:"notable",page:h,index:s}),(null===(a=null==n?void 0:n.chunkIds)||void 0===a?void 0:a.length)>0?[4,l(n.text,"Notable Quotes",n.chunkIds,0)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[3,4];case 3:return t=e.sent(),console.error("Failed to highlight quote:",t),[3,4];case 4:return[2]}}))}))}},{children:[t.jsx("p",e.__assign({style:r.quoteText},{children:null==n?void 0:n.text})),t.jsxs("p",e.__assign({style:r.quoteMeta},{children:[n.chapter," ",t.jsx("br",{})," ",n.page]})),t.jsxs("p",e.__assign({style:r.quoteAuthor},{children:["— ",null==n?void 0:n.author]}))]}),s)}))}),t.jsx("div",e.__assign({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!b&&t.jsx(n.default,{disabled:y,count:C,page:h,onChange:function(e,t){return _(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),t.jsxs("div",e.__assign({style:r.geoLocationsContainer},{children:[t.jsx("p",e.__assign({style:r.sectionTitle},{children:"Key Geo Locations"})),t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},r.quotesPadding),{marginBottom:"8px"})},{children:[J?t.jsx("div",e.__assign({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(e){return t.jsx(a.default,{variant:"rect",width:100,height:20,style:{borderRadius:"8px"}},e)}))})):0===G.length?t.jsxs("p",e.__assign({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key geo locations found. ",t.jsx("button",e.__assign({style:r.retryButton,onClick:function(){return ie({endpoint:"geo-locations",page:Y,isbn:u,setData:A,setLoading:U,setHasMore:Z,setTotalPage:te})}},{children:"Retry"}))]})):t.jsx(t.Fragment,{children:G.map((function(n,s){var a="geo_location"===se.list&&se.page===Y&&se.index===s;return t.jsxs("span",e.__assign({style:r.geoLocationFlex},{children:[t.jsx("span",e.__assign({style:e.__assign(e.__assign({},r.geoText),{fontWeight:a?"700":"",textDecoration:a?"underline":""}),onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,a;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),ae({list:"geo_location",page:Y,index:s}),(null===(a=null==n?void 0:n.chunkIds)||void 0===a?void 0:a.length)>0?[4,l(n.name,"Key Geo Locations",n.chunkIds,0)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[3,4];case 3:return t=e.sent(),console.error("Failed to highlight location:",t),[3,4];case 4:return[2]}}))}))},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:null==n?void 0:n.name})),s<G.length-1&&t.jsx("span",{style:r.geoDivider})]}),s)}))}),t.jsx("div",e.__assign({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!X&&t.jsx(n.default,{disabled:J,count:ee,page:Y,onChange:function(e,t){return O(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),t.jsxs("div",e.__assign({style:r.charactersContainer},{children:[t.jsx("p",e.__assign({style:r.sectionTitle},{children:"Key Characters"})),M?t.jsx("div",e.__assign({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(n){return t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},r.characterCard),{flexBasis:"40%"})},{children:[t.jsx(a.default,{variant:"circle",style:e.__assign(e.__assign({},r.avatar),{flexShrink:0})}),t.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",flex:1}},{children:[t.jsx(a.default,{variant:"text",style:{flex:"1",flexShrink:0}}),t.jsx(a.default,{variant:"text",style:{flex:"1"}}),t.jsx(a.default,{variant:"text",style:{flex:"1"}}),t.jsx(a.default,{variant:"text",style:{flex:"1"}})]}))]}),n)}))})):0===w.length?t.jsxs("p",e.__assign({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key characters found. ",t.jsx("button",e.__assign({style:r.retryButton,onClick:function(){return ie({endpoint:"notable-characters",page:D,isbn:u,setData:q,setLoading:E,setHasMore:I,setTotalPage:H})}},{children:"Retry"}))]})):t.jsx(t.Fragment,{children:t.jsx("div",e.__assign({style:r.charactersGrid},{children:w.map((function(n,s){var a=e.__assign(e.__assign({},r.avatar),{backgroundColor:n.bg,color:n.color}),o="key_character"===se.list&&se.page===D&&se.index===s;return t.jsxs("div",e.__assign({onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},style:e.__assign(e.__assign({},r.characterCard),{borderColor:o?"rgb(83, 43, 237)":"#E5E7EB"}),onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,a;return e.__generator(this,(function(e){switch(e.label){case 0:ae({list:"key_character",page:D,index:s}),e.label=1;case 1:return e.trys.push([1,4,,5]),(null===(a=null==n?void 0:n.chunkIds)||void 0===a?void 0:a.length)>0?[4,l(n.name,"Key Characters",n.chunkIds,0)]:[3,3];case 2:e.sent(),e.label=3;case 3:return[3,5];case 4:return t=e.sent(),console.error("Failed to highlight character:",t),[3,5];case 5:return[2]}}))}))}},{children:[t.jsx("div",e.__assign({style:a},{children:n.initials})),t.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column"}},{children:[t.jsx("p",e.__assign({style:e.__assign(e.__assign({},r.charName),{margin:0})},{children:n.name})),t.jsxs("p",e.__assign({style:e.__assign(e.__assign({},r.charDesc),{margin:0,marginTop:"4px"})},{children:["=",t.jsx(i.ReactMarkdown,e.__assign({components:{p:function(n){n.node;var s=e.__rest(n,["node"]);return t.jsx("p",e.__assign({style:{marginTop:"0"}},s))}}},{children:null==n?void 0:n.description}))]}))]}))]}),s)}))}))}),t.jsx("div",e.__assign({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!W&&t.jsx(n.default,{count:R,disabled:M,page:D,onChange:function(e,t){return L(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})};
|
|
2
2
|
//# sourceMappingURL=BookElementsCard.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.mjs.js"),t=require("react/jsx-runtime"),i=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.mjs.js"),t=require("react/jsx-runtime"),i=require("react"),o=require("../../../_virtual/Close.js"),n=require("../../../_virtual/ArrowBack.js"),r=require("../../BookCitation/BookCitation.js"),l=require("../Bookemon.js"),s=require("../../../node_modules/@material-ui/core/esm/Switch/Switch.js"),a=require("../../../node_modules/@material-ui/core/esm/Tooltip/Tooltip.js");exports.default=function(d){var c=d.bookOverView,g=d.bookCoverImage,u=d.onClose,h=d.customStyle,p=d.quotesToHighLightData,x=d.updateQuotesToHighLight,f=d.citationLoad,y=d.clickableElementCategory,v=void 0===y?"":y,_=d.comingSoonData,m=d.isNonHighlightedBlur,b=void 0!==m&&m,k=d.isBlurToggleVisible,C=void 0!==k&&k,j=d.noHtmlContent,w=void 0!==j&&j,S=d.isBookemon,B=void 0===S||S,I=i.useState(!1),T=I[0],W=I[1],L=i.useState(!0),P=L[0],q=L[1],H=!!p.textToHighLight&&!!p.content,F={header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px"},headerLeft:{display:"flex",alignItems:"center",gap:"8px"},closeButton:{padding:"4px",borderRadius:"4px",cursor:"pointer",backgroundColor:"transparent"},flexCenter:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},coverContainer:{width:"100%",maxWidth:"300px",borderRadius:"12px",padding:"4px",background:"linear-gradient(135deg, #34D399, #3B82F6, #10B981)",position:"relative",overflow:"hidden",boxShadow:"0 10px 25px rgba(0,0,0,0.3)",marginBottom:"24px"},bookCoverStyle:{width:"100%",height:"auto",objectFit:"contain",borderRadius:"12px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},loadingStyle:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},rightPanel:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},clickableElementCategory:{fontSize:"20px",fontWeight:600},previewWrapper:{flex:1,width:"80%",margin:"0 auto",display:"flex",flexDirection:"column",overflow:"hidden",justifyContent:"flex-start",alignItems:"center"},coverImagePreview:{display:"flex",justifyContent:"center",alignItems:"center",aspectRatio:"7 / 10",background:"",padding:0},toggleBlurContainer:{display:"flex",alignItems:"center",gap:"20px"},bookCoverPlaceholder:{width:"100%",height:"calc(100% - 8px)",background:"linear-gradient(to bottom, #22c55e, #14532d)",borderRadius:"4px",padding:"4px",color:"white",fontSize:"10px",display:"flex",justifyContent:"center",alignItems:"center"},bookCoverInner:{border:"1px solid white",padding:"4px",width:"calc(100% - 26px)",height:"calc(100% - 26px)",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",justifyContent:"space-around"},bookTitle:{fontWeight:800,fontSize:"1.5rem",textTransform:"uppercase",letterSpacing:"0.5px",lineHeight:1.2,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",padding:"0 8px"},bookAuthor:{fontSize:"1rem",fontWeight:500,opacity:.9,marginTop:"8px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"}};return i.useEffect((function(){q(!0),console.log(f,"citationLoad")}),[f]),t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},F.rightPanel),(null==h?void 0:h.rightPanel)||{})},{children:[t.jsxs("div",e.__assign({style:F.header},{children:[t.jsxs("div",e.__assign({style:F.headerLeft},{children:[(H||w)&&t.jsx("button",e.__assign({style:F.closeButton,onClick:function(){return x("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:t.jsx(n.default,{})})),t.jsx("h2",e.__assign({style:F.clickableElementCategory},{children:v}))]})),t.jsxs("div",e.__assign({style:F.toggleBlurContainer},{children:[H&&C&&t.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"2px"}},{children:[t.jsx(s.default,{checked:P,onChange:function(e){q(e.target.checked),console.log(e.target.checked,"event.target.checked")},color:"primary",size:"small"}),t.jsxs("span",e.__assign({style:{fontSize:"0.75rem",display:"flex",alignItems:"center",gap:"4px"}},{children:["Blur",t.jsx(a.default,e.__assign({title:"Blur Text is enabled by default. Non-highlighted parts of the text will appear blurred to help you focus on the highlighted content. You can turn this off if you want to see all text clearly."},{children:t.jsx("span",e.__assign({style:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:"14px",height:"14px",borderRadius:"50%",backgroundColor:"#485468",color:"#fff",fontSize:"10px",fontWeight:"bold",cursor:"pointer",lineHeight:"14px",userSelect:"none"}},{children:"i"}))}))]}))]})),t.jsx("button",e.__assign({style:F.closeButton,onClick:function(){u(),x("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:t.jsx(o.default,{})}))]}))]})),t.jsx("div",e.__assign({style:e.__assign(e.__assign({},F.previewWrapper),null==h?void 0:h.previewWrapper)},{children:H?t.jsx(r.default,{citationNumber:1,defaultState:!0,partialMatch:!0,fixedWidth:!1,citationTitle:"Sample Citation",title:"Sample Title",paragraphs:[null==p?void 0:p.content],textToHighlight:[null==p?void 0:p.textToHighLight],externalLinkComponent:"",bookCoverImage:g,customStyle:null==h?void 0:h.citationCustomStyle,isNonHighlightedBlur:b,isBookemon:B,toggleBlur:P}):f||w?t.jsxs("div",e.__assign({style:F.loadingStyle},{children:[t.jsx("div",e.__assign({style:l.comingSoonStyles.iconWrapper},{children:(null==_?void 0:_.icon)||l.defaultIcon})),w?t.jsxs("p",e.__assign({style:l.comingSoonStyles.text},{children:["No data found matching the selected ",v.toLowerCase()]})):t.jsxs("p",e.__assign({style:l.comingSoonStyles.text},{children:["fetching ",v.toLowerCase(),"...."]}))]})):t.jsx("div",e.__assign({style:F.flexCenter},{children:t.jsx("div",e.__assign({style:e.__assign(e.__assign({},F.coverContainer),T||!g?e.__assign(e.__assign({},F.coverImagePreview),null==h?void 0:h.coverImagePreview):{})},{children:g&&!T?t.jsx("img",{onError:function(){return W(!0)},style:F.bookCoverStyle,src:g,alt:"Book Cover Image"}):t.jsx("div",e.__assign({style:F.bookCoverPlaceholder},{children:t.jsxs("div",e.__assign({style:F.bookCoverInner},{children:[t.jsx("div",e.__assign({style:F.bookTitle},{children:(null==c?void 0:c.title)||"Unknown Title"})),t.jsx("div",e.__assign({style:F.bookAuthor},{children:(null==c?void 0:c.author)||"Unknown Author"}))]}))}))}))}))}))]}))};
|
|
2
2
|
//# sourceMappingURL=BookPreview.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.mjs.js"),i=require("react/jsx-runtime"),t=require("react"),o=require("../../node_modules/@material-ui/core/esm/Accordion/Accordion.js"),n=require("../../node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js"),r=require("../../_virtual/ExpandMore.js"),a=require("../../_virtual/Close.js"),s=require("../../node_modules/react-resizable-panels/dist/react-resizable-panels.browser.js"),l=require("./BookDetailsCard/BookDetailsCard.js"),d=require("./BookOverviewCard/BookOverviewCard.js"),c=require("./BookElementsCard/BookElementsCard.js"),u=require("./BookCopyrightsCard/BookCopyrightsCard.js"),g=require("./BookPeopleAwardsCard/BookPeopleAwardsCard.js"),h=require("./BookPreview/BookPreview.js"),x=require("../../node_modules/@material-ui/core/esm/Dialog/Dialog.js"),p=require("../../node_modules/@material-ui/core/esm/DialogContent/DialogContent.js"),_=require("../../node_modules/@material-ui/core/esm/Typography/Typography.js"),m=require("../../node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js"),f=require("../../node_modules/@material-ui/core/esm/IconButton/IconButton.js"),j={dialogPaper:{maxWidth:"none",fontFamily:"Inter, sans-serif"},dialogContent:{padding:0,backgroundColor:"#FFFFFF",overflow:"hidden",height:"90vh",position:"relative"},container:{display:"flex",height:"100%",width:"100%",alignItems:"flex-start"},leftPanel:{height:"100%",padding:"24px",overflowY:"auto",backgroundColor:"#F3F4F6",borderRadius:"12px",boxSizing:"border-box"},rightPanel:{width:"40%",backgroundColor:"#FFFFFF",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",overflow:"auto",flex:1,boxSizing:"border-box",overflowY:"auto"},accordion:{borderRadius:"12px",boxShadow:"none",marginBottom:"24px"},accordionSummary:{paddingLeft:"16px",paddingRight:"16px"},accordionDetails:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px"},heading:{fontWeight:"bold",color:"#000000",fontSize:"16px"},blurOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",backgroundColor:"rgba(255, 255, 255, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,borderRadius:"12px"},closeButton:{position:"absolute",top:"8px",right:"8px",color:"#111827"},resizeHandle:{width:"10px",backgroundColor:"#e5e7eb",cursor:"col-resize",display:"flex",alignItems:"center",justifyContent:"center"},iconContainer:{display:"flex",flexDirection:"column",gap:"4px"},dot:{width:"4px",height:"4px",backgroundColor:"#6b7280",borderRadius:"50%"},resizeHandleBar:{width:"2px",height:"24px",backgroundColor:"#666",borderRadius:"2px"}},y={wrapper:{alignItems:"center",justifyContent:"center",textAlign:"center"},inner:{width:"100%"},iconWrapper:{width:"80px",height:"80px",background:"linear-gradient(to right, #3B82F6, #9333EA)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px auto"},icon:{width:"40px",height:"40px",color:"#FFFFFF"},heading:{fontSize:"36px",fontWeight:"bold",color:"#9333EA",marginBottom:"16px"},text:{fontSize:"18px",color:"#4B5563",lineHeight:1.6,textAlign:"center"},errorState:{color:"#CE3928",padding:"18px 0px",display:"flex",justifyContent:"center",width:"100%"}},v=i.jsx("svg",e.__assign({style:y.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},{children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})),b=function(t){var o=t.header,n=t.subheader,r=t.icon;return i.jsx("div",e.__assign({style:y.wrapper},{children:i.jsxs("div",e.__assign({style:y.inner},{children:[i.jsx("div",e.__assign({style:{marginBottom:"32px"}},{children:i.jsx("div",e.__assign({style:y.iconWrapper},{children:r||v}))})),i.jsxs("div",{children:[i.jsx("h1",e.__assign({style:y.heading},{children:o})),i.jsx("p",e.__assign({style:y.text},{children:n}))]})]}))}))};exports.comingSoonStyles=y,exports.default=function(y){var k=y.open,C=y.onClose,w=y.isNonHighlightedBlur,B=y.getHighlightContent,S=y.handleFetchManuscriptElements,F=y.data,D=y.showComingSoon,z=void 0!==D&&D,P=y.comingSoonData,q=void 0===P?{header:"Bookemon Coming Soon!!",subheader:"We're working on something amazing. Stay tuned for updates!",icon:v}:P,I=y.customStyle,A=void 0===I?{}:I,H=y.isBlurToggleVisible,E=void 0!==H&&H,L=t.useState({textToHighLight:"",content:""}),O=L[0],R=L[1],T=t.useState(1),M=T[0],W=T[1],N=t.useState(!1),V=N[0],Q=N[1],Y=t.useState("Book Preview"),G=Y[0],J=Y[1],K=t.useState(70),U=K[0],X=K[1],Z=t.useRef(null),$=t.useState(!1),ee=$[0],ie=$[1],te=function(i,t,o,n){return void 0===n&&(n=0),e.__awaiter(void 0,void 0,void 0,(function(){var r,a,s,l,d,c,u,g,h,x,p,_,m;return e.__generator(this,(function(e){switch(e.label){case 0:R({textToHighLight:"",content:""}),ie(!1),Q(!0),J(t),e.label=1;case 1:return e.trys.push([1,6,7,8]),o&&0!==o.length?[4,B([o[n]])]:(console.warn("No chunk IDs provided."),Q(!1),X(70),Z.current&&Z.current.resize(70),[2]);case 2:if(r=e.sent(),a=(null==r?void 0:r.data)||r||[],!Array.isArray(a)||0===a.length)return console.warn("No highlight content found."),Q(!1),ie(!0),[2];for(l=(s=function(e){return e?e.replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(i),d=l.split(" ").filter(Boolean),c=null,u=d.length;u>0;u--){for(g=d.slice(0,u).join(" "),h=0,x=a;h<x.length;h++)if(p=x[h],s((null==p?void 0:p.normalizedContent)||(null==p?void 0:p.htmlContent)).includes(g)){c=p;break}if(c)break}return _=a.map((function(e){return e.htmlContent})).join("\n"),c?(R({textToHighLight:c.htmlContent,content:_}),J(t),X(50),Z.current&&Z.current.resize(50),Q(!1),[3,5]):[3,3];case 3:return console.warn("No matching normalized content found for highlight text."),n+1>=o.length?(ie(!0),Q(!1),[2]):[4,te(i,t,o,n+1)];case 4:e.sent(),e.label=5;case 5:return[3,8];case 6:return m=e.sent(),console.error("Error fetching highlight content:",m),ie(!0),Q(!1),[3,8];case 7:return[7];case 8:return[2]}}))}))},oe=F.bookAwards,ne=F.bookCopyRight,re=F.bookDetails,ae=F.bookElements,se=F.bookOverView,le=F.bookCoverImage,de=null==re?void 0:re.isbn;return i.jsx(x.default,e.__assign({open:k,fullWidth:!0,PaperProps:{style:e.__assign(e.__assign({},null==j?void 0:j.dialogPaper),null==A?void 0:A.dialogDimension)}},{children:i.jsxs(p.default,e.__assign({style:j.dialogContent},{children:[!z&&i.jsx("div",e.__assign({style:j.container},{children:i.jsxs(s.PanelGroup,e.__assign({direction:"horizontal"},{children:[i.jsx(s.Panel,e.__assign({order:1,ref:Z,defaultSize:U||70},{children:i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},null==j?void 0:j.leftPanel),null==A?void 0:A.leftPanel)},{children:[i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({defaultExpanded:!0,elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Book Overview"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:se&&Object.keys(se).length>0?i.jsx(d.default,{data:se}):i.jsx("div",e.__assign({style:j.errorState},{children:"No overview data available."}))}))]}))})),i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Book Manuscript Elements"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:i.jsx(c.default,{data:ae,handleFetchManuscriptElements:S,BookIsbn:de,updateQuotesToHighLight:te})}))]}))})),i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Book Metadata Details"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:re&&Object.keys(re).length>0?i.jsx(l.default,{data:re}):i.jsx("div",e.__assign({style:j.errorState},{children:"No Book Metadata data available."}))}))]}))})),i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Copyrights & Marketing"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:ne&&Object.keys(ne).length>0?i.jsx(u.default,{data:ne}):i.jsx("div",e.__assign({style:j.errorState},{children:"No Copyrights & Marketing data available."}))}))]}))})),i.jsx("div",{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"People & Awards"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:oe&&Object.keys(oe).length>0?i.jsx(g.default,{data:oe}):i.jsx("div",e.__assign({style:j.errorState},{children:"No People & Awards data available."}))}))]}))})]}))})),i.jsx(s.PanelResizeHandle,{style:{width:"3px",background:"#D1D5DC",cursor:"col-resize"}}),i.jsx(s.Panel,e.__assign({order:2,minSize:30,maxSize:50,style:{overflow:"visible",position:"relative",transition:"all 300ms ease-in-out",WebkitTransition:"all 300ms ease-in-out"}},{children:i.jsx(h.default,{bookOverView:se,bookCoverImage:le,onClose:C,clickableElementCategory:G,quotesToHighLightData:O,updateQuotesToHighLight:te,citationLoad:V,previewPage:M,setPreviewPage:W,customStyle:A,comingSoonData:q,isNonHighlightedBlur:w,isBlurToggleVisible:E,noHtmlContent:ee})}))]}))})),z?i.jsxs("div",e.__assign({style:j.blurOverlay},{children:[i.jsx(f.default,e.__assign({style:j.closeButton,onClick:C},{children:i.jsx(a.default,{})})),i.jsx(b,{header:q.header,subheader:q.subheader,icon:q.icon})]})):i.jsx(i.Fragment,{})]}))}))},exports.defaultIcon=v;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.mjs.js"),i=require("react/jsx-runtime"),t=require("react"),o=require("../../node_modules/@material-ui/core/esm/Accordion/Accordion.js"),n=require("../../node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js"),r=require("../../_virtual/ExpandMore.js"),a=require("../../_virtual/Close.js"),s=require("../../node_modules/react-resizable-panels/dist/react-resizable-panels.browser.js"),l=require("./BookDetailsCard/BookDetailsCard.js"),d=require("./BookOverviewCard/BookOverviewCard.js"),c=require("./BookElementsCard/BookElementsCard.js"),u=require("./BookCopyrightsCard/BookCopyrightsCard.js"),g=require("./BookPeopleAwardsCard/BookPeopleAwardsCard.js"),h=require("./BookPreview/BookPreview.js"),x=require("../../node_modules/@material-ui/core/esm/Dialog/Dialog.js"),p=require("../../node_modules/@material-ui/core/esm/DialogContent/DialogContent.js"),_=require("../../node_modules/@material-ui/core/esm/Typography/Typography.js"),f=require("../../node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js"),m=require("../../node_modules/@material-ui/core/esm/IconButton/IconButton.js"),j={dialogPaper:{maxWidth:"none",fontFamily:"Inter, sans-serif"},dialogContent:{padding:0,backgroundColor:"#FFFFFF",overflow:"hidden",height:"90vh",position:"relative"},container:{display:"flex",height:"100%",width:"100%",alignItems:"flex-start"},leftPanel:{height:"100%",padding:"24px",overflowY:"auto",backgroundColor:"#F3F4F6",borderRadius:"12px",boxSizing:"border-box"},rightPanel:{width:"40%",backgroundColor:"#FFFFFF",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",overflow:"auto",flex:1,boxSizing:"border-box",overflowY:"auto"},accordion:{borderRadius:"12px",boxShadow:"none",marginBottom:"24px"},accordionSummary:{paddingLeft:"16px",paddingRight:"16px"},accordionDetails:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px"},heading:{fontWeight:"bold",color:"#000000",fontSize:"16px"},blurOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",backgroundColor:"rgba(255, 255, 255, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,borderRadius:"12px"},closeButton:{position:"absolute",top:"8px",right:"8px",color:"#111827"},resizeHandle:{width:"10px",backgroundColor:"#e5e7eb",cursor:"col-resize",display:"flex",alignItems:"center",justifyContent:"center"},iconContainer:{display:"flex",flexDirection:"column",gap:"4px"},dot:{width:"4px",height:"4px",backgroundColor:"#6b7280",borderRadius:"50%"},resizeHandleBar:{width:"2px",height:"24px",backgroundColor:"#666",borderRadius:"2px"}},y={wrapper:{alignItems:"center",justifyContent:"center",textAlign:"center"},inner:{width:"100%"},iconWrapper:{width:"80px",height:"80px",background:"linear-gradient(to right, #3B82F6, #9333EA)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px auto"},icon:{width:"40px",height:"40px",color:"#FFFFFF"},heading:{fontSize:"36px",fontWeight:"bold",color:"#9333EA",marginBottom:"16px"},text:{fontSize:"18px",color:"#4B5563",lineHeight:1.6,textAlign:"center"},errorState:{color:"#CE3928",padding:"18px 0px",display:"flex",justifyContent:"center",width:"100%"}},b=i.jsx("svg",e.__assign({style:y.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},{children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})),v=function(t){var o=t.header,n=t.subheader,r=t.icon;return i.jsx("div",e.__assign({style:y.wrapper},{children:i.jsxs("div",e.__assign({style:y.inner},{children:[i.jsx("div",e.__assign({style:{marginBottom:"32px"}},{children:i.jsx("div",e.__assign({style:y.iconWrapper},{children:r||b}))})),i.jsxs("div",{children:[i.jsx("h1",e.__assign({style:y.heading},{children:o})),i.jsx("p",e.__assign({style:y.text},{children:n}))]})]}))}))};exports.comingSoonStyles=y,exports.default=function(y){var k=y.open,C=y.onClose,B=y.isNonHighlightedBlur,w=y.isBookemon,S=y.getHighlightContent,F=y.handleFetchManuscriptElements,D=y.data,z=y.showComingSoon,P=void 0!==z&&z,q=y.comingSoonData,I=void 0===q?{header:"Bookemon Coming Soon!!",subheader:"We're working on something amazing. Stay tuned for updates!",icon:b}:q,A=y.customStyle,H=void 0===A?{}:A,E=y.isBlurToggleVisible,O=void 0!==E&&E,L=t.useState({textToHighLight:"",content:""}),R=L[0],M=L[1],T=t.useState(1),W=T[0],N=T[1],V=t.useState(!1),Q=V[0],Y=V[1],G=t.useState("Book Preview"),J=G[0],K=G[1],U=t.useState(70),X=U[0],Z=U[1],$=t.useRef(null),ee=t.useState(!1),ie=ee[0],te=ee[1],oe=function(i,t,o,n){return void 0===n&&(n=0),e.__awaiter(void 0,void 0,void 0,(function(){var r,a,s,l,d,c,u,g,h,x,p,_,f,m,j,y,b,v,k,C,B,w,F,D,z,P,q,I,A,H,E,O,L,R;return e.__generator(this,(function(e){switch(e.label){case 0:M({textToHighLight:"",content:""}),te(!1),Y(!0),K(t),e.label=1;case 1:return e.trys.push([1,4,5,6]),o&&0!==o.length?[4,S([o[n]])]:(Y(!1),Z(70),null===(L=$.current)||void 0===L||L.resize(70),[2]);case 2:if(r=e.sent(),a=(null==r?void 0:r.data)||r||[],!Array.isArray(a)||0===a.length)return te(!0),Y(!1),[2];for(l=(s=function(e){return e?e.replace(/<[^>]*>/g," ").replace(/ /g," ").replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(i),d=l.split(" ").filter(Boolean),c=[],u=0;u<d.length;u++)for(g=d.length;g>u;g--)c.push(d.slice(u,g).join(" "));for(h=null,x=0,p=c;x<p.length;x++){for(B=p[x],_=0,f=a;_<f.length;_++)if(q=f[_],(I=s(q.normalizedContent||q.htmlContent))===B){h=q;break}if(h)break}if(!h)for(m=0,j=c;m<j.length;m++){for(B=j[m],y=new RegExp("\\b".concat(B,"\\b"),"i"),b=0,v=a;b<v.length;b++)if(q=v[b],I=s(q.normalizedContent||q.htmlContent),y.test(I)){h=q;break}if(h)break}if(!h)for(k=0,C=c;k<C.length;k++)if(B=C[k],!((w=B.split(" ")).length<2)){for(F=w[0],D=w[w.length-1],z=0,P=a;z<P.length;z++)if(q=P[z],I=s(q.normalizedContent||q.htmlContent),A=I.indexOf(F),H=I.indexOf(D),-1!==A&&-1!==H&&Math.abs(H-A)<40){h=q;break}if(h)break}return E=a.map((function(e){return e.htmlContent})).join("\n"),h?(M({textToHighLight:h.htmlContent,content:E}),Z(50),null===(R=$.current)||void 0===R||R.resize(50),Y(!1),[2]):n+1>=o.length?(te(!0),Y(!1),[2]):[4,oe(i,t,o,n+1)];case 3:return[2,e.sent()];case 4:return O=e.sent(),console.error("Highlight error:",O),te(!0),[3,6];case 5:return Y(!1),[7];case 6:return[2]}}))}))},ne=D.bookAwards,re=D.bookCopyRight,ae=D.bookDetails,se=D.bookElements,le=D.bookOverView,de=D.bookCoverImage,ce=null==ae?void 0:ae.isbn;return i.jsx(x.default,e.__assign({open:k,fullWidth:!0,PaperProps:{style:e.__assign(e.__assign({},null==j?void 0:j.dialogPaper),null==H?void 0:H.dialogDimension)}},{children:i.jsxs(p.default,e.__assign({style:j.dialogContent},{children:[!P&&i.jsx("div",e.__assign({style:j.container},{children:i.jsxs(s.PanelGroup,e.__assign({direction:"horizontal"},{children:[i.jsx(s.Panel,e.__assign({order:1,ref:$,defaultSize:X||70},{children:i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},null==j?void 0:j.leftPanel),null==H?void 0:H.leftPanel)},{children:[i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({defaultExpanded:!0,elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Book Overview"}))})),i.jsx(f.default,e.__assign({style:j.accordionDetails},{children:le&&Object.keys(le).length>0?i.jsx(d.default,{data:le}):i.jsx("div",e.__assign({style:j.errorState},{children:"No overview data available."}))}))]}))})),i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Book Manuscript Elements"}))})),i.jsx(f.default,e.__assign({style:j.accordionDetails},{children:i.jsx(c.default,{data:se,handleFetchManuscriptElements:F,BookIsbn:ce,updateQuotesToHighLight:oe})}))]}))})),i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Book Metadata Details"}))})),i.jsx(f.default,e.__assign({style:j.accordionDetails},{children:ae&&Object.keys(ae).length>0?i.jsx(l.default,{data:ae}):i.jsx("div",e.__assign({style:j.errorState},{children:"No Book Metadata data available."}))}))]}))})),i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Copyrights & Marketing"}))})),i.jsx(f.default,e.__assign({style:j.accordionDetails},{children:re&&Object.keys(re).length>0?i.jsx(u.default,{data:re}):i.jsx("div",e.__assign({style:j.errorState},{children:"No Copyrights & Marketing data available."}))}))]}))})),i.jsx("div",{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"People & Awards"}))})),i.jsx(f.default,e.__assign({style:j.accordionDetails},{children:ne&&Object.keys(ne).length>0?i.jsx(g.default,{data:ne}):i.jsx("div",e.__assign({style:j.errorState},{children:"No People & Awards data available."}))}))]}))})]}))})),i.jsx(s.PanelResizeHandle,{style:{width:"3px",background:"#D1D5DC",cursor:"col-resize"}}),i.jsx(s.Panel,e.__assign({order:2,minSize:30,maxSize:50,style:{overflow:"visible",position:"relative",transition:"all 300ms ease-in-out",WebkitTransition:"all 300ms ease-in-out"}},{children:i.jsx(h.default,{bookOverView:le,bookCoverImage:de,onClose:C,clickableElementCategory:J,quotesToHighLightData:R,updateQuotesToHighLight:oe,citationLoad:Q,previewPage:W,setPreviewPage:N,customStyle:H,comingSoonData:I,isNonHighlightedBlur:B,isBlurToggleVisible:O,isBookemon:w,noHtmlContent:ie})}))]}))})),P?i.jsxs("div",e.__assign({style:j.blurOverlay},{children:[i.jsx(m.default,e.__assign({style:j.closeButton,onClick:C},{children:i.jsx(a.default,{})})),i.jsx(v,{header:I.header,subheader:I.subheader,icon:I.icon})]})):i.jsx(i.Fragment,{})]}))}))},exports.defaultIcon=b;
|
|
2
2
|
//# sourceMappingURL=Bookemon.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as n}from"../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as e,Fragment as t,jsxs as a}from"react/jsx-runtime";import{useState as o,useEffect as c}from"react";import i from"./BookCitation.module.css.js";import{cleanScannedText as r}from"./text-cleaner.js";var s=function(s){var l=s.title,d=s.author,u=s.paragraphs,
|
|
1
|
+
import{__assign as n}from"../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as e,Fragment as t,jsxs as a}from"react/jsx-runtime";import{useState as o,useEffect as c}from"react";import i from"./BookCitation.module.css.js";import{cleanScannedText as r}from"./text-cleaner.js";var s=function(s){var l=s.title,d=s.author,u=s.paragraphs,h=s.chevronUpComponent,m=s.chevronDownComponent,v=s.externalLinkComponent,p=s.textToHighlight,f=s.pageNumber,g=s.totalPageNumber,N=void 0===g?null:g,x=s.citationTitle;s.customStyle;var b=s.handleExternalLinkClick,C=s.bookCoverImage,k=s.partialMatch,E=void 0!==k&&k,L=s.citationNumber,y=void 0===L?1:L,A=s.defaultState,T=void 0!==A&&A,q=s.isNonHighlightedBlur,I=void 0!==q&&q,j=s.toggleBlur,w=void 0===j?I:j,B=s.fixedWidth,W=void 0===B||B,H=s.isBookemon,M=void 0!==H&&H,O=o(T),S=O[0],$=O[1],_=["address","article","aside","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","li","main","nav","noscript","ol","p","pre","section","table","tfoot","ul","video"];c((function(){if(S){var n=document.getElementById("quotes-citations-".concat(null!=y?y:""));n&&n.scrollIntoView({behavior:"smooth",block:"center"})}}),[S,p,y]);var R=function(n){void 0===n&&(n="");var e=document.createElement("div");e.innerHTML=n;var t=e.textContent||e.innerText||"";return(t=(t=t.replace(/<\/?[^>]+(>|$)/g,"")).replace(/\s+/g," ")).trim()};function D(n){var e=document.createElement("div");e.innerHTML=n;var t=i.highlighted,a=function(n,e){var o,c;if(void 0===e&&(e=!1),n.nodeType===Node.TEXT_NODE){if(!e&&(null===(o=n.textContent)||void 0===o?void 0:o.trim())){var r=document.createElement("span");r.classList.add(i.blurred),r.textContent=n.textContent,null===(c=n.parentNode)||void 0===c||c.replaceChild(r,n)}}else if(n.nodeType===Node.ELEMENT_NODE){var s=n,l=s.classList.contains(t);Array.from(s.childNodes).forEach((function(n){return a(n,e||l)}))}};return Array.from(e.childNodes).forEach((function(n){return a(n)})),e.innerHTML}function z(n,e,t,a,o,c){void 0===o&&(o=[]),void 0===c&&(c=!1);var r,s=i.highlighted,l=i.highlightedInline,d=i.highlightedBlock,u="".concat(s," ").concat(l),h="".concat(s," ").concat(d),m=e,v=(r=document.createElement("textarea"),function(n){return r.innerHTML=n,r.value});if(o.length>0){if(c){return o.forEach((function(n){n&&(m=function(n,e,t){for(var a='<span id="'.concat(t,'" class="').concat(u,'">'),o="</span>",c=n,i=0,r=new RegExp("(<(?:".concat(_.join("|"),")[^>]*>.*?)(?=<(?:").concat(_.join("|"),")|$)"),"gi"),s=(e.match(r)||[e]).map((function(n){var e=n.match(/^<([a-zA-Z0-9]+)([^>]*)>/);if(e&&_.includes(e[1].toLowerCase())){var t=e[0].length;return e[0]+a+n.slice(t)+o}return a+n+o})).join("");;){var l=c.indexOf(e,i);if(-1===l)break;c=c.slice(0,l)+s+c.slice(l+e.length),i=l+s.length}var h=d;return c.replace(/<span([^>]*)>([\s\S]*?)<\/span>/gi,(function(n,e,t){if(_.some((function(n){return new RegExp("<".concat(n,"\\b[^>]*>"),"i").test(t)}))){var a=e.match(/\sclass\s*=\s*(['"])(.*?)\1/);if(a){var o=a[2],c=o.split(/\s+/).includes(h)?o:"".concat(o," ").concat(h);e=e.replace(a[0],' class="'.concat(c,'"'))}else e+=' class="'.concat(h,'"')}return"<span".concat(e,">").concat(t,"</span>")}))}(m,n,"Annotation"===t?"quotes-annotations-".concat(null!=a?a:""):"quotes-citations-".concat(null!=a?a:"")))})),I&&w?D(m):m}return o.forEach((function(n){var o=v(n).trim();if(o&&v(e).trim().toLowerCase()===o.toLowerCase()){var c="Annotation"===t?"quotes-annotations-".concat(null!=a?a:""):"quotes-citations-".concat(null!=a?a:"");m='<span id="'.concat(c,'" class="').concat(h,'">').concat(e,"</span>")}})),I&&w?D(m):m}var p=h;if(!n||!e)return"Annotation"===t?e:'<span id="quotes-citations" class="'.concat(p,'">').concat(e,"</span>");var f=Array.from(n.matchAll(/`([^`]+)`/g));if(0===f.length)return"Annotation"===t?e:'<span id="quotes-citations" class="'.concat(p,'">').concat(e,"</span>");m=e;var g=!1;return f.forEach((function(n){var e=v(n[1]).trim();if(e){var a=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=new RegExp("(".concat(a,")"),"gi");m.match(o)&&(g=!0,m=m.replace(o,'<span id="'.concat("Annotation"===t?"quotes-annotations":"quotes-citations",'" class="').concat(p,'">$1</span>')))}})),g?m:"Annotation"===t?e:'<span id="quotes-citations" class="'.concat(p,'">').concat(e,"</span>")}return e(t,{children:a("span",n({className:"".concat(i.relativeWrapper," ").concat(M?i.height95percent+" "+i.displayFlex:i.height100percent)},{children:[!T&&e("div",n({className:i.citationButtonWrapper},{children:a("div",n({onClick:function(){return $((function(n){return!n}))},className:i.citationButton},{children:[e("span",n({className:i.citationText},{children:x})),S?h:m]}))})),S&&e("div",n({className:i.expandedWrapper},{children:e("div",n({className:"".concat(i.expandableContainer," ").concat(W?i.expandableContainerWidth:"")},{children:e("div",n({className:i.expandableContent},{children:a("div",n({className:i.bookBodyContent},{children:[!T&&e("div",n({className:i.header},{children:a("div",n({className:i.bookInfo},{children:[C&&e("div",n({className:i.bookImageWrapper},{children:e("img",{src:C,alt:l||"Book cover",className:i.bookImage})})),a("div",n({className:i.bookTextInfo},{children:[e("h1",n({className:i.bookTitle},{children:l})),d||Array.isArray(d)&&a("p",n({className:i.bookAuthor},{children:["by"," ",Array.isArray(d)?d.join(", "):d||""]}))]})),e("div",n({onClick:b,className:i.externalLink},{children:v}))]}))})),e("div",n({className:i.relativeContainer},{children:e("div",n({className:i.container},{children:a("div",n({className:"".concat(i.contentWrapper," ").concat(i.customScrollbarClass," ").concat(M?"":i.maxheight38rem)},{children:[e("div",{className:i.gradientOverlayLeft}),e("div",{className:i.gradientOverlayRight}),a("div",n({className:i.contentWrapper},{children:[u.map((function(n,t){r(n);var a=(E?n.includes(p[0]):p.some((function(e){return R(n).toLowerCase()===R(e).toLowerCase()})))?z(u.join("\n"),n,"Citation",y,p,E):n;return e("div",{className:"".concat(i.paragraph," ").concat(0!==t?i.textIndent:""),dangerouslySetInnerHTML:{__html:a}},t)})),f&&e("div",n({className:i.pageIndex},{children:a("div",n({className:i.pageLabel},{children:[f," ",N&&"of ".concat(N)]}))}))]}))]}))}))}))]}))}))}))}))]}))})};export{s as default};
|
|
2
2
|
//# sourceMappingURL=BookCitation.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"../../node_modules/style-inject/dist/style-inject.es.js";var t={relativeWrapper:"BookCitation-module_relativeWrapper__jFpTh",relativeContainer:"BookCitation-module_relativeContainer__HLngm",citationButtonWrapper:"BookCitation-module_citationButtonWrapper__einPL",citationButton:"BookCitation-module_citationButton__8U9MO",citationText:"BookCitation-module_citationText__aH2j-",pageText:"BookCitation-module_pageText__nEM69",expandedWrapper:"BookCitation-module_expandedWrapper__roHmf",expandableContainer:"BookCitation-module_expandableContainer__yNmEx",expandableContent:"BookCitation-module_expandableContent__AvgFX",bookBodyContent:"BookCitation-module_bookBodyContent__a20pD",header:"BookCitation-module_header__kMSfc",bookInfo:"BookCitation-module_bookInfo__AzKFV",bookImageWrapper:"BookCitation-module_bookImageWrapper__JNna7",bookImage:"BookCitation-module_bookImage__CXga1",bookTextInfo:"BookCitation-module_bookTextInfo__zVuts",bookTitle:"BookCitation-module_bookTitle__lHfz0",bookAuthor:"BookCitation-module_bookAuthor__Chqif",externalLink:"BookCitation-module_externalLink__cQ3aM",audioHover:"BookCitation-module_audioHover__XquBK",audioIcon:"BookCitation-module_audioIcon__hoXWS",container:"BookCitation-module_container__msLn5",gradientOverlayLeft:"BookCitation-module_gradientOverlayLeft__vKN9H",gradientOverlayRight:"BookCitation-module_gradientOverlayRight__lElq0",contentWrapper:"BookCitation-module_contentWrapper__2y1ae",paragraph:"BookCitation-module_paragraph__9gQDG",textIndent:"BookCitation-module_textIndent__ejJaC",pageIndex:"BookCitation-module_pageIndex__wUixS",pageLabel:"BookCitation-module_pageLabel__NZ6CE",highlighted:"BookCitation-module_highlighted__n9p6V",highlightedInline:"BookCitation-module_highlightedInline__Vaoms",highlightedBlock:"BookCitation-module_highlightedBlock__c-R3J",blurred:"BookCitation-module_blurred__E0v59",customScrollbarClass:"BookCitation-module_customScrollbarClass__mwGyt"};o(".BookCitation-module_relativeWrapper__jFpTh{position:relative}.BookCitation-module_relativeContainer__HLngm{min-height:0;position:relative}.BookCitation-module_citationButtonWrapper__einPL{color:#be87ff;cursor:pointer;display:inline-block;margin-right:.25rem}.BookCitation-module_citationButton__8U9MO{align-items:center;background-color:initial;border:none;border-radius:9999px;color:#d63384;cursor:pointer;display:inline-flex;font-family:Plus Jakarta Sans,sans-serif;font-size:16px;font-weight:700;margin:0;padding:0;text-decoration:none;white-space:normal;word-break:break-word}.BookCitation-module_citationText__aH2j-{align-items:center;display:flex;justify-content:center;text-align:center}.BookCitation-module_pageText__nEM69{margin-left:6px}.BookCitation-module_expandedWrapper__roHmf{align-items:center;display:flex;justify-content:start;min-height:0}.BookCitation-module_expandableContainer__yNmEx{left:0;margin-top:.5rem;min-height:0;top:100%;
|
|
1
|
+
import o from"../../node_modules/style-inject/dist/style-inject.es.js";var t={relativeWrapper:"BookCitation-module_relativeWrapper__jFpTh",displayFlex:"BookCitation-module_displayFlex__iMb2e",height95percent:"BookCitation-module_height95percent__kWGUx",height100percent:"BookCitation-module_height100percent__zQeLG",relativeContainer:"BookCitation-module_relativeContainer__HLngm",citationButtonWrapper:"BookCitation-module_citationButtonWrapper__einPL",citationButton:"BookCitation-module_citationButton__8U9MO",citationText:"BookCitation-module_citationText__aH2j-",pageText:"BookCitation-module_pageText__nEM69",expandedWrapper:"BookCitation-module_expandedWrapper__roHmf",expandableContainer:"BookCitation-module_expandableContainer__yNmEx",expandableContainerWidth:"BookCitation-module_expandableContainerWidth__O7mEU",expandableContent:"BookCitation-module_expandableContent__AvgFX",bookBodyContent:"BookCitation-module_bookBodyContent__a20pD",header:"BookCitation-module_header__kMSfc",bookInfo:"BookCitation-module_bookInfo__AzKFV",bookImageWrapper:"BookCitation-module_bookImageWrapper__JNna7",bookImage:"BookCitation-module_bookImage__CXga1",bookTextInfo:"BookCitation-module_bookTextInfo__zVuts",bookTitle:"BookCitation-module_bookTitle__lHfz0",bookAuthor:"BookCitation-module_bookAuthor__Chqif",externalLink:"BookCitation-module_externalLink__cQ3aM",audioHover:"BookCitation-module_audioHover__XquBK",audioIcon:"BookCitation-module_audioIcon__hoXWS",container:"BookCitation-module_container__msLn5",gradientOverlayLeft:"BookCitation-module_gradientOverlayLeft__vKN9H",gradientOverlayRight:"BookCitation-module_gradientOverlayRight__lElq0",contentWrapper:"BookCitation-module_contentWrapper__2y1ae",paragraph:"BookCitation-module_paragraph__9gQDG",textIndent:"BookCitation-module_textIndent__ejJaC",pageIndex:"BookCitation-module_pageIndex__wUixS",pageLabel:"BookCitation-module_pageLabel__NZ6CE",highlighted:"BookCitation-module_highlighted__n9p6V",highlightedInline:"BookCitation-module_highlightedInline__Vaoms",highlightedBlock:"BookCitation-module_highlightedBlock__c-R3J",blurred:"BookCitation-module_blurred__E0v59",customScrollbarClass:"BookCitation-module_customScrollbarClass__mwGyt",maxheight38rem:"BookCitation-module_maxheight38rem__8icW1"};o(".BookCitation-module_relativeWrapper__jFpTh{position:relative;width:100%}.BookCitation-module_displayFlex__iMb2e{align-items:center;display:flex;justify-content:center}.BookCitation-module_height95percent__kWGUx{height:90%}.BookCitation-module_height100percent__zQeLG{height:100%}.BookCitation-module_relativeContainer__HLngm{height:100%;min-height:0;position:relative}.BookCitation-module_citationButtonWrapper__einPL{color:#be87ff;cursor:pointer;display:inline-block;height:100%;margin-right:.25rem}.BookCitation-module_citationButton__8U9MO{align-items:center;background-color:initial;border:none;border-radius:9999px;color:#d63384;cursor:pointer;display:inline-flex;font-family:Plus Jakarta Sans,sans-serif;font-size:16px;font-weight:700;margin:0;padding:0;text-decoration:none;white-space:normal;width:fit-content;word-break:break-word}.BookCitation-module_citationText__aH2j-{align-items:center;display:flex;justify-content:center;text-align:center}.BookCitation-module_pageText__nEM69{margin-left:6px}.BookCitation-module_expandedWrapper__roHmf{align-items:center;display:flex;height:100%;justify-content:start;min-height:0}.BookCitation-module_expandableContainer__yNmEx{height:100%;left:0;margin-top:.5rem;min-height:0;top:100%;z-index:49}.BookCitation-module_expandableContainerWidth__O7mEU{width:32rem}.BookCitation-module_expandableContent__AvgFX{background-color:#fff;border:1px solid #60a3f8;border-radius:8px;box-shadow:0 1.694px 6.775px 0 #0000000d,0 37.262px 40.65px -10.162px #00000026,0 0 20.325px 3.387px #0000000d;color:#fff;height:fit-content;height:100%;margin-bottom:1.5rem;min-height:0;padding:.75rem}.BookCitation-module_bookBodyContent__a20pD{height:100%;margin:0 auto;min-height:0}.BookCitation-module_header__kMSfc{display:flex;justify-content:space-between;margin-bottom:1rem}.BookCitation-module_bookInfo__AzKFV{align-items:center;display:flex;gap:1rem;justify-content:center;width:100%}.BookCitation-module_bookImageWrapper__JNna7{flex-shrink:0}.BookCitation-module_bookImage__CXga1{height:70px;object-fit:cover;width:70px}.BookCitation-module_bookTextInfo__zVuts{display:flex;flex-direction:column;gap:.1rem}.BookCitation-module_bookTitle__lHfz0{color:#60a3f8;font-family:Inter,sans-serif;font-size:1rem;font-weight:700;line-height:1;margin:0}.BookCitation-module_bookAuthor__Chqif{color:#60a3f8;font-family:Inter,sans-serif;font-size:.8rem;font-weight:500;line-height:1;margin:0}.BookCitation-module_externalLink__cQ3aM{margin-left:auto}.BookCitation-module_audioHover__XquBK{border-radius:.5rem;transition:background-color .2s}.BookCitation-module_audioHover__XquBK:hover{background-color:#fff3}.BookCitation-module_audioIcon__hoXWS{width:5rem}.BookCitation-module_container__msLn5{background-color:#fff;border-radius:.75rem;box-shadow:0 4px 6px #0000001a;display:flex;flex-direction:column;height:100%;margin-left:auto;margin-right:auto;max-width:100%;position:relative;width:100%}.BookCitation-module_gradientOverlayLeft__vKN9H{background:linear-gradient(270deg,#000 0,#000000b3 40%,#0006 70%,#0000);bottom:0;box-shadow:-4px 0 8px #0000001a;opacity:.5;pointer-events:none;position:absolute;right:20px;top:0;width:16px;z-index:0}.BookCitation-module_gradientOverlayRight__lElq0{background:linear-gradient(90deg,#000 0,#0009 40%,#0003 70%,#0000);bottom:0;box-shadow:4px 0 8px #0000001a;opacity:.5;pointer-events:none;position:absolute;right:5px;top:0;width:16px;z-index:0}.BookCitation-module_contentWrapper__2y1ae{display:flex;flex-direction:column;height:100%;overflow-y:auto;padding-right:.94rem;position:relative;word-break:break-word;z-index:0}.BookCitation-module_paragraph__9gQDG{height:100%;margin-bottom:1rem;text-align:justify}.BookCitation-module_textIndent__ejJaC{text-indent:1rem}.BookCitation-module_pageIndex__wUixS{margin-top:auto;padding:.5rem 0;text-align:right}.BookCitation-module_pageLabel__NZ6CE{border-radius:9999px;color:#4b5563;display:inline-block;font-size:1rem;font-weight:500;padding:.25rem .75rem}.BookCitation-module_highlighted__n9p6V{background-color:#eaea79;font-weight:700}.BookCitation-module_highlightedInline__Vaoms{display:inline}.BookCitation-module_highlightedBlock__c-R3J{display:block}.BookCitation-module_blurred__E0v59{filter:blur(2px);pointer-events:none;user-select:none}.BookCitation-module_customScrollbarClass__mwGyt{background-color:#f5f4f4;border:1px solid #cbd5e1;border-radius:.5rem;color:#181b1f;font-family:Times New Roman,Times,serif;font-size:14.4px;font-weight:400;letter-spacing:0;line-height:100%;overflow:auto;padding:40px 50px 0 20px}.BookCitation-module_maxheight38rem__8icW1{max-height:38rem}.BookCitation-module_customScrollbarClass__mwGyt::-webkit-scrollbar{height:0;width:0}.BookCitation-module_customScrollbarClass__mwGyt::-webkit-scrollbar-track{background:#0000}.BookCitation-module_customScrollbarClass__mwGyt::-webkit-scrollbar-thumb{background-color:#a3a4ae;border-radius:10px}.BookCitation-module_customScrollbarClass__mwGyt::-webkit-scrollbar-button{display:none}");export{t as default};
|
|
2
2
|
//# sourceMappingURL=BookCitation.module.css.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__awaiter as t,__generator as n}from"../../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as o,jsx as r,Fragment as i}from"react/jsx-runtime";import a from"../../../node_modules/@material-ui/lab/esm/Pagination/Pagination.js";import"../../../node_modules/@material-ui/utils/esm/elementAcceptingRef.js";import"../../../node_modules/@material-ui/utils/esm/elementTypeAcceptingRef.js";import"../../../_virtual/index.js";import"../../../node_modules/@material-ui/utils/esm/ponyfillGlobal.js";import"../../../node_modules/@material-ui/utils/esm/refType.js";import{useState as l,useEffect as s}from"react";import"../../../node_modules/@material-ui/core/esm/SvgIcon/SvgIcon.js";import"react-dom";import d from"../../../node_modules/@material-ui/lab/esm/Skeleton/Skeleton.js";var c={sectionTitle:{fontSize:"14px",fontWeight:600,color:"#667085",marginBottom:"12px"},quotesPadding:{paddingLeft:"12px"},quoteCard:{border:"1px solid #CBD5E1",borderRadius:"8px",padding:"16px",backgroundColor:"#F8FAFC",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",marginBottom:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},quoteText:{fontStyle:"italic",color:"#475569",fontSize:"14px",fontWeight:400,marginBottom:"12px"},quoteMeta:{color:"#475569",fontSize:"12px",fontWeight:400},quoteAuthor:{fontSize:"10px",fontWeight:600,color:"#475569",marginTop:"8px",marginBottom:"18px"},button:{color:"#5928ED",fontSize:"14px",fontWeight:600,background:"none",border:"none",cursor:"pointer",padding:0,textDecoration:"none",paddingLeft:"12px"},geoLocationsContainer:{marginTop:"24px",marginBottom:"24px"},geoText:{fontSize:"14px",fontWeight:500,cursor:"pointer",color:"#532BED"},geoDivider:{margin:"0 8px",color:"#475abb",backgroundColor:"#475abb",width:"1px",height:"18px",display:"inline-block"},geoLocationFlex:{display:"inline-flex",alignItems:"center",gap:"8px",marginBottom:"8px"},charactersContainer:{marginTop:"16px"},charactersGrid:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"16px",marginBottom:"16px",paddingLeft:"12px"},characterCard:{border:"1px solid #E5E7EB",borderRadius:"8px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",display:"flex",alignItems:"flex-start",gap:"12px",padding:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},avatar:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"9999px",fontSize:"14px",fontWeight:600,flexShrink:0},charName:{fontStyle:"normal",fontWeight:600,color:"#101827",fontSize:"16px"},charDesc:{fontStyle:"normal",fontWeight:400,fontSize:"14px",color:"#6B7280"},retryButton:{backgroundColor:"#5928EC",color:"#fff",padding:"6px 10px",border:"none",borderRadius:"6px",cursor:"pointer",fontSize:"12px",fontWeight:"500"}},u=function(u){u.data;var p=u.updateQuotesToHighLight,g=u.handleFetchManuscriptElements,h=u.BookIsbn,x=l([]),f=x[0],m=x[1],y=l(1),v=y[0],b=y[1],C=l(!1),T=C[0],S=C[1],k=l(!0),w=k[0],B=k[1],D=l(0),L=D[0],q=D[1],M=l([]),j=M[0],F=M[1],E=l(1),P=E[0],W=E[1],_=l(!1),I=_[0],z=_[1],R=l(!0),H=R[0],N=R[1],G=l(0),A=G[0],K=G[1],Y=l([]),Q=Y[0],O=Y[1],J=l(1),U=J[0],V=J[1],X=l(!1),Z=X[0],$=X[1],ee=l(!0),te=ee[0],ne=ee[1],oe=l(0),re=oe[0],ie=oe[1],ae=l({list:"",index:-1,page:1}),le=ae[0],se=ae[1],de=function(e){var o=e.endpoint,r=e.page,i=e.isbn,a=e.setData,l=e.setLoading,s=e.setHasMore,d=e.setTotalPage;return t(void 0,void 0,void 0,(function(){var e,t,c,u;return n(this,(function(n){switch(n.label){case 0:return l(!0),[4,g({endpoint:o,page:r,pageSize:10,isbn:i})];case 1:return e=n.sent(),s(!(null===(t=null==e?void 0:e.pagination)||void 0===t?void 0:t.hasNext)&&!(null===(c=null==e?void 0:e.pagination)||void 0===c?void 0:c.hasPrevious)),d((null===(u=null==e?void 0:e.pagination)||void 0===u?void 0:u.totalPages)||0),a((null==e?void 0:e.data)||[]),l(!1),[2]}}))}))};return s((function(){de({endpoint:"notable-quotes",page:v,isbn:h,setData:m,setLoading:S,setHasMore:B,setTotalPage:q})}),[v]),s((function(){de({endpoint:"notable-characters",page:P,isbn:h,setData:F,setLoading:z,setHasMore:N,setTotalPage:K})}),[P]),s((function(){de({endpoint:"geo-locations",page:U,isbn:h,setData:O,setLoading:$,setHasMore:ne,setTotalPage:ie})}),[U]),o("div",{children:[o("div",e({style:{marginBottom:"24px"}},{children:[r("p",e({style:c.sectionTitle},{children:"Notable Quotes"})),o("div",e({style:c.quotesPadding},{children:[T?r("div",e({style:{display:"flex",flexDirection:"column",rowGap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(t){return o("div",e({style:c.quoteCard},{children:[r(d,{variant:"text",width:"60%",height:28}),r(d,{variant:"text",width:"40%",height:20}),r(d,{variant:"text",width:"25%",height:20}),r(d,{variant:"text",width:"30%",height:20})]}),t)}))})):0===f.length?o("p",e({style:{color:"#6B7280",fontStyle:"italic"}},{children:["No notable quotes found. ",r("button",e({style:c.retryButton,onClick:function(){return de({endpoint:"notable-quotes",page:v,isbn:h,setData:m,setLoading:S,setHasMore:B,setTotalPage:q})}},{children:"Retry"}))]})):r(i,{children:f.map((function(i,a){var l="notable"===le.list&&le.page===v&&le.index===a;return o("div",e({style:e(e({},c.quoteCard),{borderColor:l?"rgb(83, 43, 237)":"#CBD5E1"}),onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},onClick:function(){return t(void 0,void 0,void 0,(function(){var e,t;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),se({list:"notable",page:v,index:a}),(null===(t=null==i?void 0:i.chunkIds)||void 0===t?void 0:t.length)>0?[4,p(i.text,"Notable Quotes",i.chunkIds,0)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:return e=n.sent(),console.error("Failed to highlight quote:",e),[3,4];case 4:return[2]}}))}))}},{children:[r("p",e({style:c.quoteText},{children:null==i?void 0:i.text})),o("p",e({style:c.quoteMeta},{children:[i.chapter," ",r("br",{})," ",i.page]})),o("p",e({style:c.quoteAuthor},{children:["— ",null==i?void 0:i.author]}))]}),a)}))}),r("div",e({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!w&&r(a,{disabled:T,count:L,page:v,onChange:function(e,t){return b(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),o("div",e({style:c.geoLocationsContainer},{children:[r("p",e({style:c.sectionTitle},{children:"Key Geo Locations"})),o("div",e({style:e(e({},c.quotesPadding),{marginBottom:"8px"})},{children:[Z?r("div",e({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(e){return r(d,{variant:"rect",width:100,height:20,style:{borderRadius:"8px"}},e)}))})):0===Q.length?o("p",e({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key geo locations found. ",r("button",e({style:c.retryButton,onClick:function(){return de({endpoint:"geo-locations",page:U,isbn:h,setData:O,setLoading:$,setHasMore:ne,setTotalPage:ie})}},{children:"Retry"}))]})):r(i,{children:Q.map((function(i,a){var l="geo_location"===le.list&&le.page===U&&le.index===a;return o("span",e({style:c.geoLocationFlex},{children:[r("span",e({style:e(e({},c.geoText),{fontWeight:l?"700":"",textDecoration:l?"underline":""}),onClick:function(){return t(void 0,void 0,void 0,(function(){var e,t;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),se({list:"geo_location",page:U,index:a}),(null===(t=null==i?void 0:i.chunkIds)||void 0===t?void 0:t.length)>0?[4,p(i.name,"Key Geo Locations",i.chunkIds,0)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:return e=n.sent(),console.error("Failed to highlight location:",e),[3,4];case 4:return[2]}}))}))},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:null==i?void 0:i.name})),a<Q.length-1&&r("span",{style:c.geoDivider})]}),a)}))}),r("div",e({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!te&&r(a,{disabled:Z,count:re,page:U,onChange:function(e,t){return V(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),o("div",e({style:c.charactersContainer},{children:[r("p",e({style:c.sectionTitle},{children:"Key Characters"})),I?r("div",e({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(t){return o("div",e({style:e(e({},c.characterCard),{flexBasis:"40%"})},{children:[r(d,{variant:"circle",style:e(e({},c.avatar),{flexShrink:0})}),o("div",e({style:{display:"flex",flexDirection:"column",flex:1}},{children:[r(d,{variant:"text",style:{flex:"1",flexShrink:0}}),r(d,{variant:"text",style:{flex:"1"}}),r(d,{variant:"text",style:{flex:"1"}}),r(d,{variant:"text",style:{flex:"1"}})]}))]}),t)}))})):0===j.length?o("p",e({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key characters found. ",r("button",e({style:c.retryButton,onClick:function(){return de({endpoint:"notable-characters",page:P,isbn:h,setData:F,setLoading:z,setHasMore:N,setTotalPage:K})}},{children:"Retry"}))]})):r(i,{children:r("div",e({style:c.charactersGrid},{children:j.map((function(i,a){var l=e(e({},c.avatar),{backgroundColor:i.bg,color:i.color}),s="key_character"===le.list&&le.page===P&&le.index===a;return o("div",e({onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},style:e(e({},c.characterCard),{borderColor:s?"rgb(83, 43, 237)":"#E5E7EB"}),onClick:function(){return t(void 0,void 0,void 0,(function(){var e,t;return n(this,(function(n){switch(n.label){case 0:se({list:"key_character",page:P,index:a}),n.label=1;case 1:return n.trys.push([1,4,,5]),(null===(t=null==i?void 0:i.chunkIds)||void 0===t?void 0:t.length)>0?[4,p(i.name,"Key Characters",i.chunkIds,0)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[3,5];case 4:return e=n.sent(),console.error("Failed to highlight character:",e),[3,5];case 5:return[2]}}))}))}},{children:[r("div",e({style:l},{children:i.initials})),o("div",e({style:{display:"flex",flexDirection:"column"}},{children:[r("p",e({style:e(e({},c.charName),{margin:0})},{children:i.name})),r("p",e({style:e(e({},c.charDesc),{margin:0,marginTop:"4px"})},{children:i.description}))]}))]}),a)}))}))}),r("div",e({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!H&&r(a,{count:A,disabled:I,page:P,onChange:function(e,t){return W(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})};export{u as default};
|
|
1
|
+
import{__assign as e,__awaiter as t,__rest as n,__generator as o}from"../../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as r,jsx as i,Fragment as a}from"react/jsx-runtime";import l from"../../../node_modules/@material-ui/lab/esm/Pagination/Pagination.js";import"../../../node_modules/@material-ui/utils/esm/elementAcceptingRef.js";import"../../../node_modules/@material-ui/utils/esm/elementTypeAcceptingRef.js";import"../../../_virtual/index.js";import"../../../node_modules/@material-ui/utils/esm/ponyfillGlobal.js";import"../../../node_modules/@material-ui/utils/esm/refType.js";import{useState as s,useEffect as d}from"react";import"../../../node_modules/@material-ui/core/esm/SvgIcon/SvgIcon.js";import"react-dom";import c from"../../../node_modules/@material-ui/lab/esm/Skeleton/Skeleton.js";import{ReactMarkdown as u}from"../../../node_modules/react-markdown/lib/react-markdown.js";var p={sectionTitle:{fontSize:"14px",fontWeight:600,color:"#667085",marginBottom:"12px"},quotesPadding:{paddingLeft:"12px"},quoteCard:{border:"1px solid #CBD5E1",borderRadius:"8px",padding:"16px",backgroundColor:"#F8FAFC",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",marginBottom:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},quoteText:{fontStyle:"italic",color:"#475569",fontSize:"14px",fontWeight:400,marginBottom:"12px"},quoteMeta:{color:"#475569",fontSize:"12px",fontWeight:400},quoteAuthor:{fontSize:"10px",fontWeight:600,color:"#475569",marginTop:"8px",marginBottom:"18px"},button:{color:"#5928ED",fontSize:"14px",fontWeight:600,background:"none",border:"none",cursor:"pointer",padding:0,textDecoration:"none",paddingLeft:"12px"},geoLocationsContainer:{marginTop:"24px",marginBottom:"24px"},geoText:{fontSize:"14px",fontWeight:500,cursor:"pointer",color:"#532BED"},geoDivider:{margin:"0 8px",color:"#475abb",backgroundColor:"#475abb",width:"1px",height:"18px",display:"inline-block"},geoLocationFlex:{display:"inline-flex",alignItems:"center",gap:"8px",marginBottom:"8px"},charactersContainer:{marginTop:"16px"},charactersGrid:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"16px",marginBottom:"16px",paddingLeft:"12px"},characterCard:{border:"1px solid #E5E7EB",borderRadius:"8px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",display:"flex",alignItems:"flex-start",gap:"12px",padding:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},avatar:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"9999px",fontSize:"14px",fontWeight:600,flexShrink:0},charName:{fontStyle:"normal",fontWeight:600,color:"#101827",fontSize:"16px"},charDesc:{fontStyle:"normal",fontWeight:400,fontSize:"14px",color:"#6B7280"},retryButton:{backgroundColor:"#5928EC",color:"#fff",padding:"6px 10px",border:"none",borderRadius:"6px",cursor:"pointer",fontSize:"12px",fontWeight:"500"}},g=function(g){g.data;var h=g.updateQuotesToHighLight,x=g.handleFetchManuscriptElements,f=g.BookIsbn,m=s([]),y=m[0],v=m[1],b=s(1),C=b[0],T=b[1],k=s(!1),S=k[0],w=k[1],B=s(!0),D=B[0],L=B[1],j=s(0),q=j[0],M=j[1],F=s([]),E=F[0],P=F[1],_=s(1),W=_[0],I=_[1],z=s(!1),R=z[0],H=z[1],N=s(!0),G=N[0],A=N[1],K=s(0),Y=K[0],Q=K[1],O=s([]),J=O[0],U=O[1],V=s(1),X=V[0],Z=V[1],$=s(!1),ee=$[0],te=$[1],ne=s(!0),oe=ne[0],re=ne[1],ie=s(0),ae=ie[0],le=ie[1],se=s({list:"",index:-1,page:1}),de=se[0],ce=se[1],ue=function(e){var n=e.endpoint,r=e.page,i=e.isbn,a=e.setData,l=e.setLoading,s=e.setHasMore,d=e.setTotalPage;return t(void 0,void 0,void 0,(function(){var e,t,c,u;return o(this,(function(o){switch(o.label){case 0:return l(!0),[4,x({endpoint:n,page:r,pageSize:10,isbn:i})];case 1:return e=o.sent(),s(!(null===(t=null==e?void 0:e.pagination)||void 0===t?void 0:t.hasNext)&&!(null===(c=null==e?void 0:e.pagination)||void 0===c?void 0:c.hasPrevious)),d((null===(u=null==e?void 0:e.pagination)||void 0===u?void 0:u.totalPages)||0),a((null==e?void 0:e.data)||[]),l(!1),[2]}}))}))};return d((function(){ue({endpoint:"notable-quotes",page:C,isbn:f,setData:v,setLoading:w,setHasMore:L,setTotalPage:M})}),[C]),d((function(){ue({endpoint:"notable-characters",page:W,isbn:f,setData:P,setLoading:H,setHasMore:A,setTotalPage:Q})}),[W]),d((function(){ue({endpoint:"geo-locations",page:X,isbn:f,setData:U,setLoading:te,setHasMore:re,setTotalPage:le})}),[X]),r("div",{children:[r("div",e({style:{marginBottom:"24px"}},{children:[i("p",e({style:p.sectionTitle},{children:"Notable Quotes"})),r("div",e({style:p.quotesPadding},{children:[S?i("div",e({style:{display:"flex",flexDirection:"column",rowGap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(t){return r("div",e({style:p.quoteCard},{children:[i(c,{variant:"text",width:"60%",height:28}),i(c,{variant:"text",width:"40%",height:20}),i(c,{variant:"text",width:"25%",height:20}),i(c,{variant:"text",width:"30%",height:20})]}),t)}))})):0===y.length?r("p",e({style:{color:"#6B7280",fontStyle:"italic"}},{children:["No notable quotes found. ",i("button",e({style:p.retryButton,onClick:function(){return ue({endpoint:"notable-quotes",page:C,isbn:f,setData:v,setLoading:w,setHasMore:L,setTotalPage:M})}},{children:"Retry"}))]})):i(a,{children:y.map((function(n,a){var l="notable"===de.list&&de.page===C&&de.index===a;return r("div",e({style:e(e({},p.quoteCard),{borderColor:l?"rgb(83, 43, 237)":"#CBD5E1"}),onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},onClick:function(){return t(void 0,void 0,void 0,(function(){var e,t;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),ce({list:"notable",page:C,index:a}),(null===(t=null==n?void 0:n.chunkIds)||void 0===t?void 0:t.length)>0?[4,h(n.text,"Notable Quotes",n.chunkIds,0)]:[3,2];case 1:o.sent(),o.label=2;case 2:return[3,4];case 3:return e=o.sent(),console.error("Failed to highlight quote:",e),[3,4];case 4:return[2]}}))}))}},{children:[i("p",e({style:p.quoteText},{children:null==n?void 0:n.text})),r("p",e({style:p.quoteMeta},{children:[n.chapter," ",i("br",{})," ",n.page]})),r("p",e({style:p.quoteAuthor},{children:["— ",null==n?void 0:n.author]}))]}),a)}))}),i("div",e({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!D&&i(l,{disabled:S,count:q,page:C,onChange:function(e,t){return T(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),r("div",e({style:p.geoLocationsContainer},{children:[i("p",e({style:p.sectionTitle},{children:"Key Geo Locations"})),r("div",e({style:e(e({},p.quotesPadding),{marginBottom:"8px"})},{children:[ee?i("div",e({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(e){return i(c,{variant:"rect",width:100,height:20,style:{borderRadius:"8px"}},e)}))})):0===J.length?r("p",e({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key geo locations found. ",i("button",e({style:p.retryButton,onClick:function(){return ue({endpoint:"geo-locations",page:X,isbn:f,setData:U,setLoading:te,setHasMore:re,setTotalPage:le})}},{children:"Retry"}))]})):i(a,{children:J.map((function(n,a){var l="geo_location"===de.list&&de.page===X&&de.index===a;return r("span",e({style:p.geoLocationFlex},{children:[i("span",e({style:e(e({},p.geoText),{fontWeight:l?"700":"",textDecoration:l?"underline":""}),onClick:function(){return t(void 0,void 0,void 0,(function(){var e,t;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),ce({list:"geo_location",page:X,index:a}),(null===(t=null==n?void 0:n.chunkIds)||void 0===t?void 0:t.length)>0?[4,h(n.name,"Key Geo Locations",n.chunkIds,0)]:[3,2];case 1:o.sent(),o.label=2;case 2:return[3,4];case 3:return e=o.sent(),console.error("Failed to highlight location:",e),[3,4];case 4:return[2]}}))}))},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:null==n?void 0:n.name})),a<J.length-1&&i("span",{style:p.geoDivider})]}),a)}))}),i("div",e({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!oe&&i(l,{disabled:ee,count:ae,page:X,onChange:function(e,t){return Z(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),r("div",e({style:p.charactersContainer},{children:[i("p",e({style:p.sectionTitle},{children:"Key Characters"})),R?i("div",e({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(t){return r("div",e({style:e(e({},p.characterCard),{flexBasis:"40%"})},{children:[i(c,{variant:"circle",style:e(e({},p.avatar),{flexShrink:0})}),r("div",e({style:{display:"flex",flexDirection:"column",flex:1}},{children:[i(c,{variant:"text",style:{flex:"1",flexShrink:0}}),i(c,{variant:"text",style:{flex:"1"}}),i(c,{variant:"text",style:{flex:"1"}}),i(c,{variant:"text",style:{flex:"1"}})]}))]}),t)}))})):0===E.length?r("p",e({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key characters found. ",i("button",e({style:p.retryButton,onClick:function(){return ue({endpoint:"notable-characters",page:W,isbn:f,setData:P,setLoading:H,setHasMore:A,setTotalPage:Q})}},{children:"Retry"}))]})):i(a,{children:i("div",e({style:p.charactersGrid},{children:E.map((function(a,l){var s=e(e({},p.avatar),{backgroundColor:a.bg,color:a.color}),d="key_character"===de.list&&de.page===W&&de.index===l;return r("div",e({onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},style:e(e({},p.characterCard),{borderColor:d?"rgb(83, 43, 237)":"#E5E7EB"}),onClick:function(){return t(void 0,void 0,void 0,(function(){var e,t;return o(this,(function(n){switch(n.label){case 0:ce({list:"key_character",page:W,index:l}),n.label=1;case 1:return n.trys.push([1,4,,5]),(null===(t=null==a?void 0:a.chunkIds)||void 0===t?void 0:t.length)>0?[4,h(a.name,"Key Characters",a.chunkIds,0)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[3,5];case 4:return e=n.sent(),console.error("Failed to highlight character:",e),[3,5];case 5:return[2]}}))}))}},{children:[i("div",e({style:s},{children:a.initials})),r("div",e({style:{display:"flex",flexDirection:"column"}},{children:[i("p",e({style:e(e({},p.charName),{margin:0})},{children:a.name})),r("p",e({style:e(e({},p.charDesc),{margin:0,marginTop:"4px"})},{children:["=",i(u,e({components:{p:function(t){t.node;var o=n(t,["node"]);return i("p",e({style:{marginTop:"0"}},o))}}},{children:null==a?void 0:a.description}))]}))]}))]}),l)}))}))}),i("div",e({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!G&&i(l,{count:Y,disabled:R,page:W,onChange:function(e,t){return I(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})};export{g as default};
|
|
2
2
|
//# sourceMappingURL=BookElementsCard.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"../../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useState as i,useEffect as n}from"react";import r from"../../../_virtual/Close.js";import l from"../../../_virtual/ArrowBack.js";import a from"../../BookCitation/BookCitation.js";import{comingSoonStyles as d,defaultIcon as c}from"../Bookemon.js";import s from"../../../node_modules/@material-ui/core/esm/Switch/Switch.js";import p from"../../../node_modules/@material-ui/core/esm/Tooltip/Tooltip.js";var
|
|
1
|
+
import{__assign as e}from"../../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useState as i,useEffect as n}from"react";import r from"../../../_virtual/Close.js";import l from"../../../_virtual/ArrowBack.js";import a from"../../BookCitation/BookCitation.js";import{comingSoonStyles as d,defaultIcon as c}from"../Bookemon.js";import s from"../../../node_modules/@material-ui/core/esm/Switch/Switch.js";import p from"../../../node_modules/@material-ui/core/esm/Tooltip/Tooltip.js";var h=function(h){var u=h.bookOverView,g=h.bookCoverImage,f=h.onClose,m=h.customStyle,x=h.quotesToHighLightData,v=h.updateQuotesToHighLight,y=h.citationLoad,b=h.clickableElementCategory,k=void 0===b?"":b,C=h.comingSoonData,w=h.isNonHighlightedBlur,B=void 0!==w&&w,S=h.isBlurToggleVisible,I=void 0!==S&&S,T=h.noHtmlContent,j=void 0!==T&&T,W=h.isBookemon,L=void 0===W||W,H=i(!1),P=H[0],F=H[1],z=i(!0),D=z[0],O=z[1],R=!!x.textToHighLight&&!!x.content,A={header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px"},headerLeft:{display:"flex",alignItems:"center",gap:"8px"},closeButton:{padding:"4px",borderRadius:"4px",cursor:"pointer",backgroundColor:"transparent"},flexCenter:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},coverContainer:{width:"100%",maxWidth:"300px",borderRadius:"12px",padding:"4px",background:"linear-gradient(135deg, #34D399, #3B82F6, #10B981)",position:"relative",overflow:"hidden",boxShadow:"0 10px 25px rgba(0,0,0,0.3)",marginBottom:"24px"},bookCoverStyle:{width:"100%",height:"auto",objectFit:"contain",borderRadius:"12px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},loadingStyle:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},rightPanel:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},clickableElementCategory:{fontSize:"20px",fontWeight:600},previewWrapper:{flex:1,width:"80%",margin:"0 auto",display:"flex",flexDirection:"column",overflow:"hidden",justifyContent:"flex-start",alignItems:"center"},coverImagePreview:{display:"flex",justifyContent:"center",alignItems:"center",aspectRatio:"7 / 10",background:"",padding:0},toggleBlurContainer:{display:"flex",alignItems:"center",gap:"20px"},bookCoverPlaceholder:{width:"100%",height:"calc(100% - 8px)",background:"linear-gradient(to bottom, #22c55e, #14532d)",borderRadius:"4px",padding:"4px",color:"white",fontSize:"10px",display:"flex",justifyContent:"center",alignItems:"center"},bookCoverInner:{border:"1px solid white",padding:"4px",width:"calc(100% - 26px)",height:"calc(100% - 26px)",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",justifyContent:"space-around"},bookTitle:{fontWeight:800,fontSize:"1.5rem",textTransform:"uppercase",letterSpacing:"0.5px",lineHeight:1.2,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",padding:"0 8px"},bookAuthor:{fontSize:"1rem",fontWeight:500,opacity:.9,marginTop:"8px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"}};return n((function(){O(!0),console.log(y,"citationLoad")}),[y]),t("div",e({style:e(e({},A.rightPanel),(null==m?void 0:m.rightPanel)||{})},{children:[t("div",e({style:A.header},{children:[t("div",e({style:A.headerLeft},{children:[(R||j)&&o("button",e({style:A.closeButton,onClick:function(){return v("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:o(l,{})})),o("h2",e({style:A.clickableElementCategory},{children:k}))]})),t("div",e({style:A.toggleBlurContainer},{children:[R&&I&&t("div",e({style:{display:"flex",alignItems:"center",gap:"2px"}},{children:[o(s,{checked:D,onChange:function(e){O(e.target.checked),console.log(e.target.checked,"event.target.checked")},color:"primary",size:"small"}),t("span",e({style:{fontSize:"0.75rem",display:"flex",alignItems:"center",gap:"4px"}},{children:["Blur",o(p,e({title:"Blur Text is enabled by default. Non-highlighted parts of the text will appear blurred to help you focus on the highlighted content. You can turn this off if you want to see all text clearly."},{children:o("span",e({style:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:"14px",height:"14px",borderRadius:"50%",backgroundColor:"#485468",color:"#fff",fontSize:"10px",fontWeight:"bold",cursor:"pointer",lineHeight:"14px",userSelect:"none"}},{children:"i"}))}))]}))]})),o("button",e({style:A.closeButton,onClick:function(){f(),v("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:o(r,{})}))]}))]})),o("div",e({style:e(e({},A.previewWrapper),null==m?void 0:m.previewWrapper)},{children:R?o(a,{citationNumber:1,defaultState:!0,partialMatch:!0,fixedWidth:!1,citationTitle:"Sample Citation",title:"Sample Title",paragraphs:[null==x?void 0:x.content],textToHighlight:[null==x?void 0:x.textToHighLight],externalLinkComponent:"",bookCoverImage:g,customStyle:null==m?void 0:m.citationCustomStyle,isNonHighlightedBlur:B,isBookemon:L,toggleBlur:D}):y||j?t("div",e({style:A.loadingStyle},{children:[o("div",e({style:d.iconWrapper},{children:(null==C?void 0:C.icon)||c})),t("p",e({style:d.text},j?{children:["No data found matching the selected ",k.toLowerCase()]}:{children:["fetching ",k.toLowerCase(),"...."]}))]})):o("div",e({style:A.flexCenter},{children:o("div",e({style:e(e({},A.coverContainer),P||!g?e(e({},A.coverImagePreview),null==m?void 0:m.coverImagePreview):{})},{children:g&&!P?o("img",{onError:function(){return F(!0)},style:A.bookCoverStyle,src:g,alt:"Book Cover Image"}):o("div",e({style:A.bookCoverPlaceholder},{children:t("div",e({style:A.bookCoverInner},{children:[o("div",e({style:A.bookTitle},{children:(null==u?void 0:u.title)||"Unknown Title"})),o("div",e({style:A.bookAuthor},{children:(null==u?void 0:u.author)||"Unknown Author"}))]}))}))}))}))}))]}))};export{h as default};
|
|
2
2
|
//# sourceMappingURL=BookPreview.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__awaiter as o,__generator as t}from"../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as i,jsxs as r,Fragment as n}from"react/jsx-runtime";import{useState as l,useRef as a}from"react";import d from"../../node_modules/@material-ui/core/esm/Accordion/Accordion.js";import s from"../../node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js";import c from"../../_virtual/ExpandMore.js";import h from"../../_virtual/Close.js";import{PanelGroup as
|
|
1
|
+
import{__assign as e,__awaiter as o,__generator as t}from"../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as i,jsxs as r,Fragment as n}from"react/jsx-runtime";import{useState as l,useRef as a}from"react";import d from"../../node_modules/@material-ui/core/esm/Accordion/Accordion.js";import s from"../../node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js";import c from"../../_virtual/ExpandMore.js";import h from"../../_virtual/Close.js";import{PanelGroup as g,Panel as p,PanelResizeHandle as m}from"../../node_modules/react-resizable-panels/dist/react-resizable-panels.browser.js";import u from"./BookDetailsCard/BookDetailsCard.js";import f from"./BookOverviewCard/BookOverviewCard.js";import y from"./BookElementsCard/BookElementsCard.js";import b from"./BookCopyrightsCard/BookCopyrightsCard.js";import v from"./BookPeopleAwardsCard/BookPeopleAwardsCard.js";import x from"./BookPreview/BookPreview.js";import k from"../../node_modules/@material-ui/core/esm/Dialog/Dialog.js";import C from"../../node_modules/@material-ui/core/esm/DialogContent/DialogContent.js";import B from"../../node_modules/@material-ui/core/esm/Typography/Typography.js";import w from"../../node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js";import j from"../../node_modules/@material-ui/core/esm/IconButton/IconButton.js";var F={dialogPaper:{maxWidth:"none",fontFamily:"Inter, sans-serif"},dialogContent:{padding:0,backgroundColor:"#FFFFFF",overflow:"hidden",height:"90vh",position:"relative"},container:{display:"flex",height:"100%",width:"100%",alignItems:"flex-start"},leftPanel:{height:"100%",padding:"24px",overflowY:"auto",backgroundColor:"#F3F4F6",borderRadius:"12px",boxSizing:"border-box"},rightPanel:{width:"40%",backgroundColor:"#FFFFFF",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",overflow:"auto",flex:1,boxSizing:"border-box",overflowY:"auto"},accordion:{borderRadius:"12px",boxShadow:"none",marginBottom:"24px"},accordionSummary:{paddingLeft:"16px",paddingRight:"16px"},accordionDetails:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px"},heading:{fontWeight:"bold",color:"#000000",fontSize:"16px"},blurOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",backgroundColor:"rgba(255, 255, 255, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,borderRadius:"12px"},closeButton:{position:"absolute",top:"8px",right:"8px",color:"#111827"},resizeHandle:{width:"10px",backgroundColor:"#e5e7eb",cursor:"col-resize",display:"flex",alignItems:"center",justifyContent:"center"},iconContainer:{display:"flex",flexDirection:"column",gap:"4px"},dot:{width:"4px",height:"4px",backgroundColor:"#6b7280",borderRadius:"50%"},resizeHandleBar:{width:"2px",height:"24px",backgroundColor:"#666",borderRadius:"2px"}},S={wrapper:{alignItems:"center",justifyContent:"center",textAlign:"center"},inner:{width:"100%"},iconWrapper:{width:"80px",height:"80px",background:"linear-gradient(to right, #3B82F6, #9333EA)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px auto"},icon:{width:"40px",height:"40px",color:"#FFFFFF"},heading:{fontSize:"36px",fontWeight:"bold",color:"#9333EA",marginBottom:"16px"},text:{fontSize:"18px",color:"#4B5563",lineHeight:1.6,textAlign:"center"},errorState:{color:"#CE3928",padding:"18px 0px",display:"flex",justifyContent:"center",width:"100%"}},D=i("svg",e({style:S.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},{children:i("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})),z=function(o){var t=o.header,n=o.subheader,l=o.icon;return i("div",e({style:S.wrapper},{children:r("div",e({style:S.inner},{children:[i("div",e({style:{marginBottom:"32px"}},{children:i("div",e({style:S.iconWrapper},{children:l||D}))})),r("div",{children:[i("h1",e({style:S.heading},{children:t})),i("p",e({style:S.text},{children:n}))]})]}))}))},P=function(S){var P=S.open,A=S.onClose,I=S.isNonHighlightedBlur,E=S.isBookemon,H=S.getHighlightContent,L=S.handleFetchManuscriptElements,O=S.data,_=S.showComingSoon,T=void 0!==_&&_,M=S.comingSoonData,R=void 0===M?{header:"Bookemon Coming Soon!!",subheader:"We're working on something amazing. Stay tuned for updates!",icon:D}:M,W=S.customStyle,N=void 0===W?{}:W,V=S.isBlurToggleVisible,Q=void 0!==V&&V,Y=l({textToHighLight:"",content:""}),q=Y[0],G=Y[1],J=l(1),K=J[0],U=J[1],X=l(!1),Z=X[0],$=X[1],ee=l("Book Preview"),oe=ee[0],te=ee[1],ie=l(70),re=ie[0],ne=ie[1],le=a(null),ae=l(!1),de=ae[0],se=ae[1],ce=function(e,i,r,n){return void 0===n&&(n=0),o(void 0,void 0,void 0,(function(){var o,l,a,d,s,c,h,g,p,m,u,f,y,b,v,x,k,C,B,w,j,F,S,D,z,P,A,I,E,L,O,_,T,M;return t(this,(function(t){switch(t.label){case 0:G({textToHighLight:"",content:""}),se(!1),$(!0),te(i),t.label=1;case 1:return t.trys.push([1,4,5,6]),r&&0!==r.length?[4,H([r[n]])]:($(!1),ne(70),null===(T=le.current)||void 0===T||T.resize(70),[2]);case 2:if(o=t.sent(),l=(null==o?void 0:o.data)||o||[],!Array.isArray(l)||0===l.length)return se(!0),$(!1),[2];for(d=(a=function(e){return e?e.replace(/<[^>]*>/g," ").replace(/ /g," ").replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(e),s=d.split(" ").filter(Boolean),c=[],h=0;h<s.length;h++)for(g=s.length;g>h;g--)c.push(s.slice(h,g).join(" "));for(p=null,m=0,u=c;m<u.length;m++){for(j=u[m],f=0,y=l;f<y.length;f++)if(A=y[f],(I=a(A.normalizedContent||A.htmlContent))===j){p=A;break}if(p)break}if(!p)for(b=0,v=c;b<v.length;b++){for(j=v[b],x=new RegExp("\\b".concat(j,"\\b"),"i"),k=0,C=l;k<C.length;k++)if(A=C[k],I=a(A.normalizedContent||A.htmlContent),x.test(I)){p=A;break}if(p)break}if(!p)for(B=0,w=c;B<w.length;B++)if(j=w[B],!((F=j.split(" ")).length<2)){for(S=F[0],D=F[F.length-1],z=0,P=l;z<P.length;z++)if(A=P[z],I=a(A.normalizedContent||A.htmlContent),E=I.indexOf(S),L=I.indexOf(D),-1!==E&&-1!==L&&Math.abs(L-E)<40){p=A;break}if(p)break}return O=l.map((function(e){return e.htmlContent})).join("\n"),p?(G({textToHighLight:p.htmlContent,content:O}),ne(50),null===(M=le.current)||void 0===M||M.resize(50),$(!1),[2]):n+1>=r.length?(se(!0),$(!1),[2]):[4,ce(e,i,r,n+1)];case 3:return[2,t.sent()];case 4:return _=t.sent(),console.error("Highlight error:",_),se(!0),[3,6];case 5:return $(!1),[7];case 6:return[2]}}))}))},he=O.bookAwards,ge=O.bookCopyRight,pe=O.bookDetails,me=O.bookElements,ue=O.bookOverView,fe=O.bookCoverImage,ye=null==pe?void 0:pe.isbn;return i(k,e({open:P,fullWidth:!0,PaperProps:{style:e(e({},null==F?void 0:F.dialogPaper),null==N?void 0:N.dialogDimension)}},{children:r(C,e({style:F.dialogContent},{children:[!T&&i("div",e({style:F.container},{children:r(g,e({direction:"horizontal"},{children:[i(p,e({order:1,ref:le,defaultSize:re||70},{children:r("div",e({style:e(e({},null==F?void 0:F.leftPanel),null==N?void 0:N.leftPanel)},{children:[i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({defaultExpanded:!0,elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"Book Overview"}))})),i(w,e({style:F.accordionDetails},{children:ue&&Object.keys(ue).length>0?i(f,{data:ue}):i("div",e({style:F.errorState},{children:"No overview data available."}))}))]}))})),i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"Book Manuscript Elements"}))})),i(w,e({style:F.accordionDetails},{children:i(y,{data:me,handleFetchManuscriptElements:L,BookIsbn:ye,updateQuotesToHighLight:ce})}))]}))})),i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"Book Metadata Details"}))})),i(w,e({style:F.accordionDetails},{children:pe&&Object.keys(pe).length>0?i(u,{data:pe}):i("div",e({style:F.errorState},{children:"No Book Metadata data available."}))}))]}))})),i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"Copyrights & Marketing"}))})),i(w,e({style:F.accordionDetails},{children:ge&&Object.keys(ge).length>0?i(b,{data:ge}):i("div",e({style:F.errorState},{children:"No Copyrights & Marketing data available."}))}))]}))})),i("div",{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"People & Awards"}))})),i(w,e({style:F.accordionDetails},{children:he&&Object.keys(he).length>0?i(v,{data:he}):i("div",e({style:F.errorState},{children:"No People & Awards data available."}))}))]}))})]}))})),i(m,{style:{width:"3px",background:"#D1D5DC",cursor:"col-resize"}}),i(p,e({order:2,minSize:30,maxSize:50,style:{overflow:"visible",position:"relative",transition:"all 300ms ease-in-out",WebkitTransition:"all 300ms ease-in-out"}},{children:i(x,{bookOverView:ue,bookCoverImage:fe,onClose:A,clickableElementCategory:oe,quotesToHighLightData:q,updateQuotesToHighLight:ce,citationLoad:Z,previewPage:K,setPreviewPage:U,customStyle:N,comingSoonData:R,isNonHighlightedBlur:I,isBlurToggleVisible:Q,isBookemon:E,noHtmlContent:de})}))]}))})),T?r("div",e({style:F.blurOverlay},{children:[i(j,e({style:F.closeButton,onClick:A},{children:i(h,{})})),i(z,{header:R.header,subheader:R.subheader,icon:R.icon})]})):i(n,{})]}))}))};export{S as comingSoonStyles,P as default,D as defaultIcon};
|
|
2
2
|
//# sourceMappingURL=Bookemon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookemonTest.d.ts","sourceRoot":"","sources":["../../../src/BookemonTest.tsx"],"names":[],"mappings":"AAIA,QAAA,MAAM,YAAY,+
|
|
1
|
+
{"version":3,"file":"BookemonTest.d.ts","sourceRoot":"","sources":["../../../src/BookemonTest.tsx"],"names":[],"mappings":"AAIA,QAAA,MAAM,YAAY,+CAyiBjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -32,6 +32,8 @@ interface CitationLinkProps {
|
|
|
32
32
|
defaultState?: boolean;
|
|
33
33
|
isNonHighlightedBlur?: boolean;
|
|
34
34
|
toggleBlur?: boolean;
|
|
35
|
+
fixedWidth?: boolean;
|
|
36
|
+
isBookemon?: boolean;
|
|
35
37
|
}
|
|
36
38
|
declare const BookCitation: React.FC<CitationLinkProps>;
|
|
37
39
|
export default BookCitation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookCitation.d.ts","sourceRoot":"","sources":["../../../../../src/features/BookCitation/BookCitation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAuB,MAAM,OAAO,CAAC;AAIlE,UAAU,iBAAiB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,qBAAqB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxC,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACrC,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,WAAW,CAAC,EAAE;QACZ,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,EAAE,aAAa,CAAC;QAC3B,QAAQ,CAAC,EAAE,aAAa,CAAC;QACzB,SAAS,CAAC,EAAE,aAAa,CAAC;QAC1B,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,mBAAmB,CAAC,EAAE,aAAa,CAAC;QACpC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,oBAAoB,CAAC,EAAE,aAAa,CAAC;QACrC,eAAe,CAAC,EAAE,aAAa,CAAC;KACjC,CAAC;IACF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BookCitation.d.ts","sourceRoot":"","sources":["../../../../../src/features/BookCitation/BookCitation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAuB,MAAM,OAAO,CAAC;AAIlE,UAAU,iBAAiB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,qBAAqB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxC,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACrC,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,WAAW,CAAC,EAAE;QACZ,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,EAAE,aAAa,CAAC;QAC3B,QAAQ,CAAC,EAAE,aAAa,CAAC;QACzB,SAAS,CAAC,EAAE,aAAa,CAAC;QAC1B,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,mBAAmB,CAAC,EAAE,aAAa,CAAC;QACpC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,oBAAoB,CAAC,EAAE,aAAa,CAAC;QACrC,eAAe,CAAC,EAAE,aAAa,CAAC;KACjC,CAAC;IACF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAka7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookElementsCard.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookElementsCard/BookElementsCard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BookElementsCard.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookElementsCard/BookElementsCard.tsx"],"names":[],"mappings":"AA8IA,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAG,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAG,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAG,MAAM,EAAE,CAAC;IACpB,IAAI,EAAG,MAAM,CAAA;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,EAAE,eAAe,EAAE,CAAC;IAChC,UAAU,EAAE,UAAU,EAAE,CAAC;CAC1B;AAED,UAAU,qBAAqB;IAC7B,IAAI,EAAE,iBAAiB,CAAC;IACxB,uBAAuB,EAAE,CAAC,eAAe,EAAE,MAAM,EAAC,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAM,EAAE,EAAE,YAAY,EAAG,MAAM,KAAK,IAAI,CAAC;IACnH,6BAA6B,EAAE,CAAC,EAC/B,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,IAAI,GACL,EAAE;QACD,QAAQ,EAAE,GAAG,CAAC;QACd,IAAI,EAAE,GAAG,CAAC;QACV,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG,CAAC;KACX,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACnB,QAAQ,EAAG,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,gBAAgB,+EAKnB,qBAAqB,4CAuYvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookPreview.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookPreview/BookPreview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAA+B,MAAM,OAAO,CAAC;AAI1E,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,mBAAmB,CAAC;AAM3B,UAAU,gBAAgB;IACxB,YAAY,EAAE,aAAa,CAAA;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,qBAAqB,EAAE;QACrB,eAAe,EAAE,MAAM,CAAC;QACxB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,YAAY,EAAE,OAAO,CAAC;IACtB,uBAAuB,EAAE,CAAC,eAAe,EAAE,MAAM,EAC/C,wBAAwB,EAAE,MAAM,EAChC,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE;QACZ,mBAAmB,CAAC,EAAE;YACpB,qBAAqB,CAAC,EAAE,aAAa,CAAC;YACtC,KAAK,CAAC,EAAE,aAAa,CAAC;YACtB,cAAc,CAAC,EAAE,aAAa,CAAC;YAC/B,iBAAiB,CAAC,EAAE,aAAa,CAAC;YAClC,UAAU,CAAC,EAAE,aAAa,CAAC;YAC3B,QAAQ,CAAC,EAAE,aAAa,CAAC;YACzB,SAAS,CAAC,EAAE,aAAa,CAAC;YAC1B,eAAe,CAAC,EAAE,aAAa,CAAC;YAChC,eAAe,CAAC,EAAE,aAAa,CAAC;YAChC,mBAAmB,CAAC,EAAE,aAAa,CAAC;YACpC,eAAe,CAAC,EAAE,aAAa,CAAC;YAChC,oBAAoB,CAAC,EAAE,aAAa,CAAC;YACrC,eAAe,CAAC,EAAE,aAAa,CAAC;SACjC,CAAA;QACD,eAAe,CAAC,EAAE,aAAa,CAAA;QAC/B,SAAS,CAAC,EAAE,aAAa,CAAA;QACzB,UAAU,CAAC,EAAE,aAAa,CAAA;QAC1B,cAAc,CAAC,EAAE,aAAa,CAAA;QAC9B,iBAAiB,CAAC,EAAE,aAAa,CAAA;KAClC,CAAA;IACD,cAAc,CAAC,EAAE;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;KACxB,CAAC;IACF,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,EAAE,OAAO,CAAA;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,EAAG,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"BookPreview.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookPreview/BookPreview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAA+B,MAAM,OAAO,CAAC;AAI1E,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,mBAAmB,CAAC;AAM3B,UAAU,gBAAgB;IACxB,YAAY,EAAE,aAAa,CAAA;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,qBAAqB,EAAE;QACrB,eAAe,EAAE,MAAM,CAAC;QACxB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,YAAY,EAAE,OAAO,CAAC;IACtB,uBAAuB,EAAE,CAAC,eAAe,EAAE,MAAM,EAC/C,wBAAwB,EAAE,MAAM,EAChC,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE;QACZ,mBAAmB,CAAC,EAAE;YACpB,qBAAqB,CAAC,EAAE,aAAa,CAAC;YACtC,KAAK,CAAC,EAAE,aAAa,CAAC;YACtB,cAAc,CAAC,EAAE,aAAa,CAAC;YAC/B,iBAAiB,CAAC,EAAE,aAAa,CAAC;YAClC,UAAU,CAAC,EAAE,aAAa,CAAC;YAC3B,QAAQ,CAAC,EAAE,aAAa,CAAC;YACzB,SAAS,CAAC,EAAE,aAAa,CAAC;YAC1B,eAAe,CAAC,EAAE,aAAa,CAAC;YAChC,eAAe,CAAC,EAAE,aAAa,CAAC;YAChC,mBAAmB,CAAC,EAAE,aAAa,CAAC;YACpC,eAAe,CAAC,EAAE,aAAa,CAAC;YAChC,oBAAoB,CAAC,EAAE,aAAa,CAAC;YACrC,eAAe,CAAC,EAAE,aAAa,CAAC;SACjC,CAAA;QACD,eAAe,CAAC,EAAE,aAAa,CAAA;QAC/B,SAAS,CAAC,EAAE,aAAa,CAAA;QACzB,UAAU,CAAC,EAAE,aAAa,CAAA;QAC1B,cAAc,CAAC,EAAE,aAAa,CAAA;QAC9B,iBAAiB,CAAC,EAAE,aAAa,CAAA;KAClC,CAAA;IACD,cAAc,CAAC,EAAE;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;KACxB,CAAC;IACF,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,EAAE,OAAO,CAAA;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,EAAG,OAAO,CAAA;IACvB,UAAU,EAAG,OAAO,CAAA;CACrB;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAsS3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -18,10 +18,11 @@ export interface IComingSoonOverlay {
|
|
|
18
18
|
subheader?: string;
|
|
19
19
|
icon?: React.ReactNode;
|
|
20
20
|
}
|
|
21
|
-
declare const Bookemon: ({ open, onClose, isNonHighlightedBlur, getHighlightContent, handleFetchManuscriptElements, data, showComingSoon, comingSoonData, customStyle, isBlurToggleVisible, }: {
|
|
21
|
+
declare const Bookemon: ({ open, onClose, isNonHighlightedBlur, isBookemon, getHighlightContent, handleFetchManuscriptElements, data, showComingSoon, comingSoonData, customStyle, isBlurToggleVisible, }: {
|
|
22
22
|
open: boolean;
|
|
23
23
|
onClose: () => void;
|
|
24
24
|
isNonHighlightedBlur: boolean;
|
|
25
|
+
isBookemon: boolean;
|
|
25
26
|
isBlurToggleVisible?: boolean | undefined;
|
|
26
27
|
getHighlightContent: (chunkIds: string[]) => Promise<any>;
|
|
27
28
|
handleFetchManuscriptElements: ({ endpoint, page, pageSize, isbn, }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bookemon.d.ts","sourceRoot":"","sources":["../../../../../src/features/Bookemon/Bookemon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,aAAa,EAAU,MAAM,OAAO,CAAC;AAuI/D,eAAO,MAAM,gBAAgB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;CA4C5D,CAAC;AACF,eAAO,MAAM,WAAW,yCAcvB,CAAC;AAyBF,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAKD,QAAA,MAAM,QAAQ;
|
|
1
|
+
{"version":3,"file":"Bookemon.d.ts","sourceRoot":"","sources":["../../../../../src/features/Bookemon/Bookemon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,aAAa,EAAU,MAAM,OAAO,CAAC;AAuI/D,eAAO,MAAM,gBAAgB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;CA4C5D,CAAC;AACF,eAAO,MAAM,WAAW,yCAcvB,CAAC;AAyBF,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAKD,QAAA,MAAM,QAAQ;UAiBN,OAAO;aACJ,MAAM,IAAI;0BACI,OAAO;gBACjB,OAAO;;oCAEY,MAAM,EAAE,KAAK,QAAQ,GAAG,CAAC;;kBAO7C,GAAG;cACP,GAAG;kBACC,MAAM;cACV,GAAG;UACL,QAAQ,GAAG,CAAC;UACZ,GAAG;;;;;eAKA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;6CAqazB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|