@e-llm-studio/requirement-ai 0.0.191 → 0.0.193
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/UserStoryCard/AttachedContext.module.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationComponent.module.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.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/features/RequirementAI/components/UserStoryCard/AttachedContext.module.css.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationComponent.module.css.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.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/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts +4 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts +10 -2
- 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 +2 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/cjs/features/RequirementAI/components/UserStoryCard/AttachedContext.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 t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".AttachedContext-module_wrapper__KHDIP{display:flex;flex-direction:column}.AttachedContext-module_dropdownContainer__TPFtZ{display:inline-block;position:relative;text-align:left}.AttachedContext-module_triggerButton__ZXDWZ{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 1px 2px 0 #0000000d;color:#374151;cursor:pointer;display:flex;gap:.5rem;padding:.5rem 1rem;transition:background-color .2s,border-color .2s}.AttachedContext-module_triggerButton__ZXDWZ:hover{background-color:#f9fafb}.AttachedContext-module_triggerIcon__cdeba{color:#4b5563}.AttachedContext-module_triggerLabel__7HM4O{font-weight:500}.AttachedContext-module_dropdownPanel__r-NRo{animation:AttachedContext-module_slideIn__ah8dZ .2s ease-out;background-color:#fff;border:1px solid #f3f4f6;border-radius:12px;box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;left:0;margin-top:.5rem;overflow:hidden;position:absolute;width:420px;z-index:50}.AttachedContext-module_dropdownList__E-mKF{max-height:300px;overflow-y:auto;padding-bottom:.5rem;padding-top:.5rem}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar{width:6px}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-track{background:#0000}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-thumb{background:#e5e7eb;border-radius:10px}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-thumb:hover{background:#d1d5db}.AttachedContext-module_fadeGradient__ncpfP{background:linear-gradient(0deg,#f9fafb80,#0000);height:1rem;pointer-events:none}.AttachedContext-module_emptyState__WCYKW{color:#9ca3af;font-size:.875rem;padding:2rem;text-align:center}.AttachedContext-module_contextItem__I0Q9u{align-items:flex-start;border-bottom:1px solid #0000;border-radius:8px;display:flex;gap:1rem;margin-left:.5rem;margin-right:.5rem;padding:1rem;transition:background-color .15s}.AttachedContext-module_contextItem__I0Q9u:not(.AttachedContext-module_lastItem__fWT-n){border-bottom-color:#f3f4f6}.AttachedContext-module_contextItem__I0Q9u:hover{background-color:#f9fafb}.AttachedContext-module_itemIconWrapper__FjAJj{background-color:#f5f3ff;border-radius:8px;color:#8b5cf6;flex-shrink:0;margin-top:.25rem;padding:.5rem}.AttachedContext-module_itemContent__jwJwp{flex:1;min-width:0}.AttachedContext-module_itemTitle__e2hAN{color:#111827;font-size:.9375rem;font-weight:600;margin:0;overflow:hidden;text-overflow:ellipsis;transition:color .15s;white-space:nowrap}.AttachedContext-module_contextItem__I0Q9u:hover .AttachedContext-module_itemTitle__e2hAN{color:#7c3aed}.AttachedContext-module_itemMeta__Hw9Ct{color:#6b7280;font-size:.875rem;margin-bottom:0;margin-top:.125rem}.AttachedContext-module_actionButton__oQioa{align-self:center;background:none;border:none;border-radius:4px;color:#9ca3af;cursor:pointer;flex-shrink:0;line-height:0;padding:.5rem;transition:color .15s,background-color .15s}.AttachedContext-module_actionButton__oQioa:hover{background-color:#fff;color:#7c3aed}.AttachedContext-module_actionButtonReady__TbrP-{color:#6b7280}.AttachedContext-module_sourcesContainer__AP6PI{align-items:
|
|
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 t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".AttachedContext-module_wrapper__KHDIP{display:flex;flex-direction:column}.AttachedContext-module_dropdownContainer__TPFtZ{display:inline-block;position:relative;text-align:left}.AttachedContext-module_triggerButton__ZXDWZ{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 1px 2px 0 #0000000d;color:#374151;cursor:pointer;display:flex;gap:.5rem;padding:.5rem 1rem;transition:background-color .2s,border-color .2s}.AttachedContext-module_triggerButton__ZXDWZ:hover{background-color:#f9fafb}.AttachedContext-module_triggerIcon__cdeba{color:#4b5563}.AttachedContext-module_triggerLabel__7HM4O{font-weight:500}.AttachedContext-module_dropdownPanel__r-NRo{animation:AttachedContext-module_slideIn__ah8dZ .2s ease-out;background-color:#fff;border:1px solid #f3f4f6;border-radius:12px;box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;left:0;margin-top:.5rem;overflow:hidden;position:absolute;width:420px;z-index:50}.AttachedContext-module_dropdownList__E-mKF{max-height:300px;overflow-y:auto;padding-bottom:.5rem;padding-top:.5rem}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar{width:6px}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-track{background:#0000}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-thumb{background:#e5e7eb;border-radius:10px}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-thumb:hover{background:#d1d5db}.AttachedContext-module_fadeGradient__ncpfP{background:linear-gradient(0deg,#f9fafb80,#0000);height:1rem;pointer-events:none}.AttachedContext-module_emptyState__WCYKW{color:#9ca3af;font-size:.875rem;padding:2rem;text-align:center}.AttachedContext-module_contextItem__I0Q9u{align-items:flex-start;border-bottom:1px solid #0000;border-radius:8px;display:flex;gap:1rem;margin-left:.5rem;margin-right:.5rem;padding:1rem;transition:background-color .15s}.AttachedContext-module_contextItem__I0Q9u:not(.AttachedContext-module_lastItem__fWT-n){border-bottom-color:#f3f4f6}.AttachedContext-module_contextItem__I0Q9u:hover{background-color:#f9fafb}.AttachedContext-module_itemIconWrapper__FjAJj{background-color:#f5f3ff;border-radius:8px;color:#8b5cf6;flex-shrink:0;margin-top:.25rem;padding:.5rem}.AttachedContext-module_itemContent__jwJwp{flex:1;min-width:0}.AttachedContext-module_itemTitle__e2hAN{color:#111827;font-size:.9375rem;font-weight:600;margin:0;overflow:hidden;text-overflow:ellipsis;transition:color .15s;white-space:nowrap}.AttachedContext-module_contextItem__I0Q9u:hover .AttachedContext-module_itemTitle__e2hAN{color:#7c3aed}.AttachedContext-module_itemMeta__Hw9Ct{color:#6b7280;font-size:.875rem;margin-bottom:0;margin-top:.125rem}.AttachedContext-module_actionButton__oQioa{align-self:center;background:none;border:none;border-radius:4px;color:#9ca3af;cursor:pointer;flex-shrink:0;line-height:0;padding:.5rem;transition:color .15s,background-color .15s}.AttachedContext-module_actionButton__oQioa:hover{background-color:#fff;color:#7c3aed}.AttachedContext-module_actionButtonReady__TbrP-{color:#6b7280}.AttachedContext-module_sourcesContainer__AP6PI{align-items:center;display:flex;gap:8px;min-width:0;width:100%}.AttachedContext-module_sourcesFilesContainer__-Mnhn{align-items:center;display:flex;flex-wrap:wrap;gap:8px;min-width:0}.AttachedContext-module_sourcesLabel__VN-9Q{color:#374151;flex-shrink:0;font-size:14px;font-weight:600;line-height:20px}.AttachedContext-module_sourceChip__QsVPO{align-items:center;background:#eef2ff;border-radius:10px;color:#6366f1;cursor:pointer;display:inline-flex;flex-shrink:1;font-size:13px;font-weight:500;gap:6px;line-height:18px;min-width:0;padding:6px 12px;transition:background-color .15s ease,transform .15s ease}.AttachedContext-module_sourceChip__QsVPO:hover{background:#e0e7ff}.AttachedContext-module_sourceChipLabel__f29Qv{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AttachedContext-module_moreChip__ieXRs{align-items:center;border:1px solid #c8d0db;border-radius:10px;cursor:pointer;display:inline-flex;flex-shrink:0;font-size:13px;font-weight:600;justify-content:center;line-height:18px;padding:6px 12px;transition:background-color .15s ease}.AttachedContext-module_moreChip__ieXRs:hover{background:#e0e7ff}@keyframes AttachedContext-module_slideIn__ah8dZ{0%{opacity:0;transform:translateY(-10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={wrapper:"AttachedContext-module_wrapper__KHDIP",dropdownContainer:"AttachedContext-module_dropdownContainer__TPFtZ",triggerButton:"AttachedContext-module_triggerButton__ZXDWZ",triggerIcon:"AttachedContext-module_triggerIcon__cdeba",triggerLabel:"AttachedContext-module_triggerLabel__7HM4O",dropdownPanel:"AttachedContext-module_dropdownPanel__r-NRo",slideIn:"AttachedContext-module_slideIn__ah8dZ",dropdownList:"AttachedContext-module_dropdownList__E-mKF",fadeGradient:"AttachedContext-module_fadeGradient__ncpfP",emptyState:"AttachedContext-module_emptyState__WCYKW",contextItem:"AttachedContext-module_contextItem__I0Q9u",lastItem:"AttachedContext-module_lastItem__fWT-n",itemIconWrapper:"AttachedContext-module_itemIconWrapper__FjAJj",itemContent:"AttachedContext-module_itemContent__jwJwp",itemTitle:"AttachedContext-module_itemTitle__e2hAN",itemMeta:"AttachedContext-module_itemMeta__Hw9Ct",actionButton:"AttachedContext-module_actionButton__oQioa",actionButtonReady:"AttachedContext-module_actionButtonReady__TbrP-",sourcesContainer:"AttachedContext-module_sourcesContainer__AP6PI",sourcesFilesContainer:"AttachedContext-module_sourcesFilesContainer__-Mnhn",sourcesLabel:"AttachedContext-module_sourcesLabel__VN-9Q",sourceChip:"AttachedContext-module_sourceChip__QsVPO",sourceChipLabel:"AttachedContext-module_sourceChipLabel__f29Qv",moreChip:"AttachedContext-module_moreChip__ieXRs"};
|
|
2
2
|
//# sourceMappingURL=AttachedContext.module.css.js.map
|
|
@@ -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 t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode('.CitationComponent-module_cite-acc__2XusN{background:#fff;border:1px solid #eaecf0;border-radius:12px;box-sizing:border-box;container-type:inline-size;max-height:500px;overflow:auto;width:400px}.CitationComponent-module_cite-acc__header__Ek-ou{align-items:center;border-bottom:1px solid #eaecf0;border-top:1px solid #eaecf0;display:flex;flex-wrap:nowrap;gap:12px;justify-content:space-between;min-width:0;padding:12px}.CitationComponent-module_cite-acc__headerLeft__K6ItR{align-items:center;display:flex;flex:1 1 auto;gap:4px;min-width:0;overflow:hidden}.CitationComponent-module_cite-acc__titleIcon__ssoL-{align-items:center;display:inline-flex;flex:0 0 28px;height:28px;justify-content:center;width:28px}.CitationComponent-module_cite-acc__title__3ibjn{color:#101828;font-size:14px;font-weight:500;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CitationComponent-module_cite-acc__headerRight__OhMqH{align-items:center;display:flex;flex:0 0 auto;flex-wrap:nowrap;gap:10px;min-width:0}.CitationComponent-module_cite-acc__gapBadge__VkuKQ{background:#fef3f2;border-radius:999px;color:#b42318;font-size:12px;font-weight:500;padding:4px 10px;white-space:nowrap}.CitationComponent-module_cite-acc__scoreBadge__uVDRv{align-items:center;border:1px solid var(--Primitive-Gray-300,#d0d5dd);border-radius:var(--chip-border-radius,16px);display:flex;gap:4px;padding:4px 8px}.CitationComponent-module_cite-acc__scoreIcon__-MUli{display:none}.CitationComponent-module_cite-acc__scoreText__42VsL{color:var(--Primitive-Purple-600,#6938ef);font-family:Inter;font-size:12px;font-style:normal;font-weight:500;line-height:150%}.CitationComponent-module_cite-acc__gapBadge__VkuKQ,.CitationComponent-module_cite-acc__scoreBadge__uVDRv{flex:0 1 auto;min-width:0}.CitationComponent-module_cite-acc__toggleBtn__RcZmg{align-items:center;background:#0000;border:none;cursor:pointer;display:inline-flex;flex:0 0 auto;justify-content:center;padding:4px}.CitationComponent-module_cite-acc__toggleBtn__RcZmg i{color:#667085;font-size:18px}.CitationComponent-module_cite-acc__body__YQDAm{display:flex;flex-direction:column;gap:12px;min-width:0;padding:20px}.CitationComponent-module_cite-acc__explain-body__1v7hb{display:flex;flex-direction:column;gap:"14px";min-width:0;padding:15px}.CitationComponent-module_cite-acc__explain-body_border__QQnDb{border-top:1px solid #eaecf0}.CitationComponent-module_cite-acc__innerHeader__BFwFr{align-items:center;background:#0000;display:flex;gap:12px;justify-content:space-between;min-width:0}.CitationComponent-module_cite-acc__backHeader__aFHVT{align-items:center;border-bottom:.5px solid #e8e7e3;display:flex;gap:8px;padding:14px 16px}.CitationComponent-module_cite-acc__backBtn__d91ol{background:none;border:none;color:#888;cursor:pointer;font-size:20px;line-height:1;padding:0}.CitationComponent-module_cite-acc__backTitle__Jwdr9{color:#1a1a1a;font-size:14px;font-weight:500}.CitationComponent-module_cite-acc__cognitiveSection__eVNry{align-items:center;border-bottom:none;border-top:1px solid #eee;cursor:pointer;display:flex;justify-content:space-between;padding-left:12px;padding-right:12px;padding-top:12px}.CitationComponent-module_cite-acc__cognitiveTitle__LXmhU{color:#101828;font-size:13px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CitationComponent-module_cite-acc__innerHeaderLeft__uY1Et{align-items:flex-start;display:flex;flex:1 1 auto;gap:10px;min-width:0}.CitationComponent-module_cite-acc__innerIcon__UvlXX{align-items:center;background:#f4f3ff;border-radius:999px;display:inline-flex;flex:0 0 28px;height:28px;justify-content:center;width:28px}.CitationComponent-module_cite-acc__innerTitle__Lv8vo{color:#101828;font-size:14px;font-weight:500;line-height:22px}.CitationComponent-module_cite-acc__innerSub__XG7ad{color:#101828;font-size:12px;line-height:18px;margin-top:2px}.CitationComponent-module_cite-acc__innerToggle__3YHI5{align-items:center;background:#fff;border:1px solid #eaecf0;border-radius:999px;cursor:pointer;display:inline-flex;flex:0 0 28px;height:28px;justify-content:center;width:28px}.CitationComponent-module_cite-acc__innerToggle__3YHI5 i{color:#667085;font-size:18px}.CitationComponent-module_cite-acc__innerBody__Bzkt4{border-top:none;min-width:0;overflow-wrap:anywhere;word-break:break-word}.CitationComponent-module_cite-text__mark__Xh6wV{background-color:#fef3c7;border-radius:4px;padding-left:4px;padding-right:4px}.CitationComponent-module_cite-text__a__9HVV6{display:inline}.CitationComponent-module_cite-text__a-btn__9XyA1{color:#7a5af8;cursor:pointer;display:inline;font-weight:500}.CitationComponent-module_cite-text__a-btn_chevron__DXtkI,.CitationComponent-module_cite-text__a-btn_circle__SI-j3{display:inline-block;margin-left:4px;vertical-align:middle}.CitationComponent-module_cite-text__a-btn_open__2NfoX{border:1px solid #7a5af8;border-radius:4px;padding-left:4px;padding-right:4px}.CitationComponent-module_cite-text__a-btn_circle__SI-j3{animation:CitationComponent-module_spin__W-F7a 1.5s linear infinite;color:#7a5af8;height:16px;margin-left:auto;margin-right:auto;width:16px}.CitationComponent-module_cite-text__a-btn_chevron__DXtkI{height:16px;width:16px}.CitationComponent-module_cite-text__a-container__G-ier{margin-bottom:8px;margin-top:8px;max-height:250px;overflow:scroll}.CitationComponent-module_cite-text__a-container-docs__n8qlA{margin-bottom:8px;margin-top:8px;max-height:620px;overflow:scroll}.CitationComponent-module_cite-text__a-container-loader__f0Exm{animation:CitationComponent-module_spin__W-F7a 1.5s linear infinite;color:#000;height:32px;margin-left:auto;margin-right:auto;width:32px}.CitationComponent-module_md-ol__TO-dB{list-style:decimal;list-style-position:outside;padding-left:20px}.CitationComponent-module_md-ul__LfZPA{list-style:disc;list-style-position:outside;margin:10px 0 12px;padding-left:20px}.CitationComponent-module_md-li__ZEscN{margin:6px 0}.CitationComponent-module_cite-acc__btn-container__RUjvL{align-items:center;display:flex;font-family:Inter;font-size:14px;font-style:normal;font-weight:500;gap:5px;line-height:normal;padding:0 30px 15px;.CitationComponent-module_btn-accept__F5s10{border:1px solid #8098f9;border-radius:6px;color:#444ce7;padding:7px 10.5px}.CitationComponent-module_btn-reject__ziZa-{border:1px solid #fecaca;border-radius:6px;color:#ef4444;padding:7px 10.5px}}@keyframes CitationComponent-module_spin__W-F7a{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@container (max-width: 420px){.CitationComponent-module_cite-acc__scoreIcon__-MUli{align-items:center;display:inline-flex}.CitationComponent-module_cite-acc__scoreBadge__uVDRv{gap:6px;padding:6px 8px}.CitationComponent-module_cite-acc__gapBadge__VkuKQ{padding:4px 8px}}'));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={"cite-acc":"CitationComponent-module_cite-acc__2XusN","cite-acc__header":"CitationComponent-module_cite-acc__header__Ek-ou","cite-acc__headerLeft":"CitationComponent-module_cite-acc__headerLeft__K6ItR","cite-acc__titleIcon":"CitationComponent-module_cite-acc__titleIcon__ssoL-","cite-acc__title":"CitationComponent-module_cite-acc__title__3ibjn","cite-acc__headerRight":"CitationComponent-module_cite-acc__headerRight__OhMqH","cite-acc__gapBadge":"CitationComponent-module_cite-acc__gapBadge__VkuKQ","cite-acc__scoreBadge":"CitationComponent-module_cite-acc__scoreBadge__uVDRv","cite-acc__scoreIcon":"CitationComponent-module_cite-acc__scoreIcon__-MUli","cite-acc__scoreText":"CitationComponent-module_cite-acc__scoreText__42VsL","cite-acc__toggleBtn":"CitationComponent-module_cite-acc__toggleBtn__RcZmg","cite-acc__body":"CitationComponent-module_cite-acc__body__YQDAm","cite-acc__explain-body":"CitationComponent-module_cite-acc__explain-body__1v7hb","cite-acc__explain-body_border":"CitationComponent-module_cite-acc__explain-body_border__QQnDb","cite-acc__innerHeader":"CitationComponent-module_cite-acc__innerHeader__BFwFr","cite-acc__backHeader":"CitationComponent-module_cite-acc__backHeader__aFHVT","cite-acc__backBtn":"CitationComponent-module_cite-acc__backBtn__d91ol","cite-acc__backTitle":"CitationComponent-module_cite-acc__backTitle__Jwdr9","cite-acc__cognitiveSection":"CitationComponent-module_cite-acc__cognitiveSection__eVNry","cite-acc__cognitiveTitle":"CitationComponent-module_cite-acc__cognitiveTitle__LXmhU","cite-acc__innerHeaderLeft":"CitationComponent-module_cite-acc__innerHeaderLeft__uY1Et","cite-acc__innerIcon":"CitationComponent-module_cite-acc__innerIcon__UvlXX","cite-acc__innerTitle":"CitationComponent-module_cite-acc__innerTitle__Lv8vo","cite-acc__innerSub":"CitationComponent-module_cite-acc__innerSub__XG7ad","cite-acc__innerToggle":"CitationComponent-module_cite-acc__innerToggle__3YHI5","cite-acc__innerBody":"CitationComponent-module_cite-acc__innerBody__Bzkt4","cite-text__mark":"CitationComponent-module_cite-text__mark__Xh6wV","cite-text__a":"CitationComponent-module_cite-text__a__9HVV6","cite-text__a-btn":"CitationComponent-module_cite-text__a-btn__9XyA1","cite-text__a-btn_circle":"CitationComponent-module_cite-text__a-btn_circle__SI-j3","cite-text__a-btn_chevron":"CitationComponent-module_cite-text__a-btn_chevron__DXtkI","cite-text__a-btn_open":"CitationComponent-module_cite-text__a-btn_open__2NfoX",spin:"CitationComponent-module_spin__W-F7a","cite-text__a-container":"CitationComponent-module_cite-text__a-container__G-ier","cite-text__a-container-docs":"CitationComponent-module_cite-text__a-container-docs__n8qlA","cite-text__a-container-loader":"CitationComponent-module_cite-text__a-container-loader__f0Exm","md-ol":"CitationComponent-module_md-ol__TO-dB","md-ul":"CitationComponent-module_md-ul__LfZPA","md-li":"CitationComponent-module_md-li__ZEscN","cite-acc__btn-container":"CitationComponent-module_cite-acc__btn-container__RUjvL","btn-accept":"CitationComponent-module_btn-accept__F5s10","btn-reject":"CitationComponent-module_btn-reject__ziZa-"};
|
|
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 t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode('.CitationComponent-module_cite-acc__2XusN{background:#fff;border:1px solid #eaecf0;border-radius:12px;box-sizing:border-box;container-type:inline-size;width:400px}.CitationComponent-module_cite-body__MwotJ{max-height:500px;overflow:auto;width:100%}.CitationComponent-module_cite-acc__header__Ek-ou{align-items:center;border-bottom:1px solid #eaecf0;border-top:1px solid #eaecf0;display:flex;flex-wrap:nowrap;gap:12px;justify-content:space-between;min-width:0;padding:12px}.CitationComponent-module_cite-acc__headerLeft__K6ItR{align-items:center;display:flex;flex:1 1 auto;gap:4px;min-width:0;overflow:hidden}.CitationComponent-module_cite-acc__titleIcon__ssoL-{align-items:center;display:inline-flex;flex:0 0 28px;height:28px;justify-content:center;width:28px}.CitationComponent-module_cite-acc__title__3ibjn{color:#101828;font-size:14px;font-weight:500;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CitationComponent-module_cite-acc__headerRight__OhMqH{align-items:center;display:flex;flex:0 0 auto;flex-wrap:nowrap;gap:10px;min-width:0}.CitationComponent-module_cite-acc__gapBadge__VkuKQ{background:#fef3f2;border-radius:999px;color:#b42318;font-size:12px;font-weight:500;padding:4px 10px;white-space:nowrap}.CitationComponent-module_cite-acc__scoreBadge__uVDRv{align-items:center;border:1px solid var(--Primitive-Gray-300,#d0d5dd);border-radius:var(--chip-border-radius,16px);display:flex;gap:4px;padding:4px 8px}.CitationComponent-module_cite-acc__scoreIcon__-MUli{display:none}.CitationComponent-module_cite-acc__scoreText__42VsL{color:var(--Primitive-Purple-600,#6938ef);font-family:Inter;font-size:12px;font-style:normal;font-weight:500;line-height:150%}.CitationComponent-module_cite-acc__gapBadge__VkuKQ,.CitationComponent-module_cite-acc__scoreBadge__uVDRv{flex:0 1 auto;min-width:0}.CitationComponent-module_cite-acc__toggleBtn__RcZmg{align-items:center;background:#0000;border:none;cursor:pointer;display:inline-flex;flex:0 0 auto;justify-content:center;padding:4px}.CitationComponent-module_cite-acc__toggleBtn__RcZmg i{color:#667085;font-size:18px}.CitationComponent-module_cite-acc__body__YQDAm{display:flex;flex-direction:column;gap:12px;min-width:0;padding:20px}.CitationComponent-module_cite-acc__explain-body__1v7hb{display:flex;flex-direction:column;gap:"14px";min-width:0;padding:15px}.CitationComponent-module_cite-acc__explain-body_border__QQnDb{border-top:1px solid #eaecf0}.CitationComponent-module_cite-acc__innerHeader__BFwFr{align-items:center;background:#0000;display:flex;gap:12px;justify-content:space-between;min-width:0}.CitationComponent-module_cite-acc__backHeader__aFHVT{align-items:center;border-bottom:.5px solid #e8e7e3;display:flex;gap:8px;padding:14px 16px}.CitationComponent-module_cite-acc__backBtn__d91ol{background:none;border:none;color:#888;cursor:pointer;font-size:20px;line-height:1;padding:0}.CitationComponent-module_cite-acc__backTitle__Jwdr9{color:#1a1a1a;font-size:14px;font-weight:500}.CitationComponent-module_cite-acc__cognitiveSection__eVNry{align-items:center;border-bottom:none;border-top:1px solid #eee;cursor:pointer;display:flex;justify-content:space-between;padding-left:12px;padding-right:12px;padding-top:12px}.CitationComponent-module_cite-acc__cognitiveTitle__LXmhU{color:#101828;font-size:13px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CitationComponent-module_cite-acc__innerHeaderLeft__uY1Et{align-items:flex-start;display:flex;flex:1 1 auto;gap:10px;min-width:0}.CitationComponent-module_cite-acc__innerIcon__UvlXX{align-items:center;background:#f4f3ff;border-radius:999px;display:inline-flex;flex:0 0 28px;height:28px;justify-content:center;width:28px}.CitationComponent-module_cite-acc__innerTitle__Lv8vo{color:#101828;font-size:14px;font-weight:500;line-height:22px}.CitationComponent-module_cite-acc__innerSub__XG7ad{color:#101828;font-size:12px;line-height:18px;margin-top:2px}.CitationComponent-module_cite-acc__innerToggle__3YHI5{align-items:center;background:#fff;border:1px solid #eaecf0;border-radius:999px;cursor:pointer;display:inline-flex;flex:0 0 28px;height:28px;justify-content:center;width:28px}.CitationComponent-module_cite-acc__innerToggle__3YHI5 i{color:#667085;font-size:18px}.CitationComponent-module_cite-acc__innerBody__Bzkt4{border-top:none;min-width:0;overflow-wrap:anywhere;word-break:break-word}.CitationComponent-module_cite-text__mark__Xh6wV{background-color:#fef3c7;border-radius:4px;padding-left:4px;padding-right:4px}.CitationComponent-module_cite-text__a__9HVV6{display:inline}.CitationComponent-module_cite-text__a-btn__9XyA1{color:#7a5af8;cursor:pointer;display:inline;font-weight:500}.CitationComponent-module_cite-text__a-btn_chevron__DXtkI,.CitationComponent-module_cite-text__a-btn_circle__SI-j3{display:inline-block;margin-left:4px;vertical-align:middle}.CitationComponent-module_cite-text__a-btn_open__2NfoX{border:1px solid #7a5af8;border-radius:4px;padding-left:4px;padding-right:4px}.CitationComponent-module_cite-text__a-btn_circle__SI-j3{animation:CitationComponent-module_spin__W-F7a 1.5s linear infinite;color:#7a5af8;height:16px;margin-left:auto;margin-right:auto;width:16px}.CitationComponent-module_cite-text__a-btn_chevron__DXtkI{height:16px;width:16px}.CitationComponent-module_cite-text__a-container__G-ier{margin-bottom:8px;margin-top:8px;max-height:250px;overflow:scroll}.CitationComponent-module_cite-text__a-container-docs__n8qlA{margin-bottom:8px;margin-top:8px;max-height:620px;overflow:scroll}.CitationComponent-module_cite-text__a-container-loader__f0Exm{animation:CitationComponent-module_spin__W-F7a 1.5s linear infinite;color:#000;height:32px;margin-left:auto;margin-right:auto;width:32px}.CitationComponent-module_md-ol__TO-dB{list-style:decimal;list-style-position:outside;padding-left:20px}.CitationComponent-module_md-ul__LfZPA{list-style:disc;list-style-position:outside;margin:10px 0 12px;padding-left:20px}.CitationComponent-module_md-li__ZEscN{margin:6px 0}.CitationComponent-module_cite-acc__btn-container__RUjvL{align-items:center;display:flex;font-family:Inter;font-size:14px;font-style:normal;font-weight:500;gap:5px;line-height:normal;padding:0 30px 15px;.CitationComponent-module_btn-accept__F5s10{border:1px solid #8098f9;border-radius:6px;color:#444ce7;padding:7px 10.5px}.CitationComponent-module_btn-reject__ziZa-{border:1px solid #fecaca;border-radius:6px;color:#ef4444;padding:7px 10.5px}}@keyframes CitationComponent-module_spin__W-F7a{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@container (max-width: 420px){.CitationComponent-module_cite-acc__scoreIcon__-MUli{align-items:center;display:inline-flex}.CitationComponent-module_cite-acc__scoreBadge__uVDRv{gap:6px;padding:6px 8px}.CitationComponent-module_cite-acc__gapBadge__VkuKQ{padding:4px 8px}}'));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={"cite-acc":"CitationComponent-module_cite-acc__2XusN","cite-body":"CitationComponent-module_cite-body__MwotJ","cite-acc__header":"CitationComponent-module_cite-acc__header__Ek-ou","cite-acc__headerLeft":"CitationComponent-module_cite-acc__headerLeft__K6ItR","cite-acc__titleIcon":"CitationComponent-module_cite-acc__titleIcon__ssoL-","cite-acc__title":"CitationComponent-module_cite-acc__title__3ibjn","cite-acc__headerRight":"CitationComponent-module_cite-acc__headerRight__OhMqH","cite-acc__gapBadge":"CitationComponent-module_cite-acc__gapBadge__VkuKQ","cite-acc__scoreBadge":"CitationComponent-module_cite-acc__scoreBadge__uVDRv","cite-acc__scoreIcon":"CitationComponent-module_cite-acc__scoreIcon__-MUli","cite-acc__scoreText":"CitationComponent-module_cite-acc__scoreText__42VsL","cite-acc__toggleBtn":"CitationComponent-module_cite-acc__toggleBtn__RcZmg","cite-acc__body":"CitationComponent-module_cite-acc__body__YQDAm","cite-acc__explain-body":"CitationComponent-module_cite-acc__explain-body__1v7hb","cite-acc__explain-body_border":"CitationComponent-module_cite-acc__explain-body_border__QQnDb","cite-acc__innerHeader":"CitationComponent-module_cite-acc__innerHeader__BFwFr","cite-acc__backHeader":"CitationComponent-module_cite-acc__backHeader__aFHVT","cite-acc__backBtn":"CitationComponent-module_cite-acc__backBtn__d91ol","cite-acc__backTitle":"CitationComponent-module_cite-acc__backTitle__Jwdr9","cite-acc__cognitiveSection":"CitationComponent-module_cite-acc__cognitiveSection__eVNry","cite-acc__cognitiveTitle":"CitationComponent-module_cite-acc__cognitiveTitle__LXmhU","cite-acc__innerHeaderLeft":"CitationComponent-module_cite-acc__innerHeaderLeft__uY1Et","cite-acc__innerIcon":"CitationComponent-module_cite-acc__innerIcon__UvlXX","cite-acc__innerTitle":"CitationComponent-module_cite-acc__innerTitle__Lv8vo","cite-acc__innerSub":"CitationComponent-module_cite-acc__innerSub__XG7ad","cite-acc__innerToggle":"CitationComponent-module_cite-acc__innerToggle__3YHI5","cite-acc__innerBody":"CitationComponent-module_cite-acc__innerBody__Bzkt4","cite-text__mark":"CitationComponent-module_cite-text__mark__Xh6wV","cite-text__a":"CitationComponent-module_cite-text__a__9HVV6","cite-text__a-btn":"CitationComponent-module_cite-text__a-btn__9XyA1","cite-text__a-btn_circle":"CitationComponent-module_cite-text__a-btn_circle__SI-j3","cite-text__a-btn_chevron":"CitationComponent-module_cite-text__a-btn_chevron__DXtkI","cite-text__a-btn_open":"CitationComponent-module_cite-text__a-btn_open__2NfoX",spin:"CitationComponent-module_spin__W-F7a","cite-text__a-container":"CitationComponent-module_cite-text__a-container__G-ier","cite-text__a-container-docs":"CitationComponent-module_cite-text__a-container-docs__n8qlA","cite-text__a-container-loader":"CitationComponent-module_cite-text__a-container-loader__f0Exm","md-ol":"CitationComponent-module_md-ol__TO-dB","md-ul":"CitationComponent-module_md-ul__LfZPA","md-li":"CitationComponent-module_md-li__ZEscN","cite-acc__btn-container":"CitationComponent-module_cite-acc__btn-container__RUjvL","btn-accept":"CitationComponent-module_btn-accept__F5s10","btn-reject":"CitationComponent-module_btn-reject__ziZa-"};
|
|
2
2
|
//# sourceMappingURL=CitationComponent.module.css.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),a=require("react/jsx-runtime"),i=require("react"),s=require("../Popups/PopupDefaults.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),a=require("react/jsx-runtime"),i=require("react"),s=require("../Popups/PopupDefaults.js"),c=require("react-markdown"),n=require("rehype-raw"),t=require("./CitationComponent.module.css.js"),l=require("lucide-react"),d=require("../icons/cognitiveBrain.svg.js"),r=require("../icons/aiMagic.svg.js"),o=require("./CitationAnchor.js");function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=_(i),f=_(c),x=_(n),m=function(i){var s=i.text,c=i.item;return a.jsx(f.default,e.__assign({rehypePlugins:[x.default],components:{ol:function(i){var s=i.children;return a.jsx("ol",e.__assign({className:t.default["md-ol"]},{children:s}))},ul:function(i){var s=i.children;return a.jsx("ul",e.__assign({className:t.default["md-ul"]},{children:s}))},li:function(i){var s=i.children;return a.jsx("li",e.__assign({className:t.default["md-li"]},{children:s}))},a:function(e){e.node;var i=e.href,s=e.children;return a.jsx(o.default,{href:i,children:s,metaData:{citations:c.citations,docData:c.docData}})}}},{children:s.replace(/<br\s*\/?>/gi,"\n")}))};exports.default=function(c){var n=c.item,o=c.title,_=void 0===o?"Cognitive Decisioning AI":o,f=c.relevanceScore,x=void 0===f?0:f,g=c.showRelevanceScore,v=void 0===g||g,h=c.reason,j=void 0===h?"No reasoning provided.":h,p=c.impact,N=void 0===p?"No Impact provided.":p,b=c.explaination,y=void 0===b?"No explaination provided.":b,C=c.gap,k=void 0===C?"None":C,B=c.onClose,H=void 0===B?function(){}:B,q=c.onAccept,D=c.onReject,A=c.showResolveBtns,T=void 0!==A&&A,I=c.sections,L=c.leftIcon,M=c.scoreIcon,w=c.className,P=c.customStyles,R=void 0===P?{}:P,S=c.actions,E=c.disableAllActions,F=void 0!==E&&E,G=c.actionBtnDisabledStyle,U=void 0===G?{}:G,O=c.onBackClick,z=c.isImpactNeeded,J=void 0===z||z,K=c.cognitiveTitle,Q=void 0===K?"Cognitive Integrity":K,V=c.labels,W=void 0===V?{}:V,X=i.useMemo(function(){var e=Number(x);return Number.isNaN(e)?0:Math.max(0,Math.min(100,Math.round(e)))},[x]),Y=i.useMemo(function(){var e=W&&W.noGapsText||"1. No gaps identified.";return function(e){if(!e)return!0;var a=e.trim().toLowerCase();return"none"===a||"no gap"===a||"no gaps"===a||"n/a"===a}(k)?e:k},[k]),Z=W&&W.impact||"Impact",$=W&&W.explanation||"Explaination",ee=W&&W.decisionFactors||"Decision Making Factors",ae=W&&W.gaps||"Gaps in Decision",ie=W&&W.accept||"Accept",se=W&&W.reject||"Reject",ce=W&&W.backAriaLabel||"Go back",ne=S||[{id:"reject",label:se,onClick:D,className:t.default["btn-reject"]},{id:"accept",label:ie,onClick:q,className:t.default["btn-accept"]}];return a.jsxs("div",e.__assign({className:"".concat(t.default["cite-acc"]," ").concat(w||""),style:e.__assign(e.__assign({},s.default.CitationAccordionDefaults.container),null==R?void 0:R.container)},{children:[O&&a.jsxs("div",e.__assign({className:t.default["cite-acc__backHeader"]},{children:[a.jsx("button",e.__assign({type:"button",className:t.default["cite-acc__backBtn"],onClick:function(e){e.stopPropagation(),O&&O()},"aria-label":ce},{children:"‹"})),a.jsx("span",e.__assign({className:t.default["cite-acc__backTitle"]},{children:Q}))]})),a.jsx("div",e.__assign({className:t.default["cite-body"]},{children:I&&I.length>0?I.map(function(i){return!1===i.show?null:a.jsxs("div",e.__assign({className:"".concat(t.default["cite-acc__explain-body"]," ").concat(i.bodyClassName||"")},{children:[a.jsxs("div",e.__assign({className:t.default["cite-acc__innerHeader"],style:e.__assign(e.__assign({},s.default.CitationAccordionDefaults.innerHeader),null==R?void 0:R.innerHeader)},{children:[a.jsx("div",e.__assign({className:t.default["cite-acc__innerHeaderLeft"]},{children:a.jsx("div",{children:a.jsx("div",e.__assign({className:t.default["cite-acc__innerTitle"]},{children:i.title}))})})),a.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),H&&H()}},{children:a.jsx(l.ChevronUp,{})}))]})),a.jsx("div",e.__assign({className:"".concat(t.default["cite-acc__innerBody"]," text-sm text-gray-600"),style:e.__assign(e.__assign({},s.default.CitationAccordionDefaults.innerBody),null==R?void 0:R.innerBody)},{children:"string"==typeof i.content?a.jsx(m,{text:i.content,item:i.item||n||{}}):i.content}))]}),i.id||i.title)}):a.jsxs(a.Fragment,{children:[J&&a.jsxs("div",e.__assign({className:t.default["cite-acc__explain-body"]},{children:[a.jsxs("div",e.__assign({className:t.default["cite-acc__innerHeader"]},{children:[a.jsx("div",e.__assign({className:t.default["cite-acc__innerHeaderLeft"]},{children:a.jsx("div",{children:a.jsx("div",e.__assign({className:t.default["cite-acc__innerTitle"]},{children:Z}))})})),a.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),H&&H()}},{children:a.jsx(l.ChevronUp,{})}))]})),a.jsx("div",e.__assign({className:"".concat(t.default["cite-acc__innerBody"]," text-sm text-gray-600")},{children:a.jsx(m,{text:N||"",item:n||{}})}))]})),a.jsxs("div",e.__assign({className:t.default["cite-acc__explain-body"]},{children:[a.jsx("div",e.__assign({className:t.default["cite-acc__innerHeader"]},{children:a.jsx("div",e.__assign({className:t.default["cite-acc__innerHeaderLeft"]},{children:a.jsx("div",{children:a.jsx("div",e.__assign({className:t.default["cite-acc__innerTitle"]},{children:$}))})}))})),a.jsx("div",e.__assign({className:"".concat(t.default["cite-acc__innerBody"]," text-sm text-gray-600")},{children:a.jsx(m,{text:y||"",item:{}})}))]})),T&&a.jsx("div",e.__assign({className:t.default["cite-acc__btn-container"]},{children:ne.map(function(i){var s=F||i.disabled;return a.jsx("button",e.__assign({className:i.className,onClick:s?void 0:i.onClick,disabled:s,style:e.__assign(e.__assign({},i.style),s?e.__assign(e.__assign({opacity:.5,cursor:"not-allowed"},U),i.disabledStyle):{})},{children:i.label}),i.id)})})),a.jsxs("div",e.__assign({className:t.default["cite-acc__header"]},{children:[a.jsxs("div",e.__assign({className:t.default["cite-acc__headerLeft"]},{children:[a.jsx("span",e.__assign({className:t.default["cite-acc__titleIcon"]},{children:L?"function"==typeof L?u.default.createElement(L):L:a.jsx(d.ReactComponent,{})})),a.jsx("div",e.__assign({className:t.default["cite-acc__title"]},{children:_}))]})),a.jsx("div",e.__assign({className:t.default["cite-acc__headerRight"]},{children:v&&a.jsxs("span",e.__assign({className:t.default["cite-acc__scoreBadge"]},{children:[M?"function"==typeof M?u.default.createElement(M):M:a.jsx(r.ReactComponent,{}),a.jsxs("span",e.__assign({className:t.default["cite-acc__scoreText"]},{children:[X,"%"]}))]}))}))]})),a.jsxs("div",e.__assign({className:t.default["cite-acc__explain-body"]},{children:[a.jsx("div",e.__assign({className:t.default["cite-acc__innerHeader"]},{children:a.jsx("div",e.__assign({className:t.default["cite-acc__innerHeaderLeft"]},{children:a.jsx("div",{children:a.jsx("div",e.__assign({className:t.default["cite-acc__innerTitle"]},{children:ee}))})}))})),a.jsx("div",e.__assign({className:"".concat(t.default["cite-acc__innerBody"]," text-sm text-gray-600")},{children:a.jsx(m,{text:j||"",item:n||{}})}))]})),a.jsxs("div",e.__assign({className:"".concat(t.default["cite-acc__explain-body"]," ").concat(t.default["cite-acc__explain-body_border"])},{children:[a.jsx("div",e.__assign({className:t.default["cite-acc__innerHeader"]},{children:a.jsx("div",e.__assign({className:t.default["cite-acc__innerHeaderLeft"]},{children:a.jsx("div",{children:a.jsx("div",e.__assign({className:t.default["cite-acc__innerTitle"]},{children:ae}))})}))})),a.jsx("div",e.__assign({className:"".concat(t.default["cite-acc__innerBody"]," text-sm text-gray-600")},{children:a.jsx(m,{text:Y||"",item:n||{}})}))]}))]})}))]}))};
|
|
2
2
|
//# sourceMappingURL=CognitiveComponent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),n=require("lucide-react"),s=require("react"),o=require("./ToneToggle.js");require("../CognitiveComponents/CitationComponent.module.css.js");var t=require("../icons/cognitiveBrain.svg.js"),l=require("../icons/aiMagic.svg.js"),a=[{color:"#1D9E75",angle:-90,arcD:"M1 13 A10 10 0 0 1 1 13"},{color:"#BA7517",angle:0,arcD:"M1 13 A10 10 0 0 1 11 3"},{color:"#E24B4A",angle:90,arcD:"M1 13 A10 10 0 0 1 21 13"}],r=function(n){var s=n.toneIndex,o=n.configs,t=void 0===o?a:o,l=t[Math.min(s,t.length-1)]||t[1]||t[0],r=l.color,d=l.angle,c=l.arcD,g=(d-90)*Math.PI/180,_=11+9*Math.cos(g),v=13+9*Math.sin(g);return i.jsxs("svg",e.__assign({width:"22",height:"14",viewBox:"0 0 22 14",fill:"none"},{children:[i.jsx("path",{d:"M1 13 A10 10 0 0 1 21 13",stroke:"#e5e5e5",strokeWidth:"2.5",strokeLinecap:"round"}),i.jsx("path",{d:c,stroke:r,strokeWidth:"2.5",strokeLinecap:"round"}),i.jsx("line",{x1:"11",y1:"13",x2:_,y2:v,stroke:r,strokeWidth:"2",strokeLinecap:"round"})]}))},d=function(n){var s=n.type,o=n.customStyles,t=void 0===o?{}:o,l=e.__assign(e.__assign({},{High:{padding:"3.5px 7px",borderRadius:"100px",border:"1px solid #FECACA",background:"#FEF2F2",color:"#B91C1C",fontSize:"11px",fontWeight:"500"},Medium:{padding:"3.5px 7px",borderRadius:"100px",border:"1px solid #F2E5A1",background:"#FFFBEB",color:"#B45309",fontSize:"11px",fontWeight:"500"},Low:{padding:"3.5px 7px",borderRadius:"100px",border:"1px solid #8098F9",background:"#DBEAFE",color:"#444CE7",fontSize:"11px",fontWeight:"500"}}),t),a=l[s]||l.Medium;return i.jsx("div",e.__assign({style:a},{children:s}))},c=["Lenient","Balanced","Aggressive"],g={Lenient:"#1D9E75",Balanced:"#BA7517",Aggressive:"#E24B4A"},_={width:"350px",background:"#fff",border:"1px solid #ddd",borderRadius:"8px",padding:"16px",maxHeight:"400px",overflow:"auto"},v={display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},u={fontSize:11,fontWeight:500,letterSpacing:"0.08em",color:"#E24B4A",textTransform:"uppercase"},p={fontSize:15,fontWeight:500,margin:"0 0 8px",color:"#111"},x={fontSize:13,color:"#666",lineHeight:1.6,margin:"0 0 14px"},m={marginBottom:14,borderTop:"0.5px solid #eee",paddingTop:12},y={display:"flex",alignItems:"center",gap:6,background:"none",border:"none",cursor:"pointer",padding:0,width:"100%"},h={fontSize:11,fontWeight:500,textTransform:"uppercase",letterSpacing:"0.08em",color:"#E24B4A"},f={display:"flex",gap:8,marginBottom:18},S={flex:1,display:"flex",alignItems:"center",justifyContent:"center",gap:5,fontSize:12,fontWeight:500,padding:"7px 4px",borderRadius:8,border:"0.5px solid #ccc",background:"#fff",cursor:"pointer"},j={background:"none",border:"none",cursor:"pointer",fontSize:16,color:"#888",lineHeight:1,padding:0},b={borderTop:"0.5px solid #eee",paddingTop:14},C={display:"flex",alignItems:"center",width:"100%",background:"none",border:"none",cursor:"pointer",padding:0,marginBottom:4},I={cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"12px",borderTop:"1px solid #eee",borderBottom:"none",paddingLeft:"12px",paddingRight:"12px"},B={display:"flex",alignItems:"center",gap:"4px",minWidth:0,flex:"1 1 auto",overflow:"hidden"},k={width:"28px",height:"28px",display:"inline-flex",alignItems:"center",justifyContent:"center",flex:"0 0 28px"},D={fontSize:"13px",color:"#101828",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},A={display:"flex",alignItems:"center",gap:"10px",flex:"0 0 auto",minWidth:0,flexWrap:"nowrap"},T={display:"flex",padding:"4px 8px",alignItems:"center",gap:"4px",borderRadius:"var(--chip-border-radius, 16px)",border:"1px solid var(--Primitive-Gray-300, #d0d5dd)",flex:"0 1 auto",minWidth:0},w={color:"var(--Primitive-Purple-600, #6938ef)",fontFamily:"Inter",fontSize:"12px",fontStyle:"normal",fontWeight:500,lineHeight:"150%"};exports.default=function(z){var R,W,E,L,M,F,H,N,q,P,O,G,X,J,K,Q,U=z.onClose,V=z.aiReason,Y=z.onAccept,Z=z.onReject,$=z.onIterate,ee=z.initialTone,ie=z.onRegenerate,ne=z.labels,se=void 0===ne?{}:ne,oe=z.toneLevelsConfig,te=void 0===oe?c:oe,le=z.toneColorsConfig,ae=void 0===le?g:le,re=z.dialConfigs,de=void 0===re?a:re,ce=z.actions,ge=z.disableAllActions,_e=void 0!==ge&&ge,ve=z.customStyles,ue=void 0===ve?{}:ve,pe=z.severityChipStyles,xe=void 0===pe?{}:pe,me=z.customIcons,ye=void 0===me?{}:me,he=z.onOpenCognitive,fe=z.showTone,Se=void 0===fe||fe,je=z.cognitiveSectionStyle,be=void 0===je?{}:je,Ce=z.cognitiveScoreBadgeStyle,Ie=void 0===Ce?{}:Ce,Be=z.cognitiveScoreTextStyle,ke=void 0===Be?{}:Be,De=z.cognitiveStyles,Ae=void 0===De?{}:De,Te=z.cognitiveClassNames,we=void 0===Te?{}:Te,ze=z.cognitiveTitle,Re=void 0===ze?"Cognitive Integrity":ze,We=z.cognitiveLeftIcon,Ee=z.showCognitiveRightArrow,Le=void 0===Ee||Ee,Me=z.isStreaming,Fe=te.findIndex(function(e){return e===ee});-1===Fe&&(Fe=1);var He=s.useState(!0),Ne=He[0],qe=He[1],Pe=s.useState(!1),Oe=Pe[0],Ge=Pe[1],Xe=s.useState(Fe),Je=Xe[0],Ke=Xe[1],Qe=s.useState(Fe)[0],Ue=te[Je],Ve=ae[Ue]||"#BA7517",Ye=Je!==Qe,Ze=[{id:"iterate",icon:ye.iterateIcon||i.jsx(n.PenLine,{size:16,color:"#64748B"}),label:se.btnIterate||"Iterate",color:"#64748B",onClick:$},{id:"accept",icon:ye.acceptIcon||i.jsx(n.CheckCircle,{size:16,color:"#10B981"}),label:se.btnAccept||"Approve",color:"#10B981",onClick:Y},{id:"reject",icon:ye.rejectIcon||i.jsx(n.XCircle,{size:16,color:"#DC2626"}),label:se.btnReject||"Reject",color:"#DC2626",onClick:Z}],$e=ce||Ze;return i.jsxs("div",e.__assign({onClick:function(e){return e.stopPropagation()},style:e.__assign(e.__assign({},_),null===(R=null==ue?void 0:ue.DeviationSummaryStyles)||void 0===R?void 0:R.root)},{children:[i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},v),null===(W=null==ue?void 0:ue.DeviationSummaryStyles)||void 0===W?void 0:W.header)},{children:[i.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:6}},{children:[i.jsx("span",{children:ye.summaryIcon||i.jsx(n.Info,{size:16,color:"#E24B4A"})}),i.jsx("span",e.__assign({style:e.__assign(e.__assign({},u),null===(E=null==ue?void 0:ue.DeviationSummaryStyles)||void 0===E?void 0:E.title)},{children:se.summaryHeader||"Summary"}))]})),i.jsx("button",e.__assign({onClick:U,style:e.__assign(e.__assign({},j),null===(L=null==ue?void 0:ue.DeviationSummaryStyles)||void 0===L?void 0:L.closeBtn)},{children:"✕"}))]})),i.jsx("p",e.__assign({style:e.__assign(e.__assign({},p),null===(M=null==ue?void 0:ue.DeviationSummaryStyles)||void 0===M?void 0:M.bodyText)},{children:null===(F=null==V?void 0:V.deviation_details)||void 0===F?void 0:F.deviation_title})),i.jsx("p",e.__assign({style:e.__assign(e.__assign({},x),null===(H=null==ue?void 0:ue.DeviationSummaryStyles)||void 0===H?void 0:H.summary)},{children:null===(N=null==V?void 0:V.deviation_details)||void 0===N?void 0:N.deviation_summary})),i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},m),null===(q=null==ue?void 0:ue.DeviationSummaryStyles)||void 0===q?void 0:q.impactContainer)},{children:[i.jsxs("div",e.__assign({style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},{children:[i.jsxs("button",e.__assign({onClick:function(){return qe(!Ne)},style:e.__assign(e.__assign({},y),null===(P=null==ue?void 0:ue.DeviationSummaryStyles)||void 0===P?void 0:P.impactToggle)},{children:[i.jsx("span",e.__assign({style:e.__assign(e.__assign({},h),null===(O=null==ue?void 0:ue.DeviationSummaryStyles)||void 0===O?void 0:O.impactToggleLabel)},{children:se.impactHeader||"Impact"})),i.jsx("span",e.__assign({style:{fontSize:12,color:"#E24B4A",transition:"transform 0.2s",display:"flex",alignItems:"center",transform:Ne?"rotate(180deg)":"rotate(0deg)"}},{children:i.jsx(n.ChevronDown,{size:16,color:"#E24B4A"})}))]})),i.jsx(d,{type:(null==V?void 0:V.severity)||"Medium",customStyles:xe})]})),Ne&&i.jsx("p",e.__assign({style:{fontSize:13,color:"#666",lineHeight:1.6,margin:"8px 0 0"}},{children:null!==(X=null===(G=null==V?void 0:V.deviation_details)||void 0===G?void 0:G.deviation_impact)&&void 0!==X?X:se.fallbackImpact||"This change reduces compliance obligations and lowers contractual risk thresholds."}))]})),i.jsx("div",e.__assign({style:e.__assign(e.__assign({},f),null===(J=null==ue?void 0:ue.DeviationSummaryStyles)||void 0===J?void 0:J.actionContainer)},{children:$e.map(function(n){var s,o,t=_e||n.disabled,l=t?e.__assign(e.__assign({cursor:"not-allowed",opacity:.5},null===(s=null==ue?void 0:ue.DeviationSummaryStyles)||void 0===s?void 0:s.actionBtnDisabled),n.disabledStyle):{};return i.jsxs("button",e.__assign({style:e.__assign(e.__assign(e.__assign(e.__assign(e.__assign({},S),null===(o=null==ue?void 0:ue.DeviationSummaryStyles)||void 0===o?void 0:o.actionBtn),{color:n.color}),n.style),l),onClick:t?void 0:n.onClick,disabled:t},{children:[n.icon,n.label]}),n.id)})})),Se&&i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},b),null===(K=null==ue?void 0:ue.DeviationSummaryStyles)||void 0===K?void 0:K.toneContainer)},{children:[i.jsxs("button",e.__assign({onClick:function(){return Ge(!Oe)},style:e.__assign(e.__assign({},C),null===(Q=null==ue?void 0:ue.DeviationSummaryStyles)||void 0===Q?void 0:Q.toneToggleBtn)},{children:[i.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:8}},{children:[i.jsx(r,{toneIndex:Je,configs:de}),i.jsx("span",e.__assign({style:{fontSize:13,fontWeight:500,color:"#111"}},{children:se.toneHeader||"Redline Tone"}))]})),i.jsx("span",e.__assign({style:{transition:"transform 0.2s",display:"flex",alignItems:"center",transform:Oe?"rotate(180deg)":"rotate(0deg)"}},{children:i.jsx(n.ChevronDown,{size:16,color:"#111"})}))]})),Oe&&i.jsxs(i.Fragment,{children:[i.jsx("p",e.__assign({style:{fontSize:12,color:"#888",margin:"0 0 12px"}},{children:se.toneDescription||"Controls how assertively AI is redlining"})),i.jsx(o.ToneToggle,{isDirty:Ye,onToneChange:function(e){Ke(e)},toneColor:Ve,toneIndex:Je,onClickRegenerate:function(){return null==ie?void 0:ie(Ue)},toneLabels:te,isStreaming:Me,aiReason:V})]})]})),he&&i.jsxs("div",e.__assign({className:null==we?void 0:we.section,onClick:function(e){e.stopPropagation(),he&&he(e)},style:e.__assign(e.__assign(e.__assign({},I),null==Ae?void 0:Ae.section),be)},{children:[i.jsxs("div",e.__assign({className:null==we?void 0:we.headerLeft,style:e.__assign(e.__assign({},B),null==Ae?void 0:Ae.headerLeft)},{children:[i.jsx("span",e.__assign({className:null==we?void 0:we.titleIcon,style:e.__assign(e.__assign({},k),null==Ae?void 0:Ae.titleIcon)},{children:null!=We?We:i.jsx(t.ReactComponent,{})})),i.jsx("div",e.__assign({className:null==we?void 0:we.cognitiveTitle,style:e.__assign(e.__assign({},D),null==Ae?void 0:Ae.cognitiveTitle)},{children:Re}))]})),i.jsxs("div",e.__assign({className:null==we?void 0:we.headerRight,style:e.__assign(e.__assign({},A),null==Ae?void 0:Ae.headerRight)},{children:[void 0!==(null==V?void 0:V.relevance_score)&&null!==(null==V?void 0:V.relevance_score)?i.jsxs("span",e.__assign({className:null==we?void 0:we.scoreBadge,style:e.__assign(e.__assign(e.__assign({},T),null==Ae?void 0:Ae.scoreBadge),Ie)},{children:[i.jsx(l.ReactComponent,{}),i.jsxs("span",e.__assign({className:null==we?void 0:we.scoreText,style:e.__assign(e.__assign(e.__assign({},w),null==Ae?void 0:Ae.scoreText),ke)},{children:[Math.round(Number(V.relevance_score)),"%"]}))]})):null,Le&&i.jsx("span",e.__assign({style:{display:"flex",alignItems:"center"}},{children:i.jsx(n.ChevronRight,{size:16,color:"#64748B"})}))]}))]}))]}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),n=require("lucide-react"),o=require("react"),s=require("./ToneToggle.js");require("../CognitiveComponents/CitationComponent.module.css.js");var t=require("../icons/cognitiveBrain.svg.js"),l=require("../icons/aiMagic.svg.js"),a=require("@mui/material"),r=[{color:"#1D9E75",angle:-90,arcD:"M1 13 A10 10 0 0 1 1 13"},{color:"#BA7517",angle:0,arcD:"M1 13 A10 10 0 0 1 11 3"},{color:"#E24B4A",angle:90,arcD:"M1 13 A10 10 0 0 1 21 13"}],d=function(n){var o=n.toneIndex,s=n.configs,t=void 0===s?r:s,l=t[Math.min(o,t.length-1)]||t[1]||t[0],a=l.color,d=l.angle,c=l.arcD,g=(d-90)*Math.PI/180,v=11+9*Math.cos(g),_=13+9*Math.sin(g);return i.jsxs("svg",e.__assign({width:"22",height:"14",viewBox:"0 0 22 14",fill:"none"},{children:[i.jsx("path",{d:"M1 13 A10 10 0 0 1 21 13",stroke:"#e5e5e5",strokeWidth:"2.5",strokeLinecap:"round"}),i.jsx("path",{d:c,stroke:a,strokeWidth:"2.5",strokeLinecap:"round"}),i.jsx("line",{x1:"11",y1:"13",x2:v,y2:_,stroke:a,strokeWidth:"2",strokeLinecap:"round"})]}))},c=function(n){var o=n.type,s=n.customStyles,t=void 0===s?{}:s,l=e.__assign(e.__assign({},{High:{padding:"3.5px 7px",borderRadius:"100px",border:"1px solid #FECACA",background:"#FEF2F2",color:"#B91C1C",fontSize:"11px",fontWeight:"500"},Medium:{padding:"3.5px 7px",borderRadius:"100px",border:"1px solid #F2E5A1",background:"#FFFBEB",color:"#B45309",fontSize:"11px",fontWeight:"500"},Low:{padding:"3.5px 7px",borderRadius:"100px",border:"1px solid #8098F9",background:"#DBEAFE",color:"#444CE7",fontSize:"11px",fontWeight:"500"}}),t),a=l[o]||l.Medium;return i.jsx("div",e.__assign({style:a},{children:o}))},g=["Lenient","Balanced","Aggressive"],v={Lenient:"#1D9E75",Balanced:"#BA7517",Aggressive:"#E24B4A"},_={width:"350px",background:"#fff",border:"1px solid #ddd",borderRadius:"8px",padding:"16px"},u={display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},p={fontSize:11,fontWeight:500,letterSpacing:"0.08em",color:"#E24B4A",textTransform:"uppercase"},x={fontSize:15,fontWeight:500,margin:"0 0 8px",color:"#111",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},m={fontSize:13,color:"#666",lineHeight:1.6,margin:"0 0 14px",maxHeight:"100px",overflow:"auto"},y={marginBottom:14,borderTop:"0.5px solid #eee",paddingTop:12},h={display:"flex",alignItems:"center",gap:6,background:"none",border:"none",cursor:"pointer",padding:0,width:"100%"},f={fontSize:11,fontWeight:500,textTransform:"uppercase",letterSpacing:"0.08em",color:"#E24B4A"},S={display:"flex",gap:8,marginBottom:18},j={flex:1,display:"flex",alignItems:"center",justifyContent:"center",gap:5,fontSize:12,fontWeight:500,padding:"7px 4px",borderRadius:8,border:"0.5px solid #ccc",background:"#fff",cursor:"pointer"},b={background:"none",border:"none",cursor:"pointer",fontSize:16,color:"#888",lineHeight:1,padding:0},C={borderTop:"0.5px solid #eee",padding:"14px 0px"},B={display:"flex",alignItems:"center",width:"100%",background:"none",border:"none",cursor:"pointer",padding:0,marginBottom:4},I={cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"12px",borderTop:"1px solid #eee",borderBottom:"none",paddingLeft:"12px",paddingRight:"12px"},k={display:"flex",alignItems:"center",gap:"4px",minWidth:0,flex:"1 1 auto",overflow:"hidden"},w={width:"28px",height:"28px",display:"inline-flex",alignItems:"center",justifyContent:"center",flex:"0 0 28px"},D={fontSize:"13px",color:"#101828",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},A={display:"flex",alignItems:"center",gap:"10px",flex:"0 0 auto",minWidth:0,flexWrap:"nowrap"},T={display:"flex",padding:"4px 8px",alignItems:"center",gap:"4px",borderRadius:"var(--chip-border-radius, 16px)",border:"1px solid var(--Primitive-Gray-300, #d0d5dd)",flex:"0 1 auto",minWidth:0},z={color:"var(--Primitive-Purple-600, #6938ef)",fontFamily:"Inter",fontSize:"12px",fontStyle:"normal",fontWeight:500,lineHeight:"150%"};exports.default=function(R){var W,E,L,M,F,H,q,N,P,O,G,X,J,K,Q,U,V,Y=R.onClose,Z=R.aiReason,$=R.onAccept,ee=R.onReject,ie=R.onIterate,ne=R.initialTone,oe=R.onRegenerate,se=R.labels,te=void 0===se?{}:se,le=R.toneLevelsConfig,ae=void 0===le?g:le,re=R.toneColorsConfig,de=void 0===re?v:re,ce=R.dialConfigs,ge=void 0===ce?r:ce,ve=R.actions,_e=R.disableAllActions,ue=void 0!==_e&&_e,pe=R.customStyles,xe=void 0===pe?{}:pe,me=R.severityChipStyles,ye=void 0===me?{}:me,he=R.customIcons,fe=void 0===he?{}:he,Se=R.onOpenCognitive,je=R.showTone,be=void 0===je||je,Ce=R.cognitiveSectionStyle,Be=void 0===Ce?{}:Ce,Ie=R.cognitiveScoreBadgeStyle,ke=void 0===Ie?{}:Ie,we=R.cognitiveScoreTextStyle,De=void 0===we?{}:we,Ae=R.cognitiveStyles,Te=void 0===Ae?{}:Ae,ze=R.cognitiveClassNames,Re=void 0===ze?{}:ze,We=R.cognitiveTitle,Ee=void 0===We?"Cognitive Integrity":We,Le=R.cognitiveLeftIcon,Me=R.showCognitiveRightArrow,Fe=void 0===Me||Me,He=R.isStreaming,qe=ae.findIndex(function(e){return e===ne});-1===qe&&(qe=1);var Ne=o.useState(!0),Pe=Ne[0],Oe=Ne[1],Ge=o.useState(!1),Xe=Ge[0],Je=Ge[1],Ke=o.useState(qe),Qe=Ke[0],Ue=Ke[1],Ve=o.useState(qe)[0],Ye=ae[Qe],Ze=de[Ye]||"#BA7517",$e=Qe!==Ve,ei=[{id:"iterate",icon:fe.iterateIcon||i.jsx(n.PenLine,{size:16,color:"#64748B"}),label:te.btnIterate||"Iterate",color:"#64748B",onClick:ie},{id:"accept",icon:fe.acceptIcon||i.jsx(n.CheckCircle,{size:16,color:"#10B981"}),label:te.btnAccept||"Approve",color:"#10B981",onClick:$},{id:"reject",icon:fe.rejectIcon||i.jsx(n.XCircle,{size:16,color:"#DC2626"}),label:te.btnReject||"Reject",color:"#DC2626",onClick:ee}],ii=ve||ei;return i.jsxs("div",e.__assign({onClick:function(e){return e.stopPropagation()},style:e.__assign(e.__assign({},_),null===(W=null==xe?void 0:xe.DeviationSummaryStyles)||void 0===W?void 0:W.root)},{children:[i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},u),null===(E=null==xe?void 0:xe.DeviationSummaryStyles)||void 0===E?void 0:E.header)},{children:[i.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:6}},{children:[i.jsx("span",{children:fe.summaryIcon||i.jsx(n.Info,{size:16,color:"#E24B4A"})}),i.jsx("span",e.__assign({style:e.__assign(e.__assign({},p),null===(L=null==xe?void 0:xe.DeviationSummaryStyles)||void 0===L?void 0:L.title)},{children:te.summaryHeader||"Summary"}))]})),i.jsx("button",e.__assign({onClick:Y,style:e.__assign(e.__assign({},b),null===(M=null==xe?void 0:xe.DeviationSummaryStyles)||void 0===M?void 0:M.closeBtn)},{children:"✕"}))]})),i.jsx(a.Tooltip,e.__assign({title:null===(F=null==Z?void 0:Z.deviation_details)||void 0===F?void 0:F.deviation_title},{children:i.jsx("p",e.__assign({style:e.__assign(e.__assign({},x),null===(H=null==xe?void 0:xe.DeviationSummaryStyles)||void 0===H?void 0:H.bodyText)},{children:null===(q=null==Z?void 0:Z.deviation_details)||void 0===q?void 0:q.deviation_title}))})),i.jsx("p",e.__assign({style:e.__assign(e.__assign({},m),null===(N=null==xe?void 0:xe.DeviationSummaryStyles)||void 0===N?void 0:N.summary)},{children:null===(P=null==Z?void 0:Z.deviation_details)||void 0===P?void 0:P.deviation_summary})),i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},y),null===(O=null==xe?void 0:xe.DeviationSummaryStyles)||void 0===O?void 0:O.impactContainer)},{children:[i.jsxs("div",e.__assign({style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},{children:[i.jsxs("button",e.__assign({onClick:function(){return Oe(!Pe)},style:e.__assign(e.__assign({},h),null===(G=null==xe?void 0:xe.DeviationSummaryStyles)||void 0===G?void 0:G.impactToggle)},{children:[i.jsx("span",e.__assign({style:e.__assign(e.__assign({},f),null===(X=null==xe?void 0:xe.DeviationSummaryStyles)||void 0===X?void 0:X.impactToggleLabel)},{children:te.impactHeader||"Impact"})),i.jsx("span",e.__assign({style:{fontSize:12,color:"#E24B4A",transition:"transform 0.2s",display:"flex",alignItems:"center",transform:Pe?"rotate(180deg)":"rotate(0deg)"}},{children:i.jsx(n.ChevronDown,{size:16,color:"#E24B4A"})}))]})),i.jsx(c,{type:(null==Z?void 0:Z.severity)||"Medium",customStyles:ye})]})),Pe&&i.jsx("p",e.__assign({style:{fontSize:13,color:"#666",lineHeight:1.6,margin:"8px 0 0",maxHeight:"100px",overflow:"auto"}},{children:null!==(K=null===(J=null==Z?void 0:Z.deviation_details)||void 0===J?void 0:J.deviation_impact)&&void 0!==K?K:te.fallbackImpact||"This change reduces compliance obligations and lowers contractual risk thresholds."}))]})),i.jsx("div",e.__assign({style:e.__assign(e.__assign({},S),null===(Q=null==xe?void 0:xe.DeviationSummaryStyles)||void 0===Q?void 0:Q.actionContainer)},{children:ii.map(function(n){var o,s,t=ue||n.disabled,l=t?e.__assign(e.__assign({cursor:"not-allowed",opacity:.5},null===(o=null==xe?void 0:xe.DeviationSummaryStyles)||void 0===o?void 0:o.actionBtnDisabled),n.disabledStyle):{};return i.jsxs("button",e.__assign({style:e.__assign(e.__assign(e.__assign(e.__assign(e.__assign({},j),null===(s=null==xe?void 0:xe.DeviationSummaryStyles)||void 0===s?void 0:s.actionBtn),{color:n.color}),n.style),l),onClick:t?void 0:n.onClick,disabled:t},{children:[n.icon,n.label]}),n.id)})})),be&&i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},C),null===(U=null==xe?void 0:xe.DeviationSummaryStyles)||void 0===U?void 0:U.toneContainer)},{children:[i.jsxs("button",e.__assign({onClick:function(){return Je(!Xe)},style:e.__assign(e.__assign({},B),null===(V=null==xe?void 0:xe.DeviationSummaryStyles)||void 0===V?void 0:V.toneToggleBtn)},{children:[i.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:8}},{children:[i.jsx(d,{toneIndex:Qe,configs:ge}),i.jsx("span",e.__assign({style:{fontSize:13,fontWeight:500,color:"#111"}},{children:te.toneHeader||"Redline Tone"}))]})),i.jsx("span",e.__assign({style:{transition:"transform 0.2s",display:"flex",alignItems:"center",transform:Xe?"rotate(180deg)":"rotate(0deg)"}},{children:i.jsx(n.ChevronDown,{size:16,color:"#111"})}))]})),Xe&&i.jsxs(i.Fragment,{children:[i.jsx("p",e.__assign({style:{fontSize:12,color:"#888",margin:"0 0 12px"}},{children:te.toneDescription||"Controls how assertively AI is redlining"})),i.jsx(s.ToneToggle,{isDirty:$e,onToneChange:function(e){Ue(e)},toneColor:Ze,toneIndex:Qe,onClickRegenerate:function(){return null==oe?void 0:oe(Ye)},toneLabels:ae,isStreaming:He,aiReason:Z})]})]})),Se&&i.jsxs("div",e.__assign({className:null==Re?void 0:Re.section,onClick:function(e){e.stopPropagation(),Se&&Se(e)},style:e.__assign(e.__assign(e.__assign({},I),null==Te?void 0:Te.section),Be)},{children:[i.jsxs("div",e.__assign({className:null==Re?void 0:Re.headerLeft,style:e.__assign(e.__assign({},k),null==Te?void 0:Te.headerLeft)},{children:[i.jsx("span",e.__assign({className:null==Re?void 0:Re.titleIcon,style:e.__assign(e.__assign({},w),null==Te?void 0:Te.titleIcon)},{children:null!=Le?Le:i.jsx(t.ReactComponent,{})})),i.jsx("div",e.__assign({className:null==Re?void 0:Re.cognitiveTitle,style:e.__assign(e.__assign({},D),null==Te?void 0:Te.cognitiveTitle)},{children:Ee}))]})),i.jsxs("div",e.__assign({className:null==Re?void 0:Re.headerRight,style:e.__assign(e.__assign({},A),null==Te?void 0:Te.headerRight)},{children:[void 0!==(null==Z?void 0:Z.relevance_score)&&null!==(null==Z?void 0:Z.relevance_score)?i.jsxs("span",e.__assign({className:null==Re?void 0:Re.scoreBadge,style:e.__assign(e.__assign(e.__assign({},T),null==Te?void 0:Te.scoreBadge),ke)},{children:[i.jsx(l.ReactComponent,{}),i.jsxs("span",e.__assign({className:null==Re?void 0:Re.scoreText,style:e.__assign(e.__assign(e.__assign({},z),null==Te?void 0:Te.scoreText),De)},{children:[Math.round(Number(Z.relevance_score)),"%"]}))]})):null,Fe&&i.jsx("span",e.__assign({style:{display:"flex",alignItems:"center"}},{children:i.jsx(n.ChevronRight,{size:16,color:"#64748B"})}))]}))]}))]}))};
|
|
2
2
|
//# sourceMappingURL=DeviationSummary.js.map
|
|
@@ -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("./PopupDefaults.js"),o=require("../icons/History.svg.js"),s=require("../icons/message-chat-square.svg.js"),a=require("./ToneToggle.js"),r=[{id:"chat",icon:n.jsx(s.ReactComponent,{}),label:"Chat",description:"Type on what basis you want to iterate"},{id:"risk",icon:n.jsx(s.ReactComponent,{}),label:"Shift the risk",description:"Adjust how aggressive or lenient the language is"},{id:"history",icon:n.jsx(o.ReactComponent,{}),label:"Historical Recommendations",description:"Pull from past recommended clauses"}],l=[{id:"1",filename:"Mutual_DA2.pdf",excerpt:'"...shall protect Confidential Information using at least the same degree of care as it uses to protect its own confidential information, but no less than reasonable c..."',tab:"Balanced"},{id:"2",filename:"Tech NDA.pdf",excerpt:'"...protect confidential information using reasonable care and appropriate safeguards..."',tab:"Balanced"},{id:"3",filename:"Corp NDA.pdf",excerpt:'"...shall use best efforts to protect any disclosed confidential materials from unauthorised access or disclosure..."',tab:"Aggressive"},{id:"4",filename:"Vendor Agreement.pdf",excerpt:'"...may use disclosed information solely for the stated purpose with no special handling required..."',tab:"Lenient"}],d=["Lenient","Balanced","Aggressive"],c={Lenient:"#1D9E75",Balanced:"#BA7517",Aggressive:"#E24B4A"},g=["Grounded","Innovative"];function f(i){var t=i.chatTitle,o=i.chatBody,s=i.mergedStyles,a=void 0===s?x:s;return n.jsx("div",e.__assign({style:a.body},{children:n.jsxs("div",e.__assign({style:a.chatBanner},{children:[n.jsx("p",e.__assign({style:a.chatBannerTitle},{children:t})),n.jsx("p",e.__assign({style:a.chatBannerBody},{children:o}))]}))}))}function p(t){var o=t.initialTone,s=t.onRiskRegenerate,r=t.riskMode,l=t.toneLevelsConfig,f=void 0===l?d:l,p=t.toneColorsConfig,u=void 0===p?c:p,h=t.riskModesConfig,y=void 0===h?g:h,m=t.mergedStyles,b=void 0===m?x:m,_=t.isStreaming,v=t.aiReason,C=f.findIndex(function(e){return e===o});-1===C&&(C=1);var j=i.useState(r||y[0]||"Grounded"),k=j[0],S=j[1],B=i.useState(C),R=B[0],T=B[1],A=i.useState(C)[0],w=f[R],z=u[w]||"#BA7517",L=R!==A||r!==k;return n.jsxs("div",e.__assign({style:b.body},{children:[n.jsx("div",e.__assign({style:{display:"flex",gap:8,marginBottom:16}},{children:y.map(function(i){return n.jsxs("button",e.__assign({onClick:function(){return S(i)},style:{flex:1,display:"flex",alignItems:"center",gap:8,padding:"10px 12px",borderRadius:10,border:"1px solid ".concat(k===i?"#7c5cbf":"#e0ddd8"),background:"#fff",cursor:"pointer",fontSize:13,fontWeight:500,color:"#1a1a1a"}},{children:[n.jsx("span",e.__assign({style:{width:16,height:16,borderRadius:"50%",border:"2px solid ".concat(k===i?"#7c5cbf":"#ccc"),display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},{children:k===i&&n.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:"#7c5cbf"}})})),i.charAt(0).toUpperCase()+i.slice(1)]}),i)})})),n.jsx(a.ToneToggle,{onToneChange:function(e){return T(e)},toneColor:z,isDirty:L,toneIndex:R,onClickRegenerate:function(){return null==s?void 0:s({tone:w,mode:k})},isStreaming:_,aiReason:v})]}))}function u(t){var o=t.onApply,s=t.historicalClausesData,a=void 0===s?l:s,r=t.toneLevelsConfig,c=void 0===r?d:r,g=t.mergedStyles,f=void 0===g?x:g,p=c.length>1?c[1]:c[0]||"Balanced",u=i.useState(p),h=u[0],y=u[1],m=a.filter(function(e){return e.tab===h});return n.jsxs("div",e.__assign({style:f.body},{children:[n.jsx("div",e.__assign({style:f.segmentedControl},{children:c.map(function(i){return n.jsx("button",e.__assign({onClick:function(){return y(i)},style:e.__assign(e.__assign({},f.segmentedBtn),h===i?f.segmentedBtnActive:{})},{children:i.charAt(0).toUpperCase()+i.slice(1)}),i)})})),n.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:10,marginTop:12}},{children:[m.map(function(i){return n.jsxs("button",e.__assign({onClick:function(){return null==o?void 0:o({type:"history",value:i.excerpt})},style:f.clauseCard},{children:[n.jsx("p",e.__assign({style:f.clauseFilename},{children:i.filename})),n.jsx("p",e.__assign({style:f.clauseExcerpt},{children:i.excerpt}))]}),i.id)}),0===m.length&&n.jsx("p",e.__assign({style:{fontSize:12,color:"#aaa",textAlign:"center",padding:"12px 0"}},{children:"No clauses for this tone"}))]}))]}))}function h(e){var i=e.type,t=e.onRiskRegenerate,o=e.initialTone,s=e.riskMode,a=e.onApply,r=e.chatTitle,l=e.chatBody,d=e.historicalClausesData,c=e.toneLevelsConfig,g=e.toneColorsConfig,h=e.riskModesConfig,y=e.mergedStyles,m=void 0===y?x:y,b=e.isStreaming,_=e.aiReason;return"chat"===i?n.jsx(f,{chatTitle:r,chatBody:l,mergedStyles:m}):"risk"===i?n.jsx(p,{onRiskRegenerate:t,initialTone:o,riskMode:s,toneLevelsConfig:c,toneColorsConfig:g,riskModesConfig:h,mergedStyles:m,isStreaming:b,aiReason:_}):"history"===i?n.jsx(u,{onApply:a,historicalClausesData:d,toneLevelsConfig:c,mergedStyles:m}):null}var x={card:{background:"#fff",border:"0.5px solid #e8e7e3",borderRadius:14,width:300,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),t=require("./PopupDefaults.js"),o=require("../icons/History.svg.js"),s=require("../icons/message-chat-square.svg.js"),a=require("./ToneToggle.js"),r=[{id:"chat",icon:n.jsx(s.ReactComponent,{}),label:"Chat",description:"Type on what basis you want to iterate"},{id:"risk",icon:n.jsx(s.ReactComponent,{}),label:"Shift the risk",description:"Adjust how aggressive or lenient the language is"},{id:"history",icon:n.jsx(o.ReactComponent,{}),label:"Historical Recommendations",description:"Pull from past recommended clauses"}],l=[{id:"1",filename:"Mutual_DA2.pdf",excerpt:'"...shall protect Confidential Information using at least the same degree of care as it uses to protect its own confidential information, but no less than reasonable c..."',tab:"Balanced"},{id:"2",filename:"Tech NDA.pdf",excerpt:'"...protect confidential information using reasonable care and appropriate safeguards..."',tab:"Balanced"},{id:"3",filename:"Corp NDA.pdf",excerpt:'"...shall use best efforts to protect any disclosed confidential materials from unauthorised access or disclosure..."',tab:"Aggressive"},{id:"4",filename:"Vendor Agreement.pdf",excerpt:'"...may use disclosed information solely for the stated purpose with no special handling required..."',tab:"Lenient"}],d=["Lenient","Balanced","Aggressive"],c={Lenient:"#1D9E75",Balanced:"#BA7517",Aggressive:"#E24B4A"},g=["Grounded","Innovative"];function f(i){var t=i.chatTitle,o=i.chatBody,s=i.mergedStyles,a=void 0===s?x:s;return n.jsx("div",e.__assign({style:a.body},{children:n.jsxs("div",e.__assign({style:a.chatBanner},{children:[n.jsx("p",e.__assign({style:a.chatBannerTitle},{children:t})),n.jsx("p",e.__assign({style:a.chatBannerBody},{children:o}))]}))}))}function p(t){var o=t.initialTone,s=t.onRiskRegenerate,r=t.riskMode,l=t.toneLevelsConfig,f=void 0===l?d:l,p=t.toneColorsConfig,u=void 0===p?c:p,h=t.riskModesConfig,y=void 0===h?g:h,m=t.mergedStyles,b=void 0===m?x:m,_=t.isStreaming,v=t.aiReason,C=f.findIndex(function(e){return e===o});-1===C&&(C=1);var j=i.useState(r||y[0]||"Grounded"),k=j[0],S=j[1],B=i.useState(C),R=B[0],T=B[1],A=i.useState(C)[0],w=f[R],z=u[w]||"#BA7517",L=R!==A||r!==k;return n.jsxs("div",e.__assign({style:b.body},{children:[n.jsx("div",e.__assign({style:{display:"flex",gap:8,marginBottom:16}},{children:y.map(function(i){return n.jsxs("button",e.__assign({onClick:function(){return S(i)},style:{flex:1,display:"flex",alignItems:"center",gap:8,padding:"10px 12px",borderRadius:10,border:"1px solid ".concat(k===i?"#7c5cbf":"#e0ddd8"),background:"#fff",cursor:"pointer",fontSize:13,fontWeight:500,color:"#1a1a1a"}},{children:[n.jsx("span",e.__assign({style:{width:16,height:16,borderRadius:"50%",border:"2px solid ".concat(k===i?"#7c5cbf":"#ccc"),display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},{children:k===i&&n.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:"#7c5cbf"}})})),i.charAt(0).toUpperCase()+i.slice(1)]}),i)})})),n.jsx(a.ToneToggle,{onToneChange:function(e){return T(e)},toneColor:z,isDirty:L,toneIndex:R,onClickRegenerate:function(){return null==s?void 0:s({tone:w,mode:k})},isStreaming:_,aiReason:v})]}))}function u(t){var o=t.onApply,s=t.historicalClausesData,a=void 0===s?l:s,r=t.toneLevelsConfig,c=void 0===r?d:r,g=t.mergedStyles,f=void 0===g?x:g,p=c.length>1?c[1]:c[0]||"Balanced",u=i.useState(p),h=u[0],y=u[1],m=a.filter(function(e){return e.tab===h});return n.jsxs("div",e.__assign({style:f.body},{children:[n.jsx("div",e.__assign({style:f.segmentedControl},{children:c.map(function(i){return n.jsx("button",e.__assign({onClick:function(){return y(i)},style:e.__assign(e.__assign({},f.segmentedBtn),h===i?f.segmentedBtnActive:{})},{children:i.charAt(0).toUpperCase()+i.slice(1)}),i)})})),n.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:10,marginTop:12}},{children:[m.map(function(i){return n.jsxs("button",e.__assign({onClick:function(){return null==o?void 0:o({type:"history",value:i.excerpt})},style:f.clauseCard},{children:[n.jsx("p",e.__assign({style:f.clauseFilename},{children:i.filename})),n.jsx("p",e.__assign({style:f.clauseExcerpt},{children:i.excerpt}))]}),i.id)}),0===m.length&&n.jsx("p",e.__assign({style:{fontSize:12,color:"#aaa",textAlign:"center",padding:"12px 0"}},{children:"No clauses for this tone"}))]}))]}))}function h(e){var i=e.type,t=e.onRiskRegenerate,o=e.initialTone,s=e.riskMode,a=e.onApply,r=e.chatTitle,l=e.chatBody,d=e.historicalClausesData,c=e.toneLevelsConfig,g=e.toneColorsConfig,h=e.riskModesConfig,y=e.mergedStyles,m=void 0===y?x:y,b=e.isStreaming,_=e.aiReason;return"chat"===i?n.jsx(f,{chatTitle:r,chatBody:l,mergedStyles:m}):"risk"===i?n.jsx(p,{onRiskRegenerate:t,initialTone:o,riskMode:s,toneLevelsConfig:c,toneColorsConfig:g,riskModesConfig:h,mergedStyles:m,isStreaming:b,aiReason:_}):"history"===i?n.jsx(u,{onApply:a,historicalClausesData:d,toneLevelsConfig:c,mergedStyles:m}):null}var x={card:{background:"#fff",border:"0.5px solid #e8e7e3",borderRadius:14,width:300,fontFamily:"system-ui, sans-serif"},header:{display:"flex",alignItems:"center",gap:8,padding:"14px 16px",borderBottom:"0.5px solid #e8e7e3"},backBtn:{background:"none",border:"none",cursor:"pointer",fontSize:20,color:"#888",padding:0,lineHeight:1},headerTitle:{fontSize:14,fontWeight:500,color:"#1a1a1a"},row:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 16px",cursor:"pointer",border:"none",textAlign:"left",gap:10,boxSizing:"border-box",backgroundColor:"transparent"},rowLeft:{display:"flex",alignItems:"flex-start",gap:10,flex:1},icon:{fontSize:16,color:"#666",marginTop:1,flexShrink:0},label:{margin:0,fontSize:14,fontWeight:500,color:"#1a1a1a"},desc:{margin:"2px 0 0",fontSize:12,color:"#888",lineHeight:1.4},chevron:{fontSize:18,color:"#aaa",flexShrink:0,display:"inline-block",transition:"transform 0.2s"},body:{padding:"0 16px 14px 16px"},chatBanner:{background:"#eef4fd",border:"1px solid #c5d8f7",borderRadius:10,padding:"12px 14px",marginBottom:10},chatBannerTitle:{margin:"0 0 6px",fontSize:14,fontWeight:600,color:"#3a5a8a"},chatBannerBody:{margin:0,fontSize:13,color:"#4a6080",lineHeight:1.5},applyBtn:{display:"flex",padding:"7px 10.5px",justifyContent:"center",alignItems:"center",gap:"7px",marginTop:8,fontSize:13,borderRadius:6,border:"1px solid #2563EB",background:"#2563EB",color:"#fff"},rangeLabel:{fontSize:12,color:"#888"},segmentedControl:{border:"1px solid #F2F4F7",display:"flex",background:"#F9FAFB",borderRadius:4,padding:6,gap:8},segmentedBtn:{flex:1,padding:"7px 0",fontSize:13,fontWeight:500,color:"#888",background:"transparent",border:"none",borderRadius:8,cursor:"pointer",transition:"background 0.15s, color 0.15s"},segmentedBtnActive:{background:"#dce8fa",color:"#2a4a7a",fontWeight:700},clauseCard:{background:"#fff",border:"1px solid #dde5f0",borderRadius:12,padding:"12px 14px",textAlign:"left",cursor:"pointer",width:"100%"},clauseFilename:{margin:"0 0 6px",fontSize:13,fontWeight:600,color:"#2a4a7a"},clauseExcerpt:{margin:0,fontSize:13,color:"#4a5a70",fontStyle:"italic",lineHeight:1.5}};exports.default=function(o){var s=o.onBack,a=o.onChatClick,f=o.onRiskRegenerate,p=o.initialTone,u=o.riskMode,y=o.onApply,m=o.onTabToggle,b=o.menuItemsConfig,_=void 0===b?r:b,v=o.historicalClausesConfig,C=void 0===v?l:v,j=o.chatTitle,k=void 0===j?"Chat mode active":j,S=o.chatBody,B=void 0===S?"You are now chatting about this redline, continue the conversation in the left panel to refine or update it":S,R=o.headerTitle,T=void 0===R?"How would you like to iterate?":R,A=o.customStyles,w=void 0===A?{}:A,z=o.toneLevelsConfig,L=void 0===z?d:z,M=o.toneColorsConfig,D=void 0===M?c:M,I=o.riskModesConfig,q=void 0===I?g:I,F=o.isStreaming,H=o.aiReason,W=i.useState(null),E=W[0],G=W[1],N=e.__assign(e.__assign(e.__assign({},t.default.IterateMenuDefaults.styles),x),w);return n.jsxs("div",e.__assign({style:N.card},{children:[n.jsxs("div",e.__assign({style:N.header},{children:[n.jsx("button",e.__assign({onClick:s,style:N.backBtn,"aria-label":"Go back"},{children:"‹"})),n.jsx("span",e.__assign({style:N.headerTitle},{children:T}))]})),n.jsx("div",e.__assign({style:{width:"100%",maxHeight:"300px",overflow:"auto"}},{children:_.map(function(i,t){var o=E===i.id;return n.jsxs("div",e.__assign({style:{borderBottom:t<_.length-1?"0.5px solid #e8e7e3":"none"}},{children:[n.jsxs("button",e.__assign({onClick:function(){return e=i.id,G(function(n){return n===e?null:("chat"===e&&(null==a||a()),m&&m(e),e)});var e},style:N.row},{children:[n.jsx("div",e.__assign({style:N.rowLeft},{children:n.jsxs("div",{children:[n.jsx("p",e.__assign({style:N.label},{children:i.label})),n.jsx("p",e.__assign({style:N.desc},{children:i.description}))]})})),n.jsx("span",e.__assign({style:e.__assign(e.__assign({},N.chevron),{transform:o?"rotate(90deg)":"rotate(0deg)"})},{children:"›"}))]})),n.jsx("div",e.__assign({style:{maxHeight:o?400:0,overflow:"hidden",transition:"max-height 0.25s ease"}},{children:n.jsx(h,{type:i.id,onRiskRegenerate:f,initialTone:p,riskMode:u,onApply:y,chatTitle:k,chatBody:B,historicalClausesData:C,toneLevelsConfig:L,toneColorsConfig:D,riskModesConfig:q,mergedStyles:N,aiReason:H,isStreaming:F})}))]}),i.id)})}))]}))};
|
|
2
2
|
//# sourceMappingURL=IterateComponent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={root:{width:"350px",background:"#fff",border:"1px solid #ddd",borderRadius:"8px",padding:"16px",maxHeight:"400px",overflow:"auto"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},title:{fontSize:11,fontWeight:500,letterSpacing:"0.08em",color:"#E24B4A",textTransform:"uppercase"},bodyText:{fontSize:15,fontWeight:500,margin:"0 0 8px",color:"#111"},summary:{fontSize:13,color:"#666",lineHeight:1.6,margin:"0 0 14px"},impactContainer:{marginBottom:14,borderTop:"0.5px solid #eee",paddingTop:12},actionContainer:{display:"flex",gap:8,marginBottom:18},toneContainer:{borderTop:"0.5px solid #eee",paddingTop:14}},o={styles:{card:{background:"#fff",border:"0.5px solid #e8e7e3",borderRadius:14,width:300,maxHeight:"350px",overflow:"auto",fontFamily:"system-ui, sans-serif"},header:{display:"flex",alignItems:"center",gap:8,padding:"14px 16px",borderBottom:"0.5px solid #e8e7e3"},backBtn:{background:"none",border:"none",cursor:"pointer",fontSize:20,color:"#888",padding:0,lineHeight:1},headerTitle:{fontSize:14,fontWeight:500,color:"#1a1a1a"},row:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 16px",cursor:"pointer",border:"none",textAlign:"left",gap:10,boxSizing:"border-box",backgroundColor:"transparent"},rowLeft:{display:"flex",alignItems:"flex-start",gap:10,flex:1},label:{margin:0,fontSize:14,fontWeight:500,color:"#1a1a1a"},desc:{margin:"2px 0 0",fontSize:12,color:"#888",lineHeight:1.4},chevron:{fontSize:18,color:"#aaa",flexShrink:0,display:"inline-block",transition:"transform 0.2s"},body:{padding:"0 16px 14px 16px"},chatBanner:{background:"#eef4fd",border:"1px solid #c5d8f7",borderRadius:10,padding:"12px 14px",marginBottom:10},chatBannerTitle:{margin:"0 0 6px",fontSize:14,fontWeight:600,color:"#3a5a8a"},chatBannerBody:{margin:0,fontSize:13,color:"#4a6080",lineHeight:1.5},segmentedControl:{border:"1px solid #F2F4F7",display:"flex",background:"#F9FAFB",borderRadius:4,padding:6,gap:8},segmentedBtn:{flex:1,padding:"7px 0",fontSize:13,fontWeight:500,color:"#888",background:"transparent",border:"none",borderRadius:8,cursor:"pointer",transition:"background 0.15s, color 0.15s"},segmentedBtnActive:{background:"#dce8fa",color:"#2a4a7a",fontWeight:700},clauseCard:{background:"#fff",border:"1px solid #dde5f0",borderRadius:12,padding:"12px 14px",textAlign:"left",cursor:"pointer",width:"100%"},clauseFilename:{margin:"0 0 6px",fontSize:13,fontWeight:600,color:"#2a4a7a"},clauseExcerpt:{margin:0,fontSize:13,color:"#4a5a70",fontStyle:"italic",lineHeight:1.5}}},
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={root:{width:"350px",background:"#fff",border:"1px solid #ddd",borderRadius:"8px",padding:"16px",maxHeight:"400px",overflow:"auto"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},title:{fontSize:11,fontWeight:500,letterSpacing:"0.08em",color:"#E24B4A",textTransform:"uppercase"},bodyText:{fontSize:15,fontWeight:500,margin:"0 0 8px",color:"#111"},summary:{fontSize:13,color:"#666",lineHeight:1.6,margin:"0 0 14px"},impactContainer:{marginBottom:14,borderTop:"0.5px solid #eee",paddingTop:12},actionContainer:{display:"flex",gap:8,marginBottom:18},toneContainer:{borderTop:"0.5px solid #eee",paddingTop:14}},o={styles:{card:{background:"#fff",border:"0.5px solid #e8e7e3",borderRadius:14,width:300,maxHeight:"350px",overflow:"auto",fontFamily:"system-ui, sans-serif"},header:{display:"flex",alignItems:"center",gap:8,padding:"14px 16px",borderBottom:"0.5px solid #e8e7e3"},backBtn:{background:"none",border:"none",cursor:"pointer",fontSize:20,color:"#888",padding:0,lineHeight:1},headerTitle:{fontSize:14,fontWeight:500,color:"#1a1a1a"},row:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 16px",cursor:"pointer",border:"none",textAlign:"left",gap:10,boxSizing:"border-box",backgroundColor:"transparent"},rowLeft:{display:"flex",alignItems:"flex-start",gap:10,flex:1},label:{margin:0,fontSize:14,fontWeight:500,color:"#1a1a1a"},desc:{margin:"2px 0 0",fontSize:12,color:"#888",lineHeight:1.4},chevron:{fontSize:18,color:"#aaa",flexShrink:0,display:"inline-block",transition:"transform 0.2s"},body:{padding:"0 16px 14px 16px"},chatBanner:{background:"#eef4fd",border:"1px solid #c5d8f7",borderRadius:10,padding:"12px 14px",marginBottom:10},chatBannerTitle:{margin:"0 0 6px",fontSize:14,fontWeight:600,color:"#3a5a8a"},chatBannerBody:{margin:0,fontSize:13,color:"#4a6080",lineHeight:1.5},segmentedControl:{border:"1px solid #F2F4F7",display:"flex",background:"#F9FAFB",borderRadius:4,padding:6,gap:8},segmentedBtn:{flex:1,padding:"7px 0",fontSize:13,fontWeight:500,color:"#888",background:"transparent",border:"none",borderRadius:8,cursor:"pointer",transition:"background 0.15s, color 0.15s"},segmentedBtnActive:{background:"#dce8fa",color:"#2a4a7a",fontWeight:700},clauseCard:{background:"#fff",border:"1px solid #dde5f0",borderRadius:12,padding:"12px 14px",textAlign:"left",cursor:"pointer",width:"100%"},clauseFilename:{margin:"0 0 6px",fontSize:13,fontWeight:600,color:"#2a4a7a"},clauseExcerpt:{margin:0,fontSize:13,color:"#4a5a70",fontStyle:"italic",lineHeight:1.5}}},t={root:{animation:"slideIn 0.32s cubic-bezier(0.22,1,0.36,1) both",width:350,background:"#fff",borderRadius:18,boxShadow:"0 8px 48px rgba(0,0,0,0.18), 0 1.5px 6px rgba(0,0,0,0.07)",fontFamily:"'DM Sans', 'Segoe UI', sans-serif"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 16px",borderBottom:"1.5px solid #e2e8f0",borderRadius:"18px 18px 0px 0px"},closeBtn:{background:"none",border:"none",cursor:"pointer",padding:4,borderRadius:6,display:"flex",alignItems:"center"},body:{padding:"14px 16px",display:"flex",flexDirection:"column",gap:13},meta:{},divider:{height:1,background:"#f1f5f9"},impactText:{margin:"10px 0 0",fontSize:13,lineHeight:1.65,color:"#334155",overflow:"auto",maxHeight:"100px"},secondSection:{marginTop:12,background:"#f8fafc",border:"1.5px solid #e2e8f0",borderRadius:12,padding:"14px 16px",fontSize:13,lineHeight:1.7,color:"#64748b",fontStyle:"italic",overflow:"auto",maxHeight:"100px"},actionsContainer:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:2},fallbackSectionStyle:{marginTop:12,padding:"16px",fontSize:13,color:"#94a3b8",textAlign:"center",fontStyle:"italic",background:"#f8fafc",borderRadius:12,border:"1.5px dashed #cbd5e1"}},n={container:{background:"#fff"},header:{display:"flex",alignItems:"center",justifyContent:"space-between"},innerHeader:{padding:"8px 12px"},innerBody:{padding:"8px 12px",color:"#4b5563"}},a={DeviationSummaryDefaults:e,IterateMenuDefaults:o,RedlineCardDefaults:t,CitationAccordionDefaults:n};exports.CitationAccordionDefaults=n,exports.DeviationSummaryDefaults=e,exports.IterateMenuDefaults=o,exports.RedlineCardDefaults=t,exports.default=a;
|
|
2
2
|
//# sourceMappingURL=PopupDefaults.js.map
|
package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),s=require("lucide-react"),n=require("react"),i=require("./PopupDefaults.js");function o(e){var t=new Date(e);return isNaN(t.getTime())?e:new Date(e).toLocaleString("en-US",{month:"2-digit",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0}).replace(" AM","AM").replace(" PM","PM")}var r=function(){return t.jsxs("svg",e.__assign({width:"22",height:"22",viewBox:"0 0 22 22",fill:"none"},{children:[t.jsx("circle",{cx:"11",cy:"11",r:"10",stroke:"#22c55e",strokeWidth:"2",fill:"#f0fdf4"}),t.jsx("path",{d:"M6.5 11.5l3 3 6-6",stroke:"#22c55e",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))},a=function(){return t.jsxs("svg",e.__assign({width:"22",height:"22",viewBox:"0 0 22 22",fill:"none"},{children:[t.jsx("circle",{cx:"11",cy:"11",r:"10",stroke:"#ef4444",strokeWidth:"2",fill:"#fff1f2"}),t.jsx("path",{d:"M7.5 7.5l7 7M14.5 7.5l-7 7",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round"})]}))},d=function(){return t.jsx("svg",e.__assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},{children:t.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#94a3b8",strokeWidth:"1.8",strokeLinecap:"round"})}))},l=function(){return t.jsxs("svg",e.__assign({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},{children:[t.jsx("circle",{cx:"6.5",cy:"5.5",r:"2.5",stroke:"#94a3b8",strokeWidth:"1.4"}),t.jsx("path",{d:"M1.5 13.5c0-3.038 2.462-5.5 5-5.5s5 2.462 5 5.5",stroke:"#94a3b8",strokeWidth:"1.4",strokeLinecap:"round"}),t.jsx("path",{d:"M11 8.5l1.5 1.5 2.5-2.5",stroke:"#22c55e",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]}))},c=function(){return t.jsxs("svg",e.__assign({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},{children:[t.jsx("circle",{cx:"6.5",cy:"5.5",r:"2.5",stroke:"#94a3b8",strokeWidth:"1.4"}),t.jsx("path",{d:"M1.5 13.5c0-3.038 2.462-5.5 5-5.5s5 2.462 5 5.5",stroke:"#94a3b8",strokeWidth:"1.4",strokeLinecap:"round"}),t.jsx("path",{d:"M11.5 8l3 3m0-3l-3 3",stroke:"#ef4444",strokeWidth:"1.4",strokeLinecap:"round"})]}))},u=function(s){var n=s.open;return t.jsx("svg",e.__assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",style:{transform:n?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.25s ease"}},{children:t.jsx("path",{d:"M4.5 11.25L9 6.75l4.5 4.5",stroke:"#64748b",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}))},g=function(s){var n=s.color,i=void 0===n?"#3b82f6":n;return t.jsxs("svg",e.__assign({width:"15",height:"15",viewBox:"0 0 16 16",fill:"none"},{children:[t.jsx("path",{d:"M1.5 8A6.5 6.5 0 1 0 4 3.2",stroke:i,strokeWidth:"1.5",strokeLinecap:"round"}),t.jsx("path",{d:"M1.5 3.5v4h4",stroke:i,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M8 5v3.5l2 1.5",stroke:i,strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}))},h=function(){return t.jsxs("svg",e.__assign({width:"15",height:"15",viewBox:"0 0 16 16",fill:"none"},{children:[t.jsx("path",{d:"M13.5 8a5.5 5.5 0 1 0-1.6 3.9",stroke:"#3b82f6",strokeWidth:"1.5",strokeLinecap:"round"}),t.jsx("path",{d:"M13.5 13v-4.5H9",stroke:"#3b82f6",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}))},x=function(){return t.jsxs("svg",e.__assign({width:"15",height:"15",viewBox:"0 0 16 16",fill:"none"},{children:[t.jsx("path",{d:"M2 8h12M10 4l4 4-4 4",stroke:"#64748b",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M4 5l-2 3 2 3",stroke:"#64748b",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}))};function f(s){var n=s.title,i=s.open,o=s.onToggle,r=s.children;return t.jsxs("div",e.__assign({style:{maxHeight:"170px",overflow:"auto"}},{children:[t.jsxs("div",e.__assign({onClick:o,style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",userSelect:"none",padding:"2px 0"}},{children:[t.jsx("span",e.__assign({style:{fontSize:14,fontWeight:700,color:"#1e293b",letterSpacing:"-0.01em"}},{children:n})),t.jsx(u,{open:i})]})),t.jsx("div",e.__assign({style:{maxHeight:i?300:0,opacity:i?1:0,overflow:"hidden",transition:"max-height 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.25s"}},{children:r}))]}))}function _(s){var n=s.icon,i=s.label,o=s.onClick,r=s.customStyle,a=void 0===r?{}:r,d=s.disabled,l=void 0!==d&&d,c=s.disabledStyle,u=void 0===c?{}:c,g=e.__assign(e.__assign({display:"flex",alignItems:"center",gap:7,padding:"8px 16px",background:"#f8fafc",border:"1.5px solid #e2e8f0",borderRadius:10,cursor:l?"not-allowed":"pointer",fontSize:"12px",fontWeight:600,color:"#475569",fontFamily:"inherit",transition:"background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s",whiteSpace:"nowrap",opacity:l?.5:1},a),l?u:{});return t.jsxs("button",e.__assign({onClick:l?void 0:o,disabled:l,style:g,onMouseEnter:function(e){l||(e.currentTarget.style.background="#f1f5f9",e.currentTarget.style.transform="translateY(-1px)",e.currentTarget.style.boxShadow="0 2px 8px rgba(0,0,0,0.07)")},onMouseLeave:function(e){l||(e.currentTarget.style.background="#f8fafc",e.currentTarget.style.transform="",e.currentTarget.style.boxShadow="")}},{children:[n,i]}))}exports.ApprovedIcon=r,exports.ChevronIcon=u,exports.CloseIcon=d,exports.HistoryIcon=g,exports.IterateIcon=x,exports.RedlineCard=function(u){var p,j=u.status,k=u.onClose,b=u.impactText,v=u.secondText,y=u.actionTakenByName,m=u.actionTakenAtTime,B=void 0===m?"NA":m,C=u.onHistory,L=u.onIterate,w=u.onReinstate,R=u.onRevert,I=u.disableAllActions,S=void 0!==I&&I,M=u.impactTitle,W=void 0===M?"Impact":M,T=u.customConfigs,D=void 0===T?{}:T,A=u.customStyles,z=void 0===A?{}:A,U=n.useState(!0),H=U[0],q=U[1],F=n.useState(!0),E=F[0],N=F[1],P=n.useState(!1),O=P[0],Y=P[1],G={headerBg:"#f0fdf4",headerBorder:"#dcfce7",titleColor:"#166534",label:"Redline Approved",metaLabel:"Approved By",UserIcon:t.jsx(l,{}),StatusIcon:t.jsx(r,{}),secondTitle:"Original text",secondBg:"#f8fafc",secondBorder:"#e2e8f0",impactBox:!0,actions:[{icon:t.jsx(g,{}),label:"History",onClick:C},{icon:t.jsx(s.Undo2,{size:17}),label:"Revert",onClick:R},{icon:t.jsx(x,{}),label:"Iterate",onClick:L}]},J={headerBg:"#fff1f2",headerBorder:"#fecdd3",titleColor:"#991b1b",label:"Redline Rejected",metaLabel:"Rejected By",UserIcon:t.jsx(c,{}),StatusIcon:t.jsx(a,{}),secondTitle:"Rejected Recommendation",secondBg:"#f8fafc",secondBorder:"#e2e8f0",impactBox:!1,actions:[{icon:t.jsx(g,{color:"#3b82f6"}),label:"History",onClick:C},{icon:t.jsx(h,{}),label:"Reinstate",onClick:w},{icon:t.jsx(x,{}),label:"Iterate",onClick:L}]},K={headerBg:"#E2E8F0",headerBorder:"none",titleColor:"#1E293B",label:"Redline Reverted",metaLabel:"Reverted By",UserIcon:t.jsx(l,{}),StatusIcon:t.jsx(s.Undo2,{size:17}),secondTitle:"Reverted redline",secondBg:"#F9FAFB",secondBorder:"#D0D5DD",impactBox:!1,actions:[{icon:t.jsx(g,{}),label:"History",onClick:C},{icon:t.jsx(x,{}),label:"Iterate",onClick:L}]};p="accepted"===j?G:"rejected"===j?J:K;var Q=e.__assign(e.__assign({},p),D[j]||{});return t.jsxs("div",e.__assign({style:e.__assign(e.__assign(e.__assign({},i.default.RedlineCardDefaults.root),{animation:O?"slideOut 0.26s cubic-bezier(0.4,0,1,1) forwards":i.default.RedlineCardDefaults.root.animation||"slideIn 0.32s cubic-bezier(0.22,1,0.36,1) both"}),z.root)},{children:[t.jsxs("div",e.__assign({style:e.__assign(e.__assign(e.__assign({},i.default.RedlineCardDefaults.header),{background:Q.headerBg,borderBottom:"1.5px solid ".concat(Q.headerBorder)}),z.header)},{children:[t.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:10}},{children:[Q.StatusIcon,t.jsx("span",e.__assign({style:{fontSize:15,fontWeight:700,color:Q.titleColor,letterSpacing:"-0.01em"}},{children:Q.label}))]})),t.jsx("button",e.__assign({onClick:function(){Y(!0),k()},style:{background:"none",border:"none",cursor:"pointer",padding:4,borderRadius:6,display:"flex",alignItems:"center"}},{children:t.jsx(d,{})}))]})),t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},i.default.RedlineCardDefaults.body),z.body)},{children:[t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},i.default.RedlineCardDefaults.meta),z.meta)},{children:[t.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:6,marginBottom:5}},{children:[Q.UserIcon,t.jsx("span",e.__assign({style:{fontSize:12.5,color:"#94a3b8",fontWeight:500}},{children:Q.metaLabel}))]})),t.jsxs("div",e.__assign({style:{fontSize:14,fontWeight:700,color:"#1e293b",letterSpacing:"-0.01em"}},{children:[y,", ",o(B)]}))]})),t.jsx("div",{style:e.__assign(e.__assign({},i.default.RedlineCardDefaults.divider),z.divider)}),t.jsx(f,e.__assign({title:W,open:H,onToggle:function(){return q(function(e){return!e})}},{children:t.jsx("p",e.__assign({style:e.__assign(e.__assign({},i.default.RedlineCardDefaults.impactText),z.impactText)},{children:b||""}))})),t.jsx("div",{style:e.__assign(e.__assign({},i.default.RedlineCardDefaults.divider),z.divider)}),t.jsx(f,e.__assign({title:Q.secondTitle,open:E,onToggle:function(){return N(function(e){return!e})}},{children:t.jsx("div",e.__assign({style:e.__assign(e.__assign(e.__assign({},i.default.RedlineCardDefaults.secondSection),{background:Q.secondBg,border:"1.5px solid ".concat(Q.secondBorder)}),z.secondSection)},{children:v||""}))})),t.jsx("div",e.__assign({style:e.__assign(e.__assign({},i.default.RedlineCardDefaults.actionsContainer),z.actionsContainer)},{children:Q.actions.map(function(s){return t.jsx(_,{icon:s.icon,label:s.label,onClick:s.onClick,customStyle:e.__assign(e.__assign({},s.style),z.actionBtn),disabled:S||s.disabled,disabledStyle:z.actionBtnDisabled},s.label)})}))]}))]}))},exports.ReinstateIcon=h,exports.RejectedIcon=a,exports.UserApprovedIcon=l,exports.UserRejectedIcon=c,exports.formatDate=o;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),s=require("lucide-react"),i=require("react"),n=require("./PopupDefaults.js"),o=require("@mui/material");function r(e){var t=new Date(e);return isNaN(t.getTime())?e:new Date(e).toLocaleString("en-US",{month:"2-digit",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0}).replace(" AM","AM").replace(" PM","PM")}var a=function(){return t.jsxs("svg",e.__assign({width:"22",height:"22",viewBox:"0 0 22 22",fill:"none"},{children:[t.jsx("circle",{cx:"11",cy:"11",r:"10",stroke:"#22c55e",strokeWidth:"2",fill:"#f0fdf4"}),t.jsx("path",{d:"M6.5 11.5l3 3 6-6",stroke:"#22c55e",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))},l=function(){return t.jsxs("svg",e.__assign({width:"22",height:"22",viewBox:"0 0 22 22",fill:"none"},{children:[t.jsx("circle",{cx:"11",cy:"11",r:"10",stroke:"#ef4444",strokeWidth:"2",fill:"#fff1f2"}),t.jsx("path",{d:"M7.5 7.5l7 7M14.5 7.5l-7 7",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round"})]}))},d=function(){return t.jsx("svg",e.__assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},{children:t.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#94a3b8",strokeWidth:"1.8",strokeLinecap:"round"})}))},c=function(){return t.jsxs("svg",e.__assign({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},{children:[t.jsx("circle",{cx:"6.5",cy:"5.5",r:"2.5",stroke:"#94a3b8",strokeWidth:"1.4"}),t.jsx("path",{d:"M1.5 13.5c0-3.038 2.462-5.5 5-5.5s5 2.462 5 5.5",stroke:"#94a3b8",strokeWidth:"1.4",strokeLinecap:"round"}),t.jsx("path",{d:"M11 8.5l1.5 1.5 2.5-2.5",stroke:"#22c55e",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]}))},g=function(){return t.jsxs("svg",e.__assign({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},{children:[t.jsx("circle",{cx:"6.5",cy:"5.5",r:"2.5",stroke:"#94a3b8",strokeWidth:"1.4"}),t.jsx("path",{d:"M1.5 13.5c0-3.038 2.462-5.5 5-5.5s5 2.462 5 5.5",stroke:"#94a3b8",strokeWidth:"1.4",strokeLinecap:"round"}),t.jsx("path",{d:"M11.5 8l3 3m0-3l-3 3",stroke:"#ef4444",strokeWidth:"1.4",strokeLinecap:"round"})]}))},u=function(s){var i=s.open;return t.jsx("svg",e.__assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",style:{transform:i?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.25s ease"}},{children:t.jsx("path",{d:"M4.5 11.25L9 6.75l4.5 4.5",stroke:"#64748b",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}))},x=function(s){var i=s.color,n=void 0===i?"#3b82f6":i;return t.jsxs("svg",e.__assign({width:"15",height:"15",viewBox:"0 0 16 16",fill:"none"},{children:[t.jsx("path",{d:"M1.5 8A6.5 6.5 0 1 0 4 3.2",stroke:n,strokeWidth:"1.5",strokeLinecap:"round"}),t.jsx("path",{d:"M1.5 3.5v4h4",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M8 5v3.5l2 1.5",stroke:n,strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}))},f=function(){return t.jsxs("svg",e.__assign({width:"15",height:"15",viewBox:"0 0 16 16",fill:"none"},{children:[t.jsx("path",{d:"M13.5 8a5.5 5.5 0 1 0-1.6 3.9",stroke:"#3b82f6",strokeWidth:"1.5",strokeLinecap:"round"}),t.jsx("path",{d:"M13.5 13v-4.5H9",stroke:"#3b82f6",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}))},h=function(){return t.jsxs("svg",e.__assign({width:"15",height:"15",viewBox:"0 0 16 16",fill:"none"},{children:[t.jsx("path",{d:"M2 8h12M10 4l4 4-4 4",stroke:"#64748b",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M4 5l-2 3 2 3",stroke:"#64748b",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}))};function _(s){var i=s.title,n=s.open,o=s.onToggle,r=s.children;return t.jsxs("div",{children:[t.jsxs("div",e.__assign({onClick:o,style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",userSelect:"none",padding:"2px 0"}},{children:[t.jsx("span",e.__assign({style:{fontSize:14,fontWeight:700,color:"#1e293b",letterSpacing:"-0.01em"}},{children:i})),t.jsx(u,{open:n})]})),t.jsx("div",e.__assign({style:{maxHeight:n?100:0,opacity:n?1:0,transition:"max-height 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.25s"}},{children:n&&t.jsx(t.Fragment,{children:r})}))]})}function p(s){var i=s.icon,n=s.label,o=s.onClick,r=s.customStyle,a=void 0===r?{}:r,l=s.disabled,d=void 0!==l&&l,c=s.disabledStyle,g=void 0===c?{}:c,u=e.__assign(e.__assign({display:"flex",alignItems:"center",gap:10,padding:"8px 16px",background:"#f8fafc",border:"1.5px solid #e2e8f0",borderRadius:10,cursor:d?"not-allowed":"pointer",fontSize:"12px",fontWeight:600,color:"#475569",fontFamily:"inherit",transition:"background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s",whiteSpace:"nowrap",opacity:d?.5:1},a),d?g:{});return t.jsxs("button",e.__assign({onClick:d?void 0:o,disabled:d,style:u,onMouseEnter:function(e){d||(e.currentTarget.style.background="#f1f5f9",e.currentTarget.style.transform="translateY(-1px)",e.currentTarget.style.boxShadow="0 2px 8px rgba(0,0,0,0.07)")},onMouseLeave:function(e){d||(e.currentTarget.style.background="#f8fafc",e.currentTarget.style.transform="",e.currentTarget.style.boxShadow="")}},{children:[i,n]}))}exports.ApprovedIcon=a,exports.ChevronIcon=u,exports.CloseIcon=d,exports.HistoryIcon=x,exports.IterateIcon=h,exports.RedlineCard=function(u){var j,k=u.status,b=u.onClose,v=u.impactText,y=u.secondText,m=u.actionTakenByName,B=u.actionTakenAtTime,C=void 0===B?"NA":B,L=u.onHistory,S=u.onIterate,w=u.onReinstate,R=u.onRevert,I=u.disableAllActions,T=void 0!==I&&I,W=u.impactTitle,M=void 0===W?"Impact":W,D=u.customConfigs,A=void 0===D?{}:D,z=u.customStyles,U=void 0===z?{}:z,H=u.secondaryTitle,N=i.useState(!0),q=N[0],F=N[1],O=i.useState(!0),E=O[0],P=O[1],Y=i.useState(!1),G=Y[0],J=Y[1],K={headerBg:"#f0fdf4",headerBorder:"#dcfce7",titleColor:"#166534",label:"Redline Approved",metaLabel:"Approved By",UserIcon:t.jsx(c,{}),StatusIcon:t.jsx(a,{}),secondTitle:"Original text",secondBg:"#f8fafc",secondBorder:"#e2e8f0",impactBox:!0,actions:[{icon:t.jsx(x,{}),label:"History",onClick:L},{icon:t.jsx(s.Undo2,{size:17}),label:"Revert",onClick:R},{icon:t.jsx(h,{}),label:"Iterate",onClick:S}],fallbackText:"No original text available"},Q={headerBg:"#fff1f2",headerBorder:"#fecdd3",titleColor:"#991b1b",label:"Redline Rejected",metaLabel:"Rejected By",UserIcon:t.jsx(g,{}),StatusIcon:t.jsx(l,{}),secondTitle:"Rejected Recommendation",secondBg:"#f8fafc",secondBorder:"#e2e8f0",impactBox:!1,actions:[{icon:t.jsx(x,{color:"#3b82f6"}),label:"History",onClick:L},{icon:t.jsx(f,{}),label:"Reinstate",onClick:w},{icon:t.jsx(h,{}),label:"Iterate",onClick:S}],fallbackText:"No rejected recommendation available"},V={headerBg:"#E2E8F0",headerBorder:"none",titleColor:"#1E293B",label:"Redline Reverted",metaLabel:"Reverted By",UserIcon:t.jsx(c,{}),StatusIcon:t.jsx(s.Undo2,{size:17}),secondTitle:"Reverted redline",secondBg:"#F9FAFB",secondBorder:"#D0D5DD",impactBox:!1,actions:[{icon:t.jsx(x,{}),label:"History",onClick:L},{icon:t.jsx(h,{}),label:"Iterate",onClick:S}],fallbackText:"No reverted redline available"};j="accepted"===k?K:"rejected"===k?Q:V;var X=e.__assign(e.__assign({},j),A[k]||{});return t.jsxs("div",e.__assign({style:e.__assign(e.__assign(e.__assign({},n.default.RedlineCardDefaults.root),{animation:G?"slideOut 0.26s cubic-bezier(0.4,0,1,1) forwards":n.default.RedlineCardDefaults.root.animation||"slideIn 0.32s cubic-bezier(0.22,1,0.36,1) both"}),U.root)},{children:[t.jsxs("div",e.__assign({style:e.__assign(e.__assign(e.__assign({},n.default.RedlineCardDefaults.header),{background:X.headerBg,borderBottom:"1.5px solid ".concat(X.headerBorder)}),U.header)},{children:[t.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:10}},{children:[t.jsx("div",e.__assign({style:{display:"flex",alignItems:"center",justifyContent:"center"}},{children:X.StatusIcon})),t.jsxs("div",{children:[t.jsx("span",e.__assign({style:{fontSize:15,fontWeight:700,color:X.titleColor,letterSpacing:"-0.01em"}},{children:X.label})),t.jsx(o.Tooltip,e.__assign({title:H},{children:t.jsx("span",e.__assign({style:{display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",fontSize:12,color:"gray"}},{children:H}))}))]})]})),t.jsx("button",e.__assign({onClick:function(){J(!0),b()},style:{background:"none",border:"none",cursor:"pointer",padding:4,borderRadius:6,display:"flex",alignItems:"center"}},{children:t.jsx(d,{})}))]})),t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},n.default.RedlineCardDefaults.body),U.body)},{children:[t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},n.default.RedlineCardDefaults.meta),U.meta)},{children:[t.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:6,marginBottom:5}},{children:[X.UserIcon,t.jsx("span",e.__assign({style:{fontSize:12.5,color:"#94a3b8",fontWeight:500}},{children:X.metaLabel}))]})),t.jsxs("div",e.__assign({style:{fontSize:14,fontWeight:700,color:"#1e293b",letterSpacing:"-0.01em"}},{children:[t.jsx(o.Tooltip,e.__assign({title:m},{children:t.jsx("span",e.__assign({style:{display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden"}},{children:m}))})),t.jsx("span",{children:r(C)})]}))]})),t.jsx("div",{style:e.__assign(e.__assign({},n.default.RedlineCardDefaults.divider),U.divider)}),t.jsx(_,e.__assign({title:M,open:q,onToggle:function(){return F(function(e){return!e})}},{children:t.jsx("p",e.__assign({style:e.__assign(e.__assign({},n.default.RedlineCardDefaults.impactText),U.impactText)},{children:v||""}))})),t.jsx("div",{style:e.__assign(e.__assign({},n.default.RedlineCardDefaults.divider),U.divider)}),t.jsx(_,e.__assign({title:X.secondTitle,open:E,onToggle:function(){return P(function(e){return!e})}},{children:y?t.jsx("div",e.__assign({style:e.__assign(e.__assign(e.__assign({},n.default.RedlineCardDefaults.secondSection),{background:X.secondBg,border:"1.5px solid ".concat(X.secondBorder)}),U.secondSection)},{children:y})):t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},n.default.RedlineCardDefaults.fallbackSectionStyle),U.fallbackSectionStyle)},{children:[X.fallbackText," "]}))})),t.jsx("div",e.__assign({style:e.__assign(e.__assign({},n.default.RedlineCardDefaults.actionsContainer),U.actionsContainer)},{children:X.actions.map(function(s){return t.jsx(p,{icon:s.icon,label:s.label,onClick:s.onClick,customStyle:e.__assign(e.__assign({},s.style),U.actionBtn),disabled:T||s.disabled,disabledStyle:U.actionBtnDisabled},s.label)})}))]}))]}))},exports.ReinstateIcon=f,exports.RejectedIcon=l,exports.UserApprovedIcon=c,exports.UserRejectedIcon=g,exports.formatDate=r;
|
|
2
2
|
//# sourceMappingURL=RedlineStatusCard.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"),s=require("lucide-react"),i=require("showdown"),l=require("@mui/material"),r=require("uuid"),o=require("./UserStoryCard.module.css.js"),a=require("../../utils/helpers.js"),u=require("../../utils/user-story.utils.js"),d=require("../../shared/AtomicButton.js"),c=require("../RichTextEditor/RichTextEditor.js"),f=require("../userstory-with-citation/UserStoryWithCitation.js"),v=require("../RequirementAIWrapper/RequirementAIWrapper.js"),_=require("../story-screen/BigEnoughPanel.js"),g=require("./TitleEditor/TitleEditor.js");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=y(i);function m(n){for(var i,o=[],a=/<learned>(.*?)<\/learned>/g,u=0,d=0;null!==(i=a.exec(n));){var c=i[1],f=i.index;f>u&&o.push(t.jsx("span",{children:n.slice(u,f)},"text-pre-".concat(d++))),o.push(t.jsx(l.Tooltip,e.__assign({title:c,placement:"top"},{children:t.jsx(s.Info,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(r.v4()))),u=a.lastIndex}return u<(null==n?void 0:n.length)&&o.push(t.jsx("span",{children:n.slice(u)},"text-post-".concat(d++))),o}function p(t,n,s){var i;if(!t)return{};if(n)return e.__assign({},t.parentConfig);var l=e.__assign({},t.childConfig);return s&&(null===(i=t.subFeatureOverrides)||void 0===i?void 0:i[s])?e.__assign(e.__assign({},l),t.subFeatureOverrides[s]):l}var x=function(n){var i,l=n.displayName,r=v.useRequirementAI().customStyles,a=null===(i=null==r?void 0:r.userStoryCardStyles)||void 0===i?void 0:i.showDisplayName;return t.jsxs("div",e.__assign({className:o.default.displayName,style:null==a?void 0:a.wrapper},{children:[t.jsx(s.Bookmark,{className:o.default.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),t.jsxs("span",e.__assign({style:null==a?void 0:a.label},{children:[l,":"]}))]}))},S=function(i){var y,C,I,j,w,b,N,B=i.isUserStoryCurrentlyUpdated,D=i.artifactId,U=i.artifactTitleId,k=i.parentUserStory,E=i.currentUserStory,M=i.onUserStoryChange,A=i.parentIndex,T=i.currentIndex,q=i.enableDownload,P=i.isDiffEditReviewMode,R=i.showUserStoryDiff,L=i.handleDownloadUserStory,H=i.handleOpenSendDialog,V=i.updateUserStoryArtifact,W=i.selectedArtifactId,z=i.isDisplayHighlightControl,O=i.elementDisplayConfig,F=i._resolvedConfig,G=i.showWrapper,Q=void 0!==G&&G,Z=i.actionItemsConfig,J=i.onDelete,K=i.contextVariant,X=v.useRequirementAI(),Y=X.searchQueryList,$=X.citations,ee=X.customStyles,te=null==ee?void 0:ee.userStoryCardStyles,ne=null===(y=null==ee?void 0:ee.userStoryCardStyles)||void 0===y?void 0:y.userStoryEditStyles,se=null===(C=null==ee?void 0:ee.userStoryScreenStyles)||void 0===C?void 0:C.userStoryContentStyles,ie=null==te?void 0:te.progressHeaderStyles,le=n.useState(e.__assign(e.__assign({},structuredClone(E)),{value:a.formatMarkdown(E.value)||""})),re=le[0],oe=le[1],ae=n.useState({userStory:!!E.isDefaultEdit}),ue=ae[0],de=ae[1],ce=n.useState(!1),fe=ce[0],ve=ce[1],_e=n.useState(null),ge=_e[0],ye=_e[1],he=v.useRequirementAI(),me=he.userStory,pe=he.customIcons,xe=n.useState(""===A||W===E.artifactId||!!E.isDefaultOpen),Se=xe[0],Ce=xe[1],Ie=n.useState(!1);Ie[0];var je=Ie[1],we=n.useState(null),be=we[0],Ne=we[1],Be=n.useState(null),De=Be[0],Ue=Be[1],ke=n.useState(!1),Ee=ke[0],Me=ke[1],Ae=n.useRef(null),Te=n.useState(!1);Te[0];var qe=Te[1],Pe=n.useRef(null);n.useEffect(function(){B&&Ce(B)},[B]),n.useEffect(function(){oe(e.__assign(e.__assign({},structuredClone(E)),{value:a.formatMarkdown(E.value)||""}))},[E]),n.useEffect(function(){Y.length>0?Ce(!0):W&&Ce(W===E.artifactId)},[Y,W,E.artifactId]);var Re=function(){Ne(null)},Le=function(){Ue(null)},He=function(){Ce(function(e){return!e})};var Ve=null!=(null==E?void 0:E.big_enough)&&!Number.isNaN(E.big_enough)&&!!(null==E?void 0:E.big_enough_decision_factors),We=""===A,ze=null!=F?F:p(O,We),Oe=!P&&!R;return n.useEffect(function(){if(ge){var e=setTimeout(function(){var e=document.getElementById("story-card-".concat(ge));null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return function(){return clearTimeout(e)}}},[ge]),n.useEffect(function(){E.isDefaultEdit&&de(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})},[E.isDefaultEdit]),t.jsxs("div",e.__assign({className:o.default.card,style:null==te?void 0:te.cardStyle,id:"story-card-".concat(E.title),"data-expanded":Se},{children:[t.jsxs("div",e.__assign({className:o.default.titleSection,style:null==te?void 0:te.titleSection},{children:[t.jsxs("div",e.__assign({className:o.default.titleRow,style:null==te?void 0:te.titleRow,onClick:He},{children:[t.jsxs("div",e.__assign({className:o.default.titleLeft,style:null==te?void 0:te.titleLeft,onMouseEnter:function(){return qe(!0)},onMouseLeave:function(){return qe(!1)}},{children:[t.jsx(x,{displayName:U}),fe&&Oe?t.jsx(g.InlineTitleEditor,{title:E.title,onSave:function(t){return function(t,n){return e.__awaiter(void 0,void 0,void 0,function(){var s,i;return e.__generator(this,function(l){try{s=e.__assign({},E),E.artifactId===n?s.title=t:s.sub_features=(null===(i=E.sub_features)||void 0===i?void 0:i.map(function(s){return s.artifactId===n?e.__assign(e.__assign({},s),{title:t}):s}))||[],oe(s),M(s),ve(!1)}catch(e){console.error("Failed to save title",e)}return[2]})})}(t,E.artifactId)},onCancel:function(){ve(!1)},inputStyle:null==ne?void 0:ne.inlineTitleInput,confirmButtonStyle:null==ne?void 0:ne.inlineTitleConfirm,cancelButtonStyle:null==ne?void 0:ne.inlineTitleCancel},"inline-title-editor"):t.jsxs("div",e.__assign({className:o.default.storyTitleWrapper},{children:[t.jsx("h2",e.__assign({title:E.title,className:o.default.storyTitle,style:null==te?void 0:te.storyTitle},{children:m(E.title)}),E.artifactId),t.jsx("button",e.__assign({type:"button",className:o.default.titleEditButton,style:null==ne?void 0:ne.titleEditButton,onClick:function(e){e.stopPropagation(),ve(!0),Se||Ce(!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"})}))}))]}))]})),t.jsxs("div",e.__assign({className:o.default.titleActions,style:null==te?void 0:te.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(ze.showProgressPercentage||ze.showGapBox)&&Q&&t.jsxs("div",e.__assign({className:o.default.progressHeader,style:null==ie?void 0:ie.wrapper},{children:[ze.showProgressPercentage&&t.jsxs("div",e.__assign({className:o.default.progressPercentage,style:null==ie?void 0:ie.percentage},{children:[null!==(j=null!==(I=null==E?void 0:E.confidenceScore)&&void 0!==I?I:null==ze?void 0:ze.confidenceValue)&&void 0!==j?j:"0","%"]})),ze.showGapBox&&t.jsxs("div",e.__assign({className:o.default.gapBox,style:null==ie?void 0:ie.gapBox},{children:[null!==(b=null!==(w=null==E?void 0:E.gapValue)&&void 0!==w?w:null==ze?void 0:ze.gapBoxValue)&&void 0!==b?b:"2"," ","Gaps"]}))]})),Ve&&t.jsx(_.BigEnoughPanel,{customIcons:null==pe?void 0:pe.userStoryIcons,customStyles:null==te?void 0:te.aiReasoningCitaionStyles,currentUserStory:E,panelStyles:null==te?void 0:te.BigEnoughStyles}),!ue.userStory&&t.jsxs(t.Fragment,{children:[!1!==(null==ze?void 0:ze.showShareButton)&&t.jsx("button",e.__assign({className:o.default.iconButton,style:null==te?void 0:te.iconButton,onClick:function(e){Ne(e.currentTarget)}},{children:t.jsx(s.ExternalLink,{size:16})})),t.jsxs(l.Menu,e.__assign({id:"user-story-share-menu",anchorEl:be,open:!!be,onClose:function(){return Ne(null)},style:null==te?void 0:te.userStoryShareMenu},{children:[q&&t.jsx(l.MenuItem,e.__assign({style:null==te?void 0:te.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 je(!0),L?[4,Promise.all([L("pdf"),L("doc")])]:[2];case 1:return e.sent(),je(!1),[2]}})})}},{children:t.jsxs("div",e.__assign({ref:Ae,className:o.default.menuItemContent,style:null==te?void 0:te.menuItemContent},{children:[t.jsx(s.Download,{size:16,color:null==te?void 0:te.menuIconColor}),t.jsx("p",e.__assign({style:null==te?void 0:te.menuLabel},{children:"Download"}))]}))})),t.jsx(l.MenuItem,e.__assign({style:null==te?void 0:te.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(n){return t=E,k&&(t=e.__assign(e.__assign({},E),{value:"".concat(u.replaceTitleSection(null==k?void 0:k.value,E.title)," \n").concat(E.value)})),null==H||H(!0,[t],E.artifactId),Re(),[2]})})}},{children:t.jsxs("div",e.__assign({style:null==te?void 0:te.menuItemContent,className:o.default.menuItemContentPadded},{children:[t.jsx(s.Share2,{size:16,color:null==te?void 0:te.menuIconColor}),t.jsx("p",e.__assign({style:null==te?void 0:te.menuLabel},{children:"Send"}))]}))})),t.jsx(l.MenuItem,e.__assign({style:null==te?void 0:te.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t,n,s,i,l;return e.__generator(this,function(e){switch(e.label){case 0:t=new h.default.Converter,n=t.makeHtml(a.formatMarkdown(E.value)||E.value),s=function(e){var t=(new h.default.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(a.formatMarkdown(E.value)||E.value),i=new ClipboardItem({"text/plain":new Blob([s],{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([i])];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 Re(),[7];case 5:return[2]}})})}},{children:t.jsxs("div",e.__assign({style:null==te?void 0:te.menuItemContent,className:o.default.menuItemContentPadded},{children:[t.jsx(s.Copy,{size:16,color:null==te?void 0:te.menuIconColor}),t.jsx("p",e.__assign({style:null==te?void 0:te.menuLabel},{children:"Copy"}))]}))}))]}))]}),ue.userStory&&Se?t.jsx(d.default,{type:"outline",children:"Cancel",style:null==te?void 0:te.cancelButton,onClick:function(){var t;null===(t=Pe.current)||void 0===t||t.abort(),de(function(t){return e.__assign(e.__assign({},t),{userStory:!1})})}}):t.jsx(t.Fragment,{}),ue.userStory&&Se?t.jsx(d.default,{type:"fill",children:Ee?t.jsxs("span",e.__assign({className:o.default.savingSpinner,style:null==te?void 0:te.savingSpinner},{children:[t.jsx(s.LoaderCircle,{className:o.default.spinAnimation,style:null==te?void 0:te.spinAnimation}),t.jsx("span",{children:"Saving..."})]})):"Save",isDisable:Ee,style:Ee?null==te?void 0:te.savingButton:null==te?void 0:te.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 Me(!0),"userStory"==="userStory"&&(M(re),console.log("I am changing RTE editor values",re)),[4,V($,me,D,null===(t=Pe.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),M(e.__assign(e.__assign({},re),{isDefaultEdit:!1})),de(function(t){return e.__assign(e.__assign({},t),{userStory:!1})}),Me(!1),[2]}})})}}):!P&&!R&&Se&&!1!==(null==ze?void 0:ze.showEditButton)&&t.jsx("button",e.__assign({className:o.default.iconButton,style:null==te?void 0:te.editButton,onClick:function(){return de(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})}},{children:t.jsx(s.PencilIcon,{color:null==te?void 0:te.pencilIconColor,size:16})})),We&&Se&&!P&&!R&&!1!==(null==ze?void 0:ze.showEditButton)&&t.jsxs("button",e.__assign({type:"button",className:o.default.addSectionButton,style:null==ne?void 0:ne.addSectionButton,onClick:function(t){var n,s,i;t.stopPropagation();var l=(null!==(s=null===(n=E.sub_features)||void 0===n?void 0:n.length)&&void 0!==s?s:0)+1,o={artifactId:r.v4(),title:"New Section ".concat(l),value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},a=e.__assign(e.__assign({},E),{sub_features:e.__spreadArray(e.__spreadArray([],null!==(i=E.sub_features)&&void 0!==i?i:[],!0),[o],!1)});oe(a),M(a),Ce(!0),ye(o.title)},"aria-label":"Add section",title:"Add section"},{children:[t.jsx(s.Plus,{size:14}),t.jsx("span",e.__assign({className:o.default.addSectionLabel},{children:"Add Section"}))]})),!We&&!P&&!R&&t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),null==J||J()},className:o.default.iconButton,style:null==ne?void 0:ne.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:t.jsx(s.Trash2,{size:16})})),(null==ze?void 0:ze.actionItemsButton)&&t.jsxs(t.Fragment,{children:[t.jsx("span",e.__assign({className:o.default.actionItemBtn,style:null==te?void 0:te.actionItemBtn,onClick:function(e){e.stopPropagation(),Ue(e.currentTarget)}},{children:t.jsx(s.Ellipsis,{})})),t.jsx(l.Menu,e.__assign({id:"user-story-action-menu",anchorEl:De,open:!!De,onClose:Le,style:null==te?void 0:te.userStoryShareMenu},{children:null==Z?void 0:Z.items.map(function(n,s){return t.jsx(l.MenuItem,e.__assign({style:null==te?void 0:te.userStoryMenuItem,onClick:function(){n.onclick(E),Le()}},{children:t.jsxs("div",e.__assign({className:o.default.menuItemContent,style:e.__assign(e.__assign({},null==te?void 0:te.menuItemContent),!n.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[t.jsx("span",e.__assign({className:o.default.menuItemIcon,style:null==te?void 0:te.menuItemIcon},{children:n.icon})),t.jsx("p",e.__assign({style:null==te?void 0:te.menuLabel},{children:n.name})),t.jsx("span",{className:o.default.menuItemRight,style:null==te?void 0:te.menuItemRight})]}))}),"action-item-".concat(s,"-").concat(n.name))})}))]}),t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),He()},style:null==te?void 0:te.chevronButton,className:o.default.chevronButton},{children:Se?t.jsx(s.ChevronUp,{className:o.default.chevronIcon,color:null==te?void 0:te.chevronIconColor}):t.jsx(s.ChevronDown,{className:o.default.chevronIcon,color:null==te?void 0:te.chevronIconColor})}))]}))]})),t.jsx("div",{className:o.default.divider,style:null==te?void 0:te.dividerStyle})]})),Se&&t.jsx("div",e.__assign({className:o.default.cardContent,style:null==te?void 0:te.cardContentStyle},{children:t.jsxs("div",e.__assign({className:o.default.contentInner,style:null==te?void 0:te.contentInner},{children:[t.jsxs("div",e.__assign({className:o.default.descriptionSection,style:null==te?void 0:te.descriptionSection},{children:[t.jsx("div",{className:o.default.justifyBetween,style:null==te?void 0:te.justifyBetween}),ue.userStory?t.jsx(c.default,{minHeight:"100%",height:"100%",type:"string",value:a.formatMarkdown(E.value)||"",handleUpdateState:function(t,n){var s=a.indentMarkdown(n);oe(function(t){return e.__assign(e.__assign({},t),{value:s||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:ue.userStory?"edit":"readOnly"}):t.jsx(f.default,{showUserStoryDiff:R,isParent:""===A,message:a.formatMarkdown(E.value)||"",artifactId:E.artifactId,customStyles:se,isDisplayHighlightControl:z,contextVariant:K})]})),null===(N=re.sub_features)||void 0===N?void 0:N.map(function(n,s){var i=p(O,!1,n.artifactId);return t.jsx(S,{artifactId:D,isUserStoryCurrentlyUpdated:B,artifactTitleId:"".concat(U,"-").concat(String.fromCharCode(65+s)),parentUserStory:E,parentIndex:"".concat(A).concat(A&&".").concat(T),currentIndex:"".concat(s+1),doNotShowBorderInViewMode:!1,currentUserStory:n,onUserStoryChange:function(t){return function(t,n){var s=e.__spreadArray([],E.sub_features||[],!0);s[t]=n,M(e.__assign(e.__assign({},E),{sub_features:s}))}(s,t)},enableDownload:!0,isDiffEditReviewMode:P,showUserStoryDiff:R,updateUserStoryArtifact:V,handleDownloadUserStory:L,handleOpenSendDialog:H,isDisplayHighlightControl:z,elementDisplayConfig:O,_resolvedConfig:i,actionItemsConfig:Z,onDelete:function(){return function(t){var n=(E.sub_features||[]).filter(function(e,n){return n!==t}),s=e.__assign(e.__assign({},E),{sub_features:n});oe(s),M(s)}(s)}},n.artifactId)})]}))}))]}))};exports.StoryCard=S,exports.UserStoryCardWrapper=function(n){var i=n.artifactTitleIDs,l=n.isDiffEditReviewMode,r=n.showUserStoryDiff,a=n.updateUserStoryArtifact,u=n.isUserStoryCurrentlyUpdated,d=n.artifactId,c=n.handleOpenSendDialog,f=n.handleDownloadUserStory,_=n.selectedArtifactId,g=n.isDisplayHighlightControl,y=n.elementDisplayConfig,h=n.showWrapper,m=n.actionItemsConfig,x=n.contextVariant,C=v.useRequirementAI(),I=C.userStory,j=C.setUserStory,w=C.customStyles,b=C.searchQueryList,N=C.currentHighlightIndex,B=C.setCurrentHighlightIndex;C.segmentComponentConfig;var D=null==w?void 0:w.userStoryCardStyles,U=0===N,k=N===b.length-1;return t.jsxs("div",e.__assign({className:o.default.userStoryCardWrapper,style:g?e.__assign(e.__assign({},null==D?void 0:D.userStoryCardWrapper),{position:"relative"}):null==D?void 0:D.userStoryCardWrapper},{children:[g&&t.jsx(t.Fragment,{children:b.length>0&&t.jsx("div",e.__assign({className:o.default.wrapper},{children:t.jsx("div",e.__assign({className:o.default.highlightNavigation},{children:t.jsxs("div",e.__assign({className:o.default.navigationContainer},{children:[t.jsxs("span",e.__assign({className:o.default.navCounter},{children:[N+1," of ",b.length]})),t.jsxs("div",e.__assign({className:o.default.navButtons},{children:[t.jsx("button",e.__assign({onClick:function(){N>0&&B(function(e){return e-1})},className:o.default.navButton,disabled:U},{children:t.jsx(s.ChevronUpIcon,{size:20,className:o.default.navIcon})})),t.jsx("button",e.__assign({onClick:function(){N<b.length-1&&B(function(e){return e+1})},className:o.default.navButton,disabled:k},{children:t.jsx(s.ChevronDownIcon,{size:20,className:o.default.navIcon})}))]}))]}))}))}))}),I.map(function(n,s){var o=p(y,!0);return t.jsx(S,{isUserStoryCurrentlyUpdated:u,artifactId:d,artifactTitleId:i[s]||"",currentUserStory:n,onUserStoryChange:function(t){j(function(n){return n[s]=t,e.__spreadArray([],n,!0)})},parentIndex:"",currentIndex:"".concat(s+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:l,showUserStoryDiff:r,updateUserStoryArtifact:a,handleOpenSendDialog:c,handleDownloadUserStory:f,selectedArtifactId:_,isDisplayHighlightControl:g,elementDisplayConfig:y,_resolvedConfig:o,showWrapper:h,actionItemsConfig:m,contextVariant:x},n.artifactId)})]}))},exports.default=S,exports.replaceLearnedTagsWithInfo=m;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),s=require("lucide-react"),i=require("showdown"),o=require("@mui/material"),l=require("uuid"),r=require("./UserStoryCard.module.css.js"),a=require("../../utils/helpers.js"),u=require("../../utils/user-story.utils.js"),d=require("../../shared/AtomicButton.js"),c=require("../RichTextEditor/RichTextEditor.js"),f=require("../userstory-with-citation/UserStoryWithCitation.js"),v=require("../RequirementAIWrapper/RequirementAIWrapper.js"),_=require("../story-screen/BigEnoughPanel.js"),g=require("./TitleEditor/TitleEditor.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var y=h(i);function p(n){for(var i,r=[],a=/<learned>(.*?)<\/learned>/g,u=0,d=0;null!==(i=a.exec(n));){var c=i[1],f=i.index;f>u&&r.push(t.jsx("span",{children:n.slice(u,f)},"text-pre-".concat(d++))),r.push(t.jsx(o.Tooltip,e.__assign({title:c,placement:"top"},{children:t.jsx(s.Info,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(l.v4()))),u=a.lastIndex}return u<(null==n?void 0:n.length)&&r.push(t.jsx("span",{children:n.slice(u)},"text-post-".concat(d++))),r}function m(t,n,s){var i;if(!t)return{};if(n)return e.__assign({},t.parentConfig);var o=e.__assign({},t.childConfig);return s&&(null===(i=t.subFeatureOverrides)||void 0===i?void 0:i[s])?e.__assign(e.__assign({},o),t.subFeatureOverrides[s]):o}var S=function(n){var i,o=n.displayName,l=v.useRequirementAI().customStyles,a=null===(i=null==l?void 0:l.userStoryCardStyles)||void 0===i?void 0:i.showDisplayName;return t.jsxs("div",e.__assign({className:r.default.displayName,style:null==a?void 0:a.wrapper},{children:[t.jsx(s.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:[o,":"]}))]}))},x=function(i){var h,C,I,j,w,N,b,B=i.isUserStoryCurrentlyUpdated,D=i.artifactId,E=i.artifactTitleId,U=i.parentUserStory,k=i.currentUserStory,T=i.onUserStoryChange,M=i.parentIndex,A=i.currentIndex,q=i.enableDownload,P=i.isDiffEditReviewMode,R=i.showUserStoryDiff,L=i.handleDownloadUserStory,H=i.handleOpenSendDialog,V=i.updateUserStoryArtifact,W=i.selectedArtifactId,z=i.isDisplayHighlightControl,O=i.elementDisplayConfig,F=i._resolvedConfig,G=i.showWrapper,Q=void 0!==G&&G,Z=i.actionItemsConfig,J=i.onDelete,K=i.contextVariant,X=i.showDisplayName,Y=void 0===X||X,$=i.allowTitleEdit,ee=void 0===$||$,te=i.showConfidenceScore,ne=void 0===te||te,se=i.showBorderTop,ie=void 0===se||se,oe=v.useRequirementAI(),le=oe.searchQueryList,re=oe.citations,ae=oe.customStyles,ue=null==ae?void 0:ae.userStoryCardStyles,de=null===(h=null==ae?void 0:ae.userStoryCardStyles)||void 0===h?void 0:h.userStoryEditStyles,ce=null===(C=null==ae?void 0:ae.userStoryScreenStyles)||void 0===C?void 0:C.userStoryContentStyles,fe=null==ue?void 0:ue.progressHeaderStyles,ve=n.useState(e.__assign(e.__assign({},structuredClone(k)),{value:a.formatMarkdown(k.value)||""})),_e=ve[0],ge=ve[1],he=n.useState({userStory:!!k.isDefaultEdit}),ye=he[0],pe=he[1],me=n.useState(!1),Se=me[0],xe=me[1],Ce=n.useState(null),Ie=Ce[0],je=Ce[1],we=v.useRequirementAI(),Ne=we.userStory,be=we.customIcons,Be=n.useState(""===M||W===k.artifactId||!!k.isDefaultOpen),De=Be[0],Ee=Be[1],Ue=n.useState(!1);Ue[0];var ke=Ue[1],Te=n.useState(null),Me=Te[0],Ae=Te[1],qe=n.useState(null),Pe=qe[0],Re=qe[1],Le=n.useState(!1),He=Le[0],Ve=Le[1],We=n.useRef(null),ze=n.useState(!1);ze[0];var Oe=ze[1],Fe=n.useRef(null);n.useEffect(function(){B&&Ee(B)},[B]),n.useEffect(function(){ge(e.__assign(e.__assign({},structuredClone(k)),{value:a.formatMarkdown(k.value)||""}))},[k]),n.useEffect(function(){le.length>0?Ee(!0):W&&Ee(W===k.artifactId)},[le,W,k.artifactId]);var Ge=function(){Ae(null)},Qe=function(){Re(null)},Ze=function(){Ee(function(e){return!e})};var Je=null!=(null==k?void 0:k.big_enough)&&!Number.isNaN(k.big_enough)&&!!(null==k?void 0:k.big_enough_decision_factors),Ke=""===M,Xe=null!=F?F:m(O,Ke),Ye=!P&&!R;return n.useEffect(function(){if(Ie){var e=setTimeout(function(){var e=document.getElementById("story-card-".concat(Ie));null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return function(){return clearTimeout(e)}}},[Ie]),n.useEffect(function(){k.isDefaultEdit&&pe(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})},[k.isDefaultEdit]),t.jsxs("div",e.__assign({className:r.default.card,style:null==ue?void 0:ue.cardStyle,id:"story-card-".concat(k.title),"data-expanded":De},{children:[t.jsxs("div",e.__assign({className:r.default.titleSection,style:null==ue?void 0:ue.titleSection},{children:[t.jsxs("div",e.__assign({className:r.default.titleRow,style:null==ue?void 0:ue.titleRow,onClick:Ze},{children:[t.jsxs("div",e.__assign({className:r.default.titleLeft,style:null==ue?void 0:ue.titleLeft,onMouseEnter:function(){return Oe(!0)},onMouseLeave:function(){return Oe(!1)}},{children:[Y&&t.jsx(S,{displayName:E}),Se&&Ye?t.jsx(g.InlineTitleEditor,{title:k.title,onSave:function(t){return function(t,n){return e.__awaiter(void 0,void 0,void 0,function(){var s,i;return e.__generator(this,function(o){try{s=e.__assign({},k),k.artifactId===n?s.title=t:s.sub_features=(null===(i=k.sub_features)||void 0===i?void 0:i.map(function(s){return s.artifactId===n?e.__assign(e.__assign({},s),{title:t}):s}))||[],ge(s),T(s),xe(!1)}catch(e){console.error("Failed to save title",e)}return[2]})})}(t,k.artifactId)},onCancel:function(){xe(!1)},inputStyle:null==de?void 0:de.inlineTitleInput,confirmButtonStyle:null==de?void 0:de.inlineTitleConfirm,cancelButtonStyle:null==de?void 0:de.inlineTitleCancel},"inline-title-editor"):t.jsxs("div",e.__assign({className:r.default.storyTitleWrapper},{children:[t.jsx("h2",e.__assign({title:k.title,className:r.default.storyTitle,style:null==ue?void 0:ue.storyTitle},{children:p(k.title)}),k.artifactId),ee&&t.jsx("button",e.__assign({type:"button",className:r.default.titleEditButton,style:null==de?void 0:de.titleEditButton,onClick:function(e){e.stopPropagation(),xe(!0),De||Ee(!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"})}))}))]}))]})),t.jsxs("div",e.__assign({className:r.default.titleActions,style:null==ue?void 0:ue.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(Xe.showProgressPercentage||Xe.showGapBox)&&Q&&t.jsxs("div",e.__assign({className:r.default.progressHeader,style:null==fe?void 0:fe.wrapper},{children:[Xe.showProgressPercentage&&t.jsxs("div",e.__assign({className:r.default.progressPercentage,style:null==fe?void 0:fe.percentage},{children:[null!==(j=null!==(I=null==k?void 0:k.confidenceScore)&&void 0!==I?I:null==Xe?void 0:Xe.confidenceValue)&&void 0!==j?j:"0","%"]})),Xe.showGapBox&&t.jsxs("div",e.__assign({className:r.default.gapBox,style:null==fe?void 0:fe.gapBox},{children:[null!==(N=null!==(w=null==k?void 0:k.gapValue)&&void 0!==w?w:null==Xe?void 0:Xe.gapBoxValue)&&void 0!==N?N:"2"," ","Gaps"]}))]})),Je&&t.jsx(_.BigEnoughPanel,{customIcons:null==be?void 0:be.userStoryIcons,customStyles:null==ue?void 0:ue.aiReasoningCitaionStyles,currentUserStory:k,panelStyles:null==ue?void 0:ue.BigEnoughStyles}),!ye.userStory&&t.jsxs(t.Fragment,{children:[!1!==(null==Xe?void 0:Xe.showShareButton)&&t.jsx("button",e.__assign({className:r.default.iconButton,style:null==ue?void 0:ue.iconButton,onClick:function(e){Ae(e.currentTarget)}},{children:t.jsx(s.ExternalLink,{size:16})})),t.jsxs(o.Menu,e.__assign({id:"user-story-share-menu",anchorEl:Me,open:!!Me,onClose:function(){return Ae(null)},style:null==ue?void 0:ue.userStoryShareMenu},{children:[q&&t.jsx(o.MenuItem,e.__assign({style:null==ue?void 0:ue.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 ke(!0),L?[4,Promise.all([L("pdf"),L("doc")])]:[2];case 1:return e.sent(),ke(!1),[2]}})})}},{children:t.jsxs("div",e.__assign({ref:We,className:r.default.menuItemContent,style:null==ue?void 0:ue.menuItemContent},{children:[t.jsx(s.Download,{size:16,color:null==ue?void 0:ue.menuIconColor}),t.jsx("p",e.__assign({style:null==ue?void 0:ue.menuLabel},{children:"Download"}))]}))})),t.jsx(o.MenuItem,e.__assign({style:null==ue?void 0:ue.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(n){return t=k,U&&(t=e.__assign(e.__assign({},k),{value:"".concat(u.replaceTitleSection(null==U?void 0:U.value,k.title)," \n").concat(k.value)})),null==H||H(!0,[t],k.artifactId),Ge(),[2]})})}},{children:t.jsxs("div",e.__assign({style:null==ue?void 0:ue.menuItemContent,className:r.default.menuItemContentPadded},{children:[t.jsx(s.Share2,{size:16,color:null==ue?void 0:ue.menuIconColor}),t.jsx("p",e.__assign({style:null==ue?void 0:ue.menuLabel},{children:"Send"}))]}))})),t.jsx(o.MenuItem,e.__assign({style:null==ue?void 0:ue.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t,n,s,i,o;return e.__generator(this,function(e){switch(e.label){case 0:t=new y.default.Converter,n=t.makeHtml(a.formatMarkdown(k.value)||k.value),s=function(e){var t=(new y.default.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(a.formatMarkdown(k.value)||k.value),i=new ClipboardItem({"text/plain":new Blob([s],{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([i])];case 2:return e.sent(),console.log("Copied User Story"),[3,5];case 3:return o=e.sent(),console.error("Failed to copy user story:",o),[3,5];case 4:return Ge(),[7];case 5:return[2]}})})}},{children:t.jsxs("div",e.__assign({style:null==ue?void 0:ue.menuItemContent,className:r.default.menuItemContentPadded},{children:[t.jsx(s.Copy,{size:16,color:null==ue?void 0:ue.menuIconColor}),t.jsx("p",e.__assign({style:null==ue?void 0:ue.menuLabel},{children:"Copy"}))]}))}))]}))]}),ye.userStory&&De?t.jsx(d.default,{type:"outline",children:"Cancel",style:null==ue?void 0:ue.cancelButton,onClick:function(){var t;null===(t=Fe.current)||void 0===t||t.abort(),pe(function(t){return e.__assign(e.__assign({},t),{userStory:!1})})}}):t.jsx(t.Fragment,{}),ye.userStory&&De?t.jsx(d.default,{type:"fill",children:He?t.jsxs("span",e.__assign({className:r.default.savingSpinner,style:null==ue?void 0:ue.savingSpinner},{children:[t.jsx(s.LoaderCircle,{className:r.default.spinAnimation,style:null==ue?void 0:ue.spinAnimation}),t.jsx("span",{children:"Saving..."})]})):"Save",isDisable:He,style:He?null==ue?void 0:ue.savingButton:null==ue?void 0:ue.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 Ve(!0),"userStory"==="userStory"&&(T(_e),console.log("I am changing RTE editor values",_e)),[4,V(re,Ne,D,null===(t=Fe.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),T(e.__assign(e.__assign({},_e),{isDefaultEdit:!1})),pe(function(t){return e.__assign(e.__assign({},t),{userStory:!1})}),Ve(!1),[2]}})})}}):!P&&!R&&De&&!1!==(null==Xe?void 0:Xe.showEditButton)&&ee&&t.jsx("button",e.__assign({className:r.default.iconButton,style:null==ue?void 0:ue.editButton,onClick:function(){return pe(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})}},{children:t.jsx(s.PencilIcon,{color:null==ue?void 0:ue.pencilIconColor,size:16})})),Ke&&De&&!P&&!R&&!1!==(null==Xe?void 0:Xe.showEditButton)&&t.jsxs("button",e.__assign({type:"button",className:r.default.addSectionButton,style:null==de?void 0:de.addSectionButton,onClick:function(t){var n,s,i;t.stopPropagation();var o=(null!==(s=null===(n=k.sub_features)||void 0===n?void 0:n.length)&&void 0!==s?s:0)+1,r={artifactId:l.v4(),title:"New Section ".concat(o),value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},a=e.__assign(e.__assign({},k),{sub_features:e.__spreadArray(e.__spreadArray([],null!==(i=k.sub_features)&&void 0!==i?i:[],!0),[r],!1)});ge(a),T(a),Ee(!0),je(r.title)},"aria-label":"Add section",title:"Add section"},{children:[t.jsx(s.Plus,{size:14}),t.jsx("span",e.__assign({className:r.default.addSectionLabel},{children:"Add Section"}))]})),!Ke&&!P&&!R&&t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),null==J||J()},className:r.default.iconButton,style:null==de?void 0:de.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:t.jsx(s.Trash2,{size:16})})),(null==Xe?void 0:Xe.actionItemsButton)&&t.jsxs(t.Fragment,{children:[t.jsx("span",e.__assign({className:r.default.actionItemBtn,style:null==ue?void 0:ue.actionItemBtn,onClick:function(e){e.stopPropagation(),Re(e.currentTarget)}},{children:t.jsx(s.Ellipsis,{})})),t.jsx(o.Menu,e.__assign({id:"user-story-action-menu",anchorEl:Pe,open:!!Pe,onClose:Qe,style:null==ue?void 0:ue.userStoryShareMenu},{children:null==Z?void 0:Z.items.map(function(n,s){return t.jsx(o.MenuItem,e.__assign({style:null==ue?void 0:ue.userStoryMenuItem,onClick:function(){n.onclick(k),Qe()}},{children:t.jsxs("div",e.__assign({className:r.default.menuItemContent,style:e.__assign(e.__assign({},null==ue?void 0:ue.menuItemContent),!n.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[t.jsx("span",e.__assign({className:r.default.menuItemIcon,style:null==ue?void 0:ue.menuItemIcon},{children:n.icon})),t.jsx("p",e.__assign({style:null==ue?void 0:ue.menuLabel},{children:n.name})),t.jsx("span",{className:r.default.menuItemRight,style:null==ue?void 0:ue.menuItemRight})]}))}),"action-item-".concat(s,"-").concat(n.name))})}))]}),t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),Ze()},style:null==ue?void 0:ue.chevronButton,className:r.default.chevronButton},{children:De?t.jsx(s.ChevronUp,{className:r.default.chevronIcon,color:null==ue?void 0:ue.chevronIconColor}):t.jsx(s.ChevronDown,{className:r.default.chevronIcon,color:null==ue?void 0:ue.chevronIconColor})}))]}))]})),t.jsx("div",{className:r.default.divider,style:null==ue?void 0:ue.dividerStyle})]})),De&&t.jsx("div",e.__assign({className:r.default.cardContent,style:e.__assign(e.__assign({},null==ue?void 0:ue.cardContentStyle),{borderTop:ie?"1px solid #E5E5E5":"none"})},{children:t.jsxs("div",e.__assign({className:r.default.contentInner,style:null==ue?void 0:ue.contentInner},{children:[t.jsxs("div",e.__assign({className:r.default.descriptionSection,style:null==ue?void 0:ue.descriptionSection},{children:[t.jsx("div",{className:r.default.justifyBetween,style:null==ue?void 0:ue.justifyBetween}),ye.userStory?t.jsx(c.default,{minHeight:"100%",height:"100%",type:"string",value:a.formatMarkdown(k.value)||"",handleUpdateState:function(t,n){var s=a.indentMarkdown(n);ge(function(t){return e.__assign(e.__assign({},t),{value:s||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:ye.userStory?"edit":"readOnly"}):t.jsx(f.default,{showUserStoryDiff:R,isParent:""===M,message:a.formatMarkdown(k.value)||"",artifactId:k.artifactId,customStyles:ce,isDisplayHighlightControl:z,contextVariant:K,showConfidenceScore:ne})]})),null===(b=_e.sub_features)||void 0===b?void 0:b.map(function(n,s){var i=m(O,!1,n.artifactId);return t.jsx(x,{artifactId:D,isUserStoryCurrentlyUpdated:B,artifactTitleId:"".concat(E,"-").concat(String.fromCharCode(65+s)),parentUserStory:k,parentIndex:"".concat(M).concat(M&&".").concat(A),currentIndex:"".concat(s+1),doNotShowBorderInViewMode:!1,currentUserStory:n,onUserStoryChange:function(t){return function(t,n){var s=e.__spreadArray([],k.sub_features||[],!0);s[t]=n,T(e.__assign(e.__assign({},k),{sub_features:s}))}(s,t)},enableDownload:!0,isDiffEditReviewMode:P,showUserStoryDiff:R,updateUserStoryArtifact:V,handleDownloadUserStory:L,handleOpenSendDialog:H,isDisplayHighlightControl:z,elementDisplayConfig:O,_resolvedConfig:i,actionItemsConfig:Z,onDelete:function(){return function(t){var n=(k.sub_features||[]).filter(function(e,n){return n!==t}),s=e.__assign(e.__assign({},k),{sub_features:n});ge(s),T(s)}(s)}},n.artifactId)})]}))}))]}))};exports.StoryCard=x,exports.UserStoryCardWrapper=function(n){var i=n.artifactTitleIDs,o=n.isDiffEditReviewMode,l=n.showUserStoryDiff,a=n.updateUserStoryArtifact,u=n.isUserStoryCurrentlyUpdated,d=n.artifactId,c=n.handleOpenSendDialog,f=n.handleDownloadUserStory,_=n.selectedArtifactId,g=n.isDisplayHighlightControl,h=n.elementDisplayConfig,y=n.showWrapper,p=n.actionItemsConfig,S=n.contextVariant,C=n.showDisplayName,I=n.allowTitleEdit,j=n.showConfidenceScore,w=n.showBorderTop,N=v.useRequirementAI(),b=N.userStory,B=N.setUserStory,D=N.customStyles,E=N.searchQueryList,U=N.currentHighlightIndex,k=N.setCurrentHighlightIndex;N.segmentComponentConfig;var T=null==D?void 0:D.userStoryCardStyles,M=0===U,A=U===E.length-1;return t.jsxs("div",e.__assign({className:r.default.userStoryCardWrapper,style:g?e.__assign(e.__assign({},null==T?void 0:T.userStoryCardWrapper),{position:"relative"}):null==T?void 0:T.userStoryCardWrapper},{children:[g&&t.jsx(t.Fragment,{children:E.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:[U+1," of ",E.length]})),t.jsxs("div",e.__assign({className:r.default.navButtons},{children:[t.jsx("button",e.__assign({onClick:function(){U>0&&k(function(e){return e-1})},className:r.default.navButton,disabled:M},{children:t.jsx(s.ChevronUpIcon,{size:20,className:r.default.navIcon})})),t.jsx("button",e.__assign({onClick:function(){U<E.length-1&&k(function(e){return e+1})},className:r.default.navButton,disabled:A},{children:t.jsx(s.ChevronDownIcon,{size:20,className:r.default.navIcon})}))]}))]}))}))}))}),b.map(function(n,s){var r=m(h,!0);return t.jsx(x,{isUserStoryCurrentlyUpdated:u,artifactId:d,artifactTitleId:i[s]||"",currentUserStory:n,onUserStoryChange:function(t){B(function(n){return n[s]=t,e.__spreadArray([],n,!0)})},parentIndex:"",currentIndex:"".concat(s+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:o,showUserStoryDiff:l,updateUserStoryArtifact:a,handleOpenSendDialog:c,handleDownloadUserStory:f,selectedArtifactId:_,isDisplayHighlightControl:g,elementDisplayConfig:h,_resolvedConfig:r,showWrapper:y,actionItemsConfig:p,contextVariant:S,showDisplayName:C,allowTitleEdit:I,showConfidenceScore:j,showBorderTop:w},n.artifactId)})]}))},exports.default=x,exports.replaceLearnedTagsWithInfo=p;
|
|
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{border-top:1px solid #e5e5e5;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}"));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"};
|
|
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}"));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"};
|
|
2
2
|
//# sourceMappingURL=UserStoryCard.module.css.js.map
|