@e-llm-studio/requirement-ai 0.0.203 → 0.0.205
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/RichTextEditor/Editor/Editor.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js +2 -0
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js +2 -0
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js.map +1 -0
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/Editor.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js +2 -0
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js.map +1 -0
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.css.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
- package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
- package/dist/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js +2 -0
- package/dist/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js.map +1 -0
- package/dist/types/src/RequirementAiTest.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts +9 -0
- package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/Editor.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.d.ts +44 -0
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/theme/PlaygroundEditorTheme.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts +3 -0
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.d.ts +12 -0
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.d.ts.map +1 -0
- 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"),i=require("react"),r=require("@lexical/react/LexicalComposer"),n=require("@lexical/react/LexicalHistoryPlugin"),o=require("@lexical/react/LexicalOnChangePlugin"),l=require("@lexical/react/LexicalTabIndentationPlugin"),a=require("@lexical/list"),u=require("@lexical/react/LexicalListPlugin"),s=require("@lexical/react/LexicalLinkPlugin"),c=require("@lexical/link"),d=require("@lexical/rich-text"),g=require("@lexical/react/LexicalTablePlugin"),x=require("@lexical/table"),f=require("lexical");require("./components/EditorToolbar/components/ToolbarButton/ToolbarButton.css.js");var p=require("../../RequirementAIWrapper/RequirementAIWrapper.js"),m=require("./components/EditorContainer/EditorContainer.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),i=require("react"),r=require("@lexical/react/LexicalComposer"),n=require("@lexical/react/LexicalHistoryPlugin"),o=require("@lexical/react/LexicalOnChangePlugin"),l=require("@lexical/react/LexicalTabIndentationPlugin"),a=require("@lexical/list"),u=require("@lexical/react/LexicalListPlugin"),s=require("@lexical/react/LexicalLinkPlugin"),c=require("@lexical/link"),d=require("@lexical/rich-text"),g=require("@lexical/react/LexicalTablePlugin"),x=require("@lexical/table"),f=require("lexical");require("./components/EditorToolbar/components/ToolbarButton/ToolbarButton.css.js");var p=require("../../RequirementAIWrapper/RequirementAIWrapper.js"),m=require("./components/EditorContainer/EditorContainer.js"),h=require("./components/EditorToolbar/EditorToolbar.js"),C=require("./plugins/LayoutPlugin.js"),v=require("./theme/theme.js");require("./theme/theme.css.js"),require("./Editor.css.js");var q=require("./components/Context/ContextMenu.js"),j=require("@lexical/mark"),N=require("./plugins/CommentPlugin/HTMLNode.js"),y=require("./constants/editorConfig.js"),T=require("./plugins/InitialHtml.js"),b=require("./plugins/InsertNode.js"),S=require("./plugins/DeleteNode.js"),L=require("./plugins/HighlightNode.js"),_=require("@lexical/react/LexicalComposerContext");function P(e){console.log(e)}function I(){var e=_.useLexicalComposerContext()[0];return i.useEffect(function(){var t=function(e){for(var t=e;t;){if("delete"===t.getType())return!0;t=t.getParent()}return!1};return e.registerCommand(f.KEY_DOWN_COMMAND,function(e){if("Backspace"!==e.key&&"Delete"!==e.key)return!1;var i=f.$getSelection();if(!f.$isRangeSelection(i))return!1;if(i.getNodes().some(function(e){return t(e)}))return e.preventDefault(),!0;if(i.isCollapsed()){var r=i.anchor.getNode();if(t(r))return e.preventDefault(),!0;if("Backspace"===e.key){var n=r.getPreviousSibling();if(0===i.anchor.offset&&"delete"===(null==n?void 0:n.getType()))return e.preventDefault(),!0}if("Delete"===e.key){var o=r.getNextSibling(),l=r.getTextContent().length;if(i.anchor.offset===l&&"delete"===(null==o?void 0:o.getType()))return e.preventDefault(),!0}}return!1},f.COMMAND_PRIORITY_CRITICAL)},[e]),null}exports.default=function(_){var R,E,k,B=_.minHeight,D=_.height,H=_.placeholder,M=_.onFocus,O=_.onBlur,A=_.onChange,w=_.onToolbarButtonClick,$=_.toolbarConfig,F=void 0===$?y.DEFAULT_TOOLBAR_CONFIG:$,W=_.editorRef,Y=_.editorState,V=_.initialString,G=_.customToolbar,K=_.plugins;_.nodes,_.dynamicHeight,_.artifactContext,_.commentsPanelState;var Q=_.mode,U=_.doNotShowBorderInViewMode,X=i.useRef(null),z={namespace:"MyEditor",theme:v.default,onError:P,nodes:[f.TextNode,a.ListNode,a.ListItemNode,c.LinkNode,d.QuoteNode,d.HeadingNode,x.TableNode,x.TableRowNode,x.TableCellNode,j.MarkNode,N.default,b.InsertNode,S.DeleteNode,L.HighlightSpanNode,L.HighlightButtonNode],editorState:Y},J=i.useState(null),Z=J[0],ee=J[1],te=i.useState(!1),ie=te[0],re=te[1],ne=p.useRequirementAI().customStyles,oe=function(e){var t;null===(t=W.current)||void 0===t||t.update(function(){var t=f.$getSelection();f.$isRangeSelection(t)&&t.getNodes().forEach(function(t){f.$isTextNode(t)&&t.setStyle("color: ".concat(e))})})};return document.getElementById("lexical_editor_wrapper"),t.jsxs(t.Fragment,{children:[(null===(R=null==ne?void 0:ne.textEditorStyles)||void 0===R?void 0:R.themeStyles)&&t.jsx("style",{children:null===(E=null==ne?void 0:ne.textEditorStyles)||void 0===E?void 0:E.themeStyles}),t.jsxs("div",e.__assign({ref:X,className:"w-full lexical_editor_wrapper ".concat(U&&"readOnly"===Q?"":"lexical_editor_wrapper_box"),id:"lexical_editor_wrapper",onContextMenu:function(e){var t;e.preventDefault(),null===(t=W.current)||void 0===t||t.update(function(){var t=f.$getSelection();f.$isRangeSelection(t)&&!t.isCollapsed()?(re(!0),ee({x:e.clientX,y:e.clientY})):(re(!1),ee(null))})},style:e.__assign({minHeight:B,height:D},null===(k=null==ne?void 0:ne.textEditorStyles)||void 0===k?void 0:k.textArea)},{children:[t.jsxs(r.LexicalComposer,e.__assign({initialConfig:z},{children:[" ","edit"===Q&&t.jsx(I,{}),"edit"===Q&&t.jsx(h.default,{onToolbarButtonClick:w,editorWrapperRef:X,toolbarConfig:F,customToolbar:G,editorRef:W}),t.jsx(m.default,{placeholder:H}),t.jsx(l.TabIndentationPlugin,{}),t.jsx(n.HistoryPlugin,{}),t.jsx(u.ListPlugin,{}),t.jsx(s.LinkPlugin,{}),t.jsx(g.TablePlugin,{}),t.jsx(C.LayoutPlugin,{onFocus:M,onBlur:O,editorRef:W}),t.jsx(o.OnChangePlugin,{ignoreSelectionChange:!0,ignoreHistoryMergeTagChange:!0,onChange:function(e,t,i){A&&A(e,t,i)}}),V&&t.jsx(T.InitialHtml,{initialValue:V.value,initialFormat:V.type,mode:Q}),K&&K]})),Z&&ie&&"edit"===Q&&t.jsx(q.default,{position:Z,options:[{label:"Change Color to Red",action:function(){return oe("red")}},{label:"Change Color to Blue",action:function(){return oe("blue")}}],onClose:function(){ee(null)}})]}))]})};
|
|
2
2
|
//# sourceMappingURL=Editor.js.map
|
package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),i=require("lexical"),e=function(i){function e(t,e,h){void 0===e&&(e=null);var n=i.call(this,h)||this;return n.__highlightId=t,n.__highlightColor=e,n}return t.__extends(e,i),e.getType=function(){return"highlight-span"},e.clone=function(t){return new e(t.__highlightId,t.__highlightColor,t.__key)},e.prototype.createDOM=function(){return this.createHighlightElement()},e.prototype.exportDOM=function(){return{element:this.createHighlightElement()}},e.prototype.createHighlightElement=function(){var t=document.createElement("span");return t.setAttribute("highlight-id",this.__highlightId),null!==this.__highlightColor&&t.setAttribute("highlight-color",this.__highlightColor),t},e.prototype.updateDOM=function(t,i){return t.__highlightId!==this.__highlightId&&i.setAttribute("highlight-id",this.__highlightId),t.__highlightColor!==this.__highlightColor&&(null===this.__highlightColor?i.removeAttribute("highlight-color"):i.setAttribute("highlight-color",this.__highlightColor)),!1},e.importDOM=function(){return{span:function(t){return t.hasAttribute("highlight-id")?{conversion:h,priority:1}:null}}},e.importJSON=function(t){var i=new e(t.highlightId,t.highlightColor);return i.setFormat(t.format),i.setIndent(t.indent),i.setDirection(t.direction),i},e.prototype.exportJSON=function(){return t.__assign(t.__assign({},i.prototype.exportJSON.call(this)),{type:"highlight-span",version:1,highlightId:this.__highlightId,highlightColor:this.__highlightColor})},e.prototype.isInline=function(){return!0},e}(i.ElementNode);function h(t){return{node:new e(t.getAttribute("highlight-id")||"",t.getAttribute("highlight-color"))}}var n=function(i){function e(t,e,h){void 0===t&&(t=null),void 0===e&&(e=null);var n=i.call(this,h)||this;return n.__highlightId=t,n.__highlightType=e,n}return t.__extends(e,i),e.getType=function(){return"highlight-button"},e.clone=function(t){return new e(t.__highlightId,t.__highlightType,t.__key)},e.prototype.createDOM=function(t){var i=this.createHighlightButtonElement(),e=t.theme.highlightButton;return"string"==typeof e&&(i.className=e),i.contentEditable="false",i},e.prototype.exportDOM=function(){return{element:this.createHighlightButtonElement()}},e.prototype.createHighlightButtonElement=function(){var t=document.createElement("button");return t.setAttribute("action","highlight"),null!==this.__highlightId&&t.setAttribute("highlight-id",this.__highlightId),null!==this.__highlightType&&t.setAttribute("highlight-type",this.__highlightType),t},e.prototype.updateDOM=function(){return!1},e.importDOM=function(){return{button:function(t){return"highlight"!==t.getAttribute("action")?null:{conversion:r,priority:1}}}},e.importJSON=function(t){var i=new e(t.highlightId,t.highlightType);return i.setFormat(t.format),i.setIndent(t.indent),i.setDirection(t.direction),i},e.prototype.exportJSON=function(){return t.__assign(t.__assign({},i.prototype.exportJSON.call(this)),{type:"highlight-button",version:1,highlightId:this.__highlightId,highlightType:this.__highlightType})},e.prototype.isInline=function(){return!0},e}(i.ElementNode);function r(t){return{node:new n(t.getAttribute("highlight-id"),t.getAttribute("highlight-type"))}}exports.HighlightButtonNode=n,exports.HighlightSpanNode=e;
|
|
2
|
+
//# sourceMappingURL=HighlightNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HighlightNode.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e='.PlaygroundEditorTheme__ltr{text-align:left}.PlaygroundEditorTheme__rtl{text-align:right}.PlaygroundEditorTheme__paragraph{font-family:Inter,sans-serif;line-height:28px;margin:0 0 8px;position:relative}.PlaygroundEditorTheme__paragraph:last-child{margin-bottom:0}.PlaygroundEditorTheme__quote{border-left:4px solid #ced0d4;color:#65676b;font-size:15px;margin:0 0 10px 20px;padding-left:16px}.PlaygroundEditorTheme__h1{font-family:Inter,sans-serif;font-size:24px;margin:12px 0 4px;padding:0}.PlaygroundEditorTheme__h2{font-size:20px}.PlaygroundEditorTheme__h2,.PlaygroundEditorTheme__h3{font-family:Inter,sans-serif;margin:10px 0 0;padding:0}.PlaygroundEditorTheme__h3{font-size:18px;text-transform:uppercase}.PlaygroundEditorTheme__textBold{font-family:Inter,sans-serif;font-weight:700}.PlaygroundEditorTheme__textItalic{font-style:italic}.PlaygroundEditorTheme__textUnderline{text-decoration:underline}.PlaygroundEditorTheme__textStrikethrough{text-decoration:line-through}.PlaygroundEditorTheme__textUnderlineStrikethrough{text-decoration:underline line-through}.PlaygroundEditorTheme__textSubscript{font-size:.8em;vertical-align:sub!important}.PlaygroundEditorTheme__textSuperscript{font-size:.8em;vertical-align:super}.PlaygroundEditorTheme__textCode{background-color:#f0f2f5;font-family:Menlo,Consolas,Monaco,monospace;font-size:94%;padding:1px .25rem}.PlaygroundEditorTheme__hashtag{background-color:#5890ff26;border-bottom:1px solid #5890ff4d}.PlaygroundEditorTheme__link{color:#216fdb;text-decoration:none}.PlaygroundEditorTheme__link:hover{text-decoration:underline}.PlaygroundEditorTheme__code{background-color:#f0f2f5;display:block;font-family:Menlo,Consolas,Monaco,monospace;font-size:13px;line-height:1.53;margin:8px 0;overflow-x:auto;padding:8px 8px 8px 52px;position:relative;tab-size:2}.PlaygroundEditorTheme__code:before{background-color:#eee;border-right:1px solid #ccc;color:#777;content:attr(data-gutter);left:0;min-width:25px;padding:8px;position:absolute;text-align:right;top:0;white-space:pre-wrap}.PlaygroundEditorTheme__code:after{color:#00000080;content:attr(data-highlight-language);font-size:10px;padding:3px;position:absolute;right:3px;text-transform:uppercase;top:0}.PlaygroundEditorTheme__table{border-collapse:collapse;border-spacing:0;max-width:100%;overflow-y:scroll;table-layout:fixed;width:100%}.PlaygroundEditorTheme__tableCell{border:1px solid #000;min-width:75px;padding:6px 8px;text-align:start;vertical-align:top}.PlaygroundEditorTheme__tableCellHeader{background-color:#f2f3f5;text-align:start}.PlaygroundEditorTheme__characterLimit{background-color:#fbb!important;display:inline}.PlaygroundEditorTheme__ul{list-style-type:disc}.PlaygroundEditorTheme__ol1,.PlaygroundEditorTheme__ul{list-style-position:outside;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__ol1{list-style-type:decimal}.PlaygroundEditorTheme__ol2{list-style-position:outside;list-style-type:upper-alpha;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__ol3{list-style-position:outside;list-style-type:lower-alpha;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__ol4{list-style-position:outside;list-style-type:upper-roman;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__ol5{list-style-position:outside;list-style-type:lower-roman;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__listItem{display:list-item;margin:8px 24px 8px 8px;padding:0 8px}.PlaygroundEditorTheme__nestedListItem{list-style-type:inherit;margin-left:16px}ol .PlaygroundEditorTheme__nestedListItem{list-style-type:none}.PlaygroundEditorTheme__listItemChecked,.PlaygroundEditorTheme__listItemUnchecked{list-style-type:none;margin-left:8px;margin-right:8px;outline:none;padding-left:24px;padding-right:24px;position:relative}.PlaygroundEditorTheme__listItemChecked{text-decoration:line-through}.PlaygroundEditorTheme__listItemChecked:before,.PlaygroundEditorTheme__listItemUnchecked:before{background-size:cover;content:"";cursor:pointer;display:block;height:16px;left:0;position:absolute;top:2px;width:16px}.PlaygroundEditorTheme__listItemChecked[dir=rtl]:before,.PlaygroundEditorTheme__listItemUnchecked[dir=rtl]:before{left:auto;right:0}.PlaygroundEditorTheme__listItemChecked:focus:before,.PlaygroundEditorTheme__listItemUnchecked:focus:before{border-radius:2px;box-shadow:0 0 0 2px #a6cdfe}.PlaygroundEditorTheme__tokenComment{color:#708090}.PlaygroundEditorTheme__tokenPunctuation{color:#999}.PlaygroundEditorTheme__tokenProperty{color:#905}.PlaygroundEditorTheme__tokenSelector{color:#690}.PlaygroundEditorTheme__tokenOperator{color:#9a6e3a}.PlaygroundEditorTheme__tokenAttr{color:#07a}.PlaygroundEditorTheme__tokenVariable{color:#e90}.PlaygroundEditorTheme__tokenFunction{color:#dd4a68}.PlaygroundEditorTheme__mark{background:#ffd40024;border-bottom:2px solid #ffd4004d;padding-bottom:2px}.PlaygroundEditorTheme__markOverlap{background:#ffd4004d;border-bottom:2px solid #ffd400b3}.PlaygroundEditorTheme__mark.selected{background:#ffd40080;border-bottom:2px solid #ffd400}.PlaygroundEditorTheme__markOverlap.selected{background:#ffd400b3;border-bottom:2px solid #ffd400b3}.PlaygroundEditorTheme__embedBlock{user-select:none}.PlaygroundEditorTheme__embedBlockFocus{outline:2px solid #3c84f4}.PlaygroundEditorTheme__delete-node{text-decoration:var(--delete-node-text-decoration,line-through);text-decoration-color:var(--delete-node-decoration-color,#dc2626);text-decoration-thickness:var(--delete-node-decoration-thickness,2px)}.PlaygroundEditorTheme__insert-node{background-color:var(--insert-node-bg,#dbeafe);border-radius:var(--insert-node-border-radius,2px);color:var(--insert-node-color,#1e3a8a);padding:var(--insert-node-padding,1px 2px);text-decoration:var(--insert-node-text-decoration,none)}';!function(){if("undefined"==typeof document)return;const o=document.createElement("style");o.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&o.setAttribute("nonce",t),o.appendChild(document.createTextNode(e));const r=document.head||document.getElementsByTagName("head")[0]||document.documentElement;r&&r.appendChild(o)}(),exports.default=e;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e='.PlaygroundEditorTheme__ltr{text-align:left}.PlaygroundEditorTheme__rtl{text-align:right}.PlaygroundEditorTheme__paragraph{font-family:Inter,sans-serif;line-height:28px;margin:0 0 8px;position:relative}.PlaygroundEditorTheme__paragraph:last-child{margin-bottom:0}.PlaygroundEditorTheme__quote{border-left:4px solid #ced0d4;color:#65676b;font-size:15px;margin:0 0 10px 20px;padding-left:16px}.PlaygroundEditorTheme__h1{font-family:Inter,sans-serif;font-size:24px;margin:12px 0 4px;padding:0}.PlaygroundEditorTheme__h2{font-size:20px}.PlaygroundEditorTheme__h2,.PlaygroundEditorTheme__h3{font-family:Inter,sans-serif;margin:10px 0 0;padding:0}.PlaygroundEditorTheme__h3{font-size:18px;text-transform:uppercase}.PlaygroundEditorTheme__textBold{font-family:Inter,sans-serif;font-weight:700}.PlaygroundEditorTheme__textItalic{font-style:italic}.PlaygroundEditorTheme__textUnderline{text-decoration:underline}.PlaygroundEditorTheme__textStrikethrough{text-decoration:line-through}.PlaygroundEditorTheme__textUnderlineStrikethrough{text-decoration:underline line-through}.PlaygroundEditorTheme__textSubscript{font-size:.8em;vertical-align:sub!important}.PlaygroundEditorTheme__textSuperscript{font-size:.8em;vertical-align:super}.PlaygroundEditorTheme__textCode{background-color:#f0f2f5;font-family:Menlo,Consolas,Monaco,monospace;font-size:94%;padding:1px .25rem}.PlaygroundEditorTheme__hashtag{background-color:#5890ff26;border-bottom:1px solid #5890ff4d}.PlaygroundEditorTheme__link{color:#216fdb;text-decoration:none}.PlaygroundEditorTheme__link:hover{text-decoration:underline}.PlaygroundEditorTheme__code{background-color:#f0f2f5;display:block;font-family:Menlo,Consolas,Monaco,monospace;font-size:13px;line-height:1.53;margin:8px 0;overflow-x:auto;padding:8px 8px 8px 52px;position:relative;tab-size:2}.PlaygroundEditorTheme__code:before{background-color:#eee;border-right:1px solid #ccc;color:#777;content:attr(data-gutter);left:0;min-width:25px;padding:8px;position:absolute;text-align:right;top:0;white-space:pre-wrap}.PlaygroundEditorTheme__code:after{color:#00000080;content:attr(data-highlight-language);font-size:10px;padding:3px;position:absolute;right:3px;text-transform:uppercase;top:0}.PlaygroundEditorTheme__table{border-collapse:collapse;border-spacing:0;max-width:100%;overflow-y:scroll;table-layout:fixed;width:100%}.PlaygroundEditorTheme__tableCell{border:1px solid #000;min-width:75px;padding:6px 8px;text-align:start;vertical-align:top}.PlaygroundEditorTheme__tableCellHeader{background-color:#f2f3f5;text-align:start}.PlaygroundEditorTheme__characterLimit{background-color:#fbb!important;display:inline}.PlaygroundEditorTheme__ul{list-style-type:disc}.PlaygroundEditorTheme__ol1,.PlaygroundEditorTheme__ul{list-style-position:outside;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__ol1{list-style-type:decimal}.PlaygroundEditorTheme__ol2{list-style-position:outside;list-style-type:upper-alpha;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__ol3{list-style-position:outside;list-style-type:lower-alpha;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__ol4{list-style-position:outside;list-style-type:upper-roman;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__ol5{list-style-position:outside;list-style-type:lower-roman;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__listItem{display:list-item;margin:8px 24px 8px 8px;padding:0 8px}.PlaygroundEditorTheme__nestedListItem{list-style-type:inherit;margin-left:16px}ol .PlaygroundEditorTheme__nestedListItem{list-style-type:none}.PlaygroundEditorTheme__listItemChecked,.PlaygroundEditorTheme__listItemUnchecked{list-style-type:none;margin-left:8px;margin-right:8px;outline:none;padding-left:24px;padding-right:24px;position:relative}.PlaygroundEditorTheme__listItemChecked{text-decoration:line-through}.PlaygroundEditorTheme__listItemChecked:before,.PlaygroundEditorTheme__listItemUnchecked:before{background-size:cover;content:"";cursor:pointer;display:block;height:16px;left:0;position:absolute;top:2px;width:16px}.PlaygroundEditorTheme__listItemChecked[dir=rtl]:before,.PlaygroundEditorTheme__listItemUnchecked[dir=rtl]:before{left:auto;right:0}.PlaygroundEditorTheme__listItemChecked:focus:before,.PlaygroundEditorTheme__listItemUnchecked:focus:before{border-radius:2px;box-shadow:0 0 0 2px #a6cdfe}.PlaygroundEditorTheme__tokenComment{color:#708090}.PlaygroundEditorTheme__tokenPunctuation{color:#999}.PlaygroundEditorTheme__tokenProperty{color:#905}.PlaygroundEditorTheme__tokenSelector{color:#690}.PlaygroundEditorTheme__tokenOperator{color:#9a6e3a}.PlaygroundEditorTheme__tokenAttr{color:#07a}.PlaygroundEditorTheme__tokenVariable{color:#e90}.PlaygroundEditorTheme__tokenFunction{color:#dd4a68}.PlaygroundEditorTheme__mark{background:#ffd40024;border-bottom:2px solid #ffd4004d;padding-bottom:2px}.PlaygroundEditorTheme__markOverlap{background:#ffd4004d;border-bottom:2px solid #ffd400b3}.PlaygroundEditorTheme__mark.selected{background:#ffd40080;border-bottom:2px solid #ffd400}.PlaygroundEditorTheme__markOverlap.selected{background:#ffd400b3;border-bottom:2px solid #ffd400b3}.PlaygroundEditorTheme__embedBlock{user-select:none}.PlaygroundEditorTheme__embedBlockFocus{outline:2px solid #3c84f4}.PlaygroundEditorTheme__delete-node{text-decoration:var(--delete-node-text-decoration,line-through);text-decoration-color:var(--delete-node-decoration-color,#dc2626);text-decoration-thickness:var(--delete-node-decoration-thickness,2px)}.PlaygroundEditorTheme__insert-node{background-color:var(--insert-node-bg,#dbeafe);border-radius:var(--insert-node-border-radius,2px);color:var(--insert-node-color,#1e3a8a);padding:var(--insert-node-padding,1px 2px);text-decoration:var(--insert-node-text-decoration,none)}.PlaygroundEditorTheme__highlight-button{display:none}';!function(){if("undefined"==typeof document)return;const o=document.createElement("style");o.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&o.setAttribute("nonce",t),o.appendChild(document.createTextNode(e));const r=document.head||document.getElementsByTagName("head")[0]||document.documentElement;r&&r.appendChild(o)}(),exports.default=e;
|
|
2
2
|
//# sourceMappingURL=theme.css.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("./theme.css.js");exports.default={characterLimit:"PlaygroundEditorTheme__characterLimit",code:"PlaygroundEditorTheme__code",codeHighlight:{atrule:"PlaygroundEditorTheme__tokenAttr",attr:"PlaygroundEditorTheme__tokenAttr",boolean:"PlaygroundEditorTheme__tokenProperty",builtin:"PlaygroundEditorTheme__tokenSelector",cdata:"PlaygroundEditorTheme__tokenComment",char:"PlaygroundEditorTheme__tokenSelector",class:"PlaygroundEditorTheme__tokenFunction","class-name":"PlaygroundEditorTheme__tokenFunction",comment:"PlaygroundEditorTheme__tokenComment",constant:"PlaygroundEditorTheme__tokenProperty",deleted:"PlaygroundEditorTheme__tokenProperty",doctype:"PlaygroundEditorTheme__tokenComment",entity:"PlaygroundEditorTheme__tokenOperator",function:"PlaygroundEditorTheme__tokenFunction",important:"PlaygroundEditorTheme__tokenVariable",inserted:"PlaygroundEditorTheme__tokenSelector",keyword:"PlaygroundEditorTheme__tokenAttr",namespace:"PlaygroundEditorTheme__tokenVariable",number:"PlaygroundEditorTheme__tokenProperty",operator:"PlaygroundEditorTheme__tokenOperator",prolog:"PlaygroundEditorTheme__tokenComment",property:"PlaygroundEditorTheme__tokenProperty",punctuation:"PlaygroundEditorTheme__tokenPunctuation",regex:"PlaygroundEditorTheme__tokenVariable",selector:"PlaygroundEditorTheme__tokenSelector",string:"PlaygroundEditorTheme__tokenSelector",symbol:"PlaygroundEditorTheme__tokenProperty",tag:"PlaygroundEditorTheme__tokenProperty",url:"PlaygroundEditorTheme__tokenOperator",variable:"PlaygroundEditorTheme__tokenVariable"},embedBlock:{base:"PlaygroundEditorTheme__embedBlock",focus:"PlaygroundEditorTheme__embedBlockFocus"},hashtag:"PlaygroundEditorTheme__hashtag",heading:{h1:"PlaygroundEditorTheme__h1",h2:"PlaygroundEditorTheme__h2",h3:"PlaygroundEditorTheme__h3",h4:"PlaygroundEditorTheme__h4",h5:"PlaygroundEditorTheme__h5",h6:"PlaygroundEditorTheme__h6"},image:"editor-image",link:"PlaygroundEditorTheme__link",list:{listitem:"PlaygroundEditorTheme__listItem",listitemChecked:"PlaygroundEditorTheme__listItemChecked",listitemUnchecked:"PlaygroundEditorTheme__listItemUnchecked",nested:{listitem:"PlaygroundEditorTheme__nestedListItem"},olDepth:["PlaygroundEditorTheme__ol1","PlaygroundEditorTheme__ol2","PlaygroundEditorTheme__ol3","PlaygroundEditorTheme__ol4","PlaygroundEditorTheme__ol5"],ul:"PlaygroundEditorTheme__ul"},ltr:"PlaygroundEditorTheme__ltr",mark:"PlaygroundEditorTheme__mark",markOverlap:"PlaygroundEditorTheme__markOverlap",paragraph:"PlaygroundEditorTheme__paragraph",quote:"PlaygroundEditorTheme__quote",rtl:"PlaygroundEditorTheme__rtl",table:"PlaygroundEditorTheme__table",tableCell:"PlaygroundEditorTheme__tableCell",tableCellHeader:"PlaygroundEditorTheme__tableCellHeader",text:{bold:"PlaygroundEditorTheme__textBold",code:"PlaygroundEditorTheme__textCode",italic:"PlaygroundEditorTheme__textItalic",strikethrough:"PlaygroundEditorTheme__textStrikethrough",subscript:"PlaygroundEditorTheme__textSubscript",superscript:"PlaygroundEditorTheme__textSuperscript",underline:"PlaygroundEditorTheme__textUnderline",underlineStrikethrough:"PlaygroundEditorTheme__textUnderlineStrikethrough"},deleteNode:"PlaygroundEditorTheme__delete-node",insertNode:"PlaygroundEditorTheme__insert-node"};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("./theme.css.js");exports.default={characterLimit:"PlaygroundEditorTheme__characterLimit",code:"PlaygroundEditorTheme__code",codeHighlight:{atrule:"PlaygroundEditorTheme__tokenAttr",attr:"PlaygroundEditorTheme__tokenAttr",boolean:"PlaygroundEditorTheme__tokenProperty",builtin:"PlaygroundEditorTheme__tokenSelector",cdata:"PlaygroundEditorTheme__tokenComment",char:"PlaygroundEditorTheme__tokenSelector",class:"PlaygroundEditorTheme__tokenFunction","class-name":"PlaygroundEditorTheme__tokenFunction",comment:"PlaygroundEditorTheme__tokenComment",constant:"PlaygroundEditorTheme__tokenProperty",deleted:"PlaygroundEditorTheme__tokenProperty",doctype:"PlaygroundEditorTheme__tokenComment",entity:"PlaygroundEditorTheme__tokenOperator",function:"PlaygroundEditorTheme__tokenFunction",important:"PlaygroundEditorTheme__tokenVariable",inserted:"PlaygroundEditorTheme__tokenSelector",keyword:"PlaygroundEditorTheme__tokenAttr",namespace:"PlaygroundEditorTheme__tokenVariable",number:"PlaygroundEditorTheme__tokenProperty",operator:"PlaygroundEditorTheme__tokenOperator",prolog:"PlaygroundEditorTheme__tokenComment",property:"PlaygroundEditorTheme__tokenProperty",punctuation:"PlaygroundEditorTheme__tokenPunctuation",regex:"PlaygroundEditorTheme__tokenVariable",selector:"PlaygroundEditorTheme__tokenSelector",string:"PlaygroundEditorTheme__tokenSelector",symbol:"PlaygroundEditorTheme__tokenProperty",tag:"PlaygroundEditorTheme__tokenProperty",url:"PlaygroundEditorTheme__tokenOperator",variable:"PlaygroundEditorTheme__tokenVariable"},embedBlock:{base:"PlaygroundEditorTheme__embedBlock",focus:"PlaygroundEditorTheme__embedBlockFocus"},hashtag:"PlaygroundEditorTheme__hashtag",heading:{h1:"PlaygroundEditorTheme__h1",h2:"PlaygroundEditorTheme__h2",h3:"PlaygroundEditorTheme__h3",h4:"PlaygroundEditorTheme__h4",h5:"PlaygroundEditorTheme__h5",h6:"PlaygroundEditorTheme__h6"},image:"editor-image",link:"PlaygroundEditorTheme__link",list:{listitem:"PlaygroundEditorTheme__listItem",listitemChecked:"PlaygroundEditorTheme__listItemChecked",listitemUnchecked:"PlaygroundEditorTheme__listItemUnchecked",nested:{listitem:"PlaygroundEditorTheme__nestedListItem"},olDepth:["PlaygroundEditorTheme__ol1","PlaygroundEditorTheme__ol2","PlaygroundEditorTheme__ol3","PlaygroundEditorTheme__ol4","PlaygroundEditorTheme__ol5"],ul:"PlaygroundEditorTheme__ul"},ltr:"PlaygroundEditorTheme__ltr",mark:"PlaygroundEditorTheme__mark",markOverlap:"PlaygroundEditorTheme__markOverlap",paragraph:"PlaygroundEditorTheme__paragraph",quote:"PlaygroundEditorTheme__quote",rtl:"PlaygroundEditorTheme__rtl",table:"PlaygroundEditorTheme__table",tableCell:"PlaygroundEditorTheme__tableCell",tableCellHeader:"PlaygroundEditorTheme__tableCellHeader",text:{bold:"PlaygroundEditorTheme__textBold",code:"PlaygroundEditorTheme__textCode",italic:"PlaygroundEditorTheme__textItalic",strikethrough:"PlaygroundEditorTheme__textStrikethrough",subscript:"PlaygroundEditorTheme__textSubscript",superscript:"PlaygroundEditorTheme__textSuperscript",underline:"PlaygroundEditorTheme__textUnderline",underlineStrikethrough:"PlaygroundEditorTheme__textUnderlineStrikethrough"},deleteNode:"PlaygroundEditorTheme__delete-node",insertNode:"PlaygroundEditorTheme__insert-node",highlightButton:"PlaygroundEditorTheme__highlight-button"};
|
|
2
2
|
//# sourceMappingURL=theme.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),n=require("./Editor/constants/editorConfig.js"),o=require("./Editor/Editor.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),n=require("./Editor/constants/editorConfig.js"),o=require("./Editor/Editor.js"),i=require("../../store/ref.context.js"),a=require("@lexical/html"),u=require("turndown"),c=require("turndown-plugin-gfm");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=new(l(u).default)({headingStyle:"atx",codeBlockStyle:"fenced"});d.keep(["ins","del","mark"]),d.keep(function(e){var t,r;return"A"===e.nodeName&&null!==(r=null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("ai_reasoning$"))&&void 0!==r&&r}),d.keep(function(e){return"SPAN"===e.nodeName&&e.hasAttribute("highlight-id")}),d.addRule("md-table-passthrough",{filter:function(e){return"PRE"===e.nodeName&&"true"===e.getAttribute("data-md-table")},replacement:function(e,t){return t.textContent||""}}),d.use(c.tables);exports.default=function(u){var c=u.type,l=u.value,s=u.handleUpdateState,f=u.onBlur,h=u.placeholder,g=u.minHeight,p=u.height,m=u.mode,v=u.doNotShowBorderInViewMode,E=r.useRef(null),A=r.useState({type:c,value:l}),b=A[0],y=A[1],w=r.useState(0),x=w[0],S=w[1],q=i.useRefStore(),N=q.contentRef;q.setContentRef;r.useEffect(function(){y(function(t){return e.__assign(e.__assign({},t),{value:l})})},[l]);return r.useEffect(function(){var e=function(){N&&N.current&&S(N.current.clientHeight-60)};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[N]),t.jsx(t.Fragment,{children:t.jsx(o.default,{minHeight:g,height:p,placeholder:h||"Enter some text...",onChange:function(e,t){e.read(function(){var e=a.$generateHtmlFromNodes(t,null),r=(new DOMParser).parseFromString(e,"text/html");function n(e){return Array.from(e.childNodes).map(function(e){if(e.nodeType===Node.TEXT_NODE)return e.textContent||"";if(e.nodeType===Node.ELEMENT_NODE){var t=e,r=t.tagName.toLowerCase(),o=n(t);if("strong"===r||"b"===r)return o.startsWith("<strong>")&&o.endsWith("</strong>")?o:"<strong>".concat(o,"</strong>");if("em"===r||"i"===r)return o.startsWith("<em>")&&o.endsWith("</em>")?o:"<em>".concat(o,"</em>");if("code"===r)return"<code>".concat(o,"</code>");if("u"===r)return"<u>".concat(o,"</u>");if("s"===r)return"<s>".concat(o,"</s>");if("a"===r){var i=t.getAttribute("href")||"";return'<a href="'.concat(i,'">').concat(o,"</a>")}return o}return""}).join("")}r.querySelectorAll("span").forEach(function(e){var t=e.getAttribute("style")||"";t.includes("background-color")&&t.includes("rgb(219, 234, 254)")&&e.setAttribute("data-review","insert"),t.includes("text-decoration")&&t.includes("line-through")&&e.setAttribute("data-review","delete")}),r.querySelectorAll("strong code").forEach(function(e){var t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll("code strong").forEach(function(e){var t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll('a[href*="ai_reasoning$"]').forEach(function(e){var t=e.getAttribute("href")||"";e.setAttribute("href",t.replace(/^https?:\/\//,""))}),r.querySelectorAll('a[href*="ai_reasoning$"]').forEach(function(e){var t=e.getAttribute("href")||"";e.setAttribute("href",t.replace(/^https?:\/\//,""))}),r.querySelectorAll("ins[data-review-id], del[data-review-id]").forEach(function(e){e.innerHTML=n(e)});var o=[];r.querySelectorAll("ins[data-review-id], del[data-review-id]").forEach(function(e,t){o.push(e.outerHTML);var n=r.createElement("span");n.textContent="%%REVIEW_".concat(t,"%%"),e.replaceWith(n)});var i=[];r.querySelectorAll("table").forEach(function(e,t){i.push(e.outerHTML);var n=r.createElement("p");n.textContent="%%TABLE_".concat(t,"%%"),e.replaceWith(n)});var u=d.turndown(r.body.innerHTML);o.forEach(function(e,t){u=u.replace("%%REVIEW\\_".concat(t,"%%"),e)}),i.forEach(function(e,t){u=u.replace("%%TABLE\\_".concat(t,"%%"),"\n\n".concat(e,"\n\n"))}),function(e,t){s(e,t)}("prompt",u=u.replace(/\*{4}([^*]+)\*{4}/g,"**$1**"))})},toolbarConfig:n.DEFAULT_TOOLBAR_CONFIG,editorRef:E,mode:m,initialString:{type:b.type,value:b.value},dynamicHeight:x,onBlur:f,doNotShowBorderInViewMode:v||!1})})};
|
|
2
2
|
//# sourceMappingURL=RichTextEditor.js.map
|
|
@@ -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"),i=require("lucide-react"),s=require("showdown"),l=require("@mui/material"),o=require("../../icons/Illustration.svg.js"),a=require("uuid"),r=require("./UserStoryCard.module.css.js"),u=require("../../utils/helpers.js"),d=require("../../utils/user-story.utils.js"),c=require("../../shared/AtomicButton.js"),v=require("../RichTextEditor/RichTextEditor.js"),f=require("../userstory-with-citation/UserStoryWithCitation.js"),_=require("../RequirementAIWrapper/RequirementAIWrapper.js"),g=require("../story-screen/BigEnoughPanel.js"),h=require("./TitleEditor/TitleEditor.js"),p=require("./ClinicalTrialSection.js"),m=require("../story-screen/CompletionPanel.js"),y=require("../../icons/CDIcon.js");function S(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x,C=S(s),j=((x={})[_.SectionStatus.WAITING]="WAITING TO GENERATE",x[_.SectionStatus.IN_PROGRESS]="IN PROGRESS",x[_.SectionStatus.GENERATED]="GENERATED",x[_.SectionStatus.FAILED]="FAILED",x[_.SectionStatus.GENERATE]="GENERATE",x);function I(n){for(var s,o=[],r=/<learned>(.*?)<\/learned>/g,u=0,d=0;null!==(s=r.exec(n));){var c=s[1],v=s.index;v>u&&o.push(t.jsx("span",{children:n.slice(u,v)},"text-pre-".concat(d++))),o.push(t.jsx(l.Tooltip,e.__assign({title:c,placement:"top"},{children:t.jsx(i.Info,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(a.v4()))),u=r.lastIndex}return u<(null==n?void 0:n.length)&&o.push(t.jsx("span",{children:n.slice(u)},"text-post-".concat(d++))),o}function w(t,n,i){var s;if(!t)return{};if(n)return e.__assign({},t.parentConfig);var l=e.__assign({},t.childConfig);return i&&(null===(s=t.subFeatureOverrides)||void 0===s?void 0:s[i])?e.__assign(e.__assign({},l),t.subFeatureOverrides[i]):l}var N=function(n){var s,l=n.displayName,o=_.useRequirementAI().customStyles,a=null===(s=null==o?void 0:o.userStoryCardStyles)||void 0===s?void 0:s.showDisplayName;return t.jsxs("div",e.__assign({className:r.default.displayName,style:null==a?void 0:a.wrapper},{children:[t.jsx(i.Bookmark,{className:r.default.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),t.jsxs("span",e.__assign({style:null==a?void 0:a.label},{children:[l,":"]}))]}))},b=function(s){var S,x,E,D,B,T,A,k,U,R,P,M,q,L,F,W,G,H,z,O,V=s.isUserStoryCurrentlyUpdated,Q=s.artifactId,X=s.artifactTitleId,Z=s.parentUserStory,J=s.currentUserStory,K=s.onUserStoryChange,Y=s.parentIndex,$=s.currentIndex,ee=s.enableDownload,te=s.isDiffEditReviewMode,ne=s.showUserStoryDiff,ie=s.handleDownloadUserStory,se=s.handleOpenSendDialog,le=s.updateUserStoryArtifact,oe=s.selectedArtifactId,ae=s.isDisplayHighlightControl,re=s.elementDisplayConfig,ue=s._resolvedConfig,de=s.showWrapper,ce=void 0!==de&&de,ve=s.defaultExpanded,fe=s.actionItemsConfig,_e=s.onDelete,ge=s.contextVariant,he=s.expandedSubFeatures,pe=s.showDisplayName,me=void 0===pe||pe,ye=s.allowTitleEdit,Se=void 0===ye||ye,xe=s.showConfidenceScore,Ce=void 0===xe||xe,je=s.showBorderTop,Ie=void 0===je||je,we=s.sectionStatusConfig,Ne=s.showCompletionPanel,be=void 0!==Ne&&Ne,Ee=s.showAddSectionButton,De=void 0!==Ee&&Ee,Be=null!=we?we:{},Te=Be.isLoadingSectionData,Ae=void 0!==Te&&Te,ke=Be.onLoadSectionData,Ue=Be.status,Re=Be.onStatusClick,Pe=Be.completedCount,Me=Be.totalCount,qe=Be.isNoDataAvailable,Le=void 0!==qe&&qe,Fe=_.useRequirementAI(),We=Fe.searchQueryList,Ge=Fe.citations,He=Fe.customStyles,ze=Fe.customSectionConfig,Oe=null==He?void 0:He.userStoryCardStyles,Ve=null==Oe?void 0:Oe.statusStyles,Qe=null===(x=null==He?void 0:He.userStoryCardStyles)||void 0===x?void 0:x.userStoryEditStyles,Xe=null===(E=null==He?void 0:He.userStoryScreenStyles)||void 0===E?void 0:E.userStoryContentStyles,Ze=null==Oe?void 0:Oe.progressHeaderStyles,Je=null==Oe?void 0:Oe.clinicalTrialSectionStyles,Ke=null==Oe?void 0:Oe.CompletionStyles,Ye=null!==(B=null===(D=null==ze?void 0:ze.shouldRender)||void 0===D?void 0:D.call(ze,J))&&void 0!==B&&B,$e=null===(T=null==ze?void 0:ze.getValue)||void 0===T?void 0:T.call(ze,J),et=null!==(k=null===(A=null==ze?void 0:ze.getFields)||void 0===A?void 0:A.call(ze,J))&&void 0!==k?k:[],tt=null!==(R=null===(U=null==ze?void 0:ze.isSaving)||void 0===U?void 0:U.call(ze,J))&&void 0!==R&&R,nt=(z=null!==(P=J.completion_percentage)&&void 0!==P?P:0,O=Ke,z>=80?null==O?void 0:O.highCompletion:z>=50?null==O?void 0:O.mediumCompletion:null==O?void 0:O.lowCompletion),it=((S={})[_.SectionStatus.WAITING]=null==Ve?void 0:Ve.waiting,S[_.SectionStatus.IN_PROGRESS]=null==Ve?void 0:Ve.inProgress,S[_.SectionStatus.GENERATED]=null==Ve?void 0:Ve.generated,S[_.SectionStatus.FAILED]=null==Ve?void 0:Ve.failed,S[_.SectionStatus.GENERATE]=null==Ve?void 0:Ve.generate,S),st=n.useState(e.__assign(e.__assign({},structuredClone(J)),{value:u.formatMarkdown(J.value)||""})),lt=st[0],ot=st[1],at=n.useState({userStory:!!J.isDefaultEdit}),rt=at[0],ut=at[1],dt=n.useState(!1),ct=dt[0],vt=dt[1],ft=n.useState(!1),_t=ft[0],gt=ft[1],ht=n.useState(null),pt=ht[0],mt=ht[1],yt=n.useState(null),St=yt[0],xt=yt[1],Ct=_.useRequirementAI(),jt=Ct.userStory,It=Ct.customIcons,wt=n.useState(null!=ve?ve:""===Y||oe===J.artifactId||!!J.isDefaultOpen),Nt=wt[0],bt=wt[1],Et=n.useState(!1);Et[0];var Dt=Et[1],Bt=n.useState(null),Tt=Bt[0],At=Bt[1],kt=n.useState(null),Ut=kt[0],Rt=kt[1],Pt=n.useState(!1),Mt=Pt[0],qt=Pt[1],Lt=n.useRef(null),Ft=n.useState(!1);Ft[0];var Wt=Ft[1],Gt=n.useState(!1),Ht=Gt[0],zt=Gt[1],Ot=n.useRef(null);n.useEffect(function(){V&&bt(V)},[V]),n.useEffect(function(){ot(e.__assign(e.__assign({},structuredClone(J)),{value:u.formatMarkdown(J.value)||""}))},[J]),n.useEffect(function(){We.length>0?bt(!0):void 0===ve&&(oe?bt(oe===J.artifactId):he&&he.length>0&&bt(he.includes(J.artifactId)))},[We,oe,J.artifactId,he]);var Vt=function(){At(null)},Qt=function(){Rt(null)},Xt=function(){bt(function(e){return!e})};var Zt=null!=(null==J?void 0:J.big_enough)&&!Number.isNaN(J.big_enough)&&!!(null==J?void 0:J.big_enough_decision_factors),Jt=null!==(M=null==J?void 0:J.completion_percentage)&&void 0!==M?M:0,Kt=!!(null==J?void 0:J.completion_decision_factors),Yt=""===Y,$t=null!=ue?ue:w(re,Yt),en=!te&&!ne;return n.useEffect(function(){if(St){var e=setTimeout(function(){var e=document.getElementById("story-card-".concat(St));null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return function(){return clearTimeout(e)}}},[St]),n.useEffect(function(){J.isDefaultEdit&&ut(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})},[J.isDefaultEdit]),t.jsxs("div",e.__assign({className:r.default.card,style:null==Oe?void 0:Oe.cardStyle,id:"story-card-".concat(J.title),"data-expanded":Nt},{children:[t.jsxs("div",e.__assign({className:r.default.titleSection,style:null==Oe?void 0:Oe.titleSection},{children:[t.jsxs("div",e.__assign({className:r.default.titleRow,style:null==Oe?void 0:Oe.titleRow,onClick:Xt},{children:[t.jsxs("div",e.__assign({className:r.default.titleLeft,style:null==Oe?void 0:Oe.titleLeft,onMouseEnter:function(){return Wt(!0)},onMouseLeave:function(){return Wt(!1)}},{children:[me&&t.jsx(N,{displayName:X}),ct&&en?t.jsx(h.InlineTitleEditor,{title:J.title,onSave:function(t){return function(t,n){return e.__awaiter(void 0,void 0,void 0,function(){var i,s;return e.__generator(this,function(l){try{i=e.__assign({},J),J.artifactId===n?i.title=t:i.sub_features=(null===(s=J.sub_features)||void 0===s?void 0:s.map(function(i){return i.artifactId===n?e.__assign(e.__assign({},i),{title:t}):i}))||[],ot(i),K(i),vt(!1)}catch(e){console.error("Failed to save title",e)}return[2]})})}(t,J.artifactId)},onCancel:function(){vt(!1)},inputStyle:null==Qe?void 0:Qe.inlineTitleInput,confirmButtonStyle:null==Qe?void 0:Qe.inlineTitleConfirm,cancelButtonStyle:null==Qe?void 0:Qe.inlineTitleCancel},"inline-title-editor"):t.jsxs("div",e.__assign({className:r.default.storyTitleWrapper},{children:[t.jsx("h2",e.__assign({title:J.title,className:r.default.storyTitle,style:null==Oe?void 0:Oe.storyTitle},{children:I(J.title)}),J.artifactId),be&&!Ye&&(Kt?t.jsx(m.CompletionPanel,e.__assign({customIcons:null==It?void 0:It.userStoryIcons,customStyles:null==Oe?void 0:Oe.aiReasoningCitaionStyles,currentUserStory:J,panelStyles:null==Oe?void 0:Oe.CompletionStyles,onToggleStateChange:zt},{children:t.jsxs("div",e.__assign({style:e.__assign(e.__assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==Ke?void 0:Ke.badge),nt)},{children:[t.jsxs("span",{children:[Jt,"% Completed"]}),t.jsx("span",e.__assign({style:{display:"flex",alignItems:"center"}},{children:t.jsx(y.default,{color:"currentColor"})})),Ht?t.jsx(i.ChevronUp,{size:14,style:null==Ke?void 0:Ke.chevronStyle}):t.jsx(i.ChevronDown,{size:14,style:null==Ke?void 0:Ke.chevronStyle})]}))})):t.jsx("div",e.__assign({style:e.__assign(e.__assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==Ke?void 0:Ke.badge),nt)},{children:t.jsxs("span",{children:[Jt,"% Completed"]})}))),Se&&t.jsx("button",e.__assign({type:"button",className:r.default.titleEditButton,style:null==Qe?void 0:Qe.titleEditButton,onClick:function(e){e.stopPropagation(),vt(!0),Nt||bt(!0)},"aria-label":"Edit title",title:"Edit title"},{children:t.jsx("svg",e.__assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:t.jsx("path",{d:"M8.99998 14.9992H15.75M2.25 14.9992H3.50591C3.87279 14.9992 4.05624 14.9992 4.22887 14.9577C4.38192 14.921 4.52824 14.8604 4.66245 14.7782C4.81382 14.6854 4.94354 14.5557 5.20296 14.2962L14.625 4.87419C15.2463 4.25287 15.2463 3.24551 14.625 2.62419C14.0037 2.00287 12.9963 2.00287 12.375 2.62419L2.95295 12.0462C2.69352 12.3057 2.5638 12.4354 2.47104 12.5868C2.3888 12.721 2.32819 12.8673 2.29145 13.0203C2.25 13.193 2.25 13.3764 2.25 13.7433V14.9992Z",stroke:"#94A3B8","stroke-width":"1.54286","stroke-linecap":"round","stroke-linejoin":"round"})}))}))]}))]})),(Ue||void 0!==Pe&&void 0!==Me)&&t.jsxs("div",e.__assign({className:r.default.statusContainer},{children:[void 0!==Pe&&void 0!==Me&&t.jsxs("div",e.__assign({className:r.default.completedBadge},{children:["Completed: ",Pe,"/",Me]})),Ue&&t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),null==Re||Re()},className:r.default.statusButton,style:it[Ue]},{children:j[Ue]}))]})),t.jsxs("div",e.__assign({className:r.default.titleActions,style:null==Oe?void 0:Oe.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[($t.showProgressPercentage||$t.showGapBox)&&ce&&t.jsxs("div",e.__assign({className:r.default.progressHeader,style:null==Ze?void 0:Ze.wrapper},{children:[$t.showProgressPercentage&&t.jsxs("div",e.__assign({className:r.default.progressPercentage,style:null==Ze?void 0:Ze.percentage},{children:[null!==(L=null!==(q=null==J?void 0:J.confidenceScore)&&void 0!==q?q:null==$t?void 0:$t.confidenceValue)&&void 0!==L?L:"0","%"]})),$t.showGapBox&&t.jsxs("div",e.__assign({className:r.default.gapBox,style:null==Ze?void 0:Ze.gapBox},{children:[null!==(W=null!==(F=null==J?void 0:J.gapValue)&&void 0!==F?F:null==$t?void 0:$t.gapBoxValue)&&void 0!==W?W:"2"," ","Gaps"]}))]})),Zt&&t.jsx(g.BigEnoughPanel,{customIcons:null==It?void 0:It.userStoryIcons,customStyles:null==Oe?void 0:Oe.aiReasoningCitaionStyles,currentUserStory:J,panelStyles:null==Oe?void 0:Oe.BigEnoughStyles}),!rt.userStory&&t.jsxs(t.Fragment,{children:[!1!==(null==$t?void 0:$t.showShareButton)&&t.jsx("button",e.__assign({className:r.default.iconButton,style:null==Oe?void 0:Oe.iconButton,onClick:function(e){At(e.currentTarget)}},{children:t.jsx(i.ExternalLink,{size:16})})),t.jsxs(l.Menu,e.__assign({id:"user-story-share-menu",anchorEl:Tt,open:!!Tt,onClose:function(){return At(null)},style:null==Oe?void 0:Oe.userStoryShareMenu},{children:[ee&&t.jsx(l.MenuItem,e.__assign({style:null==Oe?void 0:Oe.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return Dt(!0),ie?[4,Promise.all([ie("pdf"),ie("doc")])]:[2];case 1:return e.sent(),Dt(!1),[2]}})})}},{children:t.jsxs("div",e.__assign({ref:Lt,className:r.default.menuItemContent,style:null==Oe?void 0:Oe.menuItemContent},{children:[t.jsx(i.Download,{size:16,color:null==Oe?void 0:Oe.menuIconColor}),t.jsx("p",e.__assign({style:null==Oe?void 0:Oe.menuLabel},{children:"Download"}))]}))})),t.jsx(l.MenuItem,e.__assign({style:null==Oe?void 0:Oe.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(n){return t=J,Z&&(t=e.__assign(e.__assign({},J),{value:"".concat(d.replaceTitleSection(null==Z?void 0:Z.value,J.title)," \n").concat(J.value)})),null==se||se(!0,[t],J.artifactId),Vt(),[2]})})}},{children:t.jsxs("div",e.__assign({style:null==Oe?void 0:Oe.menuItemContent,className:r.default.menuItemContentPadded},{children:[t.jsx(i.Share2,{size:16,color:null==Oe?void 0:Oe.menuIconColor}),t.jsx("p",e.__assign({style:null==Oe?void 0:Oe.menuLabel},{children:"Send"}))]}))})),t.jsx(l.MenuItem,e.__assign({style:null==Oe?void 0:Oe.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t,n,i,s,l;return e.__generator(this,function(e){switch(e.label){case 0:t=new C.default.Converter,n=t.makeHtml(u.formatMarkdown(J.value)||J.value),i=function(e){var t=(new C.default.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(u.formatMarkdown(J.value)||J.value),s=new ClipboardItem({"text/plain":new Blob([i],{type:"text/plain"}),"text/html":new Blob([n],{type:"text/html"})}),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,navigator.clipboard.write([s])];case 2:return e.sent(),console.log("Copied User Story"),[3,5];case 3:return l=e.sent(),console.error("Failed to copy user story:",l),[3,5];case 4:return Vt(),[7];case 5:return[2]}})})}},{children:t.jsxs("div",e.__assign({style:null==Oe?void 0:Oe.menuItemContent,className:r.default.menuItemContentPadded},{children:[t.jsx(i.Copy,{size:16,color:null==Oe?void 0:Oe.menuIconColor}),t.jsx("p",e.__assign({style:null==Oe?void 0:Oe.menuLabel},{children:"Copy"}))]}))}))]}))]}),rt.userStory&&Nt?t.jsx(c.default,{type:"outline",children:"Cancel",style:null==Oe?void 0:Oe.cancelButton,onClick:function(){var t;null===(t=Ot.current)||void 0===t||t.abort(),ut(function(t){return e.__assign(e.__assign({},t),{userStory:!1})})}}):t.jsx(t.Fragment,{}),rt.userStory&&Nt?t.jsx(c.default,{type:"fill",children:Mt?t.jsxs("span",e.__assign({className:r.default.savingSpinner,style:null==Oe?void 0:Oe.savingSpinner},{children:[t.jsx(i.LoaderCircle,{className:r.default.spinAnimation,style:null==Oe?void 0:Oe.spinAnimation}),t.jsx("span",{children:"Saving..."})]})):"Save",isDisable:Mt,style:Mt?null==Oe?void 0:Oe.savingButton:null==Oe?void 0:Oe.saveButton,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(n){switch(n.label){case 0:return qt(!0),"userStory"==="userStory"&&(K(lt),console.log("I am changing RTE editor values",lt)),[4,le(Ge,jt,Q,null===(t=Ot.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),K(e.__assign(e.__assign({},lt),{isDefaultEdit:!1})),ut(function(t){return e.__assign(e.__assign({},t),{userStory:!1})}),qt(!1),[2]}})})}}):!te&&!ne&&Nt&&!1!==(null==$t?void 0:$t.showEditButton)&&t.jsx("button",e.__assign({className:r.default.iconButton,style:null==Oe?void 0:Oe.editButton,onClick:function(){return ut(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})}},{children:t.jsx(i.PencilIcon,{color:null==Oe?void 0:Oe.pencilIconColor,size:16})})),De&&Yt&&Nt&&!te&&!ne&&!1!==(null==$t?void 0:$t.showEditButton)&&t.jsxs("button",e.__assign({type:"button",className:r.default.addSectionButton,style:null==Qe?void 0:Qe.addSectionButton,onClick:function(t){var n,i,s;t.stopPropagation();var l=(null!==(i=null===(n=J.sub_features)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1,o={artifactId:a.v4(),title:"New Section ".concat(l),value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},r=e.__assign(e.__assign({},J),{sub_features:e.__spreadArray(e.__spreadArray([],null!==(s=J.sub_features)&&void 0!==s?s:[],!0),[o],!1)});ot(r),K(r),bt(!0),xt(o.title)},"aria-label":"Add section",title:"Add section"},{children:[t.jsx(i.Plus,{size:14}),t.jsx("span",e.__assign({className:r.default.addSectionLabel},{children:"Add Section"}))]})),!Yt&&!te&&!ne&&t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),null==_e||_e()},className:r.default.iconButton,style:null==Qe?void 0:Qe.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:t.jsx(i.Trash2,{size:16})})),Ye&&t.jsx("button",e.__assign({type:"button",className:r.default.iconButton,onClick:function(e){if(e.stopPropagation(),_t)return mt(null),void gt(!1);mt(structuredClone(null!=$e?$e:{})),bt(!0),gt(!0)}},{children:_t?t.jsx(i.X,{size:16,color:null==Oe?void 0:Oe.pencilIconColor}):t.jsx(i.PencilIcon,{size:16,color:null==Oe?void 0:Oe.pencilIconColor})})),(null==$t?void 0:$t.actionItemsButton)&&t.jsxs(t.Fragment,{children:[t.jsx("span",e.__assign({className:r.default.actionItemBtn,style:null==Oe?void 0:Oe.actionItemBtn,onClick:function(e){e.stopPropagation(),Rt(e.currentTarget)}},{children:t.jsx(i.Ellipsis,{})})),t.jsx(l.Menu,e.__assign({id:"user-story-action-menu",anchorEl:Ut,open:!!Ut,onClose:Qt,style:null==Oe?void 0:Oe.userStoryShareMenu},{children:null==fe?void 0:fe.items.map(function(n,i){return t.jsx(l.MenuItem,e.__assign({style:null==Oe?void 0:Oe.userStoryMenuItem,onClick:function(){n.onclick(J),Qt()}},{children:t.jsxs("div",e.__assign({className:r.default.menuItemContent,style:e.__assign(e.__assign({},null==Oe?void 0:Oe.menuItemContent),!n.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[t.jsx("span",e.__assign({className:r.default.menuItemIcon,style:null==Oe?void 0:Oe.menuItemIcon},{children:n.icon})),t.jsx("p",e.__assign({style:null==Oe?void 0:Oe.menuLabel},{children:n.name})),t.jsx("span",{className:r.default.menuItemRight,style:null==Oe?void 0:Oe.menuItemRight})]}))}),"action-item-".concat(i,"-").concat(n.name))})}))]}),t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),Xt()},style:null==Oe?void 0:Oe.chevronButton,className:r.default.chevronButton},{children:Nt?t.jsx(i.ChevronUp,{className:r.default.chevronIcon,color:null==Oe?void 0:Oe.chevronIconColor}):t.jsx(i.ChevronDown,{className:r.default.chevronIcon,color:null==Oe?void 0:Oe.chevronIconColor})}))]}))]})),t.jsx("div",{className:r.default.divider,style:null==Oe?void 0:Oe.dividerStyle})]})),Nt&&t.jsx("div",e.__assign({className:r.default.cardContent,style:e.__assign(e.__assign({},null==Oe?void 0:Oe.cardContentStyle),{borderTop:Ie?"1px solid #E5E5E5":"none"})},{children:Ae?t.jsxs("div",e.__assign({className:r.default.loadingContainer},{children:[t.jsx("div",e.__assign({className:r.default.loadingIconWrapper},{children:t.jsx(i.Hourglass,{size:28,color:"#5B3DF5",className:r.default.spinAnimation})})),t.jsxs("div",{children:[t.jsx("h3",e.__assign({className:r.default.loadingTitle},{children:"Section generation in progress.."})),t.jsx("p",e.__assign({className:r.default.loadingSubtitle},{children:"This may take a few minutes"}))]}),t.jsx("button",e.__assign({type:"button",onClick:function(){return null==ke?void 0:ke()},className:r.default.viewStatusButton},{children:"View Status"}))]})):Le?t.jsxs("div",e.__assign({className:r.default.noDataContainer},{children:[t.jsx("img",{src:o.default,alt:"No data available",className:r.default.noDataIllustration}),t.jsx("h3",e.__assign({className:r.default.noDataTitle},{children:"No Data Available for This Section"})),t.jsx("p",e.__assign({className:r.default.noDataSubtitle},{children:"We couldn't find data for this section yet. Upload the required document from the Documents tab to generate content."}))]})):t.jsxs("div",e.__assign({className:r.default.contentInner,style:null==Oe?void 0:Oe.contentInner},{children:[t.jsxs("div",e.__assign({className:r.default.descriptionSection,style:null==Oe?void 0:Oe.descriptionSection},{children:[t.jsx("div",{className:r.default.justifyBetween,style:null==Oe?void 0:Oe.justifyBetween}),rt.userStory?t.jsx(v.default,{minHeight:"100%",height:"100%",type:"string",value:u.formatMarkdown(J.value)||"",handleUpdateState:function(t,n){var i=u.indentMarkdown(n);ot(function(t){return e.__assign(e.__assign({},t),{value:i||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:rt.userStory?"edit":"readOnly"}):Ye?t.jsx(p.default,{styles:Je,fields:et,readonly:!_t,isSaving:tt,value:null!==(G=null!=pt?pt:$e)&&void 0!==G?G:{},onChange:mt,onSave:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return pt?[4,null===(t=null==ze?void 0:ze.onSave)||void 0===t?void 0:t.call(ze,J,pt)]:[2];case 1:return e.sent(),mt(null),gt(!1),[2]}})})},onCancel:function(){mt(null),gt(!1)}}):t.jsx(f.default,{showUserStoryDiff:ne,isParent:""===Y,message:u.formatMarkdown(J.value)||"",artifactId:J.artifactId,customStyles:Xe,isDisplayHighlightControl:ae,contextVariant:ge,showConfidenceScore:Ce})]})),null===(H=lt.sub_features)||void 0===H?void 0:H.map(function(n,i){var s=w(re,!1,n.artifactId);return t.jsx(b,{artifactId:Q,isUserStoryCurrentlyUpdated:V,artifactTitleId:"".concat(X,"-").concat(String.fromCharCode(65+i)),parentUserStory:J,parentIndex:"".concat(Y).concat(Y&&".").concat($),currentIndex:"".concat(i+1),doNotShowBorderInViewMode:!1,currentUserStory:n,onUserStoryChange:function(t){return function(t,n){var i=e.__spreadArray([],J.sub_features||[],!0);i[t]=n,K(e.__assign(e.__assign({},J),{sub_features:i}))}(i,t)},enableDownload:!0,isDiffEditReviewMode:te,showUserStoryDiff:ne,updateUserStoryArtifact:le,handleDownloadUserStory:ie,handleOpenSendDialog:se,isDisplayHighlightControl:ae,elementDisplayConfig:re,_resolvedConfig:s,actionItemsConfig:fe,onDelete:function(){return function(t){var n=(J.sub_features||[]).filter(function(e,n){return n!==t}),i=e.__assign(e.__assign({},J),{sub_features:n});ot(i),K(i)}(i)},expandedSubFeatures:he},n.artifactId)})]}))}))]}))};exports.StoryCard=b,exports.UserStoryCardWrapper=function(n){var s=n.artifactTitleIDs,l=n.expandedSubFeatures,o=n.isDiffEditReviewMode,a=n.showUserStoryDiff,u=n.updateUserStoryArtifact,d=n.isUserStoryCurrentlyUpdated,c=n.artifactId,v=n.handleOpenSendDialog,f=n.handleDownloadUserStory,g=n.selectedArtifactId,h=n.isDisplayHighlightControl,p=n.elementDisplayConfig,m=n.showWrapper,y=n.actionItemsConfig,S=n.contextVariant,x=n.showDisplayName,C=n.allowTitleEdit,j=n.showConfidenceScore,I=n.showBorderTop,N=n.defaultExpanded,E=n.showCompletionPanel,D=void 0!==E&&E,B=n.showAddSectionButton,T=void 0!==B&&B,A=_.useRequirementAI(),k=A.userStory,U=A.setUserStory,R=A.customStyles,P=A.searchQueryList,M=A.currentHighlightIndex,q=A.setCurrentHighlightIndex;A.segmentComponentConfig;var L=A.sectionStatusConfig,F=null==R?void 0:R.userStoryCardStyles,W=0===M,G=M===P.length-1;return t.jsxs("div",e.__assign({className:r.default.userStoryCardWrapper,style:h?e.__assign(e.__assign({},null==F?void 0:F.userStoryCardWrapper),{position:"relative"}):null==F?void 0:F.userStoryCardWrapper},{children:[h&&t.jsx(t.Fragment,{children:P.length>0&&t.jsx("div",e.__assign({className:r.default.wrapper},{children:t.jsx("div",e.__assign({className:r.default.highlightNavigation},{children:t.jsxs("div",e.__assign({className:r.default.navigationContainer},{children:[t.jsxs("span",e.__assign({className:r.default.navCounter},{children:[M+1," of ",P.length]})),t.jsxs("div",e.__assign({className:r.default.navButtons},{children:[t.jsx("button",e.__assign({onClick:function(){M>0&&q(function(e){return e-1})},className:r.default.navButton,disabled:W},{children:t.jsx(i.ChevronUpIcon,{size:20,className:r.default.navIcon})})),t.jsx("button",e.__assign({onClick:function(){M<P.length-1&&q(function(e){return e+1})},className:r.default.navButton,disabled:G},{children:t.jsx(i.ChevronDownIcon,{size:20,className:r.default.navIcon})}))]}))]}))}))}))}),k.map(function(n,i){var r=w(p,!0);return t.jsx(b,{isUserStoryCurrentlyUpdated:d,artifactId:c,artifactTitleId:s[i]||"",expandedSubFeatures:l,currentUserStory:n,onUserStoryChange:function(t){U(function(n){return n[i]=t,e.__spreadArray([],n,!0)})},parentIndex:"",currentIndex:"".concat(i+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:o,showUserStoryDiff:a,updateUserStoryArtifact:u,handleOpenSendDialog:v,handleDownloadUserStory:f,selectedArtifactId:g,isDisplayHighlightControl:h,elementDisplayConfig:p,_resolvedConfig:r,showWrapper:m,defaultExpanded:N,actionItemsConfig:y,contextVariant:S,showDisplayName:x,allowTitleEdit:C,showConfidenceScore:j,showBorderTop:I,sectionStatusConfig:L,showCompletionPanel:D,showAddSectionButton:T},n.artifactId)})]}))},exports.default=b,exports.replaceLearnedTagsWithInfo=I;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),i=require("lucide-react"),s=require("showdown"),l=require("@mui/material"),o=require("../../icons/Illustration.svg.js"),a=require("uuid"),r=require("./UserStoryCard.module.css.js"),u=require("../../utils/helpers.js"),d=require("../../utils/user-story.utils.js"),c=require("../../shared/AtomicButton.js"),v=require("../RichTextEditor/RichTextEditor.js"),f=require("../userstory-with-citation/UserStoryWithCitation.js"),_=require("../RequirementAIWrapper/RequirementAIWrapper.js"),g=require("../story-screen/BigEnoughPanel.js"),h=require("./TitleEditor/TitleEditor.js"),p=require("./ClinicalTrialSection.js"),y=require("../story-screen/CompletionPanel.js"),m=require("../../icons/CDIcon.js");function S(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x,C=S(s),j=((x={})[_.SectionStatus.WAITING]="WAITING TO GENERATE",x[_.SectionStatus.IN_PROGRESS]="IN PROGRESS",x[_.SectionStatus.GENERATED]="GENERATED",x[_.SectionStatus.FAILED]="FAILED",x[_.SectionStatus.GENERATE]="GENERATE",x);function I(n){for(var s,o=[],r=/<learned>(.*?)<\/learned>/g,u=0,d=0;null!==(s=r.exec(n));){var c=s[1],v=s.index;v>u&&o.push(t.jsx("span",{children:n.slice(u,v)},"text-pre-".concat(d++))),o.push(t.jsx(l.Tooltip,e.__assign({title:c,placement:"top"},{children:t.jsx(i.Info,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(a.v4()))),u=r.lastIndex}return u<(null==n?void 0:n.length)&&o.push(t.jsx("span",{children:n.slice(u)},"text-post-".concat(d++))),o}function w(t,n,i){var s;if(!t)return{};if(n)return e.__assign({},t.parentConfig);var l=e.__assign({},t.childConfig);return i&&(null===(s=t.subFeatureOverrides)||void 0===s?void 0:s[i])?e.__assign(e.__assign({},l),t.subFeatureOverrides[i]):l}var N=function(n){var s,l=n.displayName,o=_.useRequirementAI().customStyles,a=null===(s=null==o?void 0:o.userStoryCardStyles)||void 0===s?void 0:s.showDisplayName;return t.jsxs("div",e.__assign({className:r.default.displayName,style:null==a?void 0:a.wrapper},{children:[t.jsx(i.Bookmark,{className:r.default.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),t.jsxs("span",e.__assign({style:null==a?void 0:a.label},{children:[l,":"]}))]}))},b=function(s){var S,x,E,D,B,T,A,k,U,R,P,M,q,L,F,W,G,H,z,O,V=s.isUserStoryCurrentlyUpdated,Q=s.artifactId,X=s.artifactTitleId,Z=s.parentUserStory,J=s.currentUserStory,K=s.onUserStoryChange,Y=s.parentIndex,$=s.currentIndex,ee=s.enableDownload,te=s.isDiffEditReviewMode,ne=s.showUserStoryDiff,ie=s.handleDownloadUserStory,se=s.handleOpenSendDialog,le=s.updateUserStoryArtifact,oe=s.selectedArtifactId,ae=s.isDisplayHighlightControl,re=s.elementDisplayConfig,ue=s._resolvedConfig,de=s.showWrapper,ce=void 0!==de&&de,ve=s.defaultExpanded,fe=s.actionItemsConfig,_e=s.onDelete,ge=s.contextVariant,he=s.expandedSubFeatures,pe=s.showDisplayName,ye=void 0===pe||pe,me=s.allowTitleEdit,Se=void 0===me||me,xe=s.showConfidenceScore,Ce=void 0===xe||xe,je=s.showBorderTop,Ie=void 0===je||je,we=s.sectionStatusConfig,Ne=s.showCompletionPanel,be=void 0!==Ne&&Ne,Ee=s.showAddSectionButton,De=void 0!==Ee&&Ee,Be=null!=we?we:{},Te=Be.isLoadingSectionData,Ae=void 0!==Te&&Te,ke=Be.onLoadSectionData,Ue=Be.status,Re=Be.onStatusClick,Pe=Be.completedCount,Me=Be.totalCount,qe=Be.isNoDataAvailable,Le=void 0!==qe&&qe,Fe=_.useRequirementAI(),We=Fe.searchQueryList,Ge=Fe.citations,He=Fe.customStyles,ze=Fe.customSectionConfig,Oe=null==He?void 0:He.userStoryCardStyles,Ve=null==Oe?void 0:Oe.statusStyles,Qe=null===(x=null==He?void 0:He.userStoryCardStyles)||void 0===x?void 0:x.userStoryEditStyles,Xe=null===(E=null==He?void 0:He.userStoryScreenStyles)||void 0===E?void 0:E.userStoryContentStyles,Ze=null==Oe?void 0:Oe.progressHeaderStyles,Je=null==Oe?void 0:Oe.clinicalTrialSectionStyles,Ke=null==Oe?void 0:Oe.CompletionStyles,Ye=null==Oe?void 0:Oe.noDataStyles,$e=null!==(B=null===(D=null==ze?void 0:ze.shouldRender)||void 0===D?void 0:D.call(ze,J))&&void 0!==B&&B,et=null===(T=null==ze?void 0:ze.getValue)||void 0===T?void 0:T.call(ze,J),tt=null!==(k=null===(A=null==ze?void 0:ze.getFields)||void 0===A?void 0:A.call(ze,J))&&void 0!==k?k:[],nt=null!==(R=null===(U=null==ze?void 0:ze.isSaving)||void 0===U?void 0:U.call(ze,J))&&void 0!==R&&R,it=(z=null!==(P=J.completion_percentage)&&void 0!==P?P:0,O=Ke,z>=80?null==O?void 0:O.highCompletion:z>=50?null==O?void 0:O.mediumCompletion:null==O?void 0:O.lowCompletion),st=((S={})[_.SectionStatus.WAITING]=null==Ve?void 0:Ve.waiting,S[_.SectionStatus.IN_PROGRESS]=null==Ve?void 0:Ve.inProgress,S[_.SectionStatus.GENERATED]=null==Ve?void 0:Ve.generated,S[_.SectionStatus.FAILED]=null==Ve?void 0:Ve.failed,S[_.SectionStatus.GENERATE]=null==Ve?void 0:Ve.generate,S),lt=n.useState(e.__assign(e.__assign({},structuredClone(J)),{value:u.formatMarkdown(J.value)||""})),ot=lt[0],at=lt[1],rt=n.useState({userStory:!!J.isDefaultEdit}),ut=rt[0],dt=rt[1],ct=n.useState(!1),vt=ct[0],ft=ct[1],_t=n.useState(!1),gt=_t[0],ht=_t[1],pt=n.useState(null),yt=pt[0],mt=pt[1],St=n.useState(null),xt=St[0],Ct=St[1],jt=_.useRequirementAI(),It=jt.userStory,wt=jt.customIcons,Nt=n.useState(null!=ve?ve:""===Y||oe===J.artifactId||!!J.isDefaultOpen),bt=Nt[0],Et=Nt[1],Dt=n.useState(!1);Dt[0];var Bt=Dt[1],Tt=n.useState(null),At=Tt[0],kt=Tt[1],Ut=n.useState(null),Rt=Ut[0],Pt=Ut[1],Mt=n.useState(!1),qt=Mt[0],Lt=Mt[1],Ft=n.useRef(null),Wt=n.useState(!1);Wt[0];var Gt=Wt[1],Ht=n.useState(!1),zt=Ht[0],Ot=Ht[1],Vt=n.useRef(null);n.useEffect(function(){V&&Et(V)},[V]),n.useEffect(function(){at(e.__assign(e.__assign({},structuredClone(J)),{value:u.formatMarkdown(J.value)||""}))},[J]),n.useEffect(function(){We.length>0?Et(!0):void 0===ve&&(oe?Et(oe===J.artifactId):he&&he.length>0&&Et(he.includes(J.artifactId)))},[We,oe,J.artifactId,he]);var Qt=function(){kt(null)},Xt=function(){Pt(null)},Zt=function(){Et(function(e){return!e})};var Jt=null!=(null==J?void 0:J.big_enough)&&!Number.isNaN(J.big_enough)&&!!(null==J?void 0:J.big_enough_decision_factors),Kt=null!==(M=null==J?void 0:J.completion_percentage)&&void 0!==M?M:0,Yt=!!(null==J?void 0:J.completion_decision_factors),$t=""===Y,en=null!=ue?ue:w(re,$t),tn=!te&&!ne;return n.useEffect(function(){if(xt){var e=setTimeout(function(){var e=document.getElementById("story-card-".concat(xt));null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return function(){return clearTimeout(e)}}},[xt]),n.useEffect(function(){J.isDefaultEdit&&dt(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})},[J.isDefaultEdit]),t.jsxs("div",e.__assign({className:r.default.card,style:null==Oe?void 0:Oe.cardStyle,id:"story-card-".concat(J.title),"data-expanded":bt},{children:[t.jsxs("div",e.__assign({className:r.default.titleSection,style:null==Oe?void 0:Oe.titleSection},{children:[t.jsxs("div",e.__assign({className:r.default.titleRow,style:null==Oe?void 0:Oe.titleRow,onClick:Zt},{children:[t.jsxs("div",e.__assign({className:r.default.titleLeft,style:null==Oe?void 0:Oe.titleLeft,onMouseEnter:function(){return Gt(!0)},onMouseLeave:function(){return Gt(!1)}},{children:[ye&&t.jsx(N,{displayName:X}),vt&&tn?t.jsx(h.InlineTitleEditor,{title:J.title,onSave:function(t){return function(t,n){return e.__awaiter(void 0,void 0,void 0,function(){var i,s;return e.__generator(this,function(l){try{i=e.__assign({},J),J.artifactId===n?i.title=t:i.sub_features=(null===(s=J.sub_features)||void 0===s?void 0:s.map(function(i){return i.artifactId===n?e.__assign(e.__assign({},i),{title:t}):i}))||[],at(i),K(i),ft(!1)}catch(e){console.error("Failed to save title",e)}return[2]})})}(t,J.artifactId)},onCancel:function(){ft(!1)},inputStyle:null==Qe?void 0:Qe.inlineTitleInput,confirmButtonStyle:null==Qe?void 0:Qe.inlineTitleConfirm,cancelButtonStyle:null==Qe?void 0:Qe.inlineTitleCancel},"inline-title-editor"):t.jsxs("div",e.__assign({className:r.default.storyTitleWrapper},{children:[t.jsx("h2",e.__assign({title:J.title,className:r.default.storyTitle,style:null==Oe?void 0:Oe.storyTitle},{children:I(J.title)}),J.artifactId),be&&!$e&&(Yt?t.jsx(y.CompletionPanel,e.__assign({customIcons:null==wt?void 0:wt.userStoryIcons,customStyles:null==Oe?void 0:Oe.aiReasoningCitaionStyles,currentUserStory:J,panelStyles:null==Oe?void 0:Oe.CompletionStyles,onToggleStateChange:Ot},{children:t.jsxs("div",e.__assign({style:e.__assign(e.__assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==Ke?void 0:Ke.badge),it)},{children:[t.jsxs("span",{children:[Kt,"% Completed"]}),t.jsx("span",e.__assign({style:{display:"flex",alignItems:"center"}},{children:t.jsx(m.default,{color:"currentColor"})})),zt?t.jsx(i.ChevronUp,{size:14,style:null==Ke?void 0:Ke.chevronStyle}):t.jsx(i.ChevronDown,{size:14,style:null==Ke?void 0:Ke.chevronStyle})]}))})):t.jsx("div",e.__assign({style:e.__assign(e.__assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==Ke?void 0:Ke.badge),it)},{children:t.jsxs("span",{children:[Kt,"% Completed"]})}))),Se&&t.jsx("button",e.__assign({type:"button",className:r.default.titleEditButton,style:null==Qe?void 0:Qe.titleEditButton,onClick:function(e){e.stopPropagation(),ft(!0),bt||Et(!0)},"aria-label":"Edit title",title:"Edit title"},{children:t.jsx("svg",e.__assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:t.jsx("path",{d:"M8.99998 14.9992H15.75M2.25 14.9992H3.50591C3.87279 14.9992 4.05624 14.9992 4.22887 14.9577C4.38192 14.921 4.52824 14.8604 4.66245 14.7782C4.81382 14.6854 4.94354 14.5557 5.20296 14.2962L14.625 4.87419C15.2463 4.25287 15.2463 3.24551 14.625 2.62419C14.0037 2.00287 12.9963 2.00287 12.375 2.62419L2.95295 12.0462C2.69352 12.3057 2.5638 12.4354 2.47104 12.5868C2.3888 12.721 2.32819 12.8673 2.29145 13.0203C2.25 13.193 2.25 13.3764 2.25 13.7433V14.9992Z",stroke:"#94A3B8","stroke-width":"1.54286","stroke-linecap":"round","stroke-linejoin":"round"})}))}))]}))]})),(Ue||void 0!==Pe&&void 0!==Me)&&t.jsxs("div",e.__assign({className:r.default.statusContainer},{children:[void 0!==Pe&&void 0!==Me&&t.jsxs("div",e.__assign({className:r.default.completedBadge},{children:["Completed: ",Pe,"/",Me]})),Ue&&t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),null==Re||Re()},className:r.default.statusButton,style:st[Ue]},{children:j[Ue]}))]})),t.jsxs("div",e.__assign({className:r.default.titleActions,style:null==Oe?void 0:Oe.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(en.showProgressPercentage||en.showGapBox)&&ce&&t.jsxs("div",e.__assign({className:r.default.progressHeader,style:null==Ze?void 0:Ze.wrapper},{children:[en.showProgressPercentage&&t.jsxs("div",e.__assign({className:r.default.progressPercentage,style:null==Ze?void 0:Ze.percentage},{children:[null!==(L=null!==(q=null==J?void 0:J.confidenceScore)&&void 0!==q?q:null==en?void 0:en.confidenceValue)&&void 0!==L?L:"0","%"]})),en.showGapBox&&t.jsxs("div",e.__assign({className:r.default.gapBox,style:null==Ze?void 0:Ze.gapBox},{children:[null!==(W=null!==(F=null==J?void 0:J.gapValue)&&void 0!==F?F:null==en?void 0:en.gapBoxValue)&&void 0!==W?W:"2"," ","Gaps"]}))]})),Jt&&t.jsx(g.BigEnoughPanel,{customIcons:null==wt?void 0:wt.userStoryIcons,customStyles:null==Oe?void 0:Oe.aiReasoningCitaionStyles,currentUserStory:J,panelStyles:null==Oe?void 0:Oe.BigEnoughStyles}),!ut.userStory&&t.jsxs(t.Fragment,{children:[!1!==(null==en?void 0:en.showShareButton)&&t.jsx("button",e.__assign({className:r.default.iconButton,style:null==Oe?void 0:Oe.iconButton,onClick:function(e){kt(e.currentTarget)}},{children:t.jsx(i.ExternalLink,{size:16})})),t.jsxs(l.Menu,e.__assign({id:"user-story-share-menu",anchorEl:At,open:!!At,onClose:function(){return kt(null)},style:null==Oe?void 0:Oe.userStoryShareMenu},{children:[ee&&t.jsx(l.MenuItem,e.__assign({style:null==Oe?void 0:Oe.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return Bt(!0),ie?[4,Promise.all([ie("pdf"),ie("doc")])]:[2];case 1:return e.sent(),Bt(!1),[2]}})})}},{children:t.jsxs("div",e.__assign({ref:Ft,className:r.default.menuItemContent,style:null==Oe?void 0:Oe.menuItemContent},{children:[t.jsx(i.Download,{size:16,color:null==Oe?void 0:Oe.menuIconColor}),t.jsx("p",e.__assign({style:null==Oe?void 0:Oe.menuLabel},{children:"Download"}))]}))})),t.jsx(l.MenuItem,e.__assign({style:null==Oe?void 0:Oe.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(n){return t=J,Z&&(t=e.__assign(e.__assign({},J),{value:"".concat(d.replaceTitleSection(null==Z?void 0:Z.value,J.title)," \n").concat(J.value)})),null==se||se(!0,[t],J.artifactId),Qt(),[2]})})}},{children:t.jsxs("div",e.__assign({style:null==Oe?void 0:Oe.menuItemContent,className:r.default.menuItemContentPadded},{children:[t.jsx(i.Share2,{size:16,color:null==Oe?void 0:Oe.menuIconColor}),t.jsx("p",e.__assign({style:null==Oe?void 0:Oe.menuLabel},{children:"Send"}))]}))})),t.jsx(l.MenuItem,e.__assign({style:null==Oe?void 0:Oe.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t,n,i,s,l;return e.__generator(this,function(e){switch(e.label){case 0:t=new C.default.Converter,n=t.makeHtml(u.formatMarkdown(J.value)||J.value),i=function(e){var t=(new C.default.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(u.formatMarkdown(J.value)||J.value),s=new ClipboardItem({"text/plain":new Blob([i],{type:"text/plain"}),"text/html":new Blob([n],{type:"text/html"})}),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,navigator.clipboard.write([s])];case 2:return e.sent(),console.log("Copied User Story"),[3,5];case 3:return l=e.sent(),console.error("Failed to copy user story:",l),[3,5];case 4:return Qt(),[7];case 5:return[2]}})})}},{children:t.jsxs("div",e.__assign({style:null==Oe?void 0:Oe.menuItemContent,className:r.default.menuItemContentPadded},{children:[t.jsx(i.Copy,{size:16,color:null==Oe?void 0:Oe.menuIconColor}),t.jsx("p",e.__assign({style:null==Oe?void 0:Oe.menuLabel},{children:"Copy"}))]}))}))]}))]}),ut.userStory&&bt?t.jsx(c.default,{type:"outline",children:"Cancel",style:null==Oe?void 0:Oe.cancelButton,onClick:function(){var t;null===(t=Vt.current)||void 0===t||t.abort(),dt(function(t){return e.__assign(e.__assign({},t),{userStory:!1})})}}):t.jsx(t.Fragment,{}),ut.userStory&&bt?t.jsx(c.default,{type:"fill",children:qt?t.jsxs("span",e.__assign({className:r.default.savingSpinner,style:null==Oe?void 0:Oe.savingSpinner},{children:[t.jsx(i.LoaderCircle,{className:r.default.spinAnimation,style:null==Oe?void 0:Oe.spinAnimation}),t.jsx("span",{children:"Saving..."})]})):"Save",isDisable:qt,style:qt?null==Oe?void 0:Oe.savingButton:null==Oe?void 0:Oe.saveButton,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(n){switch(n.label){case 0:return Lt(!0),"userStory"==="userStory"&&(K(ot),console.log("I am changing RTE editor values",ot)),[4,le(Ge,It,Q,null===(t=Vt.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),K(e.__assign(e.__assign({},ot),{isDefaultEdit:!1})),dt(function(t){return e.__assign(e.__assign({},t),{userStory:!1})}),Lt(!1),[2]}})})}}):!te&&!ne&&bt&&!1!==(null==en?void 0:en.showEditButton)&&t.jsx("button",e.__assign({className:r.default.iconButton,style:null==Oe?void 0:Oe.editButton,onClick:function(){return dt(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})}},{children:t.jsx(i.PencilIcon,{color:null==Oe?void 0:Oe.pencilIconColor,size:16})})),De&&$t&&bt&&!te&&!ne&&!1!==(null==en?void 0:en.showEditButton)&&t.jsxs("button",e.__assign({type:"button",className:r.default.addSectionButton,style:null==Qe?void 0:Qe.addSectionButton,onClick:function(t){var n,i,s;t.stopPropagation();var l=(null!==(i=null===(n=J.sub_features)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1,o={artifactId:a.v4(),title:"New Section ".concat(l),value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},r=e.__assign(e.__assign({},J),{sub_features:e.__spreadArray(e.__spreadArray([],null!==(s=J.sub_features)&&void 0!==s?s:[],!0),[o],!1)});at(r),K(r),Et(!0),Ct(o.title)},"aria-label":"Add section",title:"Add section"},{children:[t.jsx(i.Plus,{size:14}),t.jsx("span",e.__assign({className:r.default.addSectionLabel},{children:"Add Section"}))]})),!$t&&!te&&!ne&&t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),null==_e||_e()},className:r.default.iconButton,style:null==Qe?void 0:Qe.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:t.jsx(i.Trash2,{size:16})})),$e&&t.jsx("button",e.__assign({type:"button",className:r.default.iconButton,onClick:function(e){if(e.stopPropagation(),gt)return mt(null),void ht(!1);mt(structuredClone(null!=et?et:{})),Et(!0),ht(!0)}},{children:gt?t.jsx(i.X,{size:16,color:null==Oe?void 0:Oe.pencilIconColor}):t.jsx(i.PencilIcon,{size:16,color:null==Oe?void 0:Oe.pencilIconColor})})),(null==en?void 0:en.actionItemsButton)&&t.jsxs(t.Fragment,{children:[t.jsx("span",e.__assign({className:r.default.actionItemBtn,style:null==Oe?void 0:Oe.actionItemBtn,onClick:function(e){e.stopPropagation(),Pt(e.currentTarget)}},{children:t.jsx(i.Ellipsis,{})})),t.jsx(l.Menu,e.__assign({id:"user-story-action-menu",anchorEl:Rt,open:!!Rt,onClose:Xt,style:null==Oe?void 0:Oe.userStoryShareMenu},{children:null==fe?void 0:fe.items.map(function(n,i){return t.jsx(l.MenuItem,e.__assign({style:null==Oe?void 0:Oe.userStoryMenuItem,onClick:function(){n.onclick(J),Xt()}},{children:t.jsxs("div",e.__assign({className:r.default.menuItemContent,style:e.__assign(e.__assign({},null==Oe?void 0:Oe.menuItemContent),!n.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[t.jsx("span",e.__assign({className:r.default.menuItemIcon,style:null==Oe?void 0:Oe.menuItemIcon},{children:n.icon})),t.jsx("p",e.__assign({style:null==Oe?void 0:Oe.menuLabel},{children:n.name})),t.jsx("span",{className:r.default.menuItemRight,style:null==Oe?void 0:Oe.menuItemRight})]}))}),"action-item-".concat(i,"-").concat(n.name))})}))]}),t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),Zt()},style:null==Oe?void 0:Oe.chevronButton,className:r.default.chevronButton},{children:bt?t.jsx(i.ChevronUp,{className:r.default.chevronIcon,color:null==Oe?void 0:Oe.chevronIconColor}):t.jsx(i.ChevronDown,{className:r.default.chevronIcon,color:null==Oe?void 0:Oe.chevronIconColor})}))]}))]})),t.jsx("div",{className:r.default.divider,style:null==Oe?void 0:Oe.dividerStyle})]})),bt&&t.jsx("div",e.__assign({className:r.default.cardContent,style:e.__assign(e.__assign({},null==Oe?void 0:Oe.cardContentStyle),{borderTop:Ie?"1px solid #E5E5E5":"none"})},{children:Ae?t.jsxs("div",e.__assign({className:r.default.loadingContainer},{children:[t.jsx("div",e.__assign({className:r.default.loadingIconWrapper},{children:t.jsx(i.Hourglass,{size:28,color:"#5B3DF5",className:r.default.spinAnimation})})),t.jsxs("div",{children:[t.jsx("h3",e.__assign({className:r.default.loadingTitle},{children:"Section generation in progress.."})),t.jsx("p",e.__assign({className:r.default.loadingSubtitle},{children:"This may take a few minutes"}))]}),t.jsx("button",e.__assign({type:"button",onClick:function(){return null==ke?void 0:ke()},className:r.default.viewStatusButton},{children:"View Status"}))]})):Le?t.jsxs("div",e.__assign({className:r.default.noDataContainer,style:null==Ye?void 0:Ye.container},{children:[t.jsx("img",{src:o.default,alt:"No data available",className:r.default.noDataIllustration,style:null==Ye?void 0:Ye.illustration}),t.jsx("h3",e.__assign({className:r.default.noDataTitle,style:null==Ye?void 0:Ye.title},{children:"No Data Available for This Section"})),t.jsx("p",e.__assign({className:r.default.noDataSubtitle,style:null==Ye?void 0:Ye.subtitle},{children:"We couldn't find data for this section yet. Upload the required document from the Documents tab to generate content."}))]})):t.jsxs("div",e.__assign({className:r.default.contentInner,style:null==Oe?void 0:Oe.contentInner},{children:[t.jsxs("div",e.__assign({className:r.default.descriptionSection,style:null==Oe?void 0:Oe.descriptionSection},{children:[t.jsx("div",{className:r.default.justifyBetween,style:null==Oe?void 0:Oe.justifyBetween}),ut.userStory?t.jsx(v.default,{minHeight:"100%",height:"100%",type:"string",value:u.formatMarkdown(J.value)||"",handleUpdateState:function(t,n){var i=u.indentMarkdown(n);at(function(t){return e.__assign(e.__assign({},t),{value:i||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:ut.userStory?"edit":"readOnly"}):$e?t.jsx(p.default,{styles:Je,fields:tt,readonly:!gt,isSaving:nt,value:null!==(G=null!=yt?yt:et)&&void 0!==G?G:{},onChange:mt,onSave:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return yt?[4,null===(t=null==ze?void 0:ze.onSave)||void 0===t?void 0:t.call(ze,J,yt)]:[2];case 1:return e.sent(),mt(null),ht(!1),[2]}})})},onCancel:function(){mt(null),ht(!1)}}):t.jsx(f.default,{showUserStoryDiff:ne,isParent:""===Y,message:u.formatMarkdown(J.value)||"",artifactId:J.artifactId,customStyles:Xe,isDisplayHighlightControl:ae,contextVariant:ge,showConfidenceScore:Ce})]})),null===(H=ot.sub_features)||void 0===H?void 0:H.map(function(n,i){var s=w(re,!1,n.artifactId);return t.jsx(b,{artifactId:Q,isUserStoryCurrentlyUpdated:V,artifactTitleId:"".concat(X,"-").concat(String.fromCharCode(65+i)),parentUserStory:J,parentIndex:"".concat(Y).concat(Y&&".").concat($),currentIndex:"".concat(i+1),doNotShowBorderInViewMode:!1,currentUserStory:n,onUserStoryChange:function(t){return function(t,n){var i=e.__spreadArray([],J.sub_features||[],!0);i[t]=n,K(e.__assign(e.__assign({},J),{sub_features:i}))}(i,t)},enableDownload:!0,isDiffEditReviewMode:te,showUserStoryDiff:ne,updateUserStoryArtifact:le,handleDownloadUserStory:ie,handleOpenSendDialog:se,isDisplayHighlightControl:ae,elementDisplayConfig:re,_resolvedConfig:s,actionItemsConfig:fe,onDelete:function(){return function(t){var n=(J.sub_features||[]).filter(function(e,n){return n!==t}),i=e.__assign(e.__assign({},J),{sub_features:n});at(i),K(i)}(i)},expandedSubFeatures:he},n.artifactId)})]}))}))]}))};exports.StoryCard=b,exports.UserStoryCardWrapper=function(n){var s=n.artifactTitleIDs,l=n.expandedSubFeatures,o=n.isDiffEditReviewMode,a=n.showUserStoryDiff,u=n.updateUserStoryArtifact,d=n.isUserStoryCurrentlyUpdated,c=n.artifactId,v=n.handleOpenSendDialog,f=n.handleDownloadUserStory,g=n.selectedArtifactId,h=n.isDisplayHighlightControl,p=n.elementDisplayConfig,y=n.showWrapper,m=n.actionItemsConfig,S=n.contextVariant,x=n.showDisplayName,C=n.allowTitleEdit,j=n.showConfidenceScore,I=n.showBorderTop,N=n.defaultExpanded,E=n.showCompletionPanel,D=void 0!==E&&E,B=n.showAddSectionButton,T=void 0!==B&&B,A=_.useRequirementAI(),k=A.userStory,U=A.setUserStory,R=A.customStyles,P=A.searchQueryList,M=A.currentHighlightIndex,q=A.setCurrentHighlightIndex;A.segmentComponentConfig;var L=A.sectionStatusConfig,F=null==R?void 0:R.userStoryCardStyles,W=0===M,G=M===P.length-1;return t.jsxs("div",e.__assign({className:r.default.userStoryCardWrapper,style:h?e.__assign(e.__assign({},null==F?void 0:F.userStoryCardWrapper),{position:"relative"}):null==F?void 0:F.userStoryCardWrapper},{children:[h&&t.jsx(t.Fragment,{children:P.length>0&&t.jsx("div",e.__assign({className:r.default.wrapper},{children:t.jsx("div",e.__assign({className:r.default.highlightNavigation},{children:t.jsxs("div",e.__assign({className:r.default.navigationContainer},{children:[t.jsxs("span",e.__assign({className:r.default.navCounter},{children:[M+1," of ",P.length]})),t.jsxs("div",e.__assign({className:r.default.navButtons},{children:[t.jsx("button",e.__assign({onClick:function(){M>0&&q(function(e){return e-1})},className:r.default.navButton,disabled:W},{children:t.jsx(i.ChevronUpIcon,{size:20,className:r.default.navIcon})})),t.jsx("button",e.__assign({onClick:function(){M<P.length-1&&q(function(e){return e+1})},className:r.default.navButton,disabled:G},{children:t.jsx(i.ChevronDownIcon,{size:20,className:r.default.navIcon})}))]}))]}))}))}))}),k.map(function(n,i){var r=w(p,!0);return t.jsx(b,{isUserStoryCurrentlyUpdated:d,artifactId:c,artifactTitleId:s[i]||"",expandedSubFeatures:l,currentUserStory:n,onUserStoryChange:function(t){U(function(n){return n[i]=t,e.__spreadArray([],n,!0)})},parentIndex:"",currentIndex:"".concat(i+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:o,showUserStoryDiff:a,updateUserStoryArtifact:u,handleOpenSendDialog:v,handleDownloadUserStory:f,selectedArtifactId:g,isDisplayHighlightControl:h,elementDisplayConfig:p,_resolvedConfig:r,showWrapper:y,defaultExpanded:N,actionItemsConfig:m,contextVariant:S,showDisplayName:x,allowTitleEdit:C,showConfidenceScore:j,showBorderTop:I,sectionStatusConfig:L,showCompletionPanel:D,showAddSectionButton:T},n.artifactId)})]}))},exports.default=b,exports.replaceLearnedTagsWithInfo=I;
|
|
2
2
|
//# sourceMappingURL=UserStoryCard.js.map
|
package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.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 r=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;r&&e.setAttribute("nonce",r),e.appendChild(document.createTextNode(".UserStoryCard-module_card__9pErS{border:1px solid #e5e5e5;border-radius:.75rem;display:flex;flex:1;flex-direction:column;margin-bottom:auto;margin-left:auto;margin-right:auto;position:relative;width:100%}.UserStoryCard-module_titleSection__pGbpL{cursor:pointer;padding:.5rem 1rem;width:100%}.UserStoryCard-module_titleRow__TyEN9{align-items:center;display:flex;justify-content:space-between;margin-top:.5rem;position:relative;width:100%}.UserStoryCard-module_titleLeft__fzF6u{align-items:center;display:flex;font-family:Inter,sans-serif;gap:.5rem;max-width:66.666%}.UserStoryCard-module_titleActions__Dabx1{align-items:center;display:flex;gap:.5rem;width:fit-content}.UserStoryCard-module_divider__xG-FC{background-color:#ffffff4d;border-radius:9999px;height:.25rem;width:4rem}.UserStoryCard-module_displayName__Jj-HK{align-items:center;color:#4b5563;display:inline-flex;font-size:.875rem;font-weight:500;gap:.5rem}.UserStoryCard-module_displayNameIcon__-SCM3{height:1rem;width:1rem}.UserStoryCard-module_storyTitle__FDX4p{color:#374151;flex:1;font-size:1rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.UserStoryCard-module_iconButton__DkfRA{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;display:flex;justify-content:center;margin-left:.5rem;padding:.4rem .8rem}.UserStoryCard-module_iconButton__DkfRA:hover{background-color:#f9fafb}.UserStoryCard-module_chevronButton__nxxYC{background:none;border:none;cursor:pointer;margin-left:.5rem;padding:.25rem}.UserStoryCard-module_chevronIcon__Azswy{color:#4b5563;height:1.5rem;width:1.5rem}.UserStoryCard-module_cardContent__rR2g3{max-height:fit-content;opacity:1;padding:1.5rem 2rem 2rem;transition:all .3s ease-in-out;width:100%}.UserStoryCard-module_contentInner__AYQbu{display:flex;flex-direction:column;gap:2.5rem;width:100%}.UserStoryCard-module_descriptionSection__5j6cg{display:flex;flex-direction:column;gap:1rem;width:100%}.UserStoryCard-module_justifyBetween__cD-EG{display:flex;justify-content:space-between}.UserStoryCard-module_savingSpinner__UmbEq{align-items:center;color:#fff;display:flex;flex-direction:row;gap:.5rem}.UserStoryCard-module_spinAnimation__INSou{animation:UserStoryCard-module_spin__afcZ6 1s linear infinite}@keyframes UserStoryCard-module_spin__afcZ6{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.UserStoryCard-module_menuItemContent__U-ZxP{align-items:center;display:flex;flex-direction:row;gap:.5rem;margin-left:.25rem}.UserStoryCard-module_actionItemBtn__3jocB{font-size:18px;line-height:0}.UserStoryCard-module_menuItemIcon__BxrJU{align-items:center;display:inline-flex;margin-right:.5rem}.UserStoryCard-module_menuItemRight__Cjw2j{align-self:center;border-radius:50%;height:8px;margin-left:auto;width:8px}.UserStoryCard-module_wrapper__ahzRY{background-color:#fff;border-bottom:1px solid hsla(0,0%,50%,.126);display:flex;justify-content:flex-end;margin-bottom:4px;padding:5px 10px 5px 0;position:sticky;top:0;width:100%;z-index:1000}.UserStoryCard-module_highlightNavigation__vv8RW{width:max-content}.UserStoryCard-module_navigationContainer__2UcOj{align-items:center;border:1px solid hsla(0,0%,50%,.126);border-radius:10px;display:inline-flex;gap:8px;padding:6px 8px}.UserStoryCard-module_navButton__EWoVi{align-items:center;background:none;border:none;color:#374151;cursor:pointer;display:flex;justify-content:center;padding:2px;transition:color .15s ease}.UserStoryCard-module_navIcon__3ZSIH{height:20px;width:20px}.UserStoryCard-module_navCounter__sIIeS{color:#4b5563;font-size:17px;font-weight:500;letter-spacing:.01em;min-width:28px;text-align:center}.UserStoryCard-module_navButtons__6oLaN{display:flex;gap:0}.UserStoryCard-module_navButton__EWoVi:disabled{cursor:not-allowed;opacity:.4}.UserStoryCard-module_menuItemContentPadded__w6udq{align-items:center;display:flex;flex-direction:row;gap:.5rem;padding-left:.25rem}.UserStoryCard-module_userStoryCardWrapper__0gC-E{width:100%}.UserStoryCard-module_progressHeader__LBMsg{align-items:center;display:flex;gap:8px}.UserStoryCard-module_progressPercentage__brScW{background:#fff;border:1px solid #d0d5dd;border-radius:8px;font-size:14px;font-weight:500;padding:4px 10px}.UserStoryCard-module_gapBox__LkEiT{background:#fff7e6;border:1px solid #f7d58d;border-radius:8px;color:#b26b00;font-size:14px;font-weight:500;padding:4px 10px}.UserStoryCard-module_storyTitleWrapper__Ng-Th{align-items:center;display:flex;gap:6px;min-width:0}.UserStoryCard-module_titleEditButton__iJADR{align-items:center;background:#0000;border:none;border-radius:4px;color:var(--color-text-secondary,#6b7280);cursor:pointer;display:inline-flex;flex-shrink:0;justify-content:center;opacity:1;padding:3px;transition:opacity .15s ease,background .15s ease,color .15s ease}.UserStoryCard-module_titleEditButton__iJADR:hover{background:var(--color-surface-hover,#f3f4f6);color:var(--color-primary,#4f46e5);opacity:1}.UserStoryCard-module_titleEditButton__iJADR:focus-visible{opacity:1;outline:2px solid var(--color-primary,#4f46e5);outline-offset:1px}.UserStoryCard-module_inlineTitleEditor__rdF-w{align-items:center;display:flex;flex:1;gap:4px;min-width:0}.UserStoryCard-module_inlineTitleInput__Ft6mB{background:var(--color-surface,#fff);border:1.5px solid var(--color-primary,#4f46e5);border-radius:5px;color:var(--color-text-primary,#111827);flex:1;font-size:inherit;font-weight:600;line-height:1.4;min-width:0;outline:none;padding:3px 8px;transition:border-color .15s ease,box-shadow .15s ease}.UserStoryCard-module_inlineTitleInput__Ft6mB:focus{border-color:var(--color-primary,#4f46e5);box-shadow:0 0 0 3px #4f46e526}.UserStoryCard-module_inlineTitleConfirm__YTG-3{align-items:center;background:var(--color-primary,#4f46e5);border:none;border-radius:5px;color:#fff;cursor:pointer;display:inline-flex;flex-shrink:0;height:26px;justify-content:center;transition:background .15s ease,transform .1s ease;width:26px}.UserStoryCard-module_inlineTitleConfirm__YTG-3:hover:not(:disabled){background:var(--color-primary-dark,#4338ca)}.UserStoryCard-module_inlineTitleConfirm__YTG-3:active:not(:disabled){transform:scale(.93)}.UserStoryCard-module_inlineTitleConfirm__YTG-3:disabled{cursor:not-allowed;opacity:.45}.UserStoryCard-module_inlineTitleConfirm__YTG-3:focus-visible{outline:2px solid var(--color-primary,#4f46e5);outline-offset:2px}.UserStoryCard-module_inlineTitleCancel__clhBR{align-items:center;background:#0000;border:1.5px solid var(--color-border,#e5e7eb);border-radius:5px;color:var(--color-text-secondary,#6b7280);cursor:pointer;display:inline-flex;flex-shrink:0;height:26px;justify-content:center;transition:background .15s ease,color .15s ease,border-color .15s ease;width:26px}.UserStoryCard-module_inlineTitleCancel__clhBR:hover{background:var(--color-surface-hover,#f3f4f6);border-color:var(--color-danger,#ef4444);color:var(--color-danger,#ef4444)}.UserStoryCard-module_inlineTitleCancel__clhBR:focus-visible{outline:2px solid var(--color-danger,#ef4444);outline-offset:2px}.UserStoryCard-module_addSectionButton__lBCWj{align-items:center;background:#0000;border:1.5px dashed var(--color-border,#d1d5db);border-radius:6px;color:var(--color-text-secondary,#6b7280);cursor:pointer;display:inline-flex;flex-shrink:0;font-size:12px;font-weight:500;gap:5px;padding:6px 10px;transition:border-color .15s ease,color .15s ease,background .15s ease;white-space:nowrap}.UserStoryCard-module_addSectionButton__lBCWj:hover{background:var(--color-primary-subtle,#4f46e50d);border-color:var(--color-primary,#4f46e5);color:var(--color-primary,#4f46e5)}.UserStoryCard-module_addSectionButton__lBCWj:active{transform:scale(.97)}.UserStoryCard-module_addSectionButton__lBCWj:focus-visible{outline:2px solid var(--color-primary,#4f46e5);outline-offset:2px}.UserStoryCard-module_addSectionLabel__kUs2E{display:inline}.UserStoryCard-module_viewStatusButton__4-ISq{background:#0000;border:1px solid #5b3df5;border-radius:12px;color:#5b3df5;cursor:pointer;font-size:14px;font-weight:600;padding:10px 20px;transition:all .2s ease}.UserStoryCard-module_viewStatusButton__4-ISq:hover{background:#5b3df5;color:#fff}.UserStoryCard-module_viewStatusButton__4-ISq:active{transform:scale(.98)}.UserStoryCard-module_statusContainer__Blr6F{align-items:center;display:flex;gap:8px;margin-left:auto;margin-right:12px}.UserStoryCard-module_completedBadge__BURPe{background:#f3f4f6;border-radius:8px;color:#374151;font-size:12px;font-weight:600;padding:4px 10px;white-space:nowrap}.UserStoryCard-module_statusButton__zeFUj{align-items:center;border:none;border-radius:5px;cursor:pointer;display:inline-flex;flex-shrink:0;font-size:12px;font-weight:600;gap:5px;padding:4px 8px;transition:all .2s ease}.UserStoryCard-module_statusWaiting__mTSf-{background:#fef3c7;color:#b45309}.UserStoryCard-module_statusInProgress__OsBoU{background:#ede9fe;color:#6d28d9}.UserStoryCard-module_statusSuccess__ufhqE{background:#dcfce7;color:#15803d}.UserStoryCard-module_loadingContainer__uPfG-{align-items:center;display:flex;flex-direction:column;gap:16px;justify-content:center;min-height:240px;padding:48px 24px;text-align:center}.UserStoryCard-module_loadingIconWrapper__5eUX7{align-items:center;background:#f4f1ff;border-radius:50%;display:flex;height:64px;justify-content:center;width:64px}.UserStoryCard-module_loadingTitle__MHwmb{color:#0f172a;font-size:18px;font-weight:600;margin:0}.UserStoryCard-module_loadingSubtitle__PKUur{color:#64748b;font-size:16px;margin-top:8px}.UserStoryCard-module_noDataContainer__Rys9X{align-items:center;display:flex;flex-direction:column;justify-content:center;min-height:280px;padding:32px;text-align:center}.UserStoryCard-module_noDataIllustration__BoSPy{height:auto;margin-bottom:16px;width:120px}.UserStoryCard-module_noDataTitle__DKazv{color:#111827;font-size:24px;font-weight:600;margin:0 0 8px}.UserStoryCard-module_noDataSubtitle__ME3eH{color:#6b7280;font-size:16px;line-height:24px;margin:0;max-width:650px}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={card:"UserStoryCard-module_card__9pErS",titleSection:"UserStoryCard-module_titleSection__pGbpL",titleRow:"UserStoryCard-module_titleRow__TyEN9",titleLeft:"UserStoryCard-module_titleLeft__fzF6u",titleActions:"UserStoryCard-module_titleActions__Dabx1",divider:"UserStoryCard-module_divider__xG-FC",displayName:"UserStoryCard-module_displayName__Jj-HK",displayNameIcon:"UserStoryCard-module_displayNameIcon__-SCM3",storyTitle:"UserStoryCard-module_storyTitle__FDX4p",iconButton:"UserStoryCard-module_iconButton__DkfRA",chevronButton:"UserStoryCard-module_chevronButton__nxxYC",chevronIcon:"UserStoryCard-module_chevronIcon__Azswy",cardContent:"UserStoryCard-module_cardContent__rR2g3",contentInner:"UserStoryCard-module_contentInner__AYQbu",descriptionSection:"UserStoryCard-module_descriptionSection__5j6cg",justifyBetween:"UserStoryCard-module_justifyBetween__cD-EG",savingSpinner:"UserStoryCard-module_savingSpinner__UmbEq",spinAnimation:"UserStoryCard-module_spinAnimation__INSou",spin:"UserStoryCard-module_spin__afcZ6",menuItemContent:"UserStoryCard-module_menuItemContent__U-ZxP",actionItemBtn:"UserStoryCard-module_actionItemBtn__3jocB",menuItemIcon:"UserStoryCard-module_menuItemIcon__BxrJU",menuItemRight:"UserStoryCard-module_menuItemRight__Cjw2j",wrapper:"UserStoryCard-module_wrapper__ahzRY",highlightNavigation:"UserStoryCard-module_highlightNavigation__vv8RW",navigationContainer:"UserStoryCard-module_navigationContainer__2UcOj",navButton:"UserStoryCard-module_navButton__EWoVi",navIcon:"UserStoryCard-module_navIcon__3ZSIH",navCounter:"UserStoryCard-module_navCounter__sIIeS",navButtons:"UserStoryCard-module_navButtons__6oLaN",menuItemContentPadded:"UserStoryCard-module_menuItemContentPadded__w6udq",userStoryCardWrapper:"UserStoryCard-module_userStoryCardWrapper__0gC-E",progressHeader:"UserStoryCard-module_progressHeader__LBMsg",progressPercentage:"UserStoryCard-module_progressPercentage__brScW",gapBox:"UserStoryCard-module_gapBox__LkEiT",storyTitleWrapper:"UserStoryCard-module_storyTitleWrapper__Ng-Th",titleEditButton:"UserStoryCard-module_titleEditButton__iJADR",inlineTitleEditor:"UserStoryCard-module_inlineTitleEditor__rdF-w",inlineTitleInput:"UserStoryCard-module_inlineTitleInput__Ft6mB",inlineTitleConfirm:"UserStoryCard-module_inlineTitleConfirm__YTG-3",inlineTitleCancel:"UserStoryCard-module_inlineTitleCancel__clhBR",addSectionButton:"UserStoryCard-module_addSectionButton__lBCWj",addSectionLabel:"UserStoryCard-module_addSectionLabel__kUs2E",viewStatusButton:"UserStoryCard-module_viewStatusButton__4-ISq",statusContainer:"UserStoryCard-module_statusContainer__Blr6F",completedBadge:"UserStoryCard-module_completedBadge__BURPe",statusButton:"UserStoryCard-module_statusButton__zeFUj",statusWaiting:"UserStoryCard-module_statusWaiting__mTSf-",statusInProgress:"UserStoryCard-module_statusInProgress__OsBoU",statusSuccess:"UserStoryCard-module_statusSuccess__ufhqE",loadingContainer:"UserStoryCard-module_loadingContainer__uPfG-",loadingIconWrapper:"UserStoryCard-module_loadingIconWrapper__5eUX7",loadingTitle:"UserStoryCard-module_loadingTitle__MHwmb",loadingSubtitle:"UserStoryCard-module_loadingSubtitle__PKUur",noDataContainer:"UserStoryCard-module_noDataContainer__Rys9X",noDataIllustration:"UserStoryCard-module_noDataIllustration__BoSPy",noDataTitle:"UserStoryCard-module_noDataTitle__DKazv",noDataSubtitle:"UserStoryCard-module_noDataSubtitle__ME3eH"};
|
|
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 r=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;r&&e.setAttribute("nonce",r),e.appendChild(document.createTextNode(".UserStoryCard-module_card__9pErS{border:1px solid #e5e5e5;border-radius:.75rem;display:flex;flex:1;flex-direction:column;margin-bottom:auto;margin-left:auto;margin-right:auto;position:relative;width:100%}.UserStoryCard-module_titleSection__pGbpL{cursor:pointer;padding:.5rem 1rem;width:100%}.UserStoryCard-module_titleRow__TyEN9{align-items:center;display:flex;justify-content:space-between;margin-top:.5rem;position:relative;width:100%}.UserStoryCard-module_titleLeft__fzF6u{align-items:center;display:flex;font-family:Inter,sans-serif;gap:.5rem;max-width:66.666%}.UserStoryCard-module_titleActions__Dabx1{align-items:center;display:flex;gap:.5rem;width:fit-content}.UserStoryCard-module_divider__xG-FC{background-color:#ffffff4d;border-radius:9999px;height:.25rem;width:4rem}.UserStoryCard-module_displayName__Jj-HK{align-items:center;color:#4b5563;display:inline-flex;font-size:.875rem;font-weight:500;gap:.5rem}.UserStoryCard-module_displayNameIcon__-SCM3{height:1rem;width:1rem}.UserStoryCard-module_storyTitle__FDX4p{color:#374151;flex:1;font-size:1rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.UserStoryCard-module_iconButton__DkfRA{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;display:flex;justify-content:center;margin-left:.5rem;padding:.4rem .8rem}.UserStoryCard-module_iconButton__DkfRA:hover{background-color:#f9fafb}.UserStoryCard-module_chevronButton__nxxYC{background:none;border:none;cursor:pointer;margin-left:.5rem;padding:.25rem}.UserStoryCard-module_chevronIcon__Azswy{color:#4b5563;height:1.5rem;width:1.5rem}.UserStoryCard-module_cardContent__rR2g3{max-height:fit-content;opacity:1;padding:1.5rem 2rem 2rem;transition:all .3s ease-in-out;width:100%}.UserStoryCard-module_contentInner__AYQbu{display:flex;flex-direction:column;gap:2.5rem;width:100%}.UserStoryCard-module_descriptionSection__5j6cg{display:flex;flex-direction:column;gap:1rem;width:100%}.UserStoryCard-module_justifyBetween__cD-EG{display:flex;justify-content:space-between}.UserStoryCard-module_savingSpinner__UmbEq{align-items:center;color:#fff;display:flex;flex-direction:row;gap:.5rem}.UserStoryCard-module_spinAnimation__INSou{animation:UserStoryCard-module_spin__afcZ6 1s linear infinite}@keyframes UserStoryCard-module_spin__afcZ6{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.UserStoryCard-module_menuItemContent__U-ZxP{align-items:center;display:flex;flex-direction:row;gap:.5rem;margin-left:.25rem}.UserStoryCard-module_actionItemBtn__3jocB{font-size:18px;line-height:0}.UserStoryCard-module_menuItemIcon__BxrJU{align-items:center;display:inline-flex;margin-right:.5rem}.UserStoryCard-module_menuItemRight__Cjw2j{align-self:center;border-radius:50%;height:8px;margin-left:auto;width:8px}.UserStoryCard-module_wrapper__ahzRY{background-color:#fff;border-bottom:1px solid hsla(0,0%,50%,.126);display:flex;justify-content:flex-end;margin-bottom:4px;padding:5px 10px 5px 0;position:sticky;top:0;width:100%;z-index:1000}.UserStoryCard-module_highlightNavigation__vv8RW{width:max-content}.UserStoryCard-module_navigationContainer__2UcOj{align-items:center;border:1px solid hsla(0,0%,50%,.126);border-radius:10px;display:inline-flex;gap:8px;padding:6px 8px}.UserStoryCard-module_navButton__EWoVi{align-items:center;background:none;border:none;color:#374151;cursor:pointer;display:flex;justify-content:center;padding:2px;transition:color .15s ease}.UserStoryCard-module_navIcon__3ZSIH{height:20px;width:20px}.UserStoryCard-module_navCounter__sIIeS{color:#4b5563;font-size:17px;font-weight:500;letter-spacing:.01em;min-width:28px;text-align:center}.UserStoryCard-module_navButtons__6oLaN{display:flex;gap:0}.UserStoryCard-module_navButton__EWoVi:disabled{cursor:not-allowed;opacity:.4}.UserStoryCard-module_menuItemContentPadded__w6udq{align-items:center;display:flex;flex-direction:row;gap:.5rem;padding-left:.25rem}.UserStoryCard-module_userStoryCardWrapper__0gC-E{width:100%}.UserStoryCard-module_progressHeader__LBMsg{align-items:center;display:flex;gap:8px}.UserStoryCard-module_progressPercentage__brScW{background:#fff;border:1px solid #d0d5dd;border-radius:8px;font-size:14px;font-weight:500;padding:4px 10px}.UserStoryCard-module_gapBox__LkEiT{background:#fff7e6;border:1px solid #f7d58d;border-radius:8px;color:#b26b00;font-size:14px;font-weight:500;padding:4px 10px}.UserStoryCard-module_storyTitleWrapper__Ng-Th{align-items:center;display:flex;gap:6px;min-width:0}.UserStoryCard-module_titleEditButton__iJADR{align-items:center;background:#0000;border:none;border-radius:4px;color:var(--color-text-secondary,#6b7280);cursor:pointer;display:inline-flex;flex-shrink:0;justify-content:center;opacity:1;padding:3px;transition:opacity .15s ease,background .15s ease,color .15s ease}.UserStoryCard-module_titleEditButton__iJADR:hover{background:var(--color-surface-hover,#f3f4f6);color:var(--color-primary,#4f46e5);opacity:1}.UserStoryCard-module_titleEditButton__iJADR:focus-visible{opacity:1;outline:2px solid var(--color-primary,#4f46e5);outline-offset:1px}.UserStoryCard-module_inlineTitleEditor__rdF-w{align-items:center;display:flex;flex:1;gap:4px;min-width:0}.UserStoryCard-module_inlineTitleInput__Ft6mB{background:var(--color-surface,#fff);border:1.5px solid var(--color-primary,#4f46e5);border-radius:5px;color:var(--color-text-primary,#111827);flex:1;font-size:inherit;font-weight:600;line-height:1.4;min-width:0;outline:none;padding:3px 8px;transition:border-color .15s ease,box-shadow .15s ease}.UserStoryCard-module_inlineTitleInput__Ft6mB:focus{border-color:var(--color-primary,#4f46e5);box-shadow:0 0 0 3px #4f46e526}.UserStoryCard-module_inlineTitleConfirm__YTG-3{align-items:center;background:var(--color-primary,#4f46e5);border:none;border-radius:5px;color:#fff;cursor:pointer;display:inline-flex;flex-shrink:0;height:26px;justify-content:center;transition:background .15s ease,transform .1s ease;width:26px}.UserStoryCard-module_inlineTitleConfirm__YTG-3:hover:not(:disabled){background:var(--color-primary-dark,#4338ca)}.UserStoryCard-module_inlineTitleConfirm__YTG-3:active:not(:disabled){transform:scale(.93)}.UserStoryCard-module_inlineTitleConfirm__YTG-3:disabled{cursor:not-allowed;opacity:.45}.UserStoryCard-module_inlineTitleConfirm__YTG-3:focus-visible{outline:2px solid var(--color-primary,#4f46e5);outline-offset:2px}.UserStoryCard-module_inlineTitleCancel__clhBR{align-items:center;background:#0000;border:1.5px solid var(--color-border,#e5e7eb);border-radius:5px;color:var(--color-text-secondary,#6b7280);cursor:pointer;display:inline-flex;flex-shrink:0;height:26px;justify-content:center;transition:background .15s ease,color .15s ease,border-color .15s ease;width:26px}.UserStoryCard-module_inlineTitleCancel__clhBR:hover{background:var(--color-surface-hover,#f3f4f6);border-color:var(--color-danger,#ef4444);color:var(--color-danger,#ef4444)}.UserStoryCard-module_inlineTitleCancel__clhBR:focus-visible{outline:2px solid var(--color-danger,#ef4444);outline-offset:2px}.UserStoryCard-module_addSectionButton__lBCWj{align-items:center;background:#0000;border:1.5px dashed var(--color-border,#d1d5db);border-radius:6px;color:var(--color-text-secondary,#6b7280);cursor:pointer;display:inline-flex;flex-shrink:0;font-size:12px;font-weight:500;gap:5px;padding:6px 10px;transition:border-color .15s ease,color .15s ease,background .15s ease;white-space:nowrap}.UserStoryCard-module_addSectionButton__lBCWj:hover{background:var(--color-primary-subtle,#4f46e50d);border-color:var(--color-primary,#4f46e5);color:var(--color-primary,#4f46e5)}.UserStoryCard-module_addSectionButton__lBCWj:active{transform:scale(.97)}.UserStoryCard-module_addSectionButton__lBCWj:focus-visible{outline:2px solid var(--color-primary,#4f46e5);outline-offset:2px}.UserStoryCard-module_addSectionLabel__kUs2E{display:inline}.UserStoryCard-module_viewStatusButton__4-ISq{background:#0000;border:1px solid #5b3df5;border-radius:12px;color:#5b3df5;cursor:pointer;font-size:14px;font-weight:600;padding:10px 20px;transition:all .2s ease}.UserStoryCard-module_viewStatusButton__4-ISq:hover{background:#5b3df5;color:#fff}.UserStoryCard-module_viewStatusButton__4-ISq:active{transform:scale(.98)}.UserStoryCard-module_statusContainer__Blr6F{align-items:center;display:flex;gap:8px;margin-left:auto;margin-right:12px}.UserStoryCard-module_completedBadge__BURPe{background:#f3f4f6;border-radius:8px;color:#374151;font-size:12px;font-weight:600;padding:4px 10px;white-space:nowrap}.UserStoryCard-module_statusButton__zeFUj{align-items:center;border:none;border-radius:5px;cursor:pointer;display:inline-flex;flex-shrink:0;font-size:12px;font-weight:600;gap:5px;padding:4px 8px;transition:all .2s ease}.UserStoryCard-module_statusWaiting__mTSf-{background:#fef3c7;color:#b45309}.UserStoryCard-module_statusInProgress__OsBoU{background:#ede9fe;color:#6d28d9}.UserStoryCard-module_statusSuccess__ufhqE{background:#dcfce7;color:#15803d}.UserStoryCard-module_loadingContainer__uPfG-{align-items:center;display:flex;flex-direction:column;gap:16px;justify-content:center;min-height:240px;padding:48px 24px;text-align:center}.UserStoryCard-module_loadingIconWrapper__5eUX7{align-items:center;background:#f4f1ff;border-radius:50%;display:flex;height:64px;justify-content:center;width:64px}.UserStoryCard-module_loadingTitle__MHwmb{color:#0f172a;font-size:18px;font-weight:600;margin:0}.UserStoryCard-module_loadingSubtitle__PKUur{color:#64748b;font-size:16px;margin-top:8px}.UserStoryCard-module_noDataContainer__Rys9X{align-items:center;display:flex;flex-direction:column;justify-content:center;padding:24px;text-align:center}.UserStoryCard-module_noDataIllustration__BoSPy{height:auto;margin-bottom:12px;width:88px}.UserStoryCard-module_noDataTitle__DKazv{color:#111827;font-size:18px;font-weight:600;line-height:26px;margin:0 0 6px}.UserStoryCard-module_noDataSubtitle__ME3eH{color:#6b7280;font-size:14px;line-height:20px;margin:0;max-width:520px}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={card:"UserStoryCard-module_card__9pErS",titleSection:"UserStoryCard-module_titleSection__pGbpL",titleRow:"UserStoryCard-module_titleRow__TyEN9",titleLeft:"UserStoryCard-module_titleLeft__fzF6u",titleActions:"UserStoryCard-module_titleActions__Dabx1",divider:"UserStoryCard-module_divider__xG-FC",displayName:"UserStoryCard-module_displayName__Jj-HK",displayNameIcon:"UserStoryCard-module_displayNameIcon__-SCM3",storyTitle:"UserStoryCard-module_storyTitle__FDX4p",iconButton:"UserStoryCard-module_iconButton__DkfRA",chevronButton:"UserStoryCard-module_chevronButton__nxxYC",chevronIcon:"UserStoryCard-module_chevronIcon__Azswy",cardContent:"UserStoryCard-module_cardContent__rR2g3",contentInner:"UserStoryCard-module_contentInner__AYQbu",descriptionSection:"UserStoryCard-module_descriptionSection__5j6cg",justifyBetween:"UserStoryCard-module_justifyBetween__cD-EG",savingSpinner:"UserStoryCard-module_savingSpinner__UmbEq",spinAnimation:"UserStoryCard-module_spinAnimation__INSou",spin:"UserStoryCard-module_spin__afcZ6",menuItemContent:"UserStoryCard-module_menuItemContent__U-ZxP",actionItemBtn:"UserStoryCard-module_actionItemBtn__3jocB",menuItemIcon:"UserStoryCard-module_menuItemIcon__BxrJU",menuItemRight:"UserStoryCard-module_menuItemRight__Cjw2j",wrapper:"UserStoryCard-module_wrapper__ahzRY",highlightNavigation:"UserStoryCard-module_highlightNavigation__vv8RW",navigationContainer:"UserStoryCard-module_navigationContainer__2UcOj",navButton:"UserStoryCard-module_navButton__EWoVi",navIcon:"UserStoryCard-module_navIcon__3ZSIH",navCounter:"UserStoryCard-module_navCounter__sIIeS",navButtons:"UserStoryCard-module_navButtons__6oLaN",menuItemContentPadded:"UserStoryCard-module_menuItemContentPadded__w6udq",userStoryCardWrapper:"UserStoryCard-module_userStoryCardWrapper__0gC-E",progressHeader:"UserStoryCard-module_progressHeader__LBMsg",progressPercentage:"UserStoryCard-module_progressPercentage__brScW",gapBox:"UserStoryCard-module_gapBox__LkEiT",storyTitleWrapper:"UserStoryCard-module_storyTitleWrapper__Ng-Th",titleEditButton:"UserStoryCard-module_titleEditButton__iJADR",inlineTitleEditor:"UserStoryCard-module_inlineTitleEditor__rdF-w",inlineTitleInput:"UserStoryCard-module_inlineTitleInput__Ft6mB",inlineTitleConfirm:"UserStoryCard-module_inlineTitleConfirm__YTG-3",inlineTitleCancel:"UserStoryCard-module_inlineTitleCancel__clhBR",addSectionButton:"UserStoryCard-module_addSectionButton__lBCWj",addSectionLabel:"UserStoryCard-module_addSectionLabel__kUs2E",viewStatusButton:"UserStoryCard-module_viewStatusButton__4-ISq",statusContainer:"UserStoryCard-module_statusContainer__Blr6F",completedBadge:"UserStoryCard-module_completedBadge__BURPe",statusButton:"UserStoryCard-module_statusButton__zeFUj",statusWaiting:"UserStoryCard-module_statusWaiting__mTSf-",statusInProgress:"UserStoryCard-module_statusInProgress__OsBoU",statusSuccess:"UserStoryCard-module_statusSuccess__ufhqE",loadingContainer:"UserStoryCard-module_loadingContainer__uPfG-",loadingIconWrapper:"UserStoryCard-module_loadingIconWrapper__5eUX7",loadingTitle:"UserStoryCard-module_loadingTitle__MHwmb",loadingSubtitle:"UserStoryCard-module_loadingSubtitle__PKUur",noDataContainer:"UserStoryCard-module_noDataContainer__Rys9X",noDataIllustration:"UserStoryCard-module_noDataIllustration__BoSPy",noDataTitle:"UserStoryCard-module_noDataTitle__DKazv",noDataSubtitle:"UserStoryCard-module_noDataSubtitle__ME3eH"};
|
|
2
2
|
//# sourceMappingURL=UserStoryCard.module.css.js.map
|
package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),t=require("react-markdown"),o=require("rehype-raw"),a=require("./UserStoryWithCitation.module.css.js"),r=require("../../shared/useMarkdownSearch.js"),l=require("lucide-react"),d=require("@mui/material"),s=require("dompurify"),c=require("../../shared/UpdatedAnimationContent.js"),u=require("../../shared/GeneratedCodeCitation.js"),v=require("../../shared/CitationLoadingIndicator.js"),g=require("../RequirementAIWrapper/RequirementAIWrapper.js"),f=require("../../icons/CognitiveDecision.js"),p=require("../../icons/BrainRed.js"),h=require("../ai-reasoning/AiReasoningCitation.js"),m=require("../../icons/RelevanceScoreIcon.js"),C=require("../RecommendationBlock/RecommendationBlock.js"),_=require("../UserStoryCard/AttachedContext.js"),x=require("../ai-reasoning/AiReasoningCitationContent.js"),j=require("./components/InlineUpdatedComponent.js"),y=require("../segment/SegmentWrapper.js"),S=require("../../store/markdown-context.js");function R(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var I=R(i),w=R(t),b=R(o),N=R(s),k=i.createContext(!1),A=i.createContext({expandedInfo:null,setExpanded:function(){},reasonToRow:{current:new Map}}),q=i.createContext({rowId:""}),E=function(t){var o,r=t.aiReason,l=t.isHighConfidence,d=t.customStyle,s=t.customIcons,c=i.useContext(A),u=c.expandedInfo,v=c.setExpanded,g=c.reasonToRow,h=i.useContext(q).rowId,m=String(r.id);h&&g.current.set(m,h);var C=(null===(o=null==u?void 0:u.aiReason)||void 0===o?void 0:o.id)===r.id,_=l?(null==s?void 0:s.highConfidence)||n.jsx(f.default,{}):(null==s?void 0:s.lowConfidence)||n.jsx(p.default,{});return n.jsxs("button",e.__assign({className:a.default.aiReasoningButton,style:d,onClick:function(e){e.stopPropagation(),e.preventDefault(),v(C?null:h,C?null:r)}},{children:[_,C?n.jsx("i",{className:"pi pi-angle-up ".concat(l?a.default.aiReasoningIconHighConfidence:a.default.aiReasoningIconLowConfidence)}):n.jsx("i",{className:"pi pi-angle-down ".concat(l?a.default.aiReasoningIconHighConfidence:a.default.aiReasoningIconLowConfidence)})]}))},M=function(t){var o,r,l=t.children,d=t.node,s=t.customStyles,c=t.customIcons,u=i.useRef(Math.random().toString(36).slice(2)).current,v=i.useContext(A).expandedInfo,g=(null==v?void 0:v.rowId)===u,f=Array.isArray(null==d?void 0:d.children)?d.children.filter(function(e){return"element"===e.type}).length:1,p=null!==(r=null===(o=null==d?void 0:d.properties)||void 0===o?void 0:o.style)&&void 0!==r?r:void 0;return n.jsxs(q.Provider,e.__assign({value:{rowId:u}},{children:[n.jsx("tr",e.__assign({style:p?{cssText:p}:void 0},{children:l})),g&&(null==v?void 0:v.aiReason)&&n.jsx("tr",e.__assign({style:{width:"100%"}},{children:n.jsx("td",e.__assign({colSpan:f||1,className:a.default.tableExpandedCell},{children:n.jsx("div",e.__assign({className:a.default.tableExpandedCellInner},{children:n.jsx("div",e.__assign({className:a.default.tableExpandedCellContent},{children:n.jsx(x.default,{aiReason:v.aiReason,customIcons:c,customStyles:{aiReasoningContent:null==s?void 0:s.aiReasoningContent,aiReasoningAccordion:null==s?void 0:s.aiReasoningAccordion,aiReasoningMarkdown:null==s?void 0:s.aiReasoningMarkdown,aiReasoningPill:null==s?void 0:s.aiReasoningPill,webCitation:null==s?void 0:s.webCitation,stormeeCitation:null==s?void 0:s.stormeeCitation,waveformCitation:null==s?void 0:s.waveformCitation,imageCitation:null==s?void 0:s.imageCitation,fileCitation:null==s?void 0:s.fileCitation,appModCitation:null==s?void 0:s.appModCitation,rcaCitation:null==s?void 0:s.rcaCitation,readFileCitation:null==s?void 0:s.readFileCitation,loadingCitations:null==s?void 0:s.loadingCitations,chatCitation:null==s?void 0:s.chatCitation}})}))}))}))}))]}))};var U=["del","ins"];function T(e){return function(e,n,i){var t=n.join("|");return e.replace(new RegExp("<(".concat(t,")>([\\s\\S]*?)<\\/\\1>"),"gi"),function(e,n,t){return"<".concat(n,">").concat(i(t),"</").concat(n,">")})}(e,U,function(e){return e.split(/(<[^>]+>)/g).map(function(e){return!e||/^<[^>]+>$/.test(e)?e:function(e){if(!e)return e;var n=[];return e.replace(/`([^`\n]+)`/g,function(e,i){var t=n.push(i)-1;return"@@CODE_SPAN_".concat(t,"@@")}).replace(/\*\*([\s\S]+?)\*\*/g,"<strong>$1</strong>").replace(/__([\s\S]+?)__/g,"<strong>$1</strong>").replace(/@@CODE_SPAN_(\d+)@@/g,function(e,i){var t,o=null!==(t=n[Number(i)])&&void 0!==t?t:"";return"<code>".concat(o.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),"</code>")})}(e)}).join("")})}exports.default=function(t){var o,s=t.message,f=t.noMarkdownContent,p=t.useMarkdown,x=void 0===p||p,R=t.isParent,q=t.scenario,U=t.showUserStoryDiff,L=void 0!==U&&U,P=t.aiReasoningsForBlock,$=t.isCitationLoadingDisplay,D=void 0!==$&&$,H=t.className;t.highConfidenceIcon,t.lowConfidenceIcon;var O=t.customStyles,F=t.customIcons,B=t.contextVariant,W=t.aiReasoningDiffView,z=t.userStoryCitations,V=t.artifactId,G=t.isCraflow,Q=t.onCraAccept,J=t.onCraReject,K=t.craFlowConfig,X=t.isDisplayHighlightControl,Y=void 0!==X&&X,Z=t.showConfidenceScore,ee=void 0===Z||Z,ne=i.useRef(null),ie=g.useRequirementAI(),te=ie.userStory,oe=ie.inlineUpdateComponentConfig,ae=ie.getAvgScoreForStory,re=ie.setUserStory,le=ie.aiReasoning,de=ie.setAiReasoning,se=ie.customIcons,ce=ie.searchQueryList,ue=ie.searchQueryReasoningIdList,ve=ie.currentHighlightIndex,ge=ie.segmentComponentConfig,fe=null!=F?F:null==se?void 0:se.userStoryIcons;null==O||O.searchHighlight;var pe=r.useMarkdownSearch(ne),he=pe.search,me=pe.clear,Ce=i.useState("1"),_e=Ce[0],xe=Ce[1],je=i.useState(null),ye=je[0],Se=je[1],Re=i.useRef(new Map),Ie=i.useCallback(function(e,n){Se(e&&n?{rowId:e,aiReason:n}:null)},[]),we=V?ae(V):0,be=i.useState([]),Ne=be[0],ke=be[1],Ae=function(e){return null==e?"":"string"==typeof e?e:"number"==typeof e?String(e):Array.isArray(e)?e.map(Ae).join(""):I.default.isValidElement(e)?Ae(e.props.children):""},qe=function(e){var n=e;return n=function(e){for(var n,i=/<updated[^>]*>[\s\S]*?<\/updated>/gi,t=[],o=new RegExp(i.source,i.flags);null!==(n=o.exec(e));){var a=n[0],r=a.match(/<deleted>([\s\S]*?)<\/deleted>/i),l=a.match(/<changed>([\s\S]*?)<\/changed>/i),d=function(e){return(e.match(/^\s*\d+\.\s/gm)||[]).length};t.push({index:n.index,endIndex:n.index+n[0].length,deletedItemCount:d((null==r?void 0:r[1])||""),changedItemCount:d((null==l?void 0:l[1])||"")})}if(0===t.length)return e;for(var s=e,c=function(e){var n=t[e],i=n.changedItemCount-n.deletedItemCount;if(0===i)return"continue";for(var o=!1,a=0,r=s.substring(0,n.index).split("\n").reverse();a<r.length;a++){var l=r[a].trim();if(""!==l){/^\d+\.\s/.test(l)&&(o=!0);break}}if(!o)return"continue";var d=n.endIndex,c=e+1<t.length?t[e+1].index:s.length,u=s.substring(d,c);u=u.replace(/^(\s*)(\d+)\.\s/gm,function(e,n,t){return"".concat(n).concat(parseInt(t,10)+i,". ")}),s=s.substring(0,d)+u+s.substring(c)},u=t.length-1;u>=0;u--)c(u);return s}(n=(n=(n=(n=(n=(n=n.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,function(e,n){var i=n.replace(/ai_reasoning\$(\d+)/g,function(e,n){return"ai_reasoning$".concat(n,"-legacy")});return"<deleted>".concat(i,"</deleted>")})).replace(/<generatedCode([^>]*)>([\s\S]*?)<\/generatedCode>/gi,function(e,n,i){var t=btoa(encodeURIComponent(i.trim()));return"\n\n<generatedCode".concat(n,' data-raw="').concat(t,'"></generatedCode>\n\n')})).replace(/^(\s*[-*]|\s*\d+\.)\s*\n?\s*(<updated\b)/gm,"$1 $2")).replace(/(<segment\b([^>]*)>)([\s\S]*?)(<\/segment>)/gi,function(e,n,i,t,o){var a=t.match(/<table[\s\S]*?<\/table>/i);if(a){var r=btoa(encodeURIComponent(a[0]));return"<segment".concat(i,' data-table="').concat(r,'"></segment>')}return e})).replace(/<updatedsegment([^>]*)>([\s\S]*?)<\/updatedsegment>/gi,function(e,n,i){if(/<table[\s>]/i.test(i)){var t=btoa(encodeURIComponent(i));return"<updatedsegment".concat(n,' data-raw="').concat(t,'"></updatedsegment>')}return e})).replace(/<updated([^>]*)>([\s\S]*?)<\/updated>/gi,function(e,i,t,o){var a=n.substring(0,o),r=a.lastIndexOf("\n"),l=/^\s+[-*]\s/.test(a.substring(r+1))||/^\s+\d+\.\s/.test(a.substring(r+1)),d=/^\s*(\d+\.|\s*[-*])\s+$/.test(a.substring(r+1));if(l||d){var s=t;return s=(s=(s=(s=s.replace(/(<deleted>)\s*\n?\s*[-*]\s+/gi,"$1\n")).replace(/(<changed>)\s*\n?\s*[-*]\s+/gi,"$1\n")).replace(/(<deleted>)\s*\n?\s*\d+\.\s+/gi,"$1\n")).replace(/(<changed>)\s*\n?\s*\d+\.\s+/gi,"$1\n"),"<updated".concat(i,">").concat(s,"</updated>")}return e})),n=function(e){var n=e.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,function(e,n){var i=n.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <deleted>",{hadChange:i!==n}),"<deleted>".concat(i,"</deleted>")});return n.replace(/<changed>([\s\S]*?)<\/changed>/gi,function(e,n){var i=n.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <changed>",{hadChange:i!==n,preview:n.substring(0,120)}),"<changed>".concat(i,"</changed>")})}(n),n=T(n)},Ee=i.useMemo(function(){return s?qe(s):s},[s]);i.useEffect(function(){ke(P||le)},[P,le]);var Me=i.useMemo(function(){return{upt:function(i){var t;i.node;var o=i.children,a=e.__rest(i,["node","children"]),r=null==a?void 0:a.id,l=r?null===(t=r.split("$"))||void 0===t?void 0:t[1]:null,d=le.find(function(e){return e.id.toString()===l});return d?n.jsx(j.default,e.__assign({aiReason:d,customStyles:null==O?void 0:O.inlineUpdatedComponent,handleClickCognitiveDecision:null==oe?void 0:oe.handleClickCognitiveDecision,handleClickUpdatedPill:null==oe?void 0:oe.handleClickUpdatedPill,handleClickOutputValue:null==oe?void 0:oe.handleClickOutputValue,customIcons:null==oe?void 0:oe.customIcons},{children:o})):o},del:function(i){var t,o,r,l;i.node;var d=i.children,s=e.__rest(i,["node","children"]),c=s.aireason,u=c&&(null===(t=c.deviation_details)||void 0===t?void 0:t.resolved)&&("rejected"===(null===(o=c.deviation_details)||void 0===o?void 0:o.resolved)||"reverted"===(null===(r=c.deviation_details)||void 0===r?void 0:r.resolved));return n.jsx("span",e.__assign({className:a.default.deleted,style:e.__assign(e.__assign({},null!==(l=null==O?void 0:O.deleted)&&void 0!==l?l:{}),{textDecoration:u?"none":"line-through"})},s,{onClick:s.onclick},{children:d}))},ins:function(i){var t=i.children,o=e.__rest(i,["children"]);return n.jsx("span",e.__assign({className:a.default.inserted,style:null==O?void 0:O.inserted},o,{onClick:o.onclick},{children:t}))},preserved:function(i){var t=i.children,o=e.__rest(i,["children"]);return n.jsx("span",e.__assign({className:a.default.preserved,style:null==O?void 0:O.preserved},o,{onClick:o.onclick},{children:t}))},h1:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("h1",e.__assign({className:a.default.heading1,style:null==O?void 0:O.heading1},{children:t.children}))},h2:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("h2",e.__assign({className:a.default.heading2,style:null==O?void 0:O.heading2},{children:t.children}))},h3:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("h3",e.__assign({className:a.default.heading3,style:null==O?void 0:O.heading3},{children:t.children}))},b:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("b",e.__assign({className:a.default.bold,style:null==O?void 0:O.bold},{children:null==t?void 0:t.children}))},p:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("p",e.__assign({},t,{className:a.default.paragraph,style:null==O?void 0:O.paragraph},{children:t.children}))},updated:function(i){var t=i.node,o=e.__rest(i,["node"]);return n.jsx(c.default,e.__assign({},o,{showUserStoryDiff:L,currentUpdatedTagId:_e,setCurrentUpdatedTagId:xe,userStory:te,setUserStory:re,setAiReasoning:de,node:t,isCraflow:G,onCraAccept:Q,onCraReject:J,customStyles:null==O?void 0:O.updatedContent,craFlowConfig:K}))},ol:function(i){var t,o,r,l=i.node,d=e.__rest(i,["node"]),s=null!==(r=null!==(o=null===(t=null==l?void 0:l.properties)||void 0===t?void 0:t.start)&&void 0!==o?o:null==d?void 0:d.start)&&void 0!==r?r:void 0;return n.jsx("ol",e.__assign({className:a.default.orderedList,style:null==O?void 0:O.olist},s?{start:Number(s)}:{},{children:null==d?void 0:d.children}))},ul:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("ul",e.__assign({className:a.default.unorderedList,style:null==O?void 0:O.ulist},{children:null==t?void 0:t.children}))},table:function(i){var t=i.children;return n.jsx("div",e.__assign({className:a.default.tableWrapper},{children:n.jsx("table",e.__assign({className:a.default.table,style:null==O?void 0:O.table},{children:t}))}))},tr:function(e){var i=e.node,t=e.children;return n.jsx(M,{node:i,children:t,customStyles:O})},td:function(i){var t,o=i.node,a=i.children,r=null!==(t=null==o?void 0:o.properties)&&void 0!==t?t:{},l=r.style,d=e.__rest(r,["style"]);return n.jsx(k.Provider,e.__assign({value:!0},{children:n.jsx("td",e.__assign({},d,{style:l?{cssText:l}:void 0},{children:a}))}))},th:function(i){var t,o=i.node,a=i.children,r=null!==(t=null==o?void 0:o.properties)&&void 0!==t?t:{},l=r.style,d=e.__rest(r,["style"]);return n.jsx(k.Provider,e.__assign({value:!0},{children:n.jsx("th",e.__assign({},d,{style:l?{cssText:l}:void 0},{children:a}))}))},recommendation:function(i){var t;i.node;var o=e.__rest(i,["node"]),a="The AI has selected this content based on: ".concat((null===(t=null==o?void 0:o.children)||void 0===t?void 0:t[0])||"");return n.jsx(C.default,e.__assign({},o,{customStyles:null==O?void 0:O.recommendationBlock,label:a}))},a:function(t){var o,a,r;t.inline;var l=t.children;t.node;var d=e.__rest(t,["inline","children","node"]),s=i.useContext(k)||"true"==(null==d?void 0:d.table),c="".concat(null==d?void 0:d.href),u=null===(o=c.split("$"))||void 0===o?void 0:o[0],v=null===(a=c.split("$"))||void 0===a?void 0:a[1];if("ai_reasoning"===u){var g=(null!==(r=L?W:le)&&void 0!==r?r:[]).find(function(e){return e.id.toString()===decodeURIComponent(v)}),f=ue.includes(v);if(g){if(s)return n.jsx(E,{aiReason:g,customStyle:null==O?void 0:O.tableAiReasoning,customIcons:fe,isHighConfidence:g.relevance_score>=h.SHOW_CONFIDENCE_SCORE_THRESHOLD_IN_AI_REASONING});var p="source"!==I.default.Children.toArray(l).join("").trim().toLowerCase();return n.jsx(h.default,{aiReason:g,isSourceHasHighlight:f,inlineLabel:l,isInlineCitation:p,customIcons:fe,customStyles:{aiReasoningContent:null==O?void 0:O.aiReasoningContent,aiReasoningAccordion:null==O?void 0:O.aiReasoningAccordion,aiReasoningMarkdown:null==O?void 0:O.aiReasoningMarkdown,aiReasoningPill:null==O?void 0:O.aiReasoningPill,webCitation:null==O?void 0:O.webCitation,stormeeCitation:null==O?void 0:O.stormeeCitation,waveformCitation:null==O?void 0:O.waveformCitation,imageCitation:null==O?void 0:O.imageCitation,fileCitation:null==O?void 0:O.fileCitation,appModCitation:null==O?void 0:O.appModCitation,rcaCitation:null==O?void 0:O.rcaCitation,readFileCitation:null==O?void 0:O.readFileCitation,loadingCitations:null==O?void 0:O.loadingCitations,chatCitation:null==O?void 0:O.chatCitation,bigEnoughCitation:null==O?void 0:O.bigEnoughCitation}})}}return null},code:function(i){i.inline;var t=i.children,o=i.className;return i.node,e.__rest(i,["inline","children","className","node"]),/language-(\w+)/.exec(o||"")||(null==o?void 0:o.includes("language-"))?n.jsx("div",{children:n.jsx("code",e.__assign({className:a.default.blockCode,style:null==O?void 0:O.code},{children:t}))}):n.jsx("code",e.__assign({className:a.default.inlineCode,style:null==O?void 0:O.code},{children:t}))},learned:function(i){var t=i.children;return n.jsx(d.Tooltip,e.__assign({title:t,placement:"top"},{children:n.jsx(l.Info,{size:16,className:a.default.learned})}))},generatedcode:function(i){i.node;var t=e.__rest(i,["node"]),o=(null==t?void 0:t.language)||"python",a=function(e){var n="";try{if(e["data-raw"])n=decodeURIComponent(atob(e["data-raw"]));else{var i=function(e){var n;return"string"==typeof e?e:Array.isArray(e)?e.map(i).join(""):(null===(n=null==e?void 0:e.props)||void 0===n?void 0:n.children)?i(e.props.children):""};n=i(e.children)}}catch(i){console.error("Error decoding generated code:",i),n=String(e.children)}return n}(t);return n.jsx(u.default,{title:"Generated Code",code:a,language:o,customStyles:{pill:null==O?void 0:O.generatedCodePill,content:null==O?void 0:O.generatedCodeContent}})},updatedsegment:function(i){var t,o,a,r,l=i.node,d=i.children,s=e.__rest(i,["node","children"]),c="".concat(null===(t=l.position)||void 0===t?void 0:t.start.line,"-").concat(null===(o=l.position)||void 0===o?void 0:o.start.column,"-").concat(null===(a=l.position)||void 0===a?void 0:a.end.line,"-").concat(null===(r=l.position)||void 0===r?void 0:r.end.column),u=function(e){if(!e["data-raw"])return null;try{return decodeURIComponent(atob(e["data-raw"]))}catch(e){return console.error("Error decoding segment raw content:",e),null}}(s),v=u?n.jsx("div",{dangerouslySetInnerHTML:{__html:N.default.sanitize(u)}}):n.jsx("div",{children:d});return n.jsx(y.default,{id:c,node:l,children:v,props:s,segmentComponentConfig:ge,customStyles:O,customIcons:F,extractText:Ae,isUpdatedSegment:!0})},segment:function(i){var t,o,a,r,l=i.node,d=i.children,s=e.__rest(i,["node","children"]),c="".concat(null===(t=l.position)||void 0===t?void 0:t.start.line,"-").concat(null===(o=l.position)||void 0===o?void 0:o.start.column,"-").concat(null===(a=l.position)||void 0===a?void 0:a.end.line,"-").concat(null===(r=l.position)||void 0===r?void 0:r.end.column);return n.jsx(y.default,{id:c,node:l,children:d,props:s,segmentComponentConfig:ge,customStyles:O,customIcons:F,extractText:Ae})}}},[Ne,K,le,z,_e,L,s,F,ce,ue,O,ge]);return i.useEffect(function(){if(ne.current){if(ce.length){var e;if(0===ue.length||Y)requestAnimationFrame(function(){he([ce[ve].replace(/\*/g,"")])});else{var n=ne.current,i=new MutationObserver(function(){clearTimeout(e),e=setTimeout(function(){i.disconnect(),requestAnimationFrame(function(){he([ce[ve].replace(/\*/g,"")])})},50)});i.observe(n,{childList:!0,subtree:!0})}return function(){clearTimeout(e)}}me()}},[ce,ue,ve,Y]),n.jsx(A.Provider,e.__assign({value:{expandedInfo:ye,setExpanded:Ie,reasonToRow:Re}},{children:n.jsxs("div",e.__assign({ref:ne,className:"".concat(a.default.container," ").concat("approving"!==q?a.default.wrapper:""," ").concat(H||""),style:null==O?void 0:O.container},{children:[x?n.jsx(S.MarkdownContextProvider,{children:n.jsx(w.default,e.__assign({components:Me,rehypePlugins:[b.default]},{children:Ee}))}):f,we>0&&ee&&n.jsx("div",e.__assign({className:a.default.confidenceScoreContainer,style:null==O?void 0:O.confidenceScoreContainer},{children:n.jsxs("span",e.__assign({className:a.default.confidenceScore,style:null==O?void 0:O.confidenceScore},{children:[n.jsx(m.default,{size:14,color:(null==O?void 0:O.confidenceScoreIconColor)||"#166534"}),we,"%"]}))})),D&&n.jsx("div",e.__assign({className:a.default.citationLoader,style:null==O?void 0:O.citationLoaderContainer},{children:n.jsx(v.default,{customStyles:{container:null==O?void 0:O.citationLoadingContainer,icon:null==O?void 0:O.citationLoadingIcon,text:null==O?void 0:O.citationLoadingText}})})),R&&n.jsx("div",e.__assign({style:e.__assign({},null===(o=null==O?void 0:O.attachedContext)||void 0===o?void 0:o.wrapper),className:"flex mt-5"},{children:n.jsx(_.default,{customStyles:null==O?void 0:O.attachedContext,variant:B})}))]}))}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),t=require("react-markdown"),o=require("rehype-raw"),l=require("./UserStoryWithCitation.module.css.js"),a=require("../../shared/useMarkdownSearch.js"),r=require("lucide-react"),d=require("@mui/material"),s=require("dompurify"),c=require("../../shared/UpdatedAnimationContent.js"),u=require("../../shared/GeneratedCodeCitation.js"),v=require("../../shared/CitationLoadingIndicator.js"),g=require("../RequirementAIWrapper/RequirementAIWrapper.js"),h=require("../../icons/CognitiveDecision.js"),f=require("../../icons/BrainRed.js"),p=require("../ai-reasoning/AiReasoningCitation.js"),m=require("../../icons/RelevanceScoreIcon.js"),C=require("../RecommendationBlock/RecommendationBlock.js"),_=require("../UserStoryCard/AttachedContext.js"),x=require("../ai-reasoning/AiReasoningCitationContent.js"),j=require("./components/InlineUpdatedComponent.js"),y=require("../segment/SegmentWrapper.js"),S=require("../../store/markdown-context.js"),w=require("./components/HighlightButtonComponent.js");function I(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var R=I(i),b=I(t),N=I(o),k=I(s),q=i.createContext(!1),A=i.createContext({expandedInfo:null,setExpanded:function(){},reasonToRow:{current:new Map}}),E=i.createContext({rowId:""}),M=function(t){var o,a=t.aiReason,r=t.isHighConfidence,d=t.customStyle,s=t.customIcons,c=i.useContext(A),u=c.expandedInfo,v=c.setExpanded,g=c.reasonToRow,p=i.useContext(E).rowId,m=String(a.id);p&&g.current.set(m,p);var C=(null===(o=null==u?void 0:u.aiReason)||void 0===o?void 0:o.id)===a.id,_=r?(null==s?void 0:s.highConfidence)||n.jsx(h.default,{}):(null==s?void 0:s.lowConfidence)||n.jsx(f.default,{});return n.jsxs("button",e.__assign({className:l.default.aiReasoningButton,style:d,onClick:function(e){e.stopPropagation(),e.preventDefault(),v(C?null:p,C?null:a)}},{children:[_,C?n.jsx("i",{className:"pi pi-angle-up ".concat(r?l.default.aiReasoningIconHighConfidence:l.default.aiReasoningIconLowConfidence)}):n.jsx("i",{className:"pi pi-angle-down ".concat(r?l.default.aiReasoningIconHighConfidence:l.default.aiReasoningIconLowConfidence)})]}))},U=function(t){var o,a,r=t.children,d=t.node,s=t.customStyles,c=t.customIcons,u=i.useRef(Math.random().toString(36).slice(2)).current,v=i.useContext(A).expandedInfo,g=(null==v?void 0:v.rowId)===u,h=Array.isArray(null==d?void 0:d.children)?d.children.filter(function(e){return"element"===e.type}).length:1,f=null!==(a=null===(o=null==d?void 0:d.properties)||void 0===o?void 0:o.style)&&void 0!==a?a:void 0;return n.jsxs(E.Provider,e.__assign({value:{rowId:u}},{children:[n.jsx("tr",e.__assign({style:f?{cssText:f}:void 0},{children:r})),g&&(null==v?void 0:v.aiReason)&&n.jsx("tr",e.__assign({style:{width:"100%"}},{children:n.jsx("td",e.__assign({colSpan:h||1,className:l.default.tableExpandedCell},{children:n.jsx("div",e.__assign({className:l.default.tableExpandedCellInner},{children:n.jsx("div",e.__assign({className:l.default.tableExpandedCellContent},{children:n.jsx(x.default,{aiReason:v.aiReason,customIcons:c,customStyles:{aiReasoningContent:null==s?void 0:s.aiReasoningContent,aiReasoningAccordion:null==s?void 0:s.aiReasoningAccordion,aiReasoningMarkdown:null==s?void 0:s.aiReasoningMarkdown,aiReasoningPill:null==s?void 0:s.aiReasoningPill,webCitation:null==s?void 0:s.webCitation,stormeeCitation:null==s?void 0:s.stormeeCitation,waveformCitation:null==s?void 0:s.waveformCitation,imageCitation:null==s?void 0:s.imageCitation,fileCitation:null==s?void 0:s.fileCitation,appModCitation:null==s?void 0:s.appModCitation,rcaCitation:null==s?void 0:s.rcaCitation,readFileCitation:null==s?void 0:s.readFileCitation,loadingCitations:null==s?void 0:s.loadingCitations,chatCitation:null==s?void 0:s.chatCitation}})}))}))}))}))]}))};var T=["del","ins"];function L(e){return function(e,n,i){var t=n.join("|");return e.replace(new RegExp("<(".concat(t,")>([\\s\\S]*?)<\\/\\1>"),"gi"),function(e,n,t){return"<".concat(n,">").concat(i(t),"</").concat(n,">")})}(e,T,function(e){return e.split(/(<[^>]+>)/g).map(function(e){return!e||/^<[^>]+>$/.test(e)?e:function(e){if(!e)return e;var n=[];return e.replace(/`([^`\n]+)`/g,function(e,i){var t=n.push(i)-1;return"@@CODE_SPAN_".concat(t,"@@")}).replace(/\*\*([\s\S]+?)\*\*/g,"<strong>$1</strong>").replace(/__([\s\S]+?)__/g,"<strong>$1</strong>").replace(/@@CODE_SPAN_(\d+)@@/g,function(e,i){var t,o=null!==(t=n[Number(i)])&&void 0!==t?t:"";return"<code>".concat(o.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),"</code>")})}(e)}).join("")})}exports.default=function(t){var o,s=t.message,h=t.noMarkdownContent,f=t.useMarkdown,x=void 0===f||f,I=t.isParent,E=t.scenario,T=t.showUserStoryDiff,P=void 0!==T&&T,H=t.aiReasoningsForBlock,$=t.isCitationLoadingDisplay,D=void 0!==$&&$,F=t.className;t.highConfidenceIcon,t.lowConfidenceIcon;var O=t.customStyles,B=t.customIcons,W=t.contextVariant,z=t.aiReasoningDiffView,V=t.userStoryCitations,G=t.artifactId,Q=t.isCraflow,J=t.onCraAccept,K=t.onCraReject,X=t.craFlowConfig,Y=t.isDisplayHighlightControl,Z=void 0!==Y&&Y,ee=t.showConfidenceScore,ne=void 0===ee||ee,ie=i.useRef(null),te=g.useRequirementAI(),oe=te.userStory,le=te.inlineUpdateComponentConfig,ae=te.getAvgScoreForStory,re=te.setUserStory,de=te.aiReasoning,se=te.setAiReasoning,ce=te.customIcons,ue=te.searchQueryList,ve=te.searchQueryReasoningIdList,ge=te.currentHighlightIndex,he=te.segmentComponentConfig,fe=null!=B?B:null==ce?void 0:ce.userStoryIcons;null==O||O.searchHighlight;var pe=a.useMarkdownSearch(ie),me=pe.search,Ce=pe.clear,_e=i.useState("1"),xe=_e[0],je=_e[1],ye=i.useState(null),Se=ye[0],we=ye[1],Ie=i.useRef(new Map),Re=i.useState(new Set),be=Re[0],Ne=Re[1],ke=i.useCallback(function(e,n){we(e&&n?{rowId:e,aiReason:n}:null)},[]),qe=G?ae(G):0,Ae=i.useState([]),Ee=Ae[0],Me=Ae[1],Ue=i.useCallback(function(e){Ne(function(n){var i=new Set(n);return i.has(e)?i.delete(e):i.add(e),i})},[]),Te=function(e){return null==e?"":"string"==typeof e?e:"number"==typeof e?String(e):Array.isArray(e)?e.map(Te).join(""):R.default.isValidElement(e)?Te(e.props.children):""},Le=function(e){var n=e;return n=function(e){for(var n,i=/<updated[^>]*>[\s\S]*?<\/updated>/gi,t=[],o=new RegExp(i.source,i.flags);null!==(n=o.exec(e));){var l=n[0],a=l.match(/<deleted>([\s\S]*?)<\/deleted>/i),r=l.match(/<changed>([\s\S]*?)<\/changed>/i),d=function(e){return(e.match(/^\s*\d+\.\s/gm)||[]).length};t.push({index:n.index,endIndex:n.index+n[0].length,deletedItemCount:d((null==a?void 0:a[1])||""),changedItemCount:d((null==r?void 0:r[1])||"")})}if(0===t.length)return e;for(var s=e,c=function(e){var n=t[e],i=n.changedItemCount-n.deletedItemCount;if(0===i)return"continue";for(var o=!1,l=0,a=s.substring(0,n.index).split("\n").reverse();l<a.length;l++){var r=a[l].trim();if(""!==r){/^\d+\.\s/.test(r)&&(o=!0);break}}if(!o)return"continue";var d=n.endIndex,c=e+1<t.length?t[e+1].index:s.length,u=s.substring(d,c);u=u.replace(/^(\s*)(\d+)\.\s/gm,function(e,n,t){return"".concat(n).concat(parseInt(t,10)+i,". ")}),s=s.substring(0,d)+u+s.substring(c)},u=t.length-1;u>=0;u--)c(u);return s}(n=(n=(n=(n=(n=(n=n.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,function(e,n){var i=n.replace(/ai_reasoning\$(\d+)/g,function(e,n){return"ai_reasoning$".concat(n,"-legacy")});return"<deleted>".concat(i,"</deleted>")})).replace(/<generatedCode([^>]*)>([\s\S]*?)<\/generatedCode>/gi,function(e,n,i){var t=btoa(encodeURIComponent(i.trim()));return"\n\n<generatedCode".concat(n,' data-raw="').concat(t,'"></generatedCode>\n\n')})).replace(/^(\s*[-*]|\s*\d+\.)\s*\n?\s*(<updated\b)/gm,"$1 $2")).replace(/(<segment\b([^>]*)>)([\s\S]*?)(<\/segment>)/gi,function(e,n,i,t,o){var l=t.match(/<table[\s\S]*?<\/table>/i);if(l){var a=btoa(encodeURIComponent(l[0]));return"<segment".concat(i,' data-table="').concat(a,'"></segment>')}return e})).replace(/<updatedsegment([^>]*)>([\s\S]*?)<\/updatedsegment>/gi,function(e,n,i){if(/<table[\s>]/i.test(i)){var t=btoa(encodeURIComponent(i));return"<updatedsegment".concat(n,' data-raw="').concat(t,'"></updatedsegment>')}return e})).replace(/<updated([^>]*)>([\s\S]*?)<\/updated>/gi,function(e,i,t,o){var l=n.substring(0,o),a=l.lastIndexOf("\n"),r=/^\s+[-*]\s/.test(l.substring(a+1))||/^\s+\d+\.\s/.test(l.substring(a+1)),d=/^\s*(\d+\.|\s*[-*])\s+$/.test(l.substring(a+1));if(r||d){var s=t;return s=(s=(s=(s=s.replace(/(<deleted>)\s*\n?\s*[-*]\s+/gi,"$1\n")).replace(/(<changed>)\s*\n?\s*[-*]\s+/gi,"$1\n")).replace(/(<deleted>)\s*\n?\s*\d+\.\s+/gi,"$1\n")).replace(/(<changed>)\s*\n?\s*\d+\.\s+/gi,"$1\n"),"<updated".concat(i,">").concat(s,"</updated>")}return e})),n=function(e){var n=e.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,function(e,n){var i=n.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <deleted>",{hadChange:i!==n}),"<deleted>".concat(i,"</deleted>")});return n.replace(/<changed>([\s\S]*?)<\/changed>/gi,function(e,n){var i=n.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <changed>",{hadChange:i!==n,preview:n.substring(0,120)}),"<changed>".concat(i,"</changed>")})}(n),n=L(n)},Pe=i.useMemo(function(){return s?Le(s):s},[s]);i.useEffect(function(){Me(H||de)},[H,de]);var He=i.useMemo(function(){return{span:function(i){var t,o,l,a,r,d=i.node,s=i.children,c=e.__rest(i,["node","children"]),u=null!==(o=null===(t=null==d?void 0:d.properties)||void 0===t?void 0:t["highlight-id"])&&void 0!==o?o:null==c?void 0:c["highlight-id"],v="string"==typeof u&&be.has(u),g=null!==(a=null===(l=null==d?void 0:d.properties)||void 0===l?void 0:l["highlight-color"])&&void 0!==a?a:null==c?void 0:c["highlight-color"];return n.jsx("span",e.__assign({style:e.__assign(e.__assign({},null!==(r=null==O?void 0:O.span)&&void 0!==r?r:{}),v?{backgroundColor:g||"#fef08a"}:{})},{children:s}))},button:function(i){var t,o,l,a,r,d,s=i.node,c=i.children,u=e.__rest(i,["node","children"]),v=null!==(o=null===(t=null==s?void 0:s.properties)||void 0===t?void 0:t.action)&&void 0!==o?o:null==u?void 0:u.action,g=null!==(a=null===(l=null==s?void 0:s.properties)||void 0===l?void 0:l["highlight-id"])&&void 0!==a?a:null==u?void 0:u["highlight-id"],h=null!==(d=null===(r=null==s?void 0:s.properties)||void 0===r?void 0:r["highlight-type"])&&void 0!==d?d:null==u?void 0:u["highlight-type"];return"highlight"===v?n.jsx(w.default,e.__assign({highlightId:g,handleHighlightSpan:Ue,icon:"web"===h?null==B?void 0:B.webCitationIcon:"doc"===h?null==B?void 0:B.fileCitationIcon:n.jsx(n.Fragment,{}),customStyles:"web"===h?null==O?void 0:O.webButton:"doc"===h?null==O?void 0:O.docButton:{}},{children:c})):null},upt:function(i){var t;i.node;var o=i.children,l=e.__rest(i,["node","children"]),a=null==l?void 0:l.id,r=a?null===(t=a.split("$"))||void 0===t?void 0:t[1]:null,d=de.find(function(e){return e.id.toString()===r});return d?n.jsx(j.default,e.__assign({aiReason:d,customStyles:null==O?void 0:O.inlineUpdatedComponent,handleClickCognitiveDecision:null==le?void 0:le.handleClickCognitiveDecision,handleClickUpdatedPill:null==le?void 0:le.handleClickUpdatedPill,handleClickOutputValue:null==le?void 0:le.handleClickOutputValue,customIcons:null==le?void 0:le.customIcons},{children:o})):o},del:function(i){var t,o,a,r;i.node;var d=i.children,s=e.__rest(i,["node","children"]),c=s.aireason,u=c&&(null===(t=c.deviation_details)||void 0===t?void 0:t.resolved)&&("rejected"===(null===(o=c.deviation_details)||void 0===o?void 0:o.resolved)||"reverted"===(null===(a=c.deviation_details)||void 0===a?void 0:a.resolved));return n.jsx("span",e.__assign({className:l.default.deleted,style:e.__assign(e.__assign({},null!==(r=null==O?void 0:O.deleted)&&void 0!==r?r:{}),{textDecoration:u?"none":"line-through"})},s,{onClick:s.onclick},{children:d}))},ins:function(i){var t=i.children,o=e.__rest(i,["children"]);return n.jsx("span",e.__assign({className:l.default.inserted,style:null==O?void 0:O.inserted},o,{onClick:o.onclick},{children:t}))},preserved:function(i){var t=i.children,o=e.__rest(i,["children"]);return n.jsx("span",e.__assign({className:l.default.preserved,style:null==O?void 0:O.preserved},o,{onClick:o.onclick},{children:t}))},h1:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("h1",e.__assign({className:l.default.heading1,style:null==O?void 0:O.heading1},{children:t.children}))},h2:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("h2",e.__assign({className:l.default.heading2,style:null==O?void 0:O.heading2},{children:t.children}))},h3:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("h3",e.__assign({className:l.default.heading3,style:null==O?void 0:O.heading3},{children:t.children}))},b:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("b",e.__assign({className:l.default.bold,style:null==O?void 0:O.bold},{children:null==t?void 0:t.children}))},p:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("p",e.__assign({},t,{className:l.default.paragraph,style:null==O?void 0:O.paragraph},{children:t.children}))},updated:function(i){var t=i.node,o=e.__rest(i,["node"]);return n.jsx(c.default,e.__assign({},o,{showUserStoryDiff:P,currentUpdatedTagId:xe,setCurrentUpdatedTagId:je,userStory:oe,setUserStory:re,setAiReasoning:se,node:t,isCraflow:Q,onCraAccept:J,onCraReject:K,customStyles:null==O?void 0:O.updatedContent,craFlowConfig:X}))},ol:function(i){var t,o,a,r=i.node,d=e.__rest(i,["node"]),s=null!==(a=null!==(o=null===(t=null==r?void 0:r.properties)||void 0===t?void 0:t.start)&&void 0!==o?o:null==d?void 0:d.start)&&void 0!==a?a:void 0;return n.jsx("ol",e.__assign({className:l.default.orderedList,style:null==O?void 0:O.olist},s?{start:Number(s)}:{},{children:null==d?void 0:d.children}))},ul:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("ul",e.__assign({className:l.default.unorderedList,style:null==O?void 0:O.ulist},{children:null==t?void 0:t.children}))},table:function(i){var t=i.children;return n.jsx("div",e.__assign({className:l.default.tableWrapper},{children:n.jsx("table",e.__assign({className:l.default.table,style:null==O?void 0:O.table},{children:t}))}))},tr:function(e){var i=e.node,t=e.children;return n.jsx(U,{node:i,children:t,customStyles:O})},td:function(i){var t,o=i.node,l=i.children,a=null!==(t=null==o?void 0:o.properties)&&void 0!==t?t:{},r=a.style,d=e.__rest(a,["style"]);return n.jsx(q.Provider,e.__assign({value:!0},{children:n.jsx("td",e.__assign({},d,{style:r?{cssText:r}:void 0},{children:l}))}))},th:function(i){var t,o=i.node,l=i.children,a=null!==(t=null==o?void 0:o.properties)&&void 0!==t?t:{},r=a.style,d=e.__rest(a,["style"]);return n.jsx(q.Provider,e.__assign({value:!0},{children:n.jsx("th",e.__assign({},d,{style:r?{cssText:r}:void 0},{children:l}))}))},recommendation:function(i){var t;i.node;var o=e.__rest(i,["node"]),l="The AI has selected this content based on: ".concat((null===(t=null==o?void 0:o.children)||void 0===t?void 0:t[0])||"");return n.jsx(C.default,e.__assign({},o,{customStyles:null==O?void 0:O.recommendationBlock,label:l}))},a:function(t){var o,l,a;t.inline;var r=t.children;t.node;var d=e.__rest(t,["inline","children","node"]),s=i.useContext(q)||"true"==(null==d?void 0:d.table),c="".concat(null==d?void 0:d.href),u=null===(o=c.split("$"))||void 0===o?void 0:o[0],v=null===(l=c.split("$"))||void 0===l?void 0:l[1];if("ai_reasoning"===u){var g=(null!==(a=P?z:de)&&void 0!==a?a:[]).find(function(e){return e.id.toString()===decodeURIComponent(v)}),h=ve.includes(v);if(g){if(s)return n.jsx(M,{aiReason:g,customStyle:null==O?void 0:O.tableAiReasoning,customIcons:fe,isHighConfidence:g.relevance_score>=p.SHOW_CONFIDENCE_SCORE_THRESHOLD_IN_AI_REASONING});var f=Te(r),m="source"!==f.trim().toLowerCase();return n.jsx(p.default,{aiReason:g,isSourceHasHighlight:h,inlineLabel:f,isInlineCitation:m,customIcons:fe,customStyles:{aiReasoningContent:null==O?void 0:O.aiReasoningContent,aiReasoningAccordion:null==O?void 0:O.aiReasoningAccordion,aiReasoningMarkdown:null==O?void 0:O.aiReasoningMarkdown,aiReasoningPill:null==O?void 0:O.aiReasoningPill,webCitation:null==O?void 0:O.webCitation,stormeeCitation:null==O?void 0:O.stormeeCitation,waveformCitation:null==O?void 0:O.waveformCitation,imageCitation:null==O?void 0:O.imageCitation,fileCitation:null==O?void 0:O.fileCitation,appModCitation:null==O?void 0:O.appModCitation,rcaCitation:null==O?void 0:O.rcaCitation,readFileCitation:null==O?void 0:O.readFileCitation,loadingCitations:null==O?void 0:O.loadingCitations,chatCitation:null==O?void 0:O.chatCitation,bigEnoughCitation:null==O?void 0:O.bigEnoughCitation}})}}return null},code:function(i){i.inline;var t=i.children,o=i.className;return i.node,e.__rest(i,["inline","children","className","node"]),/language-(\w+)/.exec(o||"")||(null==o?void 0:o.includes("language-"))?n.jsx("div",{children:n.jsx("code",e.__assign({className:l.default.blockCode,style:null==O?void 0:O.code},{children:t}))}):n.jsx("code",e.__assign({className:l.default.inlineCode,style:null==O?void 0:O.code},{children:t}))},learned:function(i){var t=i.children;return n.jsx(d.Tooltip,e.__assign({title:t,placement:"top"},{children:n.jsx(r.Info,{size:16,className:l.default.learned})}))},generatedcode:function(i){i.node;var t=e.__rest(i,["node"]),o=(null==t?void 0:t.language)||"python",l=function(e){var n="";try{if(e["data-raw"])n=decodeURIComponent(atob(e["data-raw"]));else{var i=function(e){var n;return"string"==typeof e?e:Array.isArray(e)?e.map(i).join(""):(null===(n=null==e?void 0:e.props)||void 0===n?void 0:n.children)?i(e.props.children):""};n=i(e.children)}}catch(i){console.error("Error decoding generated code:",i),n=String(e.children)}return n}(t);return n.jsx(u.default,{title:"Generated Code",code:l,language:o,customStyles:{pill:null==O?void 0:O.generatedCodePill,content:null==O?void 0:O.generatedCodeContent}})},updatedsegment:function(i){var t,o,l,a,r=i.node,d=i.children,s=e.__rest(i,["node","children"]),c="".concat(null===(t=r.position)||void 0===t?void 0:t.start.line,"-").concat(null===(o=r.position)||void 0===o?void 0:o.start.column,"-").concat(null===(l=r.position)||void 0===l?void 0:l.end.line,"-").concat(null===(a=r.position)||void 0===a?void 0:a.end.column),u=function(e){if(!e["data-raw"])return null;try{return decodeURIComponent(atob(e["data-raw"]))}catch(e){return console.error("Error decoding segment raw content:",e),null}}(s),v=u?n.jsx("div",{dangerouslySetInnerHTML:{__html:k.default.sanitize(u)}}):n.jsx("div",{children:d});return n.jsx(y.default,{id:c,node:r,children:v,props:s,segmentComponentConfig:he,customStyles:O,customIcons:B,extractText:Te,isUpdatedSegment:!0})},segment:function(i){var t,o,l,a,r=i.node,d=i.children,s=e.__rest(i,["node","children"]),c="".concat(null===(t=r.position)||void 0===t?void 0:t.start.line,"-").concat(null===(o=r.position)||void 0===o?void 0:o.start.column,"-").concat(null===(l=r.position)||void 0===l?void 0:l.end.line,"-").concat(null===(a=r.position)||void 0===a?void 0:a.end.column);return n.jsx(y.default,{id:c,node:r,children:d,props:s,segmentComponentConfig:he,customStyles:O,customIcons:B,extractText:Te})}}},[Ee,X,de,V,xe,P,s,B,ue,ve,O,he,be,Ue]);return i.useEffect(function(){if(ie.current){if(ue.length){var e;if(0===ve.length||Z)requestAnimationFrame(function(){me([ue[ge].replace(/\*/g,"")])});else{var n=ie.current,i=new MutationObserver(function(){clearTimeout(e),e=setTimeout(function(){i.disconnect(),requestAnimationFrame(function(){me([ue[ge].replace(/\*/g,"")])})},50)});i.observe(n,{childList:!0,subtree:!0})}return function(){clearTimeout(e)}}Ce()}},[ue,ve,ge,Z]),n.jsx(A.Provider,e.__assign({value:{expandedInfo:Se,setExpanded:ke,reasonToRow:Ie}},{children:n.jsxs("div",e.__assign({ref:ie,className:"".concat(l.default.container," ").concat("approving"!==E?l.default.wrapper:""," ").concat(F||""),style:null==O?void 0:O.container},{children:[x?n.jsx(S.MarkdownContextProvider,{children:n.jsx(b.default,e.__assign({components:He,rehypePlugins:[N.default]},{children:Pe}))}):h,qe>0&&ne&&n.jsx("div",e.__assign({className:l.default.confidenceScoreContainer,style:null==O?void 0:O.confidenceScoreContainer},{children:n.jsxs("span",e.__assign({className:l.default.confidenceScore,style:null==O?void 0:O.confidenceScore},{children:[n.jsx(m.default,{size:14,color:(null==O?void 0:O.confidenceScoreIconColor)||"#166534"}),qe,"%"]}))})),D&&n.jsx("div",e.__assign({className:l.default.citationLoader,style:null==O?void 0:O.citationLoaderContainer},{children:n.jsx(v.default,{customStyles:{container:null==O?void 0:O.citationLoadingContainer,icon:null==O?void 0:O.citationLoadingIcon,text:null==O?void 0:O.citationLoadingText}})})),I&&n.jsx("div",e.__assign({style:e.__assign({},null===(o=null==O?void 0:O.attachedContext)||void 0===o?void 0:o.wrapper),className:"flex mt-5"},{children:n.jsx(_.default,{customStyles:null==O?void 0:O.attachedContext,variant:W})}))]}))}))};
|
|
2
2
|
//# sourceMappingURL=UserStoryWithCitation.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime");exports.default=function(t){var l=t.props,n=t.highlightId,r=t.handleHighlightSpan,s=t.children,o=t.customStyles,u=t.icon;return i.jsxs("button",e.__assign({},l,{onClick:function(e){var i;null===(i=null==l?void 0:l.onClick)||void 0===i||i.call(l,e),r(n)},style:e.__assign({},o)},{children:[s,u]}))};
|
|
2
|
+
//# sourceMappingURL=HighlightButtonComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HighlightButtonComponent.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as t,Fragment as o,jsx as r}from"react/jsx-runtime";import{useRef as i,useState as n,useEffect as l}from"react";import{LexicalComposer as a}from"@lexical/react/LexicalComposer";import{HistoryPlugin as c}from"@lexical/react/LexicalHistoryPlugin";import{OnChangePlugin as m}from"@lexical/react/LexicalOnChangePlugin";import{TabIndentationPlugin as u}from"@lexical/react/LexicalTabIndentationPlugin";import{ListNode as s,ListItemNode as p}from"@lexical/list";import{ListPlugin as f}from"@lexical/react/LexicalListPlugin";import{LinkPlugin as d}from"@lexical/react/LexicalLinkPlugin";import{LinkNode as g}from"@lexical/link";import{QuoteNode as x,HeadingNode as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as t,Fragment as o,jsx as r}from"react/jsx-runtime";import{useRef as i,useState as n,useEffect as l}from"react";import{LexicalComposer as a}from"@lexical/react/LexicalComposer";import{HistoryPlugin as c}from"@lexical/react/LexicalHistoryPlugin";import{OnChangePlugin as m}from"@lexical/react/LexicalOnChangePlugin";import{TabIndentationPlugin as u}from"@lexical/react/LexicalTabIndentationPlugin";import{ListNode as s,ListItemNode as p}from"@lexical/list";import{ListPlugin as f}from"@lexical/react/LexicalListPlugin";import{LinkPlugin as d}from"@lexical/react/LexicalLinkPlugin";import{LinkNode as g}from"@lexical/link";import{QuoteNode as x,HeadingNode as h}from"@lexical/rich-text";import{TablePlugin as v}from"@lexical/react/LexicalTablePlugin";import{TableNode as C,TableRowNode as y,TableCellNode as b}from"@lexical/table";import{KEY_DOWN_COMMAND as T,$getSelection as j,$isRangeSelection as S,COMMAND_PRIORITY_CRITICAL as E,TextNode as L,$isTextNode as k}from"lexical";import"./components/EditorToolbar/components/ToolbarButton/ToolbarButton.css.js";import{useRequirementAI as B}from"../../RequirementAIWrapper/RequirementAIWrapper.js";import P from"./components/EditorContainer/EditorContainer.js";import N from"./components/EditorToolbar/EditorToolbar.js";import{LayoutPlugin as _}from"./plugins/LayoutPlugin.js";import D from"./theme/theme.js";import"./theme/theme.css.js";import"./Editor.css.js";import H from"./components/Context/ContextMenu.js";import{MarkNode as w}from"@lexical/mark";import I from"./plugins/CommentPlugin/HTMLNode.js";import{DEFAULT_TOOLBAR_CONFIG as R}from"./constants/editorConfig.js";import{InitialHtml as M}from"./plugins/InitialHtml.js";import{InsertNode as A}from"./plugins/InsertNode.js";import{DeleteNode as F}from"./plugins/DeleteNode.js";import{HighlightSpanNode as W,HighlightButtonNode as q}from"./plugins/HighlightNode.js";import{useLexicalComposerContext as O}from"@lexical/react/LexicalComposerContext";function V(e){console.log(e)}function X(){var e=O()[0];return l(function(){var t=function(e){for(var t=e;t;){if("delete"===t.getType())return!0;t=t.getParent()}return!1};return e.registerCommand(T,function(e){if("Backspace"!==e.key&&"Delete"!==e.key)return!1;var o=j();if(!S(o))return!1;if(o.getNodes().some(function(e){return t(e)}))return e.preventDefault(),!0;if(o.isCollapsed()){var r=o.anchor.getNode();if(t(r))return e.preventDefault(),!0;if("Backspace"===e.key){var i=r.getPreviousSibling();if(0===o.anchor.offset&&"delete"===(null==i?void 0:i.getType()))return e.preventDefault(),!0}if("Delete"===e.key){var n=r.getNextSibling(),l=r.getTextContent().length;if(o.anchor.offset===l&&"delete"===(null==n?void 0:n.getType()))return e.preventDefault(),!0}}return!1},E)},[e]),null}function Y(l){var T,E,O,Y=l.minHeight,z=l.height,G=l.placeholder,J=l.onFocus,K=l.onBlur,Q=l.onChange,U=l.onToolbarButtonClick,Z=l.toolbarConfig,$=void 0===Z?R:Z,ee=l.editorRef,te=l.editorState,oe=l.initialString,re=l.customToolbar,ie=l.plugins;l.nodes,l.dynamicHeight,l.artifactContext,l.commentsPanelState;var ne=l.mode,le=l.doNotShowBorderInViewMode,ae=i(null),ce={namespace:"MyEditor",theme:D,onError:V,nodes:[L,s,p,g,x,h,C,y,b,w,I,A,F,W,q],editorState:te},me=n(null),ue=me[0],se=me[1],pe=n(!1),fe=pe[0],de=pe[1],ge=B().customStyles,xe=function(e){var t;null===(t=ee.current)||void 0===t||t.update(function(){var t=j();S(t)&&t.getNodes().forEach(function(t){k(t)&&t.setStyle("color: ".concat(e))})})};return document.getElementById("lexical_editor_wrapper"),t(o,{children:[(null===(T=null==ge?void 0:ge.textEditorStyles)||void 0===T?void 0:T.themeStyles)&&r("style",{children:null===(E=null==ge?void 0:ge.textEditorStyles)||void 0===E?void 0:E.themeStyles}),t("div",e({ref:ae,className:"w-full lexical_editor_wrapper ".concat(le&&"readOnly"===ne?"":"lexical_editor_wrapper_box"),id:"lexical_editor_wrapper",onContextMenu:function(e){var t;e.preventDefault(),null===(t=ee.current)||void 0===t||t.update(function(){var t=j();S(t)&&!t.isCollapsed()?(de(!0),se({x:e.clientX,y:e.clientY})):(de(!1),se(null))})},style:e({minHeight:Y,height:z},null===(O=null==ge?void 0:ge.textEditorStyles)||void 0===O?void 0:O.textArea)},{children:[t(a,e({initialConfig:ce},{children:[" ","edit"===ne&&r(X,{}),"edit"===ne&&r(N,{onToolbarButtonClick:U,editorWrapperRef:ae,toolbarConfig:$,customToolbar:re,editorRef:ee}),r(P,{placeholder:G}),r(u,{}),r(c,{}),r(f,{}),r(d,{}),r(v,{}),r(_,{onFocus:J,onBlur:K,editorRef:ee}),r(m,{ignoreSelectionChange:!0,ignoreHistoryMergeTagChange:!0,onChange:function(e,t,o){Q&&Q(e,t,o)}}),oe&&r(M,{initialValue:oe.value,initialFormat:oe.type,mode:ne}),ie&&ie]})),ue&&fe&&"edit"===ne&&r(H,{position:ue,options:[{label:"Change Color to Red",action:function(){return xe("red")}},{label:"Change Color to Blue",action:function(){return xe("blue")}}],onClose:function(){se(null)}})]}))]})}export{Y as default};
|
|
2
2
|
//# sourceMappingURL=Editor.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__extends as t,__assign as i}from"tslib";import{ElementNode as h}from"lexical";var e=function(h){function e(t,i,e){void 0===i&&(i=null);var n=h.call(this,e)||this;return n.__highlightId=t,n.__highlightColor=i,n}return t(e,h),e.getType=function(){return"highlight-span"},e.clone=function(t){return new e(t.__highlightId,t.__highlightColor,t.__key)},e.prototype.createDOM=function(){return this.createHighlightElement()},e.prototype.exportDOM=function(){return{element:this.createHighlightElement()}},e.prototype.createHighlightElement=function(){var t=document.createElement("span");return t.setAttribute("highlight-id",this.__highlightId),null!==this.__highlightColor&&t.setAttribute("highlight-color",this.__highlightColor),t},e.prototype.updateDOM=function(t,i){return t.__highlightId!==this.__highlightId&&i.setAttribute("highlight-id",this.__highlightId),t.__highlightColor!==this.__highlightColor&&(null===this.__highlightColor?i.removeAttribute("highlight-color"):i.setAttribute("highlight-color",this.__highlightColor)),!1},e.importDOM=function(){return{span:function(t){return t.hasAttribute("highlight-id")?{conversion:n,priority:1}:null}}},e.importJSON=function(t){var i=new e(t.highlightId,t.highlightColor);return i.setFormat(t.format),i.setIndent(t.indent),i.setDirection(t.direction),i},e.prototype.exportJSON=function(){return i(i({},h.prototype.exportJSON.call(this)),{type:"highlight-span",version:1,highlightId:this.__highlightId,highlightColor:this.__highlightColor})},e.prototype.isInline=function(){return!0},e}(h);function n(t){return{node:new e(t.getAttribute("highlight-id")||"",t.getAttribute("highlight-color"))}}var r=function(h){function e(t,i,e){void 0===t&&(t=null),void 0===i&&(i=null);var n=h.call(this,e)||this;return n.__highlightId=t,n.__highlightType=i,n}return t(e,h),e.getType=function(){return"highlight-button"},e.clone=function(t){return new e(t.__highlightId,t.__highlightType,t.__key)},e.prototype.createDOM=function(t){var i=this.createHighlightButtonElement(),h=t.theme.highlightButton;return"string"==typeof h&&(i.className=h),i.contentEditable="false",i},e.prototype.exportDOM=function(){return{element:this.createHighlightButtonElement()}},e.prototype.createHighlightButtonElement=function(){var t=document.createElement("button");return t.setAttribute("action","highlight"),null!==this.__highlightId&&t.setAttribute("highlight-id",this.__highlightId),null!==this.__highlightType&&t.setAttribute("highlight-type",this.__highlightType),t},e.prototype.updateDOM=function(){return!1},e.importDOM=function(){return{button:function(t){return"highlight"!==t.getAttribute("action")?null:{conversion:o,priority:1}}}},e.importJSON=function(t){var i=new e(t.highlightId,t.highlightType);return i.setFormat(t.format),i.setIndent(t.indent),i.setDirection(t.direction),i},e.prototype.exportJSON=function(){return i(i({},h.prototype.exportJSON.call(this)),{type:"highlight-button",version:1,highlightId:this.__highlightId,highlightType:this.__highlightType})},e.prototype.isInline=function(){return!0},e}(h);function o(t){return{node:new r(t.getAttribute("highlight-id"),t.getAttribute("highlight-type"))}}export{r as HighlightButtonNode,e as HighlightSpanNode};
|
|
2
|
+
//# sourceMappingURL=HighlightNode.js.map
|
package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HighlightNode.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e='.PlaygroundEditorTheme__ltr{text-align:left}.PlaygroundEditorTheme__rtl{text-align:right}.PlaygroundEditorTheme__paragraph{font-family:Inter,sans-serif;line-height:28px;margin:0 0 8px;position:relative}.PlaygroundEditorTheme__paragraph:last-child{margin-bottom:0}.PlaygroundEditorTheme__quote{border-left:4px solid #ced0d4;color:#65676b;font-size:15px;margin:0 0 10px 20px;padding-left:16px}.PlaygroundEditorTheme__h1{font-family:Inter,sans-serif;font-size:24px;margin:12px 0 4px;padding:0}.PlaygroundEditorTheme__h2{font-size:20px}.PlaygroundEditorTheme__h2,.PlaygroundEditorTheme__h3{font-family:Inter,sans-serif;margin:10px 0 0;padding:0}.PlaygroundEditorTheme__h3{font-size:18px;text-transform:uppercase}.PlaygroundEditorTheme__textBold{font-family:Inter,sans-serif;font-weight:700}.PlaygroundEditorTheme__textItalic{font-style:italic}.PlaygroundEditorTheme__textUnderline{text-decoration:underline}.PlaygroundEditorTheme__textStrikethrough{text-decoration:line-through}.PlaygroundEditorTheme__textUnderlineStrikethrough{text-decoration:underline line-through}.PlaygroundEditorTheme__textSubscript{font-size:.8em;vertical-align:sub!important}.PlaygroundEditorTheme__textSuperscript{font-size:.8em;vertical-align:super}.PlaygroundEditorTheme__textCode{background-color:#f0f2f5;font-family:Menlo,Consolas,Monaco,monospace;font-size:94%;padding:1px .25rem}.PlaygroundEditorTheme__hashtag{background-color:#5890ff26;border-bottom:1px solid #5890ff4d}.PlaygroundEditorTheme__link{color:#216fdb;text-decoration:none}.PlaygroundEditorTheme__link:hover{text-decoration:underline}.PlaygroundEditorTheme__code{background-color:#f0f2f5;display:block;font-family:Menlo,Consolas,Monaco,monospace;font-size:13px;line-height:1.53;margin:8px 0;overflow-x:auto;padding:8px 8px 8px 52px;position:relative;tab-size:2}.PlaygroundEditorTheme__code:before{background-color:#eee;border-right:1px solid #ccc;color:#777;content:attr(data-gutter);left:0;min-width:25px;padding:8px;position:absolute;text-align:right;top:0;white-space:pre-wrap}.PlaygroundEditorTheme__code:after{color:#00000080;content:attr(data-highlight-language);font-size:10px;padding:3px;position:absolute;right:3px;text-transform:uppercase;top:0}.PlaygroundEditorTheme__table{border-collapse:collapse;border-spacing:0;max-width:100%;overflow-y:scroll;table-layout:fixed;width:100%}.PlaygroundEditorTheme__tableCell{border:1px solid #000;min-width:75px;padding:6px 8px;text-align:start;vertical-align:top}.PlaygroundEditorTheme__tableCellHeader{background-color:#f2f3f5;text-align:start}.PlaygroundEditorTheme__characterLimit{background-color:#fbb!important;display:inline}.PlaygroundEditorTheme__ul{list-style-type:disc}.PlaygroundEditorTheme__ol1,.PlaygroundEditorTheme__ul{list-style-position:outside;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__ol1{list-style-type:decimal}.PlaygroundEditorTheme__ol2{list-style-position:outside;list-style-type:upper-alpha;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__ol3{list-style-position:outside;list-style-type:lower-alpha;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__ol4{list-style-position:outside;list-style-type:upper-roman;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__ol5{list-style-position:outside;list-style-type:lower-roman;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__listItem{display:list-item;margin:8px 24px 8px 8px;padding:0 8px}.PlaygroundEditorTheme__nestedListItem{list-style-type:inherit;margin-left:16px}ol .PlaygroundEditorTheme__nestedListItem{list-style-type:none}.PlaygroundEditorTheme__listItemChecked,.PlaygroundEditorTheme__listItemUnchecked{list-style-type:none;margin-left:8px;margin-right:8px;outline:none;padding-left:24px;padding-right:24px;position:relative}.PlaygroundEditorTheme__listItemChecked{text-decoration:line-through}.PlaygroundEditorTheme__listItemChecked:before,.PlaygroundEditorTheme__listItemUnchecked:before{background-size:cover;content:"";cursor:pointer;display:block;height:16px;left:0;position:absolute;top:2px;width:16px}.PlaygroundEditorTheme__listItemChecked[dir=rtl]:before,.PlaygroundEditorTheme__listItemUnchecked[dir=rtl]:before{left:auto;right:0}.PlaygroundEditorTheme__listItemChecked:focus:before,.PlaygroundEditorTheme__listItemUnchecked:focus:before{border-radius:2px;box-shadow:0 0 0 2px #a6cdfe}.PlaygroundEditorTheme__tokenComment{color:#708090}.PlaygroundEditorTheme__tokenPunctuation{color:#999}.PlaygroundEditorTheme__tokenProperty{color:#905}.PlaygroundEditorTheme__tokenSelector{color:#690}.PlaygroundEditorTheme__tokenOperator{color:#9a6e3a}.PlaygroundEditorTheme__tokenAttr{color:#07a}.PlaygroundEditorTheme__tokenVariable{color:#e90}.PlaygroundEditorTheme__tokenFunction{color:#dd4a68}.PlaygroundEditorTheme__mark{background:#ffd40024;border-bottom:2px solid #ffd4004d;padding-bottom:2px}.PlaygroundEditorTheme__markOverlap{background:#ffd4004d;border-bottom:2px solid #ffd400b3}.PlaygroundEditorTheme__mark.selected{background:#ffd40080;border-bottom:2px solid #ffd400}.PlaygroundEditorTheme__markOverlap.selected{background:#ffd400b3;border-bottom:2px solid #ffd400b3}.PlaygroundEditorTheme__embedBlock{user-select:none}.PlaygroundEditorTheme__embedBlockFocus{outline:2px solid #3c84f4}.PlaygroundEditorTheme__delete-node{text-decoration:var(--delete-node-text-decoration,line-through);text-decoration-color:var(--delete-node-decoration-color,#dc2626);text-decoration-thickness:var(--delete-node-decoration-thickness,2px)}.PlaygroundEditorTheme__insert-node{background-color:var(--insert-node-bg,#dbeafe);border-radius:var(--insert-node-border-radius,2px);color:var(--insert-node-color,#1e3a8a);padding:var(--insert-node-padding,1px 2px);text-decoration:var(--insert-node-text-decoration,none)}';!function(){if("undefined"==typeof document)return;const o=document.createElement("style");o.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&o.setAttribute("nonce",t),o.appendChild(document.createTextNode(e));const r=document.head||document.getElementsByTagName("head")[0]||document.documentElement;r&&r.appendChild(o)}();export{e as default};
|
|
1
|
+
var e='.PlaygroundEditorTheme__ltr{text-align:left}.PlaygroundEditorTheme__rtl{text-align:right}.PlaygroundEditorTheme__paragraph{font-family:Inter,sans-serif;line-height:28px;margin:0 0 8px;position:relative}.PlaygroundEditorTheme__paragraph:last-child{margin-bottom:0}.PlaygroundEditorTheme__quote{border-left:4px solid #ced0d4;color:#65676b;font-size:15px;margin:0 0 10px 20px;padding-left:16px}.PlaygroundEditorTheme__h1{font-family:Inter,sans-serif;font-size:24px;margin:12px 0 4px;padding:0}.PlaygroundEditorTheme__h2{font-size:20px}.PlaygroundEditorTheme__h2,.PlaygroundEditorTheme__h3{font-family:Inter,sans-serif;margin:10px 0 0;padding:0}.PlaygroundEditorTheme__h3{font-size:18px;text-transform:uppercase}.PlaygroundEditorTheme__textBold{font-family:Inter,sans-serif;font-weight:700}.PlaygroundEditorTheme__textItalic{font-style:italic}.PlaygroundEditorTheme__textUnderline{text-decoration:underline}.PlaygroundEditorTheme__textStrikethrough{text-decoration:line-through}.PlaygroundEditorTheme__textUnderlineStrikethrough{text-decoration:underline line-through}.PlaygroundEditorTheme__textSubscript{font-size:.8em;vertical-align:sub!important}.PlaygroundEditorTheme__textSuperscript{font-size:.8em;vertical-align:super}.PlaygroundEditorTheme__textCode{background-color:#f0f2f5;font-family:Menlo,Consolas,Monaco,monospace;font-size:94%;padding:1px .25rem}.PlaygroundEditorTheme__hashtag{background-color:#5890ff26;border-bottom:1px solid #5890ff4d}.PlaygroundEditorTheme__link{color:#216fdb;text-decoration:none}.PlaygroundEditorTheme__link:hover{text-decoration:underline}.PlaygroundEditorTheme__code{background-color:#f0f2f5;display:block;font-family:Menlo,Consolas,Monaco,monospace;font-size:13px;line-height:1.53;margin:8px 0;overflow-x:auto;padding:8px 8px 8px 52px;position:relative;tab-size:2}.PlaygroundEditorTheme__code:before{background-color:#eee;border-right:1px solid #ccc;color:#777;content:attr(data-gutter);left:0;min-width:25px;padding:8px;position:absolute;text-align:right;top:0;white-space:pre-wrap}.PlaygroundEditorTheme__code:after{color:#00000080;content:attr(data-highlight-language);font-size:10px;padding:3px;position:absolute;right:3px;text-transform:uppercase;top:0}.PlaygroundEditorTheme__table{border-collapse:collapse;border-spacing:0;max-width:100%;overflow-y:scroll;table-layout:fixed;width:100%}.PlaygroundEditorTheme__tableCell{border:1px solid #000;min-width:75px;padding:6px 8px;text-align:start;vertical-align:top}.PlaygroundEditorTheme__tableCellHeader{background-color:#f2f3f5;text-align:start}.PlaygroundEditorTheme__characterLimit{background-color:#fbb!important;display:inline}.PlaygroundEditorTheme__ul{list-style-type:disc}.PlaygroundEditorTheme__ol1,.PlaygroundEditorTheme__ul{list-style-position:outside;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__ol1{list-style-type:decimal}.PlaygroundEditorTheme__ol2{list-style-position:outside;list-style-type:upper-alpha;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__ol3{list-style-position:outside;list-style-type:lower-alpha;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__ol4{list-style-position:outside;list-style-type:upper-roman;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__ol5{list-style-position:outside;list-style-type:lower-roman;margin:0 0 0 24px;padding:0}.PlaygroundEditorTheme__listItem{display:list-item;margin:8px 24px 8px 8px;padding:0 8px}.PlaygroundEditorTheme__nestedListItem{list-style-type:inherit;margin-left:16px}ol .PlaygroundEditorTheme__nestedListItem{list-style-type:none}.PlaygroundEditorTheme__listItemChecked,.PlaygroundEditorTheme__listItemUnchecked{list-style-type:none;margin-left:8px;margin-right:8px;outline:none;padding-left:24px;padding-right:24px;position:relative}.PlaygroundEditorTheme__listItemChecked{text-decoration:line-through}.PlaygroundEditorTheme__listItemChecked:before,.PlaygroundEditorTheme__listItemUnchecked:before{background-size:cover;content:"";cursor:pointer;display:block;height:16px;left:0;position:absolute;top:2px;width:16px}.PlaygroundEditorTheme__listItemChecked[dir=rtl]:before,.PlaygroundEditorTheme__listItemUnchecked[dir=rtl]:before{left:auto;right:0}.PlaygroundEditorTheme__listItemChecked:focus:before,.PlaygroundEditorTheme__listItemUnchecked:focus:before{border-radius:2px;box-shadow:0 0 0 2px #a6cdfe}.PlaygroundEditorTheme__tokenComment{color:#708090}.PlaygroundEditorTheme__tokenPunctuation{color:#999}.PlaygroundEditorTheme__tokenProperty{color:#905}.PlaygroundEditorTheme__tokenSelector{color:#690}.PlaygroundEditorTheme__tokenOperator{color:#9a6e3a}.PlaygroundEditorTheme__tokenAttr{color:#07a}.PlaygroundEditorTheme__tokenVariable{color:#e90}.PlaygroundEditorTheme__tokenFunction{color:#dd4a68}.PlaygroundEditorTheme__mark{background:#ffd40024;border-bottom:2px solid #ffd4004d;padding-bottom:2px}.PlaygroundEditorTheme__markOverlap{background:#ffd4004d;border-bottom:2px solid #ffd400b3}.PlaygroundEditorTheme__mark.selected{background:#ffd40080;border-bottom:2px solid #ffd400}.PlaygroundEditorTheme__markOverlap.selected{background:#ffd400b3;border-bottom:2px solid #ffd400b3}.PlaygroundEditorTheme__embedBlock{user-select:none}.PlaygroundEditorTheme__embedBlockFocus{outline:2px solid #3c84f4}.PlaygroundEditorTheme__delete-node{text-decoration:var(--delete-node-text-decoration,line-through);text-decoration-color:var(--delete-node-decoration-color,#dc2626);text-decoration-thickness:var(--delete-node-decoration-thickness,2px)}.PlaygroundEditorTheme__insert-node{background-color:var(--insert-node-bg,#dbeafe);border-radius:var(--insert-node-border-radius,2px);color:var(--insert-node-color,#1e3a8a);padding:var(--insert-node-padding,1px 2px);text-decoration:var(--insert-node-text-decoration,none)}.PlaygroundEditorTheme__highlight-button{display:none}';!function(){if("undefined"==typeof document)return;const o=document.createElement("style");o.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&o.setAttribute("nonce",t),o.appendChild(document.createTextNode(e));const r=document.head||document.getElementsByTagName("head")[0]||document.documentElement;r&&r.appendChild(o)}();export{e as default};
|
|
2
2
|
//# sourceMappingURL=theme.css.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./theme.css.js";var e={characterLimit:"PlaygroundEditorTheme__characterLimit",code:"PlaygroundEditorTheme__code",codeHighlight:{atrule:"PlaygroundEditorTheme__tokenAttr",attr:"PlaygroundEditorTheme__tokenAttr",boolean:"PlaygroundEditorTheme__tokenProperty",builtin:"PlaygroundEditorTheme__tokenSelector",cdata:"PlaygroundEditorTheme__tokenComment",char:"PlaygroundEditorTheme__tokenSelector",class:"PlaygroundEditorTheme__tokenFunction","class-name":"PlaygroundEditorTheme__tokenFunction",comment:"PlaygroundEditorTheme__tokenComment",constant:"PlaygroundEditorTheme__tokenProperty",deleted:"PlaygroundEditorTheme__tokenProperty",doctype:"PlaygroundEditorTheme__tokenComment",entity:"PlaygroundEditorTheme__tokenOperator",function:"PlaygroundEditorTheme__tokenFunction",important:"PlaygroundEditorTheme__tokenVariable",inserted:"PlaygroundEditorTheme__tokenSelector",keyword:"PlaygroundEditorTheme__tokenAttr",namespace:"PlaygroundEditorTheme__tokenVariable",number:"PlaygroundEditorTheme__tokenProperty",operator:"PlaygroundEditorTheme__tokenOperator",prolog:"PlaygroundEditorTheme__tokenComment",property:"PlaygroundEditorTheme__tokenProperty",punctuation:"PlaygroundEditorTheme__tokenPunctuation",regex:"PlaygroundEditorTheme__tokenVariable",selector:"PlaygroundEditorTheme__tokenSelector",string:"PlaygroundEditorTheme__tokenSelector",symbol:"PlaygroundEditorTheme__tokenProperty",tag:"PlaygroundEditorTheme__tokenProperty",url:"PlaygroundEditorTheme__tokenOperator",variable:"PlaygroundEditorTheme__tokenVariable"},embedBlock:{base:"PlaygroundEditorTheme__embedBlock",focus:"PlaygroundEditorTheme__embedBlockFocus"},hashtag:"PlaygroundEditorTheme__hashtag",heading:{h1:"PlaygroundEditorTheme__h1",h2:"PlaygroundEditorTheme__h2",h3:"PlaygroundEditorTheme__h3",h4:"PlaygroundEditorTheme__h4",h5:"PlaygroundEditorTheme__h5",h6:"PlaygroundEditorTheme__h6"},image:"editor-image",link:"PlaygroundEditorTheme__link",list:{listitem:"PlaygroundEditorTheme__listItem",listitemChecked:"PlaygroundEditorTheme__listItemChecked",listitemUnchecked:"PlaygroundEditorTheme__listItemUnchecked",nested:{listitem:"PlaygroundEditorTheme__nestedListItem"},olDepth:["PlaygroundEditorTheme__ol1","PlaygroundEditorTheme__ol2","PlaygroundEditorTheme__ol3","PlaygroundEditorTheme__ol4","PlaygroundEditorTheme__ol5"],ul:"PlaygroundEditorTheme__ul"},ltr:"PlaygroundEditorTheme__ltr",mark:"PlaygroundEditorTheme__mark",markOverlap:"PlaygroundEditorTheme__markOverlap",paragraph:"PlaygroundEditorTheme__paragraph",quote:"PlaygroundEditorTheme__quote",rtl:"PlaygroundEditorTheme__rtl",table:"PlaygroundEditorTheme__table",tableCell:"PlaygroundEditorTheme__tableCell",tableCellHeader:"PlaygroundEditorTheme__tableCellHeader",text:{bold:"PlaygroundEditorTheme__textBold",code:"PlaygroundEditorTheme__textCode",italic:"PlaygroundEditorTheme__textItalic",strikethrough:"PlaygroundEditorTheme__textStrikethrough",subscript:"PlaygroundEditorTheme__textSubscript",superscript:"PlaygroundEditorTheme__textSuperscript",underline:"PlaygroundEditorTheme__textUnderline",underlineStrikethrough:"PlaygroundEditorTheme__textUnderlineStrikethrough"},deleteNode:"PlaygroundEditorTheme__delete-node",insertNode:"PlaygroundEditorTheme__insert-node"};export{e as default};
|
|
1
|
+
import"./theme.css.js";var e={characterLimit:"PlaygroundEditorTheme__characterLimit",code:"PlaygroundEditorTheme__code",codeHighlight:{atrule:"PlaygroundEditorTheme__tokenAttr",attr:"PlaygroundEditorTheme__tokenAttr",boolean:"PlaygroundEditorTheme__tokenProperty",builtin:"PlaygroundEditorTheme__tokenSelector",cdata:"PlaygroundEditorTheme__tokenComment",char:"PlaygroundEditorTheme__tokenSelector",class:"PlaygroundEditorTheme__tokenFunction","class-name":"PlaygroundEditorTheme__tokenFunction",comment:"PlaygroundEditorTheme__tokenComment",constant:"PlaygroundEditorTheme__tokenProperty",deleted:"PlaygroundEditorTheme__tokenProperty",doctype:"PlaygroundEditorTheme__tokenComment",entity:"PlaygroundEditorTheme__tokenOperator",function:"PlaygroundEditorTheme__tokenFunction",important:"PlaygroundEditorTheme__tokenVariable",inserted:"PlaygroundEditorTheme__tokenSelector",keyword:"PlaygroundEditorTheme__tokenAttr",namespace:"PlaygroundEditorTheme__tokenVariable",number:"PlaygroundEditorTheme__tokenProperty",operator:"PlaygroundEditorTheme__tokenOperator",prolog:"PlaygroundEditorTheme__tokenComment",property:"PlaygroundEditorTheme__tokenProperty",punctuation:"PlaygroundEditorTheme__tokenPunctuation",regex:"PlaygroundEditorTheme__tokenVariable",selector:"PlaygroundEditorTheme__tokenSelector",string:"PlaygroundEditorTheme__tokenSelector",symbol:"PlaygroundEditorTheme__tokenProperty",tag:"PlaygroundEditorTheme__tokenProperty",url:"PlaygroundEditorTheme__tokenOperator",variable:"PlaygroundEditorTheme__tokenVariable"},embedBlock:{base:"PlaygroundEditorTheme__embedBlock",focus:"PlaygroundEditorTheme__embedBlockFocus"},hashtag:"PlaygroundEditorTheme__hashtag",heading:{h1:"PlaygroundEditorTheme__h1",h2:"PlaygroundEditorTheme__h2",h3:"PlaygroundEditorTheme__h3",h4:"PlaygroundEditorTheme__h4",h5:"PlaygroundEditorTheme__h5",h6:"PlaygroundEditorTheme__h6"},image:"editor-image",link:"PlaygroundEditorTheme__link",list:{listitem:"PlaygroundEditorTheme__listItem",listitemChecked:"PlaygroundEditorTheme__listItemChecked",listitemUnchecked:"PlaygroundEditorTheme__listItemUnchecked",nested:{listitem:"PlaygroundEditorTheme__nestedListItem"},olDepth:["PlaygroundEditorTheme__ol1","PlaygroundEditorTheme__ol2","PlaygroundEditorTheme__ol3","PlaygroundEditorTheme__ol4","PlaygroundEditorTheme__ol5"],ul:"PlaygroundEditorTheme__ul"},ltr:"PlaygroundEditorTheme__ltr",mark:"PlaygroundEditorTheme__mark",markOverlap:"PlaygroundEditorTheme__markOverlap",paragraph:"PlaygroundEditorTheme__paragraph",quote:"PlaygroundEditorTheme__quote",rtl:"PlaygroundEditorTheme__rtl",table:"PlaygroundEditorTheme__table",tableCell:"PlaygroundEditorTheme__tableCell",tableCellHeader:"PlaygroundEditorTheme__tableCellHeader",text:{bold:"PlaygroundEditorTheme__textBold",code:"PlaygroundEditorTheme__textCode",italic:"PlaygroundEditorTheme__textItalic",strikethrough:"PlaygroundEditorTheme__textStrikethrough",subscript:"PlaygroundEditorTheme__textSubscript",superscript:"PlaygroundEditorTheme__textSuperscript",underline:"PlaygroundEditorTheme__textUnderline",underlineStrikethrough:"PlaygroundEditorTheme__textUnderlineStrikethrough"},deleteNode:"PlaygroundEditorTheme__delete-node",insertNode:"PlaygroundEditorTheme__insert-node",highlightButton:"PlaygroundEditorTheme__highlight-button"};export{e as default};
|
|
2
2
|
//# sourceMappingURL=theme.js.map
|