@e-llm-studio/requirement-ai 0.0.236 → 0.0.238
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/RequirementAI/components/segment/Segment.js +1 -1
- package/dist/cjs/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.js +1 -1
- package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.module.css.js +1 -1
- package/dist/features/RequirementAI/components/segment/Segment.js +1 -1
- package/dist/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
- package/dist/features/RequirementAI/components/story-screen/CompletionPanel.js +1 -1
- package/dist/features/RequirementAI/components/story-screen/CompletionPanel.module.css.js +1 -1
- package/dist/types/src/RequirementAiTest.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts +2 -0
- package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/segment/SegmentWrapper.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/story-screen/CompletionPanel.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/types/segment.type.d.ts +2 -0
- package/dist/types/src/features/RequirementAI/types/segment.type.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("tslib"),t=require("react/jsx-runtime"),n=require("react"),s=require("lucide-react"),i=require("../../../UserStoryImport/lib/cn.js"),a=require("./segment.module.css.js"),l=require("./deleteSegmentDialog.module.css.js"),o=require("./ExampleComponentWrapper.js"),d=require("../ai-reasoning/AiReasoningCitationContent.js"),r=require("./SegmentLoader.js");require("./segment-common.css.js");var c=require("../../store/markdown-context.js"),u=require("@mui/material/Dialog"),g=require("@mui/material/IconButton"),m=require("./DeleteSegmentsDialog.js"),j=require("@mui/material/Tooltip"),p=require("./EditSegmentDialog.js");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x=b(n),v=b(u),f=b(g),y=b(j);exports.default=({id:u="Segment",label:g,children:j,segmentUUID:b,decisionStrength:h=80,aiReason:O,customStyles:C,customIcons:S,aiReasoningCitationCustomStyles:I,segmentExampleComponent:E,handleViewGlossary:w,isUpdatedSegment:q,onOpen:D,onDelete:k,onEdit:N,customDeleteStyles:B,customDeleteIcons:M})=>{var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),s=require("lucide-react"),i=require("../../../UserStoryImport/lib/cn.js"),a=require("./segment.module.css.js"),l=require("./deleteSegmentDialog.module.css.js"),o=require("./ExampleComponentWrapper.js"),d=require("../ai-reasoning/AiReasoningCitationContent.js"),r=require("./SegmentLoader.js");require("./segment-common.css.js");var c=require("../../store/markdown-context.js"),u=require("@mui/material/Dialog"),g=require("@mui/material/IconButton"),m=require("./DeleteSegmentsDialog.js"),j=require("@mui/material/Tooltip"),p=require("./EditSegmentDialog.js");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x=b(n),v=b(u),f=b(g),y=b(j);exports.default=({id:u="Segment",label:g,children:j,segmentUUID:b,decisionStrength:h=80,aiReason:O,customStyles:C,customIcons:S,aiReasoningCitationCustomStyles:I,segmentExampleComponent:E,handleViewGlossary:w,isUpdatedSegment:q,onOpen:D,onDelete:k,onEdit:N,customDeleteStyles:B,customDeleteIcons:M,enabledSegmentActions:$})=>{var z,A;const{citationsMetadata:L,updateCitationsMetadata:R}=n.useContext(c.MarkdownStateContext),[W,_]=x.default.useState(!1),[U,T]=x.default.useState(!1),[F,G]=x.default.useState(!1),[V,H]=x.default.useState(""),[P,X]=x.default.useState(!1),{prefix:K,inner:J}=n.useMemo(()=>(e=>{const t=e.match(/^(.*?)\s*\{([^}]+)\}\s*$/);return!t||t.length<3?{prefix:"",inner:e}:{prefix:t[1].trim(),inner:t[2].trim()}})(null!=g?g:""),[g]);x.default.useEffect(()=>{F||H(J)},[F,J]);const Q=()=>e.__awaiter(void 0,void 0,void 0,function*(){if(N){const e=V.toLowerCase();yield N(e)}G(!1),X(!1)}),Y=()=>G(!1),Z=(null==M?void 0:M.editIcon)||t.jsx(s.Pencil,{size:14}),ee=(null==M?void 0:M.checkIcon)||t.jsx(s.Check,{size:16,color:"#16A34A"}),te=(null==M?void 0:M.crossIcon)||t.jsx(s.X,{size:16,color:"#DC2626"}),ne=n.useMemo(()=>L.get(b),[L,b]),se=n.useMemo(()=>(null==ne?void 0:ne.open)||!1,[ne]),ie=n.useMemo(()=>ne&&"loading"===ne.state,[ne]),ae=()=>e.__awaiter(void 0,void 0,void 0,function*(){const e=!se;if(_(!1),console.log("citation metadata::",e,O),e&&!(null==O?void 0:O.reason)){R(b,t=>{if(t){const e=Object.assign({},t);return e.state="loading",e}return{open:e,state:"loading"}});try{console.log("citation metadata:: onopen"),yield null==D?void 0:D()}finally{R(b,t=>{if(t){const n=Object.assign({},t);return n.state="ready",n.open=e,n}return{open:e,state:"ready"}})}}else console.log("citation metadata:: else block"),R(b,t=>{if(t){const n=Object.assign({},t);return n.open=e,n}return{open:e,state:ie?"loading":"ready"}})});return t.jsxs("div",Object.assign({className:`segment-wrapper-${u} ${a.default.segmentWrapper}`,style:Object.assign(Object.assign({},null==C?void 0:C.segmentWrapper),{display:"inline-flex",verticalAlign:"middle"})},{children:[t.jsxs("div",Object.assign({className:`segment-${u}-container segmentContainer ${q?"updatedSegmentContainer":""}`,style:Object.assign({},null==C?void 0:C.container)},{children:[t.jsx("span",Object.assign({className:`segment-${u} segmentLabel ${q?"updatedSegmentLabel":""}`,style:Object.assign({},null==C?void 0:C.label)},{children:q?j:g})),t.jsx("button",Object.assign({className:`${a.default.segmentExplanationButtonContainer}`,style:Object.assign({},null==C?void 0:C.buttonContainer),onClick:ae},{children:t.jsx(s.ArrowUpRight,{className:i.cn(q&&a.default.updatedChevronIcon,a.default.cheveronIcon),style:Object.assign({},null==C?void 0:C.cheveronIcon)})}))]})),se&&t.jsx(v.default,Object.assign({open:!0,onClose:ae,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",maxWidth:"xl",container:document.getElementById("#root")},{children:t.jsxs("div",Object.assign({style:{minWidth:"50vw",paddingLeft:16,paddingRight:16,paddingTop:24,paddingBottom:24}},{children:[t.jsxs("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16}},{children:[F?t.jsxs("div",Object.assign({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[K&&t.jsx("span",Object.assign({className:"segmentLabel",style:Object.assign({fontSize:18,fontWeight:600},null==C?void 0:C.label)},{children:K})),t.jsxs("div",Object.assign({className:a.default.editInputWrapper,style:null==C?void 0:C.editInputWrapper},{children:[t.jsx("input",{value:V,onChange:e=>H(e.target.value),className:a.default.editInput,style:Object.assign(Object.assign({},null==C?void 0:C.editInput),{color:(null===(z=null==C?void 0:C.label)||void 0===z?void 0:z.color)?String(C.label.color):"#3B82F6",textTransform:"uppercase"}),autoFocus:!0,onKeyDown:e=>{"Enter"===e.key&&Q(),"Escape"===e.key&&Y()}}),t.jsx(f.default,Object.assign({onClick:()=>{V!==J?(R(b,e=>e?Object.assign(Object.assign({},e),{open:!1}):{open:!1,state:ie?"loading":"ready"}),X(!0)):G(!1)},size:"small",style:null==C?void 0:C.editCheckIcon},{children:ee})),t.jsx(f.default,Object.assign({onClick:Y,size:"small",style:null==C?void 0:C.editCrossIcon},{children:te}))]}))]})):t.jsxs("div",Object.assign({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:[t.jsx("span",Object.assign({className:"segmentLabel",style:Object.assign({fontSize:18,fontWeight:600},null==C?void 0:C.label)},{children:null!=g?g:"SEGMENT NAME"})),(null==$?void 0:$.includes("edit"))&&t.jsx(y.default,Object.assign({title:"Edit segment",placement:"top",arrow:!0},{children:t.jsx("button",Object.assign({onClick:()=>G(!0),className:a.default.headerEditButton,style:null==C?void 0:C.editIconButton},{children:Z}))}))]})),t.jsxs("div",Object.assign({style:Object.assign({display:"flex",alignItems:"center",gap:"6px",flexShrink:0},null==C?void 0:C.headerActionsContainer)},{children:[(null==$?void 0:$.includes("delete"))&&t.jsx(y.default,Object.assign({title:"Delete segment",placement:"top",arrow:!0},{children:t.jsxs("button",Object.assign({onClick:()=>{_(!1),T(!0),R(b,e=>{if(e){const t=Object.assign({},e);return t.open=!1,t}return{open:!1,state:ie?"loading":"ready"}})},className:l.default.headerDeleteButton},{children:[t.jsx(s.Trash2,{size:14}),"Delete"]}))})),t.jsx(f.default,Object.assign({"aria-label":"close",onClick:ae,sx:e=>({padding:"4px",color:e.palette.grey[500]})},{children:t.jsx(s.X,{size:20})}))]}))]})),ie?t.jsx(r.default,{customStyles:null==C?void 0:C.loadingSkeleton}):t.jsxs(t.Fragment,{children:[W&&!q&&t.jsx("div",Object.assign({style:{marginBottom:16}},{children:t.jsx(o.default,{label:null!=g?g:"",segmentExampleComponent:E,customStyles:Object.assign(Object.assign({},null==C?void 0:C.segmentExample),{exampleContainer:Object.assign(Object.assign({},null===(A=null==C?void 0:C.segmentExample)||void 0===A?void 0:A.exampleContainer),{width:"100%"})}),handleCancelExample:()=>{_(!1)}})})),q&&t.jsx("div",Object.assign({style:{marginBottom:16}},{children:t.jsx("div",Object.assign({className:`segment-${u}-container segmentContainer updatedSegmentContainer`,style:Object.assign({},null==C?void 0:C.container)},{children:t.jsx("span",Object.assign({className:`segment-${u} segmentLabel updatedSegmentLabel`,style:Object.assign({},null==C?void 0:C.label)},{children:j}))}))})),t.jsx("div",{children:t.jsx(d.default,{aiReason:O,customStyles:Object.assign(Object.assign({},I),{aiReasoningContent:Object.assign(Object.assign({},null==I?void 0:I.aiReasoningContent),{headerBar:{width:"auto"}}),aiReasoningAccordion:{header:{width:"auto"}}}),customIcons:S,isSegmentExplanation:!0,handleViewGlossary:w?()=>{R(b,e=>{if(e){const t=Object.assign({},e);return t.open=!1,t}return{open:!1,state:ie?"loading":"ready"}}),null==w||w(u)}:void 0,handleViewExample:E?()=>{_(!0)}:void 0,isUpdatedSegment:q})})]})]}))})),t.jsx(m.default,{open:U,onHide:()=>{T(!1)},customDeleteStyles:B,customDeleteIcons:M,onDelete:t=>e.__awaiter(void 0,void 0,void 0,function*(){yield null==k?void 0:k(t)})}),t.jsx(p.default,{open:P,onHide:()=>{X(!1),G(!1)},customStyles:B,customIcons:M,onConfirm:Q})]}))};
|
|
2
2
|
//# sourceMappingURL=Segment.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("./Segment.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(require("dompurify"));exports.default=({id:l,children:i,props:d,segmentComponentConfig:s,customStyles:a,customIcons:u,extractText:r,isUpdatedSegment:v=!1,blockId:g,customDeleteStyles:c,customDeleteIcons:m})=>{var p,S,h,I,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("./Segment.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(require("dompurify"));exports.default=({id:l,children:i,props:d,segmentComponentConfig:s,customStyles:a,customIcons:u,extractText:r,isUpdatedSegment:v=!1,blockId:g,customDeleteStyles:c,customDeleteIcons:m})=>{var p,S,h,b,I,f,y,C,x,_,D,j,O,E,U,W,k,q,A;const F=(null==d?void 0:d.id)||"Segment",L=(null==d?void 0:d.decisionstrength)||"80",{segmentDataList:w,getSegmentExampleComponent:R,handleViewGlossary:B,upadatedSegmentDataList:G,handleFetchUpdatedSegmentDetails:M,handleFetchSegmentDetails:T,handleDeleteSegment:V,handleEditSegment:z,enabledSegmentActions:H}=s||{},P=v?null==G?void 0:G.find(e=>{var n;return String(e.segment_id)===String(null===(n=null==F?void 0:F.split("-"))||void 0===n?void 0:n[0])}):null==w?void 0:w.find(e=>{var n;return String(e.segment_id)===String(null===(n=null==F?void 0:F.split("-"))||void 0===n?void 0:n[0])}),J={id:F,reason:null!==(p=null==P?void 0:P.reason)&&void 0!==p?p:"",gap:null!==(S=null==P?void 0:P.gap)&&void 0!==S?S:"",explanation:null!==(h=null==P?void 0:P.explanation)&&void 0!==h?h:"",relevance_score:null!==(b=null==P?void 0:P.relevance_score)&&void 0!==b?b:0,isOpen:!1};let K;const N=r(i),Q=d["data-table"];let X="";if(Q&&!v)try{X=decodeURIComponent(atob(Q))}catch(e){console.error("Failed to decode data-table for segment",F,e)}const Y=o.default.sanitize(X),Z=()=>n.jsx("div",{dangerouslySetInnerHTML:{__html:Y}});return P||!T||v||null==T||T(F),F&&P&&R&&!v&&(K=Q?n.jsx(Z,{}):R(F,N,P.segment_type)),n.jsx(t.default,Object.assign({id:F,segmentUUID:l,label:null!==(I=null==P?void 0:P.label)&&void 0!==I?I:null==P?void 0:P.segment_name,decisionStrength:L,aiReason:J,customIcons:u,aiReasoningCitationCustomStyles:a,segmentExampleComponent:K,handleViewGlossary:B,customStyles:{segmentWrapper:null===(f=null==a?void 0:a.segment)||void 0===f?void 0:f.segmentWrapper,container:null===(y=null==a?void 0:a.segment)||void 0===y?void 0:y.container,label:null===(C=null==a?void 0:a.segment)||void 0===C?void 0:C.label,decisionStrength:null===(x=null==a?void 0:a.segment)||void 0===x?void 0:x.decisionStrength,buttonContainer:null===(_=null==a?void 0:a.segment)||void 0===_?void 0:_.buttonContainer,cheveronIcon:null===(D=null==a?void 0:a.segment)||void 0===D?void 0:D.cheveronIcon,segmentExample:null===(j=null==a?void 0:a.segment)||void 0===j?void 0:j.segmentExample,loadingSkeleton:null===(O=null==a?void 0:a.segment)||void 0===O?void 0:O.SegmentLoadingSkeletonStyles,editInputWrapper:null===(E=null==a?void 0:a.segment)||void 0===E?void 0:E.editInputWrapper,editInput:null===(U=null==a?void 0:a.segment)||void 0===U?void 0:U.editInput,editCheckIcon:null===(W=null==a?void 0:a.segment)||void 0===W?void 0:W.editCheckIcon,editCrossIcon:null===(k=null==a?void 0:a.segment)||void 0===k?void 0:k.editCrossIcon,headerActionsContainer:null===(q=null==a?void 0:a.segment)||void 0===q?void 0:q.headerActionsContainer,editIconButton:null===(A=null==a?void 0:a.segment)||void 0===A?void 0:A.editIconButton},isUpdatedSegment:v,onOpen:()=>e.__awaiter(void 0,void 0,void 0,function*(){!P&&v&&(console.log("citation metadata:: handleFetchUpdatedSegmentDetails"),yield null==M?void 0:M(F))}),onDelete:e=>{if(console.log("SegmentWrapper: onDelete",e,Object.assign(Object.assign({},P),{segment_uuid:F}),g),P)return null==V?void 0:V(e,Object.assign(Object.assign({},P),{segment_uuid:F}),g)},onEdit:e=>{if(console.log("SegmentWrapper: onEdit",P,e),P&&z)return null==z?void 0:z(P,e)},customDeleteStyles:c,customDeleteIcons:m,enabledSegmentActions:H},{children:i}),F)};
|
|
2
2
|
//# sourceMappingURL=SegmentWrapper.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("react"),t=require("../ai-reasoning/AiReasoningCitationContent.js"),n=require("./CompletionPanel.module.css.js"),s=require("../../icons/CDIcon.js"),l=require("lucide-react");const a=({customIcons:a,customStyles:i,currentUserStory:r,panelStyles:c,showPanel:d=!1,children:u,onToggleStateChange:m,completionPanelConfig:p})=>{var g,f,v,j,C;const[h,k]=o.useState(!!d),x=null!==(g=null==r?void 0:r.completion_percentage)&&void 0!==g?g:0,y=o.useRef(null),b=o.useRef(null),{isMarkingComplete:w=!1,markedComplete:_=!1,onMarkAsComplete:P}=null!=p?p:{},S=()=>{k(!1),null==m||m(!1)},O=e=>{e.stopPropagation(),k(e=>{const o=!e;return null==m||m(o),o})};return o.useEffect(()=>{if(!h)return;const e=e=>{b.current&&!b.current.contains(e.target)&&S()},o=e=>{"Escape"===e.key&&(k(!1),null==m||m(!1))};return document.addEventListener("mousedown",e,!0),document.addEventListener("keydown",o),()=>{document.removeEventListener("mousedown",e,!0),document.removeEventListener("keydown",o)}},[h,m]),e.jsxs("div",Object.assign({ref:b,className:n.default.triggerWrapper,style:null==c?void 0:c.triggerWrapperStyle},{children:[!d&&e.jsx(e.Fragment,{children:u?e.jsx("div",Object.assign({className:n.default.completionButton,style:null==c?void 0:c.completionButtonStyle,onClick:O},{children:u})):e.jsx("button",Object.assign({ref:y,className:n.default.completionIconButton,style:null==c?void 0:c.completionIconButtonStyle,onClick:O},{children:e.jsx(s.default,{})}))}),h&&e.jsx("div",Object.assign({className:`${n.default.dropdown} ${d?n.default.showPanelDropdown:""}`,style:Object.assign(Object.assign({},null==c?void 0:c.dropdownStyle),d?null==c?void 0:c.showPanelDropdownStyle:{}),onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()},{children:e.jsx(t.default,{aiReason:{explanation:(null===(f=r.completion_decision_factors)||void 0===f?void 0:f.explanation)||"",relevance_score:(null===(v=r.completion_decision_factors)||void 0===v?void 0:v.relevance_score)||0,reason:(null===(j=r.completion_decision_factors)||void 0===j?void 0:j.score_reason)||"",gap:(null===(C=r.completion_decision_factors)||void 0===C?void 0:C.gap)||"",id:"completion-cd"},customIcons:a,customStyles:i,footer:e.jsxs("div",Object.assign({className:n.default.markCompleteContainer},{children:[e.jsx("h4",Object.assign({className:n.default.markCompleteTitle},{children:"Mark this section as complete?"})),e.jsxs("p",Object.assign({className:n.default.markCompleteDescription},{children:["AI estimates this section is"," ",x,"% complete. If you're satisfied with the content, you can mark it as complete."]})),e.jsxs("button",Object.assign({className:n.default.markCompleteButton,disabled:w||_,onClick:e=>{e.stopPropagation(),null==P||P(),S()}},{children:[w?e.jsx(l.Loader2,{size:18,className:n.default.markCompleteSpinner}):e.jsx(l.Check,{size:18,strokeWidth:3,className:n.default.markCompleteIcon}),e.jsx("span",{children:_?"Marked Complete":"Mark as Complete"})]}))]}))})}))]}))};exports.CompletionPanel=a,exports.default=a;
|
|
2
2
|
//# sourceMappingURL=CompletionPanel.js.map
|
package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.module.css.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const o=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;o&&e.setAttribute("nonce",o),e.appendChild(document.createTextNode(".CompletionPanel-module_completionButton__ORlGC{align-items:center;cursor:pointer;display:inline-flex;gap:4px}.CompletionPanel-module_triggerWrapper__PdQj6{align-items:center;display:inline-flex;position:relative}.CompletionPanel-module_chevron__XDcBW{color:#64748b;flex-shrink:0;transition:transform .2s ease}.CompletionPanel-module_dropdown__7iQ-8{background:#fff;border:1px solid #cbd5e1;border-radius:12px;box-shadow:0 4px 12px #0f172a14,0 2px 4px #0f172a0a;left:0;max-width:660px;min-width:660px;overflow:hidden;position:absolute;top:calc(100% + 6px);width:660px;z-index:1000}.CompletionPanel-module_showPanelDropdown__LhOPy{left:0;max-width:100%;position:relative;top:0;width:100%}.CompletionPanel-module_completionIconButton__sI9MX{align-items:center;background:#0000;border:none;cursor:pointer;display:inline-flex;gap:4px;height:28px;justify-content:center;min-width:28px;padding:0}.CompletionPanel-module_markCompleteContainer__9q--o{background:#f9fafb;border-top:1px solid #e5e7eb;padding:20px 24px}.CompletionPanel-module_markCompleteTitle__EM4s4{color:#111827;font-size:16px;font-weight:600;margin:0}.CompletionPanel-module_markCompleteDescription__FqRzk{color:#6b7280;font-size:15px;line-height:1.5;margin:10px 0 18px}.CompletionPanel-module_markCompleteButton__Xh2IV{align-items:center;background:#16a34a;border:none;border-radius:8px;color:#fff;cursor:pointer;display:inline-flex;font-size:15px;font-weight:600;gap:8px;padding:10px 18px;transition:background .2s}.CompletionPanel-module_markCompleteButton__Xh2IV:hover{background:#15803d}.CompletionPanel-module_markCompleteButton__Xh2IV:disabled{cursor:not-allowed;opacity:.6}.CompletionPanel-module_markCompleteIcon__1O7Zs{flex-shrink:0}.CompletionPanel-module_markCompleteSpinner__t-6yz{animation:CompletionPanel-module_spin__s8-Bm 1s linear infinite;flex-shrink:0}@keyframes CompletionPanel-module_spin__s8-Bm{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const o=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;o&&e.setAttribute("nonce",o),e.appendChild(document.createTextNode(".CompletionPanel-module_completionButton__ORlGC{align-items:center;cursor:pointer;display:inline-flex;gap:4px}.CompletionPanel-module_triggerWrapper__PdQj6{align-items:center;display:inline-flex;position:relative}.CompletionPanel-module_chevron__XDcBW{color:#64748b;flex-shrink:0;transition:transform .2s ease}.CompletionPanel-module_dropdown__7iQ-8{background:#fff;border:1px solid #cbd5e1;border-radius:12px;box-shadow:0 4px 12px #0f172a14,0 2px 4px #0f172a0a;left:0;max-width:660px;min-width:660px;overflow:hidden;position:absolute;top:calc(100% + 6px);width:660px;z-index:1000}.CompletionPanel-module_showPanelDropdown__LhOPy{left:0;max-width:100%;position:relative;top:0;width:100%}.CompletionPanel-module_completionIconButton__sI9MX{align-items:center;background:#0000;border:none;cursor:pointer;display:inline-flex;gap:4px;height:28px;justify-content:center;min-width:28px;padding:0}.CompletionPanel-module_markCompleteContainer__9q--o{background:#f9fafb;border-top:1px solid #e5e7eb;padding:20px 24px}.CompletionPanel-module_markCompleteTitle__EM4s4{color:#111827;font-size:16px;font-weight:600;margin:0}.CompletionPanel-module_markCompleteDescription__FqRzk{color:#6b7280;font-size:15px;line-height:1.5;margin:10px 0 18px}.CompletionPanel-module_markCompleteButton__Xh2IV{align-items:center;background:#16a34a;border:none;border-radius:8px;color:#fff;cursor:pointer;display:inline-flex;font-size:15px;font-weight:600;gap:8px;padding:10px 18px;transition:background .2s}.CompletionPanel-module_markCompleteButton__Xh2IV:hover{background:#15803d}.CompletionPanel-module_markCompleteButton__Xh2IV:disabled{cursor:not-allowed;opacity:.6}.CompletionPanel-module_markCompleteIcon__1O7Zs{flex-shrink:0}.CompletionPanel-module_markCompleteSpinner__t-6yz{animation:CompletionPanel-module_spin__s8-Bm 1s linear infinite;flex-shrink:0}@keyframes CompletionPanel-module_spin__s8-Bm{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}(),exports.default={completionButton:"CompletionPanel-module_completionButton__ORlGC",triggerWrapper:"CompletionPanel-module_triggerWrapper__PdQj6",chevron:"CompletionPanel-module_chevron__XDcBW",dropdown:"CompletionPanel-module_dropdown__7iQ-8",showPanelDropdown:"CompletionPanel-module_showPanelDropdown__LhOPy",completionIconButton:"CompletionPanel-module_completionIconButton__sI9MX",markCompleteContainer:"CompletionPanel-module_markCompleteContainer__9q--o",markCompleteTitle:"CompletionPanel-module_markCompleteTitle__EM4s4",markCompleteDescription:"CompletionPanel-module_markCompleteDescription__FqRzk",markCompleteButton:"CompletionPanel-module_markCompleteButton__Xh2IV",markCompleteIcon:"CompletionPanel-module_markCompleteIcon__1O7Zs",markCompleteSpinner:"CompletionPanel-module_markCompleteSpinner__t-6yz",spin:"CompletionPanel-module_spin__s8-Bm"};
|
|
2
2
|
//# sourceMappingURL=CompletionPanel.module.css.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__awaiter as e}from"tslib";import{jsx as t,jsxs as n,Fragment as i}from"react/jsx-runtime";import s,{useContext as o,useMemo as a}from"react";import{Pencil as l,Check as c,X as r,ArrowUpRight as d,Trash2 as m}from"lucide-react";import{cn as g}from"../../../UserStoryImport/lib/cn.js";import p from"./segment.module.css.js";import u from"./deleteSegmentDialog.module.css.js";import b from"./ExampleComponentWrapper.js";import j from"../ai-reasoning/AiReasoningCitationContent.js";import v from"./SegmentLoader.js";import"./segment-common.css.js";import{MarkdownStateContext as y}from"../../store/markdown-context.js";import h from"@mui/material/Dialog";import O from"@mui/material/IconButton";import f from"./DeleteSegmentsDialog.js";import C from"@mui/material/Tooltip";import S from"./EditSegmentDialog.js";const x=({id:x="Segment",label:I,children:E,segmentUUID:D,decisionStrength:N=80,aiReason:k,customStyles:w,customIcons:B,aiReasoningCitationCustomStyles:$,segmentExampleComponent:z,handleViewGlossary:L,isUpdatedSegment:W,onOpen:
|
|
1
|
+
import{__awaiter as e}from"tslib";import{jsx as t,jsxs as n,Fragment as i}from"react/jsx-runtime";import s,{useContext as o,useMemo as a}from"react";import{Pencil as l,Check as c,X as r,ArrowUpRight as d,Trash2 as m}from"lucide-react";import{cn as g}from"../../../UserStoryImport/lib/cn.js";import p from"./segment.module.css.js";import u from"./deleteSegmentDialog.module.css.js";import b from"./ExampleComponentWrapper.js";import j from"../ai-reasoning/AiReasoningCitationContent.js";import v from"./SegmentLoader.js";import"./segment-common.css.js";import{MarkdownStateContext as y}from"../../store/markdown-context.js";import h from"@mui/material/Dialog";import O from"@mui/material/IconButton";import f from"./DeleteSegmentsDialog.js";import C from"@mui/material/Tooltip";import S from"./EditSegmentDialog.js";const x=({id:x="Segment",label:I,children:E,segmentUUID:D,decisionStrength:N=80,aiReason:k,customStyles:w,customIcons:B,aiReasoningCitationCustomStyles:$,segmentExampleComponent:z,handleViewGlossary:L,isUpdatedSegment:W,onOpen:A,onDelete:R,onEdit:U,customDeleteStyles:M,customDeleteIcons:T,enabledSegmentActions:G})=>{var V,F;const{citationsMetadata:H,updateCitationsMetadata:K}=o(y),[q,J]=s.useState(!1),[P,Q]=s.useState(!1),[X,Y]=s.useState(!1),[Z,_]=s.useState(""),[ee,te]=s.useState(!1),{prefix:ne,inner:ie}=a(()=>(e=>{const t=e.match(/^(.*?)\s*\{([^}]+)\}\s*$/);return!t||t.length<3?{prefix:"",inner:e}:{prefix:t[1].trim(),inner:t[2].trim()}})(null!=I?I:""),[I]);s.useEffect(()=>{X||_(ie)},[X,ie]);const se=()=>e(void 0,void 0,void 0,function*(){if(U){const e=Z.toLowerCase();yield U(e)}Y(!1),te(!1)}),oe=()=>Y(!1),ae=(null==T?void 0:T.editIcon)||t(l,{size:14}),le=(null==T?void 0:T.checkIcon)||t(c,{size:16,color:"#16A34A"}),ce=(null==T?void 0:T.crossIcon)||t(r,{size:16,color:"#DC2626"}),re=a(()=>H.get(D),[H,D]),de=a(()=>(null==re?void 0:re.open)||!1,[re]),me=a(()=>re&&"loading"===re.state,[re]),ge=()=>e(void 0,void 0,void 0,function*(){const e=!de;if(J(!1),console.log("citation metadata::",e,k),e&&!(null==k?void 0:k.reason)){K(D,t=>{if(t){const e=Object.assign({},t);return e.state="loading",e}return{open:e,state:"loading"}});try{console.log("citation metadata:: onopen"),yield null==A?void 0:A()}finally{K(D,t=>{if(t){const n=Object.assign({},t);return n.state="ready",n.open=e,n}return{open:e,state:"ready"}})}}else console.log("citation metadata:: else block"),K(D,t=>{if(t){const n=Object.assign({},t);return n.open=e,n}return{open:e,state:me?"loading":"ready"}})});return n("div",Object.assign({className:`segment-wrapper-${x} ${p.segmentWrapper}`,style:Object.assign(Object.assign({},null==w?void 0:w.segmentWrapper),{display:"inline-flex",verticalAlign:"middle"})},{children:[n("div",Object.assign({className:`segment-${x}-container segmentContainer ${W?"updatedSegmentContainer":""}`,style:Object.assign({},null==w?void 0:w.container)},{children:[t("span",Object.assign({className:`segment-${x} segmentLabel ${W?"updatedSegmentLabel":""}`,style:Object.assign({},null==w?void 0:w.label)},{children:W?E:I})),t("button",Object.assign({className:`${p.segmentExplanationButtonContainer}`,style:Object.assign({},null==w?void 0:w.buttonContainer),onClick:ge},{children:t(d,{className:g(W&&p.updatedChevronIcon,p.cheveronIcon),style:Object.assign({},null==w?void 0:w.cheveronIcon)})}))]})),de&&t(h,Object.assign({open:!0,onClose:ge,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",maxWidth:"xl",container:document.getElementById("#root")},{children:n("div",Object.assign({style:{minWidth:"50vw",paddingLeft:16,paddingRight:16,paddingTop:24,paddingBottom:24}},{children:[n("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16}},{children:[n("div",X?Object.assign({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[ne&&t("span",Object.assign({className:"segmentLabel",style:Object.assign({fontSize:18,fontWeight:600},null==w?void 0:w.label)},{children:ne})),n("div",Object.assign({className:p.editInputWrapper,style:null==w?void 0:w.editInputWrapper},{children:[t("input",{value:Z,onChange:e=>_(e.target.value),className:p.editInput,style:Object.assign(Object.assign({},null==w?void 0:w.editInput),{color:(null===(V=null==w?void 0:w.label)||void 0===V?void 0:V.color)?String(w.label.color):"#3B82F6",textTransform:"uppercase"}),autoFocus:!0,onKeyDown:e=>{"Enter"===e.key&&se(),"Escape"===e.key&&oe()}}),t(O,Object.assign({onClick:()=>{Z!==ie?(K(D,e=>e?Object.assign(Object.assign({},e),{open:!1}):{open:!1,state:me?"loading":"ready"}),te(!0)):Y(!1)},size:"small",style:null==w?void 0:w.editCheckIcon},{children:le})),t(O,Object.assign({onClick:oe,size:"small",style:null==w?void 0:w.editCrossIcon},{children:ce}))]}))]}):Object.assign({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:[t("span",Object.assign({className:"segmentLabel",style:Object.assign({fontSize:18,fontWeight:600},null==w?void 0:w.label)},{children:null!=I?I:"SEGMENT NAME"})),(null==G?void 0:G.includes("edit"))&&t(C,Object.assign({title:"Edit segment",placement:"top",arrow:!0},{children:t("button",Object.assign({onClick:()=>Y(!0),className:p.headerEditButton,style:null==w?void 0:w.editIconButton},{children:ae}))}))]})),n("div",Object.assign({style:Object.assign({display:"flex",alignItems:"center",gap:"6px",flexShrink:0},null==w?void 0:w.headerActionsContainer)},{children:[(null==G?void 0:G.includes("delete"))&&t(C,Object.assign({title:"Delete segment",placement:"top",arrow:!0},{children:n("button",Object.assign({onClick:()=>{J(!1),Q(!0),K(D,e=>{if(e){const t=Object.assign({},e);return t.open=!1,t}return{open:!1,state:me?"loading":"ready"}})},className:u.headerDeleteButton},{children:[t(m,{size:14}),"Delete"]}))})),t(O,Object.assign({"aria-label":"close",onClick:ge,sx:e=>({padding:"4px",color:e.palette.grey[500]})},{children:t(r,{size:20})}))]}))]})),me?t(v,{customStyles:null==w?void 0:w.loadingSkeleton}):n(i,{children:[q&&!W&&t("div",Object.assign({style:{marginBottom:16}},{children:t(b,{label:null!=I?I:"",segmentExampleComponent:z,customStyles:Object.assign(Object.assign({},null==w?void 0:w.segmentExample),{exampleContainer:Object.assign(Object.assign({},null===(F=null==w?void 0:w.segmentExample)||void 0===F?void 0:F.exampleContainer),{width:"100%"})}),handleCancelExample:()=>{J(!1)}})})),W&&t("div",Object.assign({style:{marginBottom:16}},{children:t("div",Object.assign({className:`segment-${x}-container segmentContainer updatedSegmentContainer`,style:Object.assign({},null==w?void 0:w.container)},{children:t("span",Object.assign({className:`segment-${x} segmentLabel updatedSegmentLabel`,style:Object.assign({},null==w?void 0:w.label)},{children:E}))}))})),t("div",{children:t(j,{aiReason:k,customStyles:Object.assign(Object.assign({},$),{aiReasoningContent:Object.assign(Object.assign({},null==$?void 0:$.aiReasoningContent),{headerBar:{width:"auto"}}),aiReasoningAccordion:{header:{width:"auto"}}}),customIcons:B,isSegmentExplanation:!0,handleViewGlossary:L?()=>{K(D,e=>{if(e){const t=Object.assign({},e);return t.open=!1,t}return{open:!1,state:me?"loading":"ready"}}),null==L||L(x)}:void 0,handleViewExample:z?()=>{J(!0)}:void 0,isUpdatedSegment:W})})]})]}))})),t(f,{open:P,onHide:()=>{Q(!1)},customDeleteStyles:M,customDeleteIcons:T,onDelete:t=>e(void 0,void 0,void 0,function*(){yield null==R?void 0:R(t)})}),t(S,{open:ee,onHide:()=>{te(!1),Y(!1)},customStyles:M,customIcons:T,onConfirm:se})]}))};export{x as default};
|
|
2
2
|
//# sourceMappingURL=Segment.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__awaiter as e}from"tslib";import{jsx as n}from"react/jsx-runtime";import t from"./Segment.js";import o from"dompurify";const l=({id:l,children:i,props:d,segmentComponentConfig:s,customStyles:a,customIcons:u,extractText:v,isUpdatedSegment:r=!1,blockId:m,customDeleteStyles:g,customDeleteIcons:c})=>{var p,S,h,I,b,C,f,y,D,x,_,j,E,O,U,W,k,F
|
|
1
|
+
import{__awaiter as e}from"tslib";import{jsx as n}from"react/jsx-runtime";import t from"./Segment.js";import o from"dompurify";const l=({id:l,children:i,props:d,segmentComponentConfig:s,customStyles:a,customIcons:u,extractText:v,isUpdatedSegment:r=!1,blockId:m,customDeleteStyles:g,customDeleteIcons:c})=>{var p,S,h,I,b,C,f,y,D,x,_,j,E,O,U,W,k,A,F;const L=(null==d?void 0:d.id)||"Segment",R=(null==d?void 0:d.decisionstrength)||"80",{segmentDataList:w,getSegmentExampleComponent:B,handleViewGlossary:G,upadatedSegmentDataList:T,handleFetchUpdatedSegmentDetails:V,handleFetchSegmentDetails:z,handleDeleteSegment:H,handleEditSegment:M,enabledSegmentActions:q}=s||{},J=r?null==T?void 0:T.find(e=>{var n;return String(e.segment_id)===String(null===(n=null==L?void 0:L.split("-"))||void 0===n?void 0:n[0])}):null==w?void 0:w.find(e=>{var n;return String(e.segment_id)===String(null===(n=null==L?void 0:L.split("-"))||void 0===n?void 0:n[0])}),K={id:L,reason:null!==(p=null==J?void 0:J.reason)&&void 0!==p?p:"",gap:null!==(S=null==J?void 0:J.gap)&&void 0!==S?S:"",explanation:null!==(h=null==J?void 0:J.explanation)&&void 0!==h?h:"",relevance_score:null!==(I=null==J?void 0:J.relevance_score)&&void 0!==I?I:0,isOpen:!1};let N;const P=v(i),Q=d["data-table"];let X="";if(Q&&!r)try{X=decodeURIComponent(atob(Q))}catch(e){console.error("Failed to decode data-table for segment",L,e)}const Y=o.sanitize(X),Z=()=>n("div",{dangerouslySetInnerHTML:{__html:Y}});return J||!z||r||null==z||z(L),L&&J&&B&&!r&&(N=Q?n(Z,{}):B(L,P,J.segment_type)),n(t,Object.assign({id:L,segmentUUID:l,label:null!==(b=null==J?void 0:J.label)&&void 0!==b?b:null==J?void 0:J.segment_name,decisionStrength:R,aiReason:K,customIcons:u,aiReasoningCitationCustomStyles:a,segmentExampleComponent:N,handleViewGlossary:G,customStyles:{segmentWrapper:null===(C=null==a?void 0:a.segment)||void 0===C?void 0:C.segmentWrapper,container:null===(f=null==a?void 0:a.segment)||void 0===f?void 0:f.container,label:null===(y=null==a?void 0:a.segment)||void 0===y?void 0:y.label,decisionStrength:null===(D=null==a?void 0:a.segment)||void 0===D?void 0:D.decisionStrength,buttonContainer:null===(x=null==a?void 0:a.segment)||void 0===x?void 0:x.buttonContainer,cheveronIcon:null===(_=null==a?void 0:a.segment)||void 0===_?void 0:_.cheveronIcon,segmentExample:null===(j=null==a?void 0:a.segment)||void 0===j?void 0:j.segmentExample,loadingSkeleton:null===(E=null==a?void 0:a.segment)||void 0===E?void 0:E.SegmentLoadingSkeletonStyles,editInputWrapper:null===(O=null==a?void 0:a.segment)||void 0===O?void 0:O.editInputWrapper,editInput:null===(U=null==a?void 0:a.segment)||void 0===U?void 0:U.editInput,editCheckIcon:null===(W=null==a?void 0:a.segment)||void 0===W?void 0:W.editCheckIcon,editCrossIcon:null===(k=null==a?void 0:a.segment)||void 0===k?void 0:k.editCrossIcon,headerActionsContainer:null===(A=null==a?void 0:a.segment)||void 0===A?void 0:A.headerActionsContainer,editIconButton:null===(F=null==a?void 0:a.segment)||void 0===F?void 0:F.editIconButton},isUpdatedSegment:r,onOpen:()=>e(void 0,void 0,void 0,function*(){!J&&r&&(console.log("citation metadata:: handleFetchUpdatedSegmentDetails"),yield null==V?void 0:V(L))}),onDelete:e=>{if(console.log("SegmentWrapper: onDelete",e,Object.assign(Object.assign({},J),{segment_uuid:L}),m),J)return null==H?void 0:H(e,Object.assign(Object.assign({},J),{segment_uuid:L}),m)},onEdit:e=>{if(console.log("SegmentWrapper: onEdit",J,e),J&&M)return null==M?void 0:M(J,e)},customDeleteStyles:g,customDeleteIcons:c,enabledSegmentActions:q},{children:i}),L)};export{l as default};
|
|
2
2
|
//# sourceMappingURL=SegmentWrapper.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,
|
|
1
|
+
import{jsxs as e,jsx as o,Fragment as n}from"react/jsx-runtime";import{useState as t,useRef as i,useEffect as s}from"react";import l from"../ai-reasoning/AiReasoningCitationContent.js";import a from"./CompletionPanel.module.css.js";import r from"../../icons/CDIcon.js";import{Loader2 as c,Check as m}from"lucide-react";const d=({customIcons:d,customStyles:p,currentUserStory:u,panelStyles:g,showPanel:v=!1,children:C,onToggleStateChange:h,completionPanelConfig:k})=>{var f,y,j,w,b;const[_,P]=t(!!v),S=null!==(f=null==u?void 0:u.completion_percentage)&&void 0!==f?f:0,N=i(null),O=i(null),{isMarkingComplete:I=!1,markedComplete:D=!1,onMarkAsComplete:M}=null!=k?k:{},B=()=>{P(!1),null==h||h(!1)},E=e=>{e.stopPropagation(),P(e=>{const o=!e;return null==h||h(o),o})};return s(()=>{if(!_)return;const e=e=>{O.current&&!O.current.contains(e.target)&&B()},o=e=>{"Escape"===e.key&&(P(!1),null==h||h(!1))};return document.addEventListener("mousedown",e,!0),document.addEventListener("keydown",o),()=>{document.removeEventListener("mousedown",e,!0),document.removeEventListener("keydown",o)}},[_,h]),e("div",Object.assign({ref:O,className:a.triggerWrapper,style:null==g?void 0:g.triggerWrapperStyle},{children:[!v&&o(n,{children:C?o("div",Object.assign({className:a.completionButton,style:null==g?void 0:g.completionButtonStyle,onClick:E},{children:C})):o("button",Object.assign({ref:N,className:a.completionIconButton,style:null==g?void 0:g.completionIconButtonStyle,onClick:E},{children:o(r,{})}))}),_&&o("div",Object.assign({className:`${a.dropdown} ${v?a.showPanelDropdown:""}`,style:Object.assign(Object.assign({},null==g?void 0:g.dropdownStyle),v?null==g?void 0:g.showPanelDropdownStyle:{}),onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()},{children:o(l,{aiReason:{explanation:(null===(y=u.completion_decision_factors)||void 0===y?void 0:y.explanation)||"",relevance_score:(null===(j=u.completion_decision_factors)||void 0===j?void 0:j.relevance_score)||0,reason:(null===(w=u.completion_decision_factors)||void 0===w?void 0:w.score_reason)||"",gap:(null===(b=u.completion_decision_factors)||void 0===b?void 0:b.gap)||"",id:"completion-cd"},customIcons:d,customStyles:p,footer:e("div",Object.assign({className:a.markCompleteContainer},{children:[o("h4",Object.assign({className:a.markCompleteTitle},{children:"Mark this section as complete?"})),e("p",Object.assign({className:a.markCompleteDescription},{children:["AI estimates this section is"," ",S,"% complete. If you're satisfied with the content, you can mark it as complete."]})),e("button",Object.assign({className:a.markCompleteButton,disabled:I||D,onClick:e=>{e.stopPropagation(),null==M||M(),B()}},{children:[I?o(c,{size:18,className:a.markCompleteSpinner}):o(m,{size:18,strokeWidth:3,className:a.markCompleteIcon}),o("span",{children:D?"Marked Complete":"Mark as Complete"})]}))]}))})}))]}))};export{d as CompletionPanel,d as default};
|
|
2
2
|
//# sourceMappingURL=CompletionPanel.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={completionButton:"CompletionPanel-module_completionButton__ORlGC",triggerWrapper:"CompletionPanel-module_triggerWrapper__PdQj6",chevron:"CompletionPanel-module_chevron__XDcBW",dropdown:"CompletionPanel-module_dropdown__7iQ-8",showPanelDropdown:"CompletionPanel-module_showPanelDropdown__LhOPy",completionIconButton:"CompletionPanel-module_completionIconButton__sI9MX",markCompleteContainer:"CompletionPanel-module_markCompleteContainer__9q--o",markCompleteTitle:"CompletionPanel-module_markCompleteTitle__EM4s4",markCompleteDescription:"CompletionPanel-module_markCompleteDescription__FqRzk",markCompleteButton:"CompletionPanel-module_markCompleteButton__Xh2IV",markCompleteIcon:"CompletionPanel-module_markCompleteIcon__1O7Zs",markCompleteSpinner:"CompletionPanel-module_markCompleteSpinner__t-6yz",spin:"CompletionPanel-module_spin__s8-Bm"
|
|
1
|
+
var e={completionButton:"CompletionPanel-module_completionButton__ORlGC",triggerWrapper:"CompletionPanel-module_triggerWrapper__PdQj6",chevron:"CompletionPanel-module_chevron__XDcBW",dropdown:"CompletionPanel-module_dropdown__7iQ-8",showPanelDropdown:"CompletionPanel-module_showPanelDropdown__LhOPy",completionIconButton:"CompletionPanel-module_completionIconButton__sI9MX",markCompleteContainer:"CompletionPanel-module_markCompleteContainer__9q--o",markCompleteTitle:"CompletionPanel-module_markCompleteTitle__EM4s4",markCompleteDescription:"CompletionPanel-module_markCompleteDescription__FqRzk",markCompleteButton:"CompletionPanel-module_markCompleteButton__Xh2IV",markCompleteIcon:"CompletionPanel-module_markCompleteIcon__1O7Zs",markCompleteSpinner:"CompletionPanel-module_markCompleteSpinner__t-6yz",spin:"CompletionPanel-module_spin__s8-Bm"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const o=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;o&&e.setAttribute("nonce",o),e.appendChild(document.createTextNode(".CompletionPanel-module_completionButton__ORlGC{align-items:center;cursor:pointer;display:inline-flex;gap:4px}.CompletionPanel-module_triggerWrapper__PdQj6{align-items:center;display:inline-flex;position:relative}.CompletionPanel-module_chevron__XDcBW{color:#64748b;flex-shrink:0;transition:transform .2s ease}.CompletionPanel-module_dropdown__7iQ-8{background:#fff;border:1px solid #cbd5e1;border-radius:12px;box-shadow:0 4px 12px #0f172a14,0 2px 4px #0f172a0a;left:0;max-width:660px;min-width:660px;overflow:hidden;position:absolute;top:calc(100% + 6px);width:660px;z-index:1000}.CompletionPanel-module_showPanelDropdown__LhOPy{left:0;max-width:100%;position:relative;top:0;width:100%}.CompletionPanel-module_completionIconButton__sI9MX{align-items:center;background:#0000;border:none;cursor:pointer;display:inline-flex;gap:4px;height:28px;justify-content:center;min-width:28px;padding:0}.CompletionPanel-module_markCompleteContainer__9q--o{background:#f9fafb;border-top:1px solid #e5e7eb;padding:20px 24px}.CompletionPanel-module_markCompleteTitle__EM4s4{color:#111827;font-size:16px;font-weight:600;margin:0}.CompletionPanel-module_markCompleteDescription__FqRzk{color:#6b7280;font-size:15px;line-height:1.5;margin:10px 0 18px}.CompletionPanel-module_markCompleteButton__Xh2IV{align-items:center;background:#16a34a;border:none;border-radius:8px;color:#fff;cursor:pointer;display:inline-flex;font-size:15px;font-weight:600;gap:8px;padding:10px 18px;transition:background .2s}.CompletionPanel-module_markCompleteButton__Xh2IV:hover{background:#15803d}.CompletionPanel-module_markCompleteButton__Xh2IV:disabled{cursor:not-allowed;opacity:.6}.CompletionPanel-module_markCompleteIcon__1O7Zs{flex-shrink:0}.CompletionPanel-module_markCompleteSpinner__t-6yz{animation:CompletionPanel-module_spin__s8-Bm 1s linear infinite;flex-shrink:0}@keyframes CompletionPanel-module_spin__s8-Bm{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}();export{e as default};
|
|
2
2
|
//# sourceMappingURL=CompletionPanel.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequirementAiTest.d.ts","sourceRoot":"","sources":["../../../src/RequirementAiTest.tsx"],"names":[],"mappings":"AA8BA,OAAO,EAA2B,cAAc,EAAE,aAAa,EAAE,MAAM,+EAA+E,CAAC;AAQvJ,QAAA,MAAM,iBAAiB,+
|
|
1
|
+
{"version":3,"file":"RequirementAiTest.d.ts","sourceRoot":"","sources":["../../../src/RequirementAiTest.tsx"],"names":[],"mappings":"AA8BA,OAAO,EAA2B,cAAc,EAAE,aAAa,EAAE,MAAM,+EAA+E,CAAC;AAQvJ,QAAA,MAAM,iBAAiB,+CAiqHtB,CAAC;AAiVF,eAAO,MAAM,iBAAiB,EAAE,cAAc,EAoH7C,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,aAAa,EAoV3C,CAAC;AAGF,eAAO,MAAM,mBAAmB,YACrB,cAAc,EAAE,GAAG,aAAa,EAAE;;;;;CA0B5C,CAAC;AAGF,eAAe,iBAAiB,CAAC"}
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { AiReasoningCustomStyles, SegmentStyles, TAIReasoning, UserStoryIcons, DeleteDialogIcons } from '../../types/aiReasoning.type';
|
|
3
3
|
import './segment-common.css';
|
|
4
4
|
import { DeleteScope } from './DeleteSegmentsDialog';
|
|
5
|
+
import { TSegmentComponentConfig } from '../../types/segment.type';
|
|
5
6
|
interface SegmentProps {
|
|
6
7
|
id?: string;
|
|
7
8
|
label?: string;
|
|
@@ -19,6 +20,7 @@ interface SegmentProps {
|
|
|
19
20
|
onEdit?: (newLabel: string) => void | Promise<void>;
|
|
20
21
|
customDeleteStyles?: SegmentStyles;
|
|
21
22
|
customDeleteIcons?: DeleteDialogIcons;
|
|
23
|
+
enabledSegmentActions?: TSegmentComponentConfig["enabledSegmentActions"];
|
|
22
24
|
}
|
|
23
25
|
declare const Segment: React.FC<SegmentProps>;
|
|
24
26
|
export default Segment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Segment.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/segment/Segment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAQvI,OAAO,sBAAsB,CAAA;AAI7B,OAA4B,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"Segment.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/segment/Segment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAQvI,OAAO,sBAAsB,CAAA;AAI7B,OAA4B,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,UAAU,YAAY;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAC,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,+BAA+B,CAAC,EAAE,uBAAuB,CAAC;IAC1D,uBAAuB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACtC,kBAAkB,CAAC,EAAC,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,gBAAgB,CAAC,EAAC,OAAO,CAAA;IACzB,MAAM,CAAC,EAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACvD,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,kBAAkB,CAAC,EAAE,aAAa,CAAC;IACnC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,qBAAqB,CAAC,EAAC,uBAAuB,CAAC,uBAAuB,CAAC,CAAA;CAE1E;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAwcnC,CAAA;AAED,eAAe,OAAO,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentWrapper.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/segment/SegmentWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAExC,OAAO,EAAY,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAE7E,OAAO,EAAE,aAAa,EAAgB,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAI9F,UAAU,mBAAmB;IACzB,EAAE,EAAC,MAAM,CAAC;IACV,IAAI,EAAE,GAAG,CAAC;IACV,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,GAAG,CAAC;IACX,sBAAsB,CAAC,EAAE,uBAAuB,CAAC;IACjD,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,KAAK,MAAM,CAAC;IAC/C,gBAAgB,CAAC,EAAC,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,aAAa,CAAC;IACnC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACzC;AAGD,QAAA,MAAM,cAAc,8JAYjB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"SegmentWrapper.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/segment/SegmentWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAExC,OAAO,EAAY,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAE7E,OAAO,EAAE,aAAa,EAAgB,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAI9F,UAAU,mBAAmB;IACzB,EAAE,EAAC,MAAM,CAAC;IACV,IAAI,EAAE,GAAG,CAAC;IACV,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,GAAG,CAAC;IACX,sBAAsB,CAAC,EAAE,uBAAuB,CAAC;IACjD,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,KAAK,MAAM,CAAC;IAC/C,gBAAgB,CAAC,EAAC,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,aAAa,CAAC;IACnC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACzC;AAGD,QAAA,MAAM,cAAc,8JAYjB,mBAAmB,4CA4GrB,CAAA;AAED,eAAe,cAAc,CAAA"}
|
package/dist/types/src/features/RequirementAI/components/story-screen/CompletionPanel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompletionPanel.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/story-screen/CompletionPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;AAC/D,OAAO,EACH,UAAU,EACV,qBAAqB,EACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACH,uBAAuB,EACvB,cAAc,EACjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACH,2BAA2B,EAC9B,MAAM,8CAA8C,CAAC;AAItD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"CompletionPanel.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/story-screen/CompletionPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;AAC/D,OAAO,EACH,UAAU,EACV,qBAAqB,EACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACH,uBAAuB,EACvB,cAAc,EACjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACH,2BAA2B,EAC9B,MAAM,8CAA8C,CAAC;AAItD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,eAAO,MAAM,eAAe;iBAUX,cAAc;kBACb,uBAAuB;sBACnB,qBAAqB,GAAG,UAAU;;;eAGzC,SAAS;oCACW,OAAO,KAAK,IAAI;;6CA6LlD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -15,6 +15,7 @@ export type TSegment = {
|
|
|
15
15
|
export type TUniqueSegment = TSegment & {
|
|
16
16
|
segment_uuid: string;
|
|
17
17
|
};
|
|
18
|
+
export type TSegmentActions = "edit" | "delete";
|
|
18
19
|
export type TSegmentComponentConfig = {
|
|
19
20
|
segmentDataList?: TSegment[];
|
|
20
21
|
upadatedSegmentDataList?: TSegment[];
|
|
@@ -24,5 +25,6 @@ export type TSegmentComponentConfig = {
|
|
|
24
25
|
getSegmentExampleComponent?: (segmentId: string, originalValue: string, segmentType: TSegmentType) => JSX.Element;
|
|
25
26
|
handleDeleteSegment?: (scope: DeleteScope, segment: TUniqueSegment, blockId?: string) => Promise<void>;
|
|
26
27
|
handleEditSegment?: (segment: TSegment, newLabel: string) => Promise<void>;
|
|
28
|
+
enabledSegmentActions?: TSegmentActions[];
|
|
27
29
|
};
|
|
28
30
|
//# sourceMappingURL=segment.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segment.type.d.ts","sourceRoot":"","sources":["../../../../../../src/features/RequirementAI/types/segment.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9C,MAAM,MAAM,QAAQ,GAAG;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,EAAC,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG;IACpC,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC;
|
|
1
|
+
{"version":3,"file":"segment.type.d.ts","sourceRoot":"","sources":["../../../../../../src/features/RequirementAI/types/segment.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9C,MAAM,MAAM,QAAQ,GAAG;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,EAAC,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG;IACpC,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC;AAGF,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,CAAC;AAChD,MAAM,MAAM,uBAAuB,GAAG;IAClC,eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC7B,uBAAuB,CAAC,EAAE,QAAQ,EAAE,CAAC;IACrC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,yBAAyB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,gCAAgC,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxE,0BAA0B,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,KAAK,GAAG,CAAC,OAAO,CAAC;IAClH,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvG,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3E,qBAAqB,CAAC,EAAC,eAAe,EAAE,CAAA;CAC3C,CAAA"}
|