@nivora/matrix 0.3.7 → 0.3.9
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +6 -6
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +6 -6
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +2 -2
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/matrix/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/releases/[id]/page.js +3 -3
- package/.next/server/app/releases/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/releases/page.js +3 -3
- package/.next/server/app/releases/page_client-reference-manifest.js +1 -1
- package/.next/server/app/specs/[id]/page.js +1 -1
- package/.next/server/app/specs/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/traceability/archive/page.js +2 -2
- package/.next/server/app/traceability/archive/page.js.nft.json +1 -1
- package/.next/server/app/traceability/archive/page_client-reference-manifest.js +1 -1
- package/.next/server/app/traceability/fs/[id]/page.js +3 -3
- package/.next/server/app/traceability/fs/[id]/page.js.nft.json +1 -1
- package/.next/server/app/traceability/fs/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/traceability/fs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/traceability/page_client-reference-manifest.js +1 -1
- package/.next/server/app/traceability/risk/[id]/page.js +1 -1
- package/.next/server/app/traceability/risk/[id]/page.js.nft.json +1 -1
- package/.next/server/app/traceability/risk/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/traceability/risk/page_client-reference-manifest.js +1 -1
- package/.next/server/app/traceability/urs/[id]/page.js +2 -2
- package/.next/server/app/traceability/urs/[id]/page.js.nft.json +1 -1
- package/.next/server/app/traceability/urs/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/traceability/urs/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +6 -6
- package/.next/server/chunks/115.js +1 -0
- package/.next/server/chunks/930.js +1 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +2 -2
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/444-150a194fd05ab19b.js +1 -0
- package/.next/static/chunks/579.7253319e999e172d.js +1 -0
- package/.next/static/chunks/app/releases/[id]/{page-fc4810ad78aacc05.js → page-afa3f1c28d6c7765.js} +1 -1
- package/.next/static/chunks/app/releases/page-59506110e5faba1f.js +1 -0
- package/.next/static/chunks/app/specs/[id]/page-c533ddcd6fff787a.js +1 -0
- package/.next/static/chunks/app/traceability/archive/page-2ce8716b9833a881.js +1 -0
- package/.next/static/chunks/app/traceability/fs/[id]/{page-74b333bf6fee2124.js → page-1aae1d2fb97895e3.js} +2 -2
- package/.next/static/chunks/app/traceability/risk/[id]/page-bb6c699a60a4a7e6.js +1 -0
- package/.next/static/chunks/app/traceability/urs/[id]/page-5e3bf9709c3d0937.js +1 -0
- package/.next/static/chunks/{webpack-fdd24ee937b83737.js → webpack-7c5c48f4e751caa0.js} +1 -1
- package/bin/cli.js +39 -2
- package/bin/cli.ts +10 -0
- package/package.json +4 -3
- package/.next/server/chunks/14.js +0 -1
- package/.next/server/chunks/2.js +0 -1
- package/.next/static/chunks/444-1331cf1713bba53d.js +0 -1
- package/.next/static/chunks/918.8613117e214693b1.js +0 -1
- package/.next/static/chunks/app/releases/page-ea3a4e53452c06a7.js +0 -1
- package/.next/static/chunks/app/specs/[id]/page-f178b6b820cd72a2.js +0 -1
- package/.next/static/chunks/app/traceability/archive/page-935f11cdeb06e469.js +0 -1
- package/.next/static/chunks/app/traceability/risk/[id]/page-5f453b802c3b94c1.js +0 -1
- package/.next/static/chunks/app/traceability/urs/[id]/page-fcbf0f20c12adc8c.js +0 -1
- /package/.next/static/{N8nz88V5gLBgFu2wLdIIn → MaKq1Re1ae59Q6-jV_l8J}/_buildManifest.js +0 -0
- /package/.next/static/{N8nz88V5gLBgFu2wLdIIn → MaKq1Re1ae59Q6-jV_l8J}/_ssgManifest.js +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[922],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[922],{1090:(e,r,t)=>{"use strict";t.d(r,{FSClient:()=>u});var n=t(5155),i=t(2115),s=t(3321),a=t(8500),o=t.n(a),l=t(9339);let d=(0,l.createServerReference)("40d07adedac517436e0020d814e92dd30513b208bd",l.callServer,void 0,l.findSourceMapURL,"archiveFSAction");var c=t(5083),m=t(3987),p=t(7948),h=t(8942);function u({fs:e,isNew:r=!1,ursItems:a,riskItems:l,stepsByType:u}){let x=(0,s.useRouter)(),[y,b]=(0,i.useState)(r),[f,j]=(0,i.useState)(e?.id||"FS-XXX"),[S,k]=(0,i.useState)(e?.title||""),[C,w]=(0,i.useState)(e?.description||""),[B,R]=(0,i.useState)(e?.urs_ids||[]),[z,W]=(0,i.useState)(e?.risk_ids||[]),N=e?.scenarios?e.scenarios.map(e=>({name:e.name,steps:e.steps.map(e=>{let r=e.match(/^(Given|When|Then|And|But)\s+(.+)$/i);return r?{type:r[1].toLowerCase(),text:r[2]}:{type:"given",text:e}})})):[{name:"",steps:[{type:"given",text:""},{type:"when",text:""},{type:"then",text:""}]}],[$,F]=(0,i.useState)(N),[L,I]=(0,i.useState)(null),[T,_]=(0,i.useState)({type:"idle"}),[A,E]=(0,i.useTransition)(),[U,H]=(0,i.useState)(!1),[M,G]=(0,i.useState)(!1),O=()=>{let e=$.filter(e=>e.name.trim()).map(e=>{let r=e.steps.filter(e=>e.text.trim()).map(e=>` ${v(e.type)} ${e.text}`).join("\n");return` Scenario: ${e.name}
|
|
2
2
|
${r}`}).join("\n\n"),t=[r?"@FS-XXX":`@${f}`,...B.map(e=>`@${e}`),...z.map(e=>`@${e}`)].join(" ");return`${t}
|
|
3
3
|
Feature: ${S}
|
|
4
4
|
${C}
|
|
5
5
|
|
|
6
6
|
${e}
|
|
7
|
-
`},X=async()=>{H(!0)},D=async()=>{await d(e.id),x.refresh(),b(!1)},P=async()=>{G(!0)},q=async()=>{await (0,c.m)(e.id),x.refresh()};return!y&&e?(0,n.jsxs)("div",{className:"card",style:{maxWidth:"900px"},children:[e.is_archived&&(0,n.jsxs)("div",{style:{background:"rgba(239, 68, 68, 0.1)",border:"1px solid var(--error)",padding:"1rem",borderRadius:"8px",marginBottom:"1.5rem",color:"var(--error)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsxs)("span",{children:[(0,n.jsx)("strong",{children:"Archived:"})," This item is soft-deleted and hidden from lists."]}),(0,n.jsx)("button",{onClick:P,className:"btn",style:{background:"var(--bg-hover)",border:"1px solid var(--error)",color:"var(--error)"},children:"Restore"})]}),(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"2rem",paddingBottom:"1rem",borderBottom:"1px solid var(--border)"},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{style:{margin:0,fontSize:"1.5rem",fontWeight:600,color:"var(--warning)"},children:e.id}),(0,n.jsx)("h2",{style:{margin:"0.5rem 0 0",fontSize:"1.25rem",fontWeight:500},children:e.title})]}),(0,n.jsxs)("div",{style:{display:"flex",gap:"0.75rem"},children:[(0,n.jsx)("button",{onClick:X,className:"btn",style:{background:"transparent",border:"1px solid var(--error)",color:"var(--error)",display:e.is_archived?"none":"flex",alignItems:"center",gap:"0.5rem"},children:"\uD83D\uDDD1️ Archive"}),(0,n.jsx)("button",{onClick:()=>b(!0),disabled:!!e.is_archived,className:"btn btn-primary",style:{opacity:e.is_archived?.5:1,cursor:e.is_archived?"not-allowed":"pointer"},children:"✏️ Edit"})]})]}),(0,n.jsxs)("div",{style:{marginBottom:"2rem"},children:[(0,n.jsx)("h3",{style:{fontSize:"1rem",fontWeight:600,marginBottom:"0.5rem",color:"var(--text-secondary)"},children:"Description"}),(0,n.jsx)("div",{style:{lineHeight:1.6,whiteSpace:"pre-wrap"},children:e.description})]}),(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"2rem",marginBottom:"2rem"},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{style:{fontSize:"1rem",fontWeight:600,marginBottom:"0.5rem",color:"var(--text-secondary)"},children:"Linked Requirements"}),(0,n.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.5rem"},children:e.urs_ids.length?e.urs_ids.map(e=>(0,n.jsx)(o(),{href:`/traceability/urs/${e}`,children:(0,n.jsx)("span",{className:"badge badge-success",children:e})},e)):"None"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{style:{fontSize:"1rem",fontWeight:600,marginBottom:"0.5rem",color:"var(--text-secondary)"},children:"Linked Risks"}),(0,n.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.5rem"},children:e.risk_ids.length?e.risk_ids.map(e=>(0,n.jsx)(o(),{href:`/traceability/risk/${e}`,children:(0,n.jsx)("span",{className:"badge",style:{background:"#f9731633",color:"#f97316"},children:e})},e)):"None"})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{style:{fontSize:"1rem",fontWeight:600,marginBottom:"1rem",color:"var(--text-secondary)"},children:"Scenarios"}),(0,n.jsx)("div",{style:{display:"grid",gap:"1rem"},children:e.scenarios.map((e,r)=>(0,n.jsxs)("div",{style:{padding:"1rem",background:"var(--bg-hover)",borderRadius:"8px"},children:[(0,n.jsxs)("div",{style:{fontWeight:600,marginBottom:"0.5rem"},children:["\uD83E\uDDEA ",e.name]}),(0,n.jsx)("div",{style:{fontFamily:"monospace",fontSize:"0.875rem"},children:e.steps.map((e,r)=>(0,n.jsx)("div",{style:{color:"var(--text-secondary)"},children:e},r))})]},r))})]}),(0,n.jsx)(h.R,{isOpen:U,onClose:()=>H(!1),onConfirm:D,title:"Archive Functional Spec",message:"Are you sure you want to archive this FS? It will be hidden from lists but can be restored later.",confirmLabel:"Archive",isDangerous:!0}),(0,n.jsx)(h.R,{isOpen:M,onClose:()=>G(!1),onConfirm:q,title:"Restore Functional Spec",message:"Are you sure you want to restore this FS?",confirmLabel:"Restore"})]}):(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"1.5rem",height:"calc(100vh - 100px)"},children:[(0,n.jsxs)("div",{className:"card",style:{maxWidth:"none",overflow:"auto"},children:[(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"2rem",alignItems:"center"},children:[(0,n.jsx)(p.Mo,{icon:"⚙️",title:r?"New Functional Spec":`Editing ${e?.id}`,subtitle:"Gherkin-based feature builder"}),(0,n.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[!r&&(0,n.jsx)("button",{onClick:X,className:"btn",style:{color:"var(--error)",borderColor:"var(--error)"},children:"Archive"}),(0,n.jsx)("button",{onClick:()=>{r?x.back():b(!1)},className:"btn",children:"Cancel"})]})]}),(0,n.jsx)(p.t3,{status:T}),(0,n.jsx)("div",{style:{marginBottom:"1.5rem"},children:(0,n.jsx)(p.zB,{label:"Title",required:!0,compact:!0,children:(0,n.jsx)("input",{value:S,onChange:e=>k(e.target.value),onFocus:()=>I("title"),onBlur:()=>I(null),placeholder:"e.g., User Login",style:(0,p.wI)("title",L)})})}),(0,n.jsx)(p.zB,{label:"Description",hint:"Brief description of the feature",children:(0,n.jsx)("textarea",{value:C,onChange:e=>w(e.target.value),onFocus:()=>I("description"),onBlur:()=>I(null),placeholder:"Brief description of the feature...",style:{...(0,p.KN)("description",L),minHeight:"80px"}})}),(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"1rem",marginBottom:"1.5rem"},children:[(0,n.jsx)(p.zB,{label:"Link URS",compact:!0,children:(0,n.jsx)(m.j,{options:a.map(e=>({value:e.id,label:`${e.id} - ${e.title}`})),selected:B,onChange:R,placeholder:"Search URS...",multi:!0})}),(0,n.jsx)(p.zB,{label:"Link Risks",compact:!0,children:(0,n.jsx)(m.j,{options:l.map(e=>({value:e.id,label:`${e.id} - ${e.title}`})),selected:z,onChange:W,placeholder:"Search Risks...",multi:!0})})]}),(0,n.jsx)(p.zB,{label:"Test Scenarios",hint:"Gherkin scenarios",action:{label:"+ Scenario",onClick:()=>F([...$,{name:"",steps:[{type:"given",text:""},{type:"when",text:""},{type:"then",text:""}]}])},children:$.map((e,r)=>(0,n.jsx)(g,{scenario:e,index:r,stepsByType:u,focusedField:L,setFocusedField:I,onNameChange:e=>{let t;(t=[...$])[r].name=e,F(t)},onStepChange:(e,t)=>{let n;(n=[...$])[r].steps[e].text=t,F(n)},onStepTypeChange:(e,t)=>{let n;(n=[...$])[r].steps[e].type=t,F(n)},onAddStep:e=>{let t;(t=[...$])[r].steps.push({type:e,text:""}),F(t)},onRemoveStep:e=>{let t;(t=[...$])[r].steps=t[r].steps.filter((r,t)=>t!==e),F(t)},onRemove:()=>{$.length>1&&F($.filter((e,t)=>t!==r))},canRemove:$.length>1},r))})]}),(0,n.jsxs)("div",{className:"card",style:{maxWidth:"none",display:"flex",flexDirection:"column"},children:[(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"1rem"},children:[(0,n.jsx)("h2",{style:{fontSize:"1.125rem",fontWeight:600},children:"\uD83D\uDCC4 Gherkin Preview"}),(0,n.jsxs)("div",{style:{display:"flex",gap:"0.75rem"},children:[(0,n.jsx)("button",{onClick:()=>{let e=O(),r=`${f.trim()}-${S.toLowerCase().replace(/\s+/g,"-")}.feature`,t=new Blob([e],{type:"text/plain"}),n=URL.createObjectURL(t),i=document.createElement("a");i.href=n,i.download=r,i.click(),URL.revokeObjectURL(n)},className:"btn",children:"⬇️ Download"}),(0,n.jsx)(p.yY,{onClick:()=>{_({type:"idle"}),E(async()=>{let n=O(),i=r?"FS-NEW":f,s=`${i.trim()}-${S.toLowerCase().replace(/\s+/g,"-")}.feature`;try{let{saveFS:i,updateFSLinksAction:a}=await t.e(918).then(t.bind(t,7918)),o=await i(s,n,r?void 0:e?.file_path);o.success?(await a(o.id,B),_({type:"success",message:`Saved ${o.id}`}),r?x.push(`/traceability/fs/${o.id}`):b(!1)):_({type:"error",message:o.error})}catch(e){_({type:"error",message:"Failed to save"})}})},disabled:A||!S.trim(),isPending:A,label:"Save"})]})]}),(0,n.jsx)("pre",{style:{background:"var(--bg-secondary)",padding:"1.25rem",borderRadius:"10px",overflow:"auto",whiteSpace:"pre-wrap",fontFamily:"'JetBrains Mono', monospace",fontSize:"0.8125rem",lineHeight:1.7,flex:1,border:"1px solid var(--border)"},children:O()})]})]})}function x({onClick:e}){return(0,n.jsx)("button",{onClick:e,style:{padding:"0.5rem",background:"transparent",border:"1px solid var(--border)",borderRadius:"8px",color:"var(--text-secondary)",cursor:"pointer",lineHeight:1},title:"Remove",children:"✕"})}function g({scenario:e,index:r,stepsByType:t,focusedField:i,setFocusedField:s,onNameChange:a,onStepChange:o,onStepTypeChange:l,onAddStep:d,onRemoveStep:c,onRemove:h,canRemove:u}){return(0,n.jsxs)("div",{style:{marginBottom:"1rem",padding:"1.25rem",background:"var(--bg-secondary)",borderRadius:"10px",border:"1px solid var(--border)"},children:[(0,n.jsxs)("div",{style:{display:"flex",gap:"0.75rem",marginBottom:"1rem",alignItems:"center"},children:[(0,n.jsxs)("span",{style:{color:"var(--accent)",fontWeight:600,fontSize:"0.875rem"},children:["Scenario ",r+1]}),(0,n.jsx)("input",{value:e.name,onChange:e=>a(e.target.value),onFocus:()=>s(`scenario-${r}`),onBlur:()=>s(null),placeholder:"Scenario name",style:{...(0,p.wI)(`scenario-${r}`,i),flex:1,fontWeight:500}}),u&&(0,n.jsx)(x,{onClick:h})]}),e.steps.map((e,r)=>(0,n.jsxs)("div",{style:{display:"flex",gap:"0.75rem",marginBottom:"0.75rem",alignItems:"center"},children:[(0,n.jsxs)("select",{value:e.type,onChange:e=>l(r,e.target.value),style:{minWidth:"80px",fontSize:"0.75rem",fontWeight:600,color:{given:"#a78bfa",when:"#60a5fa",then:"#34d399",and:"#94a3b8",but:"#f472b6"}[e.type]||"var(--text-secondary)",textTransform:"capitalize",padding:"0.25rem",borderRadius:"6px",border:"1px solid var(--border)",background:"var(--bg-primary)"},children:[(0,n.jsx)("option",{value:"given",children:"Given"}),(0,n.jsx)("option",{value:"when",children:"When"}),(0,n.jsx)("option",{value:"then",children:"Then"}),(0,n.jsx)("option",{value:"and",children:"And"}),(0,n.jsx)("option",{value:"but",children:"But"})]}),(0,n.jsx)(m.j,{options:t[e.type]?.map(e=>({value:e.replace(/^(Given|When|Then|And|But)\s+/,""),label:e}))||[],selected:e.text?[e.text]:[],onChange:e=>o(r,e[0]||""),placeholder:`Select or type ${e.type} step...`,multi:!1,allowCustom:!0}),(0,n.jsx)(x,{onClick:()=>c(r)})]},r)),(0,n.jsxs)("div",{style:{display:"flex",gap:"0.5rem",marginTop:"1rem"},children:[(0,n.jsx)("button",{onClick:()=>d("given"),className:"btn btn-sm",style:{fontSize:"0.75rem"},children:"+ Given"}),(0,n.jsx)("button",{onClick:()=>d("when"),className:"btn btn-sm",style:{fontSize:"0.75rem"},children:"+ When"}),(0,n.jsx)("button",{onClick:()=>d("then"),className:"btn btn-sm",style:{fontSize:"0.75rem"},children:"+ Then"}),["and","but"].map(e=>(0,n.jsxs)("button",{onClick:()=>d(e),className:"btn btn-sm",style:{fontSize:"0.75rem"},children:["+ ",v(e)]},e))]})]})}function v(e){return e.charAt(0).toUpperCase()+e.slice(1)}},2504:(e,r,t)=>{Promise.resolve().then(t.bind(t,2193))},3987:(e,r,t)=>{"use strict";t.d(r,{j:()=>s});var n=t(5155),i=t(2115);function s({options:e,selected:r,onChange:t,placeholder:s,multi:a=!0,allowCustom:o=!0}){let[l,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(""),p=(0,i.useRef)(null),h=e.filter(e=>e.label.toLowerCase().includes(c.toLowerCase())&&(!a||!r.includes(e.value)));return(0,i.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,n.jsxs)("div",{ref:p,style:{position:"relative",flex:1},children:[a&&r.length>0&&(0,n.jsx)("div",{style:{display:"flex",gap:"0.25rem",flexWrap:"wrap",marginBottom:"0.5rem"},children:r.map(i=>{let s=e.find(e=>e.value===i);return(0,n.jsxs)("span",{className:"badge badge-success",style:{display:"flex",alignItems:"center",gap:"0.25rem"},children:[s?.value||i,(0,n.jsx)("button",{onClick:()=>{t(r.filter(e=>e!==i))},style:{background:"none",border:"none",cursor:"pointer",padding:0,fontSize:"1rem",color:"inherit"},children:"\xd7"})]},i)})}),(0,n.jsx)("input",{type:"text",value:a||l?c:(()=>{if(!a&&r.length>0){let t=e.find(e=>e.value===r[0]);return t?.label||r[0]}return""})(),onChange:e=>m(e.target.value),onFocus:()=>d(!0),placeholder:0!==r.length&&a?"Add more...":s,className:"input",style:{width:"100%"}}),l&&(0,n.jsxs)("div",{style:{position:"absolute",top:"100%",left:0,right:0,marginTop:"0.25rem",background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"8px",maxHeight:"200px",overflowY:"auto",zIndex:100,boxShadow:"0 4px 12px rgba(0,0,0,0.3)"},children:[0===h.length?(0,n.jsx)("div",{style:{padding:"0.75rem",color:"var(--text-secondary)",fontSize:"0.875rem"},children:o?"No matches - type to create":"No matching steps"}):h.slice(0,20).map(e=>(0,n.jsxs)("div",{onClick:()=>{var n;return n=e.value,void(a?t([...r,n]):(t([n]),d(!1)),m(""))},style:{padding:"0.625rem 0.75rem",cursor:"pointer",fontSize:"0.875rem",borderBottom:"1px solid var(--border)",transition:"background 0.15s"},onMouseEnter:e=>e.currentTarget.style.background="var(--bg-hover)",onMouseLeave:e=>e.currentTarget.style.background="transparent",children:[(0,n.jsx)("div",{style:{fontWeight:500},children:e.value}),e.label!==e.value&&(0,n.jsx)("div",{style:{fontSize:"0.75rem",color:"var(--text-secondary)",marginTop:"0.125rem"},children:e.label})]},e.value)),h.length>20&&(0,n.jsxs)("div",{style:{padding:"0.5rem",color:"var(--text-secondary)",fontSize:"0.75rem",textAlign:"center"},children:["+",h.length-20," more..."]})]})]})}},7948:(e,r,t)=>{"use strict";t.d(r,{KN:()=>c,Mo:()=>h,d0:()=>x,mQ:()=>d,t3:()=>p,wI:()=>l,yY:()=>u,zB:()=>m});var n=t(5155);t(2115);let i={width:"100%",padding:"0.875rem 1rem",fontSize:"0.9375rem",lineHeight:"1.5",color:"var(--text-primary)",background:"var(--bg-secondary)",borderWidth:"1px",borderStyle:"solid",borderColor:"var(--border)",borderRadius:"10px",outline:"none",transition:"all 0.2s ease"},s={borderColor:"var(--accent)",boxShadow:"0 0 0 3px rgba(99, 102, 241, 0.15)"},a={...i,cursor:"pointer",appearance:"none",backgroundImage:"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238888a0' d='M6 8L1 3h10z'/%3E%3C/svg%3E\")",backgroundRepeat:"no-repeat",backgroundPosition:"right 1rem center",paddingRight:"2.5rem"},o={...i,resize:"vertical",minHeight:"120px",fontFamily:"inherit"};function l(e,r){return{...i,...r===e?s:{}}}function d(e,r){return{...a,...r===e?s:{}}}function c(e,r){return{...o,...r===e?s:{}}}function m({label:e,children:r,required:t,compact:i,hint:s,action:a}){return(0,n.jsxs)("div",{style:{marginBottom:i?"0":"1.5rem"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"0.5rem"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,n.jsx)("label",{style:{fontWeight:500,fontSize:"0.875rem",color:"var(--text-primary)"},children:e}),t&&(0,n.jsx)("span",{style:{color:"var(--accent)",fontSize:"0.75rem"},children:"Required"}),s&&(0,n.jsxs)("span",{style:{color:"var(--text-secondary)",fontSize:"0.8125rem",fontWeight:400},children:["— ",s]})]}),a&&(0,n.jsx)("button",{onClick:a.onClick,style:{padding:"0.375rem 0.75rem",fontSize:"0.8125rem",fontWeight:500,background:"transparent",border:"1px solid var(--accent)",borderRadius:"6px",color:"var(--accent)",cursor:"pointer",transition:"all 0.2s"},children:a.label})]}),r]})}function p({status:e}){return"idle"===e.type?null:(0,n.jsxs)("div",{style:{marginBottom:"1.5rem",padding:"1rem 1.25rem",borderRadius:"10px",background:"success"===e.type?"rgba(16, 185, 129, 0.1)":"rgba(239, 68, 68, 0.1)",color:"success"===e.type?"var(--success)":"var(--error)",fontSize:"0.9375rem",display:"flex",alignItems:"center",gap:"0.5rem",borderWidth:"1px",borderStyle:"solid",borderColor:"success"===e.type?"rgba(16, 185, 129, 0.2)":"rgba(239, 68, 68, 0.2)"},children:["success"===e.type?"✅":"❌"," ",e.message]})}function h({icon:e,title:r,subtitle:t}){return(0,n.jsxs)("div",{style:{marginBottom:"2rem",paddingBottom:"1.5rem",borderBottom:"1px solid var(--border)"},children:[(0,n.jsxs)("h2",{style:{margin:0,fontSize:"1.25rem",fontWeight:600},children:[e," ",r]}),(0,n.jsx)("p",{style:{margin:"0.25rem 0 0",color:"var(--text-secondary)",fontSize:"0.875rem"},children:t})]})}function u({onClick:e,disabled:r,isPending:t,label:i="Save"}){return(0,n.jsx)("button",{onClick:e,disabled:r,style:{padding:"0.75rem 1.5rem",fontSize:"0.9375rem",fontWeight:600,borderRadius:"10px",border:"none",cursor:r?"not-allowed":"pointer",background:r?"var(--bg-hover)":"linear-gradient(135deg, var(--gradient-start), var(--gradient-end))",color:r?"var(--text-secondary)":"white",transition:"all 0.2s ease",boxShadow:r?"none":"0 4px 12px rgba(99, 102, 241, 0.25)"},children:t?"\uD83D\uDCBE Saving...":`💾 ${i}`})}function x({onClick:e}){return(0,n.jsx)("button",{onClick:e,style:{padding:"0.5rem",background:"transparent",border:"1px solid var(--border)",borderRadius:"8px",color:"var(--text-secondary)",cursor:"pointer",transition:"all 0.2s",lineHeight:1},title:"Remove",children:"✕"})}},8942:(e,r,t)=>{"use strict";t.d(r,{R:()=>o});var n=t(5155),i=t(9092),s=t.n(i);function a({isOpen:e,onClose:r,children:t,width:i="500px"}){return e?(0,n.jsxs)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(4px)",background:"rgba(0, 0, 0, 0.5)",animation:"fadeIn 0.2s ease-out"},className:"jsx-5d567d25508aa188",children:[(0,n.jsx)("div",{onClick:e=>e.stopPropagation(),style:{background:"var(--bg-primary)",borderRadius:"12px",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",width:i,maxWidth:"90%",maxHeight:"90vh",overflow:"auto",border:"1px solid var(--border)",animation:"slideUp 0.2s ease-out"},className:"jsx-5d567d25508aa188",children:t}),(0,n.jsx)(s(),{id:"5d567d25508aa188",children:"@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes slideUp{from{opacity:0;transform:scale(.95)translatey(10px)}to{opacity:1;transform:scale(1)translatey(0)}}"})]}):null}function o({isOpen:e,onClose:r,onConfirm:t,title:i,message:s,confirmLabel:o="Confirm",cancelLabel:l="Cancel",isDangerous:d=!1}){return(0,n.jsx)(a,{isOpen:e,onClose:r,width:"400px",children:(0,n.jsxs)("div",{style:{padding:"1.5rem"},children:[(0,n.jsx)("h3",{style:{margin:"0 0 0.5rem 0",fontSize:"1.25rem",fontWeight:600},children:i}),(0,n.jsx)("p",{style:{margin:"0 0 1.5rem 0",color:"var(--text-secondary)",lineHeight:1.5},children:s}),(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.75rem"},children:[(0,n.jsx)("button",{onClick:r,className:"btn",style:{background:"transparent",border:"1px solid var(--border)",color:"var(--text-primary)"},children:l}),(0,n.jsx)("button",{onClick:()=>{t(),r()},className:"btn",style:{background:d?"var(--error)":"var(--accent)",color:"white",border:"none",fontWeight:600},children:o})]})]})})}t(2115)}},e=>{e.O(0,[500,594,441,794,358],()=>e(e.s=2504)),_N_E=e.O()}]);
|
|
7
|
+
`},X=async()=>{H(!0)},D=async()=>{await d(e.id),x.refresh(),b(!1)},P=async()=>{G(!0)},q=async()=>{await (0,c.m)(e.id),x.refresh()};return!y&&e?(0,n.jsxs)("div",{className:"card",style:{maxWidth:"900px"},children:[e.is_archived&&(0,n.jsxs)("div",{style:{background:"rgba(239, 68, 68, 0.1)",border:"1px solid var(--error)",padding:"1rem",borderRadius:"8px",marginBottom:"1.5rem",color:"var(--error)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsxs)("span",{children:[(0,n.jsx)("strong",{children:"Archived:"})," This item is soft-deleted and hidden from lists."]}),(0,n.jsx)("button",{onClick:P,className:"btn",style:{background:"var(--bg-hover)",border:"1px solid var(--error)",color:"var(--error)"},children:"Restore"})]}),(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"2rem",paddingBottom:"1rem",borderBottom:"1px solid var(--border)"},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{style:{margin:0,fontSize:"1.5rem",fontWeight:600,color:"var(--warning)"},children:e.id}),(0,n.jsx)("h2",{style:{margin:"0.5rem 0 0",fontSize:"1.25rem",fontWeight:500},children:e.title})]}),(0,n.jsxs)("div",{style:{display:"flex",gap:"0.75rem"},children:[(0,n.jsx)("button",{onClick:X,className:"btn",style:{background:"transparent",border:"1px solid var(--error)",color:"var(--error)",display:e.is_archived?"none":"flex",alignItems:"center",gap:"0.5rem"},children:"\uD83D\uDDD1️ Archive"}),(0,n.jsx)("button",{onClick:()=>b(!0),disabled:!!e.is_archived,className:"btn btn-primary",style:{opacity:e.is_archived?.5:1,cursor:e.is_archived?"not-allowed":"pointer"},children:"✏️ Edit"})]})]}),(0,n.jsxs)("div",{style:{marginBottom:"2rem"},children:[(0,n.jsx)("h3",{style:{fontSize:"1rem",fontWeight:600,marginBottom:"0.5rem",color:"var(--text-secondary)"},children:"Description"}),(0,n.jsx)("div",{style:{lineHeight:1.6,whiteSpace:"pre-wrap"},children:e.description})]}),(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"2rem",marginBottom:"2rem"},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{style:{fontSize:"1rem",fontWeight:600,marginBottom:"0.5rem",color:"var(--text-secondary)"},children:"Linked Requirements"}),(0,n.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.5rem"},children:e.urs_ids.length?e.urs_ids.map(e=>(0,n.jsx)(o(),{href:`/traceability/urs/${e}`,children:(0,n.jsx)("span",{className:"badge badge-success",children:e})},e)):"None"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{style:{fontSize:"1rem",fontWeight:600,marginBottom:"0.5rem",color:"var(--text-secondary)"},children:"Linked Risks"}),(0,n.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.5rem"},children:e.risk_ids.length?e.risk_ids.map(e=>(0,n.jsx)(o(),{href:`/traceability/risk/${e}`,children:(0,n.jsx)("span",{className:"badge",style:{background:"#f9731633",color:"#f97316"},children:e})},e)):"None"})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{style:{fontSize:"1rem",fontWeight:600,marginBottom:"1rem",color:"var(--text-secondary)"},children:"Scenarios"}),(0,n.jsx)("div",{style:{display:"grid",gap:"1rem"},children:e.scenarios.map((e,r)=>(0,n.jsxs)("div",{style:{padding:"1rem",background:"var(--bg-hover)",borderRadius:"8px"},children:[(0,n.jsxs)("div",{style:{fontWeight:600,marginBottom:"0.5rem"},children:["\uD83E\uDDEA ",e.name]}),(0,n.jsx)("div",{style:{fontFamily:"monospace",fontSize:"0.875rem"},children:e.steps.map((e,r)=>(0,n.jsx)("div",{style:{color:"var(--text-secondary)"},children:e},r))})]},r))})]}),(0,n.jsx)(h.R,{isOpen:U,onClose:()=>H(!1),onConfirm:D,title:"Archive Functional Spec",message:"Are you sure you want to archive this FS? It will be hidden from lists but can be restored later.",confirmLabel:"Archive",isDangerous:!0}),(0,n.jsx)(h.R,{isOpen:M,onClose:()=>G(!1),onConfirm:q,title:"Restore Functional Spec",message:"Are you sure you want to restore this FS?",confirmLabel:"Restore"})]}):(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"1.5rem",height:"calc(100vh - 100px)"},children:[(0,n.jsxs)("div",{className:"card",style:{maxWidth:"none",overflow:"auto"},children:[(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"2rem",alignItems:"center"},children:[(0,n.jsx)(p.Mo,{icon:"⚙️",title:r?"New Functional Spec":`Editing ${e?.id}`,subtitle:"Gherkin-based feature builder"}),(0,n.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[!r&&(0,n.jsx)("button",{onClick:X,className:"btn",style:{color:"var(--error)",borderColor:"var(--error)"},children:"Archive"}),(0,n.jsx)("button",{onClick:()=>{r?x.back():b(!1)},className:"btn",children:"Cancel"})]})]}),(0,n.jsx)(p.t3,{status:T}),(0,n.jsx)("div",{style:{marginBottom:"1.5rem"},children:(0,n.jsx)(p.zB,{label:"Title",required:!0,compact:!0,children:(0,n.jsx)("input",{value:S,onChange:e=>k(e.target.value),onFocus:()=>I("title"),onBlur:()=>I(null),placeholder:"e.g., User Login",style:(0,p.wI)("title",L)})})}),(0,n.jsx)(p.zB,{label:"Description",hint:"Brief description of the feature",children:(0,n.jsx)("textarea",{value:C,onChange:e=>w(e.target.value),onFocus:()=>I("description"),onBlur:()=>I(null),placeholder:"Brief description of the feature...",style:{...(0,p.KN)("description",L),minHeight:"80px"}})}),(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"1rem",marginBottom:"1.5rem"},children:[(0,n.jsx)(p.zB,{label:"Link URS",compact:!0,children:(0,n.jsx)(m.j,{options:a.map(e=>({value:e.id,label:`${e.id} - ${e.title}`})),selected:B,onChange:R,placeholder:"Search URS...",multi:!0})}),(0,n.jsx)(p.zB,{label:"Link Risks",compact:!0,children:(0,n.jsx)(m.j,{options:l.map(e=>({value:e.id,label:`${e.id} - ${e.title}`})),selected:z,onChange:W,placeholder:"Search Risks...",multi:!0})})]}),(0,n.jsx)(p.zB,{label:"Test Scenarios",hint:"Gherkin scenarios",action:{label:"+ Scenario",onClick:()=>F([...$,{name:"",steps:[{type:"given",text:""},{type:"when",text:""},{type:"then",text:""}]}])},children:$.map((e,r)=>(0,n.jsx)(g,{scenario:e,index:r,stepsByType:u,focusedField:L,setFocusedField:I,onNameChange:e=>{let t;(t=[...$])[r].name=e,F(t)},onStepChange:(e,t)=>{let n;(n=[...$])[r].steps[e].text=t,F(n)},onStepTypeChange:(e,t)=>{let n;(n=[...$])[r].steps[e].type=t,F(n)},onAddStep:e=>{let t;(t=[...$])[r].steps.push({type:e,text:""}),F(t)},onRemoveStep:e=>{let t;(t=[...$])[r].steps=t[r].steps.filter((r,t)=>t!==e),F(t)},onRemove:()=>{$.length>1&&F($.filter((e,t)=>t!==r))},canRemove:$.length>1},r))})]}),(0,n.jsxs)("div",{className:"card",style:{maxWidth:"none",display:"flex",flexDirection:"column"},children:[(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"1rem"},children:[(0,n.jsx)("h2",{style:{fontSize:"1.125rem",fontWeight:600},children:"\uD83D\uDCC4 Gherkin Preview"}),(0,n.jsxs)("div",{style:{display:"flex",gap:"0.75rem"},children:[(0,n.jsx)("button",{onClick:()=>{let e=O(),r=`${f.trim()}-${S.toLowerCase().replace(/\s+/g,"-")}.feature`,t=new Blob([e],{type:"text/plain"}),n=URL.createObjectURL(t),i=document.createElement("a");i.href=n,i.download=r,i.click(),URL.revokeObjectURL(n)},className:"btn",children:"⬇️ Download"}),(0,n.jsx)(p.yY,{onClick:()=>{_({type:"idle"}),E(async()=>{let n=O(),i=r?"FS-NEW":f,s=`${i.trim()}-${S.toLowerCase().replace(/\s+/g,"-")}.feature`;try{let{saveFS:i,updateFSLinksAction:a}=await t.e(579).then(t.bind(t,2579)),o=await i(s,n,r?void 0:e?.file_path);o.success?(await a(o.id,B),_({type:"success",message:`Saved ${o.id}`}),r?x.push(`/traceability/fs/${o.id}`):b(!1)):_({type:"error",message:o.error})}catch(e){_({type:"error",message:"Failed to save"})}})},disabled:A||!S.trim(),isPending:A,label:"Save"})]})]}),(0,n.jsx)("pre",{style:{background:"var(--bg-secondary)",padding:"1.25rem",borderRadius:"10px",overflow:"auto",whiteSpace:"pre-wrap",fontFamily:"'JetBrains Mono', monospace",fontSize:"0.8125rem",lineHeight:1.7,flex:1,border:"1px solid var(--border)"},children:O()})]})]})}function x({onClick:e}){return(0,n.jsx)("button",{onClick:e,style:{padding:"0.5rem",background:"transparent",border:"1px solid var(--border)",borderRadius:"8px",color:"var(--text-secondary)",cursor:"pointer",lineHeight:1},title:"Remove",children:"✕"})}function g({scenario:e,index:r,stepsByType:t,focusedField:i,setFocusedField:s,onNameChange:a,onStepChange:o,onStepTypeChange:l,onAddStep:d,onRemoveStep:c,onRemove:h,canRemove:u}){return(0,n.jsxs)("div",{style:{marginBottom:"1rem",padding:"1.25rem",background:"var(--bg-secondary)",borderRadius:"10px",border:"1px solid var(--border)"},children:[(0,n.jsxs)("div",{style:{display:"flex",gap:"0.75rem",marginBottom:"1rem",alignItems:"center"},children:[(0,n.jsxs)("span",{style:{color:"var(--accent)",fontWeight:600,fontSize:"0.875rem"},children:["Scenario ",r+1]}),(0,n.jsx)("input",{value:e.name,onChange:e=>a(e.target.value),onFocus:()=>s(`scenario-${r}`),onBlur:()=>s(null),placeholder:"Scenario name",style:{...(0,p.wI)(`scenario-${r}`,i),flex:1,fontWeight:500}}),u&&(0,n.jsx)(x,{onClick:h})]}),e.steps.map((e,r)=>(0,n.jsxs)("div",{style:{display:"flex",gap:"0.75rem",marginBottom:"0.75rem",alignItems:"center"},children:[(0,n.jsxs)("select",{value:e.type,onChange:e=>l(r,e.target.value),style:{minWidth:"80px",fontSize:"0.75rem",fontWeight:600,color:{given:"#a78bfa",when:"#60a5fa",then:"#34d399",and:"#94a3b8",but:"#f472b6"}[e.type]||"var(--text-secondary)",textTransform:"capitalize",padding:"0.25rem",borderRadius:"6px",border:"1px solid var(--border)",background:"var(--bg-primary)"},children:[(0,n.jsx)("option",{value:"given",children:"Given"}),(0,n.jsx)("option",{value:"when",children:"When"}),(0,n.jsx)("option",{value:"then",children:"Then"}),(0,n.jsx)("option",{value:"and",children:"And"}),(0,n.jsx)("option",{value:"but",children:"But"})]}),(0,n.jsx)(m.j,{options:t[e.type]?.map(e=>({value:e.replace(/^(Given|When|Then|And|But)\s+/,""),label:e}))||[],selected:e.text?[e.text]:[],onChange:e=>o(r,e[0]||""),placeholder:`Select or type ${e.type} step...`,multi:!1,allowCustom:!0}),(0,n.jsx)(x,{onClick:()=>c(r)})]},r)),(0,n.jsxs)("div",{style:{display:"flex",gap:"0.5rem",marginTop:"1rem"},children:[(0,n.jsx)("button",{onClick:()=>d("given"),className:"btn btn-sm",style:{fontSize:"0.75rem"},children:"+ Given"}),(0,n.jsx)("button",{onClick:()=>d("when"),className:"btn btn-sm",style:{fontSize:"0.75rem"},children:"+ When"}),(0,n.jsx)("button",{onClick:()=>d("then"),className:"btn btn-sm",style:{fontSize:"0.75rem"},children:"+ Then"}),["and","but"].map(e=>(0,n.jsxs)("button",{onClick:()=>d(e),className:"btn btn-sm",style:{fontSize:"0.75rem"},children:["+ ",v(e)]},e))]})]})}function v(e){return e.charAt(0).toUpperCase()+e.slice(1)}},2504:(e,r,t)=>{Promise.resolve().then(t.bind(t,1090))},3987:(e,r,t)=>{"use strict";t.d(r,{j:()=>s});var n=t(5155),i=t(2115);function s({options:e,selected:r,onChange:t,placeholder:s,multi:a=!0,allowCustom:o=!0}){let[l,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(""),p=(0,i.useRef)(null),h=e.filter(e=>e.label.toLowerCase().includes(c.toLowerCase())&&(!a||!r.includes(e.value)));return(0,i.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,n.jsxs)("div",{ref:p,style:{position:"relative",flex:1},children:[a&&r.length>0&&(0,n.jsx)("div",{style:{display:"flex",gap:"0.25rem",flexWrap:"wrap",marginBottom:"0.5rem"},children:r.map(i=>{let s=e.find(e=>e.value===i);return(0,n.jsxs)("span",{className:"badge badge-success",style:{display:"flex",alignItems:"center",gap:"0.25rem"},children:[s?.value||i,(0,n.jsx)("button",{onClick:()=>{t(r.filter(e=>e!==i))},style:{background:"none",border:"none",cursor:"pointer",padding:0,fontSize:"1rem",color:"inherit"},children:"\xd7"})]},i)})}),(0,n.jsx)("input",{type:"text",value:a||l?c:(()=>{if(!a&&r.length>0){let t=e.find(e=>e.value===r[0]);return t?.label||r[0]}return""})(),onChange:e=>m(e.target.value),onFocus:()=>d(!0),placeholder:0!==r.length&&a?"Add more...":s,className:"input",style:{width:"100%"}}),l&&(0,n.jsxs)("div",{style:{position:"absolute",top:"100%",left:0,right:0,marginTop:"0.25rem",background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"8px",maxHeight:"200px",overflowY:"auto",zIndex:100,boxShadow:"0 4px 12px rgba(0,0,0,0.3)"},children:[0===h.length?(0,n.jsx)("div",{style:{padding:"0.75rem",color:"var(--text-secondary)",fontSize:"0.875rem"},children:o?"No matches - type to create":"No matching steps"}):h.slice(0,20).map(e=>(0,n.jsxs)("div",{onClick:()=>{var n;return n=e.value,void(a?t([...r,n]):(t([n]),d(!1)),m(""))},style:{padding:"0.625rem 0.75rem",cursor:"pointer",fontSize:"0.875rem",borderBottom:"1px solid var(--border)",transition:"background 0.15s"},onMouseEnter:e=>e.currentTarget.style.background="var(--bg-hover)",onMouseLeave:e=>e.currentTarget.style.background="transparent",children:[(0,n.jsx)("div",{style:{fontWeight:500},children:e.value}),e.label!==e.value&&(0,n.jsx)("div",{style:{fontSize:"0.75rem",color:"var(--text-secondary)",marginTop:"0.125rem"},children:e.label})]},e.value)),h.length>20&&(0,n.jsxs)("div",{style:{padding:"0.5rem",color:"var(--text-secondary)",fontSize:"0.75rem",textAlign:"center"},children:["+",h.length-20," more..."]})]})]})}},5083:(e,r,t)=>{"use strict";t.d(r,{m:()=>i});var n=t(9339);let i=(0,n.createServerReference)("40eba7da600a5a7025ed623ab6e609247d98f38243",n.callServer,void 0,n.findSourceMapURL,"restoreFSAction")},7948:(e,r,t)=>{"use strict";t.d(r,{KN:()=>c,Mo:()=>h,d0:()=>x,mQ:()=>d,t3:()=>p,wI:()=>l,yY:()=>u,zB:()=>m});var n=t(5155);t(2115);let i={width:"100%",padding:"0.875rem 1rem",fontSize:"0.9375rem",lineHeight:"1.5",color:"var(--text-primary)",background:"var(--bg-secondary)",borderWidth:"1px",borderStyle:"solid",borderColor:"var(--border)",borderRadius:"10px",outline:"none",transition:"all 0.2s ease"},s={borderColor:"var(--accent)",boxShadow:"0 0 0 3px rgba(99, 102, 241, 0.15)"},a={...i,cursor:"pointer",appearance:"none",backgroundImage:"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238888a0' d='M6 8L1 3h10z'/%3E%3C/svg%3E\")",backgroundRepeat:"no-repeat",backgroundPosition:"right 1rem center",paddingRight:"2.5rem"},o={...i,resize:"vertical",minHeight:"120px",fontFamily:"inherit"};function l(e,r){return{...i,...r===e?s:{}}}function d(e,r){return{...a,...r===e?s:{}}}function c(e,r){return{...o,...r===e?s:{}}}function m({label:e,children:r,required:t,compact:i,hint:s,action:a}){return(0,n.jsxs)("div",{style:{marginBottom:i?"0":"1.5rem"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"0.5rem"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,n.jsx)("label",{style:{fontWeight:500,fontSize:"0.875rem",color:"var(--text-primary)"},children:e}),t&&(0,n.jsx)("span",{style:{color:"var(--accent)",fontSize:"0.75rem"},children:"Required"}),s&&(0,n.jsxs)("span",{style:{color:"var(--text-secondary)",fontSize:"0.8125rem",fontWeight:400},children:["— ",s]})]}),a&&(0,n.jsx)("button",{onClick:a.onClick,style:{padding:"0.375rem 0.75rem",fontSize:"0.8125rem",fontWeight:500,background:"transparent",border:"1px solid var(--accent)",borderRadius:"6px",color:"var(--accent)",cursor:"pointer",transition:"all 0.2s"},children:a.label})]}),r]})}function p({status:e}){return"idle"===e.type?null:(0,n.jsxs)("div",{style:{marginBottom:"1.5rem",padding:"1rem 1.25rem",borderRadius:"10px",background:"success"===e.type?"rgba(16, 185, 129, 0.1)":"rgba(239, 68, 68, 0.1)",color:"success"===e.type?"var(--success)":"var(--error)",fontSize:"0.9375rem",display:"flex",alignItems:"center",gap:"0.5rem",borderWidth:"1px",borderStyle:"solid",borderColor:"success"===e.type?"rgba(16, 185, 129, 0.2)":"rgba(239, 68, 68, 0.2)"},children:["success"===e.type?"✅":"❌"," ",e.message]})}function h({icon:e,title:r,subtitle:t}){return(0,n.jsxs)("div",{style:{marginBottom:"2rem",paddingBottom:"1.5rem",borderBottom:"1px solid var(--border)"},children:[(0,n.jsxs)("h2",{style:{margin:0,fontSize:"1.25rem",fontWeight:600},children:[e," ",r]}),(0,n.jsx)("p",{style:{margin:"0.25rem 0 0",color:"var(--text-secondary)",fontSize:"0.875rem"},children:t})]})}function u({onClick:e,disabled:r,isPending:t,label:i="Save"}){return(0,n.jsx)("button",{onClick:e,disabled:r,style:{padding:"0.75rem 1.5rem",fontSize:"0.9375rem",fontWeight:600,borderRadius:"10px",border:"none",cursor:r?"not-allowed":"pointer",background:r?"var(--bg-hover)":"linear-gradient(135deg, var(--gradient-start), var(--gradient-end))",color:r?"var(--text-secondary)":"white",transition:"all 0.2s ease",boxShadow:r?"none":"0 4px 12px rgba(99, 102, 241, 0.25)"},children:t?"\uD83D\uDCBE Saving...":`💾 ${i}`})}function x({onClick:e}){return(0,n.jsx)("button",{onClick:e,style:{padding:"0.5rem",background:"transparent",border:"1px solid var(--border)",borderRadius:"8px",color:"var(--text-secondary)",cursor:"pointer",transition:"all 0.2s",lineHeight:1},title:"Remove",children:"✕"})}},8942:(e,r,t)=>{"use strict";t.d(r,{R:()=>o});var n=t(5155),i=t(9092),s=t.n(i);function a({isOpen:e,onClose:r,children:t,width:i="500px"}){return e?(0,n.jsxs)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(4px)",background:"rgba(0, 0, 0, 0.5)",animation:"fadeIn 0.2s ease-out"},className:"jsx-5d567d25508aa188",children:[(0,n.jsx)("div",{onClick:e=>e.stopPropagation(),style:{background:"var(--bg-primary)",borderRadius:"12px",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",width:i,maxWidth:"90%",maxHeight:"90vh",overflow:"auto",border:"1px solid var(--border)",animation:"slideUp 0.2s ease-out"},className:"jsx-5d567d25508aa188",children:t}),(0,n.jsx)(s(),{id:"5d567d25508aa188",children:"@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes slideUp{from{opacity:0;transform:scale(.95)translatey(10px)}to{opacity:1;transform:scale(1)translatey(0)}}"})]}):null}function o({isOpen:e,onClose:r,onConfirm:t,title:i,message:s,confirmLabel:o="Confirm",cancelLabel:l="Cancel",isDangerous:d=!1}){return(0,n.jsx)(a,{isOpen:e,onClose:r,width:"400px",children:(0,n.jsxs)("div",{style:{padding:"1.5rem"},children:[(0,n.jsx)("h3",{style:{margin:"0 0 0.5rem 0",fontSize:"1.25rem",fontWeight:600},children:i}),(0,n.jsx)("p",{style:{margin:"0 0 1.5rem 0",color:"var(--text-secondary)",lineHeight:1.5},children:s}),(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.75rem"},children:[(0,n.jsx)("button",{onClick:r,className:"btn",style:{background:"transparent",border:"1px solid var(--border)",color:"var(--text-primary)"},children:l}),(0,n.jsx)("button",{onClick:()=>{t(),r()},className:"btn",style:{background:d?"var(--error)":"var(--accent)",color:"white",border:"none",fontWeight:600},children:o})]})]})})}t(2115)}},e=>{e.O(0,[500,594,441,794,358],()=>e(e.s=2504)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[510],{3987:(e,r,t)=>{"use strict";t.d(r,{j:()=>n});var i=t(5155),s=t(2115);function n({options:e,selected:r,onChange:t,placeholder:n,multi:l=!0,allowCustom:a=!0}){let[o,d]=(0,s.useState)(!1),[c,m]=(0,s.useState)(""),p=(0,s.useRef)(null),u=e.filter(e=>e.label.toLowerCase().includes(c.toLowerCase())&&(!l||!r.includes(e.value)));return(0,s.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.jsxs)("div",{ref:p,style:{position:"relative",flex:1},children:[l&&r.length>0&&(0,i.jsx)("div",{style:{display:"flex",gap:"0.25rem",flexWrap:"wrap",marginBottom:"0.5rem"},children:r.map(s=>{let n=e.find(e=>e.value===s);return(0,i.jsxs)("span",{className:"badge badge-success",style:{display:"flex",alignItems:"center",gap:"0.25rem"},children:[n?.value||s,(0,i.jsx)("button",{onClick:()=>{t(r.filter(e=>e!==s))},style:{background:"none",border:"none",cursor:"pointer",padding:0,fontSize:"1rem",color:"inherit"},children:"\xd7"})]},s)})}),(0,i.jsx)("input",{type:"text",value:l||o?c:(()=>{if(!l&&r.length>0){let t=e.find(e=>e.value===r[0]);return t?.label||r[0]}return""})(),onChange:e=>m(e.target.value),onFocus:()=>d(!0),placeholder:0!==r.length&&l?"Add more...":n,className:"input",style:{width:"100%"}}),o&&(0,i.jsxs)("div",{style:{position:"absolute",top:"100%",left:0,right:0,marginTop:"0.25rem",background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"8px",maxHeight:"200px",overflowY:"auto",zIndex:100,boxShadow:"0 4px 12px rgba(0,0,0,0.3)"},children:[0===u.length?(0,i.jsx)("div",{style:{padding:"0.75rem",color:"var(--text-secondary)",fontSize:"0.875rem"},children:a?"No matches - type to create":"No matching steps"}):u.slice(0,20).map(e=>(0,i.jsxs)("div",{onClick:()=>{var i;return i=e.value,void(l?t([...r,i]):(t([i]),d(!1)),m(""))},style:{padding:"0.625rem 0.75rem",cursor:"pointer",fontSize:"0.875rem",borderBottom:"1px solid var(--border)",transition:"background 0.15s"},onMouseEnter:e=>e.currentTarget.style.background="var(--bg-hover)",onMouseLeave:e=>e.currentTarget.style.background="transparent",children:[(0,i.jsx)("div",{style:{fontWeight:500},children:e.value}),e.label!==e.value&&(0,i.jsx)("div",{style:{fontSize:"0.75rem",color:"var(--text-secondary)",marginTop:"0.125rem"},children:e.label})]},e.value)),u.length>20&&(0,i.jsxs)("div",{style:{padding:"0.5rem",color:"var(--text-secondary)",fontSize:"0.75rem",textAlign:"center"},children:["+",u.length-20," more..."]})]})]})}},6640:(e,r,t)=>{Promise.resolve().then(t.bind(t,7804))},7804:(e,r,t)=>{"use strict";t.d(r,{RiskClient:()=>g});var i=t(5155),s=t(2115),n=t(3321),l=t(8500),a=t.n(l),o=t(9339);let d=(0,o.createServerReference)("40b3b0b2c6a325afd7609a6fedd2e23ef143b03e76",o.callServer,void 0,o.findSourceMapURL,"archiveRiskAction");var c=t(9231),m=t(3987),p=t(7948),u=t(8942);function g({risk:e,isNew:r=!1,fsItems:l}){let o=(0,n.useRouter)(),[g,b]=(0,s.useState)(r),[y,f]=(0,s.useState)(e?.title||""),[j,k]=(0,s.useState)(e?.status||"draft"),[C,S]=(0,s.useState)(e?.category||""),[w,R]=(0,s.useState)(e?.gamp_category||4),[z,I]=(0,s.useState)(e?.impact||"medium"),[B,_]=(0,s.useState)(e?.probability||"medium"),[W,N]=(0,s.useState)(e?.risk_level||"medium"),[F,L]=(0,s.useState)(e?.residual_risk||"acceptable"),[$,A]=(0,s.useState)(e?.fs_ids||[]),T=e?.risks?.length?e.risks.map(e=>({id:e.id,description:e.description,impact:e.impact,probability:e.probability})):[{id:"R-001.1",description:"",impact:"medium",probability:"medium"}],E=e?.mitigations?.length?e.mitigations.map(e=>({risk_id:e.risk_id,control:e.control,test:e.test})):[{risk_id:"R-001.1",control:"",test:""}],[H,M]=(0,s.useState)(T),[D,P]=(0,s.useState)(E),[O,Q]=(0,s.useState)(null),[U,q]=(0,s.useState)({type:"idle"}),[Y,K]=(0,s.useTransition)(),[G,J]=(0,s.useState)(!1),[V,X]=(0,s.useState)(!1),Z=(e,r,t)=>{let i=[...H];i[e]={...i[e],[r]:t},M(i)},ee=(e,r,t)=>{let i=[...D];i[e]={...i[e],[r]:t},P(i)},er=async()=>{J(!0)},et=async()=>{await d(e.id),o.refresh(),b(!1)},ei=async()=>{X(!0)},es=async()=>{await (0,c.I)(e.id),o.refresh()};return!g&&e?(0,i.jsxs)("div",{className:"card",style:{maxWidth:"900px"},children:[e.is_archived&&(0,i.jsxs)("div",{style:{background:"rgba(239, 68, 68, 0.1)",border:"1px solid var(--error)",padding:"1rem",borderRadius:"8px",marginBottom:"1.5rem",color:"var(--error)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,i.jsxs)("span",{children:[(0,i.jsx)("strong",{children:"Archived:"})," This item is soft-deleted and hidden from lists."]}),(0,i.jsx)("button",{onClick:ei,className:"btn",style:{background:"var(--bg-hover)",border:"1px solid var(--error)",color:"var(--error)"},children:"Restore"})]}),(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"2rem",paddingBottom:"1.5rem",borderBottom:"1px solid var(--border)"},children:[(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"1rem",marginBottom:"0.5rem"},children:[(0,i.jsx)("span",{style:{fontSize:"0.75rem",fontWeight:600,padding:"0.25rem 0.75rem",background:"#f97316",borderRadius:"6px",color:"white"},children:e.id}),(0,i.jsxs)("span",{className:`badge ${"acceptable"===e.residual_risk?"badge-success":"badge-error"}`,style:{textTransform:"capitalize"},children:["acceptable"===e.residual_risk?"✅":"⚠️"," ",e.residual_risk||"pending"]})]}),(0,i.jsx)("h1",{style:{margin:0,fontSize:"1.5rem",fontWeight:600,lineHeight:1.3},children:e.title})]}),(0,i.jsxs)("div",{style:{display:"flex",gap:"0.75rem"},children:[(0,i.jsx)("button",{onClick:er,className:"btn",style:{background:"transparent",border:"1px solid var(--error)",color:"var(--error)",display:e.is_archived?"none":"flex",alignItems:"center",gap:"0.5rem"},children:"\uD83D\uDDD1️ Archive"}),(0,i.jsxs)("button",{onClick:()=>b(!0),disabled:!!e.is_archived,className:"btn btn-primary",style:{display:"flex",gap:"0.5rem",alignItems:"center",opacity:e.is_archived?.5:1,cursor:e.is_archived?"not-allowed":"pointer"},children:[(0,i.jsx)("span",{children:"✏️"})," Edit"]})]})]}),(0,i.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1rem",marginBottom:"1.5rem"},children:[(0,i.jsx)(h,{label:"Category",value:e.category}),(0,i.jsx)(h,{label:"Impact",value:e.impact,color:v(e.impact)}),(0,i.jsx)(h,{label:"Probability",value:e.probability,color:v(e.probability)}),(0,i.jsx)(h,{label:"Risk Level",value:e.risk_level,color:v(e.risk_level)})]}),(0,i.jsx)(x,{label:"Linked Functional Specs",children:e.fs_ids.length>0?(0,i.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.5rem"},children:e.fs_ids.map(e=>(0,i.jsx)(a(),{href:`/traceability/fs/${e}`,children:(0,i.jsx)("span",{className:"badge badge-warning",children:e})},e))}):(0,i.jsx)("span",{style:{color:"var(--text-secondary)",fontStyle:"italic"},children:"No functional specs linked. Edit to add links."})}),e.risks.length>0&&(0,i.jsx)(x,{label:"Identified Risks",count:e.risks.length,children:(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:e.risks.map((e,r)=>(0,i.jsxs)("div",{style:{display:"flex",gap:"0.75rem",alignItems:"flex-start"},children:[(0,i.jsx)("span",{style:{color:"#f97316",fontWeight:600,fontSize:"0.875rem",fontFamily:"monospace",minWidth:"70px"},children:e.id}),(0,i.jsx)("span",{style:{lineHeight:1.6},children:e.description})]},r))})}),e.mitigations.length>0&&(0,i.jsx)(x,{label:"Mitigation & Control",count:e.mitigations.length,children:(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:e.mitigations.map((e,r)=>(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"0.25rem"},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,i.jsxs)("span",{style:{color:"var(--accent)",fontWeight:600,fontSize:"0.75rem"},children:["For ",e.risk_id,":"]}),(0,i.jsx)("span",{style:{fontWeight:500},children:e.control})]}),(0,i.jsxs)("div",{style:{fontSize:"0.875rem",color:"var(--text-secondary)",paddingLeft:"1rem"},children:["Test: ",e.test]})]},r))})}),(0,i.jsx)(u.R,{isOpen:G,onClose:()=>J(!1),onConfirm:et,title:"Archive Risk",message:"Are you sure you want to archive this Risk? It will be hidden from lists but can be restored later.",confirmLabel:"Archive",isDangerous:!0}),(0,i.jsx)(u.R,{isOpen:V,onClose:()=>X(!1),onConfirm:es,title:"Restore Risk",message:"Are you sure you want to restore this Risk?",confirmLabel:"Restore"})]}):(0,i.jsxs)("div",{className:"card",style:{maxWidth:"900px"},children:[(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"2rem",alignItems:"center"},children:[(0,i.jsx)(p.Mo,{icon:"⚠️",title:r?"New Risk Assessment":`Editing ${e?.id}`,subtitle:"Identify and mitigate risks"}),(0,i.jsxs)("div",{style:{display:"flex",gap:"0.75rem"},children:[!r&&(0,i.jsx)("button",{onClick:er,className:"btn",style:{color:"var(--error)",borderColor:"var(--error)"},children:"Archive"}),(0,i.jsx)("button",{onClick:()=>{r?o.back():b(!1)},className:"btn",children:"Cancel"}),(0,i.jsx)(p.yY,{onClick:()=>{q({type:"idle"}),K(async()=>{try{let i,s={title:y,status:j,category:C,gamp_category:w,fs_ids:$,impact:z,probability:B,risk_level:W,residual_risk:F,risks:H.filter(e=>e.description.trim()||e.id).map(e=>({id:e.id,description:e.description,impact:e.impact,probability:e.probability})),mitigations:D.filter(e=>e.control.trim()).map(e=>({risk_id:e.risk_id,control:e.control,test:e.test}))};if(r){let{saveRisk:e}=await t.e(579).then(t.bind(t,2579));i=await e(s)}else{let{updateRiskAction:r}=await t.e(579).then(t.bind(t,2579));i=await r(e.id,s)}i.success?(q({type:"success",message:`Saved ${i.id}`}),r?o.push(`/traceability/risk/${i.id}`):(o.refresh(),b(!1))):q({type:"error",message:i.error})}catch(e){q({type:"error",message:"Failed to save"})}})},disabled:Y||!y.trim(),isPending:Y,label:"Save Risk"})]})]}),(0,i.jsx)(p.t3,{status:U}),(0,i.jsx)(p.zB,{label:"Title",required:!0,children:(0,i.jsx)("input",{value:y,onChange:e=>f(e.target.value),style:(0,p.wI)("title",O),onFocus:()=>Q("title"),onBlur:()=>Q(null)})}),(0,i.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"1rem",marginBottom:"1.5rem"},children:[(0,i.jsx)(p.zB,{label:"Category",compact:!0,children:(0,i.jsx)("input",{value:C,onChange:e=>S(e.target.value),style:(0,p.wI)("cat",O),onFocus:()=>Q("cat")})}),(0,i.jsx)(p.zB,{label:"Link FS",required:!0,compact:!0,children:(0,i.jsx)(m.j,{options:l.map(e=>({value:e.id,label:`${e.id} - ${e.title}`})),selected:$,onChange:A,placeholder:"Search FS...",multi:!0})})]}),(0,i.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1rem",marginBottom:"1.5rem"},children:[(0,i.jsx)(p.zB,{label:"Impact",compact:!0,children:(0,i.jsxs)("select",{value:z,onChange:e=>I(e.target.value),style:(0,p.mQ)("imp",O),onFocus:()=>Q("imp"),children:[(0,i.jsx)("option",{value:"low",children:"\uD83D\uDFE2 Low"}),(0,i.jsx)("option",{value:"medium",children:"\uD83D\uDFE1 Medium"}),(0,i.jsx)("option",{value:"high",children:"\uD83D\uDFE0 High"}),(0,i.jsx)("option",{value:"critical",children:"\uD83D\uDD34 Critical"})]})}),(0,i.jsx)(p.zB,{label:"Probability",compact:!0,children:(0,i.jsxs)("select",{value:B,onChange:e=>_(e.target.value),style:(0,p.mQ)("prob",O),onFocus:()=>Q("prob"),children:[(0,i.jsx)("option",{value:"low",children:"\uD83D\uDFE2 Low"}),(0,i.jsx)("option",{value:"medium",children:"\uD83D\uDFE1 Medium"}),(0,i.jsx)("option",{value:"high",children:"\uD83D\uDD34 High"})]})}),(0,i.jsx)(p.zB,{label:"Risk Level",compact:!0,children:(0,i.jsxs)("select",{value:W,onChange:e=>N(e.target.value),style:(0,p.mQ)("lvl",O),onFocus:()=>Q("lvl"),children:[(0,i.jsx)("option",{value:"low",children:"\uD83D\uDFE2 Low"}),(0,i.jsx)("option",{value:"medium",children:"\uD83D\uDFE1 Medium"}),(0,i.jsx)("option",{value:"high",children:"\uD83D\uDFE0 High"}),(0,i.jsx)("option",{value:"critical",children:"\uD83D\uDD34 Critical"})]})}),(0,i.jsx)(p.zB,{label:"Residual Risk",compact:!0,children:(0,i.jsxs)("select",{value:F,onChange:e=>L(e.target.value),style:(0,p.mQ)("res",O),onFocus:()=>Q("res"),children:[(0,i.jsx)("option",{value:"acceptable",children:"✅ Acceptable"}),(0,i.jsx)("option",{value:"unacceptable",children:"❌ Unacceptable"}),(0,i.jsx)("option",{value:"pending",children:"⏳ Pending"})]})})]}),(0,i.jsx)(p.zB,{label:"Identified Risks",hint:"List specific risks",action:{label:"+ Add Risk",onClick:()=>M([...H,{id:`R-001.${H.length+1}`,description:"",impact:"medium",probability:"medium"}])},children:(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:H.map((e,r)=>(0,i.jsxs)("div",{style:{display:"flex",gap:"0.75rem",alignItems:"center"},children:[(0,i.jsx)("input",{value:e.id,onChange:e=>Z(r,"id",e.target.value),onFocus:()=>Q(`risk-id-${r}`),onBlur:()=>Q(null),placeholder:"R-ID",style:{...(0,p.wI)(`risk-id-${r}`,O),width:"100px",flexShrink:0}}),(0,i.jsx)("input",{value:e.description,onChange:e=>Z(r,"description",e.target.value),onFocus:()=>Q(`risk-desc-${r}`),onBlur:()=>Q(null),placeholder:"Risk description",style:{...(0,p.wI)(`risk-desc-${r}`,O),flex:1}}),H.length>1&&(0,i.jsx)(p.d0,{onClick:()=>{H.length>1&&M(H.filter((e,t)=>t!==r))}})]},r))})}),(0,i.jsx)(p.zB,{label:"Mitigations",hint:"Control measures and testing",action:{label:"+ Add Mitigation",onClick:()=>P([...D,{risk_id:"",control:"",test:""}])},children:(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:D.map((e,r)=>(0,i.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"100px 1fr 1fr auto",gap:"0.75rem",alignItems:"center",padding:"1rem",background:"var(--bg-secondary)",borderRadius:"10px",border:"1px solid var(--border)"},children:[(0,i.jsx)("input",{value:e.risk_id,onChange:e=>ee(r,"risk_id",e.target.value),onFocus:()=>Q(`mit-id-${r}`),onBlur:()=>Q(null),placeholder:"R-ID",style:(0,p.wI)(`mit-id-${r}`,O)}),(0,i.jsx)("input",{value:e.control,onChange:e=>ee(r,"control",e.target.value),onFocus:()=>Q(`mit-control-${r}`),onBlur:()=>Q(null),placeholder:"Control measure",style:(0,p.wI)(`mit-control-${r}`,O)}),(0,i.jsx)("input",{value:e.test,onChange:e=>ee(r,"test",e.target.value),onFocus:()=>Q(`mit-test-${r}`),onBlur:()=>Q(null),placeholder:"How to test",style:(0,p.wI)(`mit-test-${r}`,O)}),D.length>1&&(0,i.jsx)(p.d0,{onClick:()=>{D.length>1&&P(D.filter((e,t)=>t!==r))}})]},r))})})]})}function h({label:e,value:r,color:t}){return(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{style:{fontSize:"0.75rem",color:"var(--text-secondary)",fontWeight:500,marginBottom:"0.25rem"},children:e}),(0,i.jsx)("div",{style:{fontSize:"1rem",fontWeight:500,textTransform:"capitalize",color:t||"var(--text-primary)"},children:r||"—"})]})}function x({label:e,count:r,children:t}){return(0,i.jsxs)("div",{style:{marginBottom:"1.5rem"},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",marginBottom:"0.5rem"},children:[(0,i.jsx)("label",{style:{fontWeight:500,fontSize:"0.875rem",color:"var(--text-secondary)"},children:e}),void 0!==r&&(0,i.jsx)("span",{style:{fontSize:"0.75rem",padding:"0.125rem 0.5rem",background:"var(--bg-hover)",borderRadius:"9999px"},children:r})]}),(0,i.jsx)("div",{style:{lineHeight:1.7},children:t})]})}function v(e){switch(e?.toLowerCase()){case"high":return"#ef4444";case"medium":return"#f59e0b";case"low":return"#10b981";default:return"var(--text-primary)"}}},7948:(e,r,t)=>{"use strict";t.d(r,{KN:()=>c,Mo:()=>u,d0:()=>h,mQ:()=>d,t3:()=>p,wI:()=>o,yY:()=>g,zB:()=>m});var i=t(5155);t(2115);let s={width:"100%",padding:"0.875rem 1rem",fontSize:"0.9375rem",lineHeight:"1.5",color:"var(--text-primary)",background:"var(--bg-secondary)",borderWidth:"1px",borderStyle:"solid",borderColor:"var(--border)",borderRadius:"10px",outline:"none",transition:"all 0.2s ease"},n={borderColor:"var(--accent)",boxShadow:"0 0 0 3px rgba(99, 102, 241, 0.15)"},l={...s,cursor:"pointer",appearance:"none",backgroundImage:"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238888a0' d='M6 8L1 3h10z'/%3E%3C/svg%3E\")",backgroundRepeat:"no-repeat",backgroundPosition:"right 1rem center",paddingRight:"2.5rem"},a={...s,resize:"vertical",minHeight:"120px",fontFamily:"inherit"};function o(e,r){return{...s,...r===e?n:{}}}function d(e,r){return{...l,...r===e?n:{}}}function c(e,r){return{...a,...r===e?n:{}}}function m({label:e,children:r,required:t,compact:s,hint:n,action:l}){return(0,i.jsxs)("div",{style:{marginBottom:s?"0":"1.5rem"},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"0.5rem"},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,i.jsx)("label",{style:{fontWeight:500,fontSize:"0.875rem",color:"var(--text-primary)"},children:e}),t&&(0,i.jsx)("span",{style:{color:"var(--accent)",fontSize:"0.75rem"},children:"Required"}),n&&(0,i.jsxs)("span",{style:{color:"var(--text-secondary)",fontSize:"0.8125rem",fontWeight:400},children:["— ",n]})]}),l&&(0,i.jsx)("button",{onClick:l.onClick,style:{padding:"0.375rem 0.75rem",fontSize:"0.8125rem",fontWeight:500,background:"transparent",border:"1px solid var(--accent)",borderRadius:"6px",color:"var(--accent)",cursor:"pointer",transition:"all 0.2s"},children:l.label})]}),r]})}function p({status:e}){return"idle"===e.type?null:(0,i.jsxs)("div",{style:{marginBottom:"1.5rem",padding:"1rem 1.25rem",borderRadius:"10px",background:"success"===e.type?"rgba(16, 185, 129, 0.1)":"rgba(239, 68, 68, 0.1)",color:"success"===e.type?"var(--success)":"var(--error)",fontSize:"0.9375rem",display:"flex",alignItems:"center",gap:"0.5rem",borderWidth:"1px",borderStyle:"solid",borderColor:"success"===e.type?"rgba(16, 185, 129, 0.2)":"rgba(239, 68, 68, 0.2)"},children:["success"===e.type?"✅":"❌"," ",e.message]})}function u({icon:e,title:r,subtitle:t}){return(0,i.jsxs)("div",{style:{marginBottom:"2rem",paddingBottom:"1.5rem",borderBottom:"1px solid var(--border)"},children:[(0,i.jsxs)("h2",{style:{margin:0,fontSize:"1.25rem",fontWeight:600},children:[e," ",r]}),(0,i.jsx)("p",{style:{margin:"0.25rem 0 0",color:"var(--text-secondary)",fontSize:"0.875rem"},children:t})]})}function g({onClick:e,disabled:r,isPending:t,label:s="Save"}){return(0,i.jsx)("button",{onClick:e,disabled:r,style:{padding:"0.75rem 1.5rem",fontSize:"0.9375rem",fontWeight:600,borderRadius:"10px",border:"none",cursor:r?"not-allowed":"pointer",background:r?"var(--bg-hover)":"linear-gradient(135deg, var(--gradient-start), var(--gradient-end))",color:r?"var(--text-secondary)":"white",transition:"all 0.2s ease",boxShadow:r?"none":"0 4px 12px rgba(99, 102, 241, 0.25)"},children:t?"\uD83D\uDCBE Saving...":`💾 ${s}`})}function h({onClick:e}){return(0,i.jsx)("button",{onClick:e,style:{padding:"0.5rem",background:"transparent",border:"1px solid var(--border)",borderRadius:"8px",color:"var(--text-secondary)",cursor:"pointer",transition:"all 0.2s",lineHeight:1},title:"Remove",children:"✕"})}},8942:(e,r,t)=>{"use strict";t.d(r,{R:()=>a});var i=t(5155),s=t(9092),n=t.n(s);function l({isOpen:e,onClose:r,children:t,width:s="500px"}){return e?(0,i.jsxs)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(4px)",background:"rgba(0, 0, 0, 0.5)",animation:"fadeIn 0.2s ease-out"},className:"jsx-5d567d25508aa188",children:[(0,i.jsx)("div",{onClick:e=>e.stopPropagation(),style:{background:"var(--bg-primary)",borderRadius:"12px",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",width:s,maxWidth:"90%",maxHeight:"90vh",overflow:"auto",border:"1px solid var(--border)",animation:"slideUp 0.2s ease-out"},className:"jsx-5d567d25508aa188",children:t}),(0,i.jsx)(n(),{id:"5d567d25508aa188",children:"@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes slideUp{from{opacity:0;transform:scale(.95)translatey(10px)}to{opacity:1;transform:scale(1)translatey(0)}}"})]}):null}function a({isOpen:e,onClose:r,onConfirm:t,title:s,message:n,confirmLabel:a="Confirm",cancelLabel:o="Cancel",isDangerous:d=!1}){return(0,i.jsx)(l,{isOpen:e,onClose:r,width:"400px",children:(0,i.jsxs)("div",{style:{padding:"1.5rem"},children:[(0,i.jsx)("h3",{style:{margin:"0 0 0.5rem 0",fontSize:"1.25rem",fontWeight:600},children:s}),(0,i.jsx)("p",{style:{margin:"0 0 1.5rem 0",color:"var(--text-secondary)",lineHeight:1.5},children:n}),(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.75rem"},children:[(0,i.jsx)("button",{onClick:r,className:"btn",style:{background:"transparent",border:"1px solid var(--border)",color:"var(--text-primary)"},children:o}),(0,i.jsx)("button",{onClick:()=>{t(),r()},className:"btn",style:{background:d?"var(--error)":"var(--accent)",color:"white",border:"none",fontWeight:600},children:a})]})]})})}t(2115)},9231:(e,r,t)=>{"use strict";t.d(r,{I:()=>s});var i=t(9339);let s=(0,i.createServerReference)("40bdad7229835624b988b4dc440df74862a3f14b94",i.callServer,void 0,i.findSourceMapURL,"restoreRiskAction")}},e=>{e.O(0,[500,594,441,794,358],()=>e(e.s=6640)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[245],{1045:(e,r,t)=>{"use strict";t.d(r,{Z:()=>n});var i=t(9339);let n=(0,i.createServerReference)("40f82dd9d6c4e0bd6ff038dbc077ca5ae784a00689",i.callServer,void 0,i.findSourceMapURL,"restoreURSAction")},1704:(e,r,t)=>{Promise.resolve().then(t.bind(t,9910))},3987:(e,r,t)=>{"use strict";t.d(r,{j:()=>a});var i=t(5155),n=t(2115);function a({options:e,selected:r,onChange:t,placeholder:a,multi:s=!0,allowCustom:o=!0}){let[l,d]=(0,n.useState)(!1),[c,u]=(0,n.useState)(""),p=(0,n.useRef)(null),m=e.filter(e=>e.label.toLowerCase().includes(c.toLowerCase())&&(!s||!r.includes(e.value)));return(0,n.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.jsxs)("div",{ref:p,style:{position:"relative",flex:1},children:[s&&r.length>0&&(0,i.jsx)("div",{style:{display:"flex",gap:"0.25rem",flexWrap:"wrap",marginBottom:"0.5rem"},children:r.map(n=>{let a=e.find(e=>e.value===n);return(0,i.jsxs)("span",{className:"badge badge-success",style:{display:"flex",alignItems:"center",gap:"0.25rem"},children:[a?.value||n,(0,i.jsx)("button",{onClick:()=>{t(r.filter(e=>e!==n))},style:{background:"none",border:"none",cursor:"pointer",padding:0,fontSize:"1rem",color:"inherit"},children:"\xd7"})]},n)})}),(0,i.jsx)("input",{type:"text",value:s||l?c:(()=>{if(!s&&r.length>0){let t=e.find(e=>e.value===r[0]);return t?.label||r[0]}return""})(),onChange:e=>u(e.target.value),onFocus:()=>d(!0),placeholder:0!==r.length&&s?"Add more...":a,className:"input",style:{width:"100%"}}),l&&(0,i.jsxs)("div",{style:{position:"absolute",top:"100%",left:0,right:0,marginTop:"0.25rem",background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"8px",maxHeight:"200px",overflowY:"auto",zIndex:100,boxShadow:"0 4px 12px rgba(0,0,0,0.3)"},children:[0===m.length?(0,i.jsx)("div",{style:{padding:"0.75rem",color:"var(--text-secondary)",fontSize:"0.875rem"},children:o?"No matches - type to create":"No matching steps"}):m.slice(0,20).map(e=>(0,i.jsxs)("div",{onClick:()=>{var i;return i=e.value,void(s?t([...r,i]):(t([i]),d(!1)),u(""))},style:{padding:"0.625rem 0.75rem",cursor:"pointer",fontSize:"0.875rem",borderBottom:"1px solid var(--border)",transition:"background 0.15s"},onMouseEnter:e=>e.currentTarget.style.background="var(--bg-hover)",onMouseLeave:e=>e.currentTarget.style.background="transparent",children:[(0,i.jsx)("div",{style:{fontWeight:500},children:e.value}),e.label!==e.value&&(0,i.jsx)("div",{style:{fontSize:"0.75rem",color:"var(--text-secondary)",marginTop:"0.125rem"},children:e.label})]},e.value)),m.length>20&&(0,i.jsxs)("div",{style:{padding:"0.5rem",color:"var(--text-secondary)",fontSize:"0.75rem",textAlign:"center"},children:["+",m.length-20," more..."]})]})]})}},7948:(e,r,t)=>{"use strict";t.d(r,{KN:()=>c,Mo:()=>m,d0:()=>x,mQ:()=>d,t3:()=>p,wI:()=>l,yY:()=>h,zB:()=>u});var i=t(5155);t(2115);let n={width:"100%",padding:"0.875rem 1rem",fontSize:"0.9375rem",lineHeight:"1.5",color:"var(--text-primary)",background:"var(--bg-secondary)",borderWidth:"1px",borderStyle:"solid",borderColor:"var(--border)",borderRadius:"10px",outline:"none",transition:"all 0.2s ease"},a={borderColor:"var(--accent)",boxShadow:"0 0 0 3px rgba(99, 102, 241, 0.15)"},s={...n,cursor:"pointer",appearance:"none",backgroundImage:"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238888a0' d='M6 8L1 3h10z'/%3E%3C/svg%3E\")",backgroundRepeat:"no-repeat",backgroundPosition:"right 1rem center",paddingRight:"2.5rem"},o={...n,resize:"vertical",minHeight:"120px",fontFamily:"inherit"};function l(e,r){return{...n,...r===e?a:{}}}function d(e,r){return{...s,...r===e?a:{}}}function c(e,r){return{...o,...r===e?a:{}}}function u({label:e,children:r,required:t,compact:n,hint:a,action:s}){return(0,i.jsxs)("div",{style:{marginBottom:n?"0":"1.5rem"},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"0.5rem"},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,i.jsx)("label",{style:{fontWeight:500,fontSize:"0.875rem",color:"var(--text-primary)"},children:e}),t&&(0,i.jsx)("span",{style:{color:"var(--accent)",fontSize:"0.75rem"},children:"Required"}),a&&(0,i.jsxs)("span",{style:{color:"var(--text-secondary)",fontSize:"0.8125rem",fontWeight:400},children:["— ",a]})]}),s&&(0,i.jsx)("button",{onClick:s.onClick,style:{padding:"0.375rem 0.75rem",fontSize:"0.8125rem",fontWeight:500,background:"transparent",border:"1px solid var(--accent)",borderRadius:"6px",color:"var(--accent)",cursor:"pointer",transition:"all 0.2s"},children:s.label})]}),r]})}function p({status:e}){return"idle"===e.type?null:(0,i.jsxs)("div",{style:{marginBottom:"1.5rem",padding:"1rem 1.25rem",borderRadius:"10px",background:"success"===e.type?"rgba(16, 185, 129, 0.1)":"rgba(239, 68, 68, 0.1)",color:"success"===e.type?"var(--success)":"var(--error)",fontSize:"0.9375rem",display:"flex",alignItems:"center",gap:"0.5rem",borderWidth:"1px",borderStyle:"solid",borderColor:"success"===e.type?"rgba(16, 185, 129, 0.2)":"rgba(239, 68, 68, 0.2)"},children:["success"===e.type?"✅":"❌"," ",e.message]})}function m({icon:e,title:r,subtitle:t}){return(0,i.jsxs)("div",{style:{marginBottom:"2rem",paddingBottom:"1.5rem",borderBottom:"1px solid var(--border)"},children:[(0,i.jsxs)("h2",{style:{margin:0,fontSize:"1.25rem",fontWeight:600},children:[e," ",r]}),(0,i.jsx)("p",{style:{margin:"0.25rem 0 0",color:"var(--text-secondary)",fontSize:"0.875rem"},children:t})]})}function h({onClick:e,disabled:r,isPending:t,label:n="Save"}){return(0,i.jsx)("button",{onClick:e,disabled:r,style:{padding:"0.75rem 1.5rem",fontSize:"0.9375rem",fontWeight:600,borderRadius:"10px",border:"none",cursor:r?"not-allowed":"pointer",background:r?"var(--bg-hover)":"linear-gradient(135deg, var(--gradient-start), var(--gradient-end))",color:r?"var(--text-secondary)":"white",transition:"all 0.2s ease",boxShadow:r?"none":"0 4px 12px rgba(99, 102, 241, 0.25)"},children:t?"\uD83D\uDCBE Saving...":`💾 ${n}`})}function x({onClick:e}){return(0,i.jsx)("button",{onClick:e,style:{padding:"0.5rem",background:"transparent",border:"1px solid var(--border)",borderRadius:"8px",color:"var(--text-secondary)",cursor:"pointer",transition:"all 0.2s",lineHeight:1},title:"Remove",children:"✕"})}},8942:(e,r,t)=>{"use strict";t.d(r,{R:()=>o});var i=t(5155),n=t(9092),a=t.n(n);function s({isOpen:e,onClose:r,children:t,width:n="500px"}){return e?(0,i.jsxs)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(4px)",background:"rgba(0, 0, 0, 0.5)",animation:"fadeIn 0.2s ease-out"},className:"jsx-5d567d25508aa188",children:[(0,i.jsx)("div",{onClick:e=>e.stopPropagation(),style:{background:"var(--bg-primary)",borderRadius:"12px",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",width:n,maxWidth:"90%",maxHeight:"90vh",overflow:"auto",border:"1px solid var(--border)",animation:"slideUp 0.2s ease-out"},className:"jsx-5d567d25508aa188",children:t}),(0,i.jsx)(a(),{id:"5d567d25508aa188",children:"@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes slideUp{from{opacity:0;transform:scale(.95)translatey(10px)}to{opacity:1;transform:scale(1)translatey(0)}}"})]}):null}function o({isOpen:e,onClose:r,onConfirm:t,title:n,message:a,confirmLabel:o="Confirm",cancelLabel:l="Cancel",isDangerous:d=!1}){return(0,i.jsx)(s,{isOpen:e,onClose:r,width:"400px",children:(0,i.jsxs)("div",{style:{padding:"1.5rem"},children:[(0,i.jsx)("h3",{style:{margin:"0 0 0.5rem 0",fontSize:"1.25rem",fontWeight:600},children:n}),(0,i.jsx)("p",{style:{margin:"0 0 1.5rem 0",color:"var(--text-secondary)",lineHeight:1.5},children:a}),(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.75rem"},children:[(0,i.jsx)("button",{onClick:r,className:"btn",style:{background:"transparent",border:"1px solid var(--border)",color:"var(--text-primary)"},children:l}),(0,i.jsx)("button",{onClick:()=>{t(),r()},className:"btn",style:{background:d?"var(--error)":"var(--accent)",color:"white",border:"none",fontWeight:600},children:o})]})]})})}t(2115)},9910:(e,r,t)=>{"use strict";t.d(r,{URSClient:()=>x});var i=t(5155),n=t(2115),a=t(3321),s=t(8500),o=t.n(s),l=t(9339);let d=(0,l.createServerReference)("40b05670235a3804b8b805f19f3721be598a84c308",l.callServer,void 0,l.findSourceMapURL,"archiveURSAction");var c=t(1045),u=t(6444),p=t(3987),m=t(7948),h=t(8942);function x({urs:e,isNew:r=!1,linkedFS:s=[],allFS:l=[]}){let x=(0,a.useRouter)(),[y,b]=(0,n.useState)(r),[f,j]=(0,n.useState)(e?.title||""),[S,w]=(0,n.useState)(e?.status||"draft"),[C,k]=(0,n.useState)(e?.priority||"high"),[R,z]=(0,n.useState)(e?.owner||""),[B,N]=(0,n.useState)(e?.category||""),[_,W]=(0,n.useState)(e?.business_need||""),[I,A]=(0,n.useState)(e?.acceptance_criteria||[""]),[F,L]=(0,n.useState)(s.map(e=>e.id)),[U,q]=(0,n.useState)(null),[E,T]=(0,n.useState)({type:"idle"}),[D,H]=(0,n.useTransition)(),[$,O]=(0,n.useState)(!1),[M,P]=(0,n.useState)(!1),Q=async()=>{O(!0)},Y=async()=>{await d(e.id),x.refresh(),b(!1)},K=async()=>{P(!0)},Z=async()=>{await (0,c.Z)(e.id),x.refresh()};return!y&&e?(0,i.jsxs)("div",{className:"card",style:{maxWidth:"900px"},children:[e.is_archived&&(0,i.jsxs)("div",{style:{background:"rgba(239, 68, 68, 0.1)",border:"1px solid var(--error)",padding:"1rem",borderRadius:"8px",marginBottom:"1.5rem",color:"var(--error)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,i.jsxs)("span",{children:[(0,i.jsx)("strong",{children:"Archived:"})," This item is soft-deleted and hidden from lists."]}),(0,i.jsx)("button",{onClick:K,className:"btn",style:{background:"var(--bg-hover)",border:"1px solid var(--error)",color:"var(--error)"},children:"Restore"})]}),(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"2rem",paddingBottom:"1.5rem",borderBottom:"1px solid var(--border)"},children:[(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"1rem",marginBottom:"0.5rem"},children:[(0,i.jsx)("span",{style:{fontSize:"0.75rem",fontWeight:600,padding:"0.25rem 0.75rem",background:"linear-gradient(135deg, var(--gradient-start), var(--gradient-end))",borderRadius:"6px",color:"white"},children:e.id}),(0,i.jsxs)("span",{className:`badge ${"approved"===e.status?"badge-success":"review"===e.status?"badge-warning":""}`,style:{textTransform:"capitalize"},children:["approved"===e.status?"✅":"review"===e.status?"\uD83D\uDC40":"\uD83D\uDCDD"," ",e.status]})]}),(0,i.jsx)("h1",{style:{margin:0,fontSize:"1.5rem",fontWeight:600,lineHeight:1.3},children:e.title})]}),(0,i.jsxs)("div",{style:{display:"flex",gap:"0.75rem"},children:[(0,i.jsx)("button",{onClick:Q,className:"btn",style:{background:"transparent",border:"1px solid var(--error)",color:"var(--error)",display:e.is_archived?"none":"flex",alignItems:"center",gap:"0.5rem"},children:"\uD83D\uDDD1️ Archive"}),(0,i.jsxs)("button",{onClick:()=>b(!0),disabled:!!e.is_archived,className:"btn btn-primary",style:{display:"flex",gap:"0.5rem",alignItems:"center",opacity:e.is_archived?.5:1,cursor:e.is_archived?"not-allowed":"pointer"},children:[(0,i.jsx)("span",{children:"✏️"})," Edit"]})]})]}),(0,i.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1rem",marginBottom:"1.5rem"},children:[(0,i.jsx)(g,{label:"Priority",value:e.priority,color:function(e){switch(e){case"critical":return"#ef4444";case"high":return"#f97316";case"medium":return"#f59e0b";case"low":return"#10b981";default:return"var(--text-primary)"}}(e.priority)}),(0,i.jsx)(g,{label:"Category",value:e.category}),(0,i.jsx)(g,{label:"Owner",value:e.owner}),(0,i.jsx)(g,{label:"Created",value:e.created_at?new Date(e.created_at).toLocaleDateString():void 0})]}),(0,i.jsx)(v,{label:"Linked Functional Specs",count:s.length,children:s.length>0?(0,i.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.5rem"},children:s.map(e=>(0,i.jsx)(o(),{href:`/traceability/fs/${e.id}`,style:{textDecoration:"none"},children:(0,i.jsx)("span",{className:"badge",style:{background:"rgba(245, 158, 11, 0.15)",color:"var(--warning)"},children:e.id})},e.id))}):(0,i.jsx)("span",{style:{color:"var(--text-secondary)",fontStyle:"italic"},children:"No linked FS"})}),(0,i.jsx)(v,{label:"Business Need",children:e.business_need?(0,i.jsx)("div",{className:"prose",children:(0,i.jsx)(u.oz,{children:e.business_need})}):(0,i.jsx)("span",{style:{color:"var(--text-secondary)",fontStyle:"italic"},children:"No business need specified"})}),e.acceptance_criteria&&e.acceptance_criteria.length>0&&(0,i.jsx)(v,{label:"Acceptance Criteria",count:e.acceptance_criteria.length,children:(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:e.acceptance_criteria.map((e,r)=>(0,i.jsxs)("div",{style:{display:"flex",gap:"0.75rem",alignItems:"flex-start"},children:[(0,i.jsxs)("span",{style:{color:"var(--accent)",fontWeight:600,fontSize:"0.875rem",minWidth:"24px"},children:[r+1,"."]}),(0,i.jsx)("span",{style:{lineHeight:1.6},children:e})]},r))})}),(0,i.jsx)(h.R,{isOpen:$,onClose:()=>O(!1),onConfirm:Y,title:"Archive Requirement",message:"Are you sure you want to archive this URS? It will be hidden from lists but can be restored later.",confirmLabel:"Archive",isDangerous:!0}),(0,i.jsx)(h.R,{isOpen:M,onClose:()=>P(!1),onConfirm:Z,title:"Restore Requirement",message:"Are you sure you want to restore this URS?",confirmLabel:"Restore"})]}):(0,i.jsxs)("div",{className:"card",style:{maxWidth:"900px"},children:[(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"2rem",paddingBottom:"1.5rem",borderBottom:"1px solid var(--border)"},children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h2",{style:{margin:0,fontSize:"1.25rem",fontWeight:600},children:r?"New User Requirement":`Editing ${e?.id}`}),(0,i.jsx)("p",{style:{margin:"0.25rem 0 0",color:"var(--text-secondary)",fontSize:"0.875rem"},children:r?"Create a new URS document":"Update requirement details"})]}),(0,i.jsxs)("div",{style:{display:"flex",gap:"0.75rem"},children:[!r&&(0,i.jsx)("button",{onClick:Q,style:{padding:"0.75rem 1.5rem",background:"transparent",border:"1px solid var(--error)",borderRadius:"10px",color:"var(--error)",cursor:"pointer",fontWeight:600},title:"Archive this requirement",children:"Archive"}),(0,i.jsx)("button",{onClick:()=>{r?x.back():(j(e?.title||""),w(e?.status||"draft"),k(e?.priority||"high"),z(e?.owner||""),N(e?.category||""),W(e?.business_need||""),A(e?.acceptance_criteria||[""]),L(s.map(e=>e.id)),b(!1))},style:{padding:"0.75rem 1.5rem",background:"transparent",border:"1px solid var(--border)",borderRadius:"10px",color:"var(--text-secondary)",cursor:"pointer",fontWeight:600},children:"Cancel"}),(0,i.jsx)(m.yY,{onClick:()=>{T({type:"idle"}),H(async()=>{try{let i,n={title:f,status:S,priority:C,owner:R,category:B,business_need:_,intended_use:"",acceptance_criteria:I.filter(e=>e.trim()),regulatory_refs:[]};if(r||e.id,r){let{saveURS:e}=await t.e(579).then(t.bind(t,2579));i=await e(n)}else{let{updateURSAction:r}=await t.e(579).then(t.bind(t,2579));i=await r(e.id,n)}if(!i.success)return void T({type:"error",message:i.error});let a=i.id,{updateFSLinksAction:o}=await t.e(579).then(t.bind(t,2579)),d=s.map(e=>e.id);for(let e of new Set([...d,...F])){let r=l.find(r=>r.id===e);if(!r)continue;let t=new Set(r.urs_ids);F.includes(e)?t.add(a):t.delete(a),await o(e,Array.from(t))}T({type:"success",message:`Saved ${a}`}),r?x.push(`/traceability/urs/${a}`):(x.refresh(),b(!1))}catch(e){T({type:"error",message:"Failed to save"})}})},disabled:D||!f.trim()||!R.trim(),isPending:D,label:"Save URS"})]})]}),(0,i.jsx)(m.t3,{status:E}),(0,i.jsx)(m.zB,{label:"Title",required:!0,children:(0,i.jsx)("input",{type:"text",value:f,onChange:e=>j(e.target.value),onFocus:()=>q("title"),onBlur:()=>q(null),placeholder:"e.g., User Authentication Requirements",style:(0,m.wI)("title",U)})}),(0,i.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1rem",marginBottom:"1.5rem"},children:[(0,i.jsx)(m.zB,{label:"Status",compact:!0,children:(0,i.jsxs)("select",{value:S,onChange:e=>w(e.target.value),onFocus:()=>q("status"),onBlur:()=>q(null),style:(0,m.mQ)("status",U),children:[(0,i.jsx)("option",{value:"draft",children:"\uD83D\uDCDD Draft"}),(0,i.jsx)("option",{value:"review",children:"\uD83D\uDC40 Review"}),(0,i.jsx)("option",{value:"approved",children:"✅ Approved"})]})}),(0,i.jsx)(m.zB,{label:"Priority",compact:!0,children:(0,i.jsxs)("select",{value:C,onChange:e=>k(e.target.value),onFocus:()=>q("priority"),onBlur:()=>q(null),style:(0,m.mQ)("priority",U),children:[(0,i.jsx)("option",{value:"critical",children:"\uD83D\uDD34 Critical"}),(0,i.jsx)("option",{value:"high",children:"\uD83D\uDFE0 High"}),(0,i.jsx)("option",{value:"medium",children:"\uD83D\uDFE1 Medium"}),(0,i.jsx)("option",{value:"low",children:"\uD83D\uDFE2 Low"})]})}),(0,i.jsx)(m.zB,{label:"Category",compact:!0,children:(0,i.jsx)("input",{type:"text",value:B,onChange:e=>N(e.target.value),onFocus:()=>q("category"),onBlur:()=>q(null),placeholder:"e.g., Security",style:(0,m.wI)("category",U)})}),(0,i.jsx)(m.zB,{label:"Owner",required:!0,compact:!0,children:(0,i.jsx)("input",{type:"text",value:R,onChange:e=>z(e.target.value),onFocus:()=>q("owner"),onBlur:()=>q(null),placeholder:"e.g., Product Team",style:(0,m.wI)("owner",U)})})]}),(0,i.jsx)(m.zB,{label:"Linked Functional Specs",hint:"Select FS that implement this requirement",children:(0,i.jsx)(p.j,{options:l.map(e=>({value:e.id,label:`${e.id} - ${e.title}`})),selected:F,onChange:L,placeholder:"Search FS...",multi:!0})}),(0,i.jsx)(m.zB,{label:"Business Need",hint:"Describe why this requirement exists",children:(0,i.jsx)("textarea",{value:_,onChange:e=>W(e.target.value),onFocus:()=>q("businessNeed"),onBlur:()=>q(null),placeholder:"Describe the business problem this requirement addresses...",style:{...(0,m.KN)("businessNeed",U),minHeight:"140px"}})}),(0,i.jsx)(m.zB,{label:"Acceptance Criteria",hint:"Define measurable conditions for success",action:{label:"+ Add Criterion",onClick:()=>A([...I,""])},children:(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:I.map((e,r)=>(0,i.jsxs)("div",{style:{display:"flex",gap:"0.75rem",alignItems:"center"},children:[(0,i.jsxs)("span",{style:{color:"var(--accent)",fontWeight:600,fontSize:"0.875rem",minWidth:"24px"},children:[r+1,"."]}),(0,i.jsx)("input",{type:"text",value:e,onChange:e=>{var t;let i;return t=e.target.value,void((i=[...I])[r]=t,A(i))},onFocus:()=>q(`criterion-${r}`),onBlur:()=>q(null),placeholder:`Criterion ${r+1}`,style:{...(0,m.wI)(`criterion-${r}`,U),flex:1}}),I.length>1&&(0,i.jsx)("button",{onClick:()=>{I.length>1&&A(I.filter((e,t)=>t!==r))},style:{padding:"0.5rem",background:"transparent",border:"1px solid var(--border)",borderRadius:"8px",color:"var(--text-secondary)",cursor:"pointer"},children:"✕"})]},r))})}),(0,i.jsx)(h.R,{isOpen:$,onClose:()=>O(!1),onConfirm:Y,title:"Archive Requirement",message:"Are you sure you want to archive this URS? It will be hidden from lists but can be restored later.",confirmLabel:"Archive",isDangerous:!0}),(0,i.jsx)(h.R,{isOpen:M,onClose:()=>P(!1),onConfirm:Z,title:"Restore Requirement",message:"Are you sure you want to restore this URS?",confirmLabel:"Restore"})]})}function g({label:e,value:r,color:t}){return(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{style:{fontSize:"0.75rem",color:"var(--text-secondary)",fontWeight:500,marginBottom:"0.25rem"},children:e}),(0,i.jsx)("div",{style:{fontSize:"1rem",fontWeight:500,textTransform:"capitalize",color:t||"var(--text-primary)"},children:r||"—"})]})}function v({label:e,count:r,children:t}){return(0,i.jsxs)("div",{style:{marginBottom:"1.5rem"},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",marginBottom:"0.5rem"},children:[(0,i.jsx)("label",{style:{fontWeight:500,fontSize:"0.875rem",color:"var(--text-secondary)"},children:e}),void 0!==r&&(0,i.jsx)("span",{style:{fontSize:"0.75rem",padding:"0.125rem 0.5rem",background:"var(--bg-hover)",borderRadius:"9999px"},children:r})]}),(0,i.jsx)("div",{style:{lineHeight:1.7},children:t})]})}}},e=>{e.O(0,[500,594,444,441,794,358],()=>e(e.s=1704)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e,t,r,o,n,i,a,u,l={},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={exports:{}},o=!0;try{l[e].call(r.exports,r,r.exports,s),o=!1}finally{o&&delete c[e]}return r.exports}s.m=l,e=[],s.O=(t,r,o,n)=>{if(r){n=n||0;for(var i=e.length;i>0&&e[i-1][2]>n;i--)e[i]=e[i-1];e[i]=[r,o,n];return}for(var a=1/0,i=0;i<e.length;i++){for(var[r,o,n]=e[i],u=!0,l=0;l<r.length;l++)(!1&n||a>=n)&&Object.keys(s.O).every(e=>s.O[e](r[l]))?r.splice(l--,1):(u=!1,n<a&&(a=n));if(u){e.splice(i--,1);var c=o();void 0!==c&&(t=c)}}return t},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,o){if(1&o&&(e=this(e)),8&o||"object"==typeof e&&e&&(4&o&&e.__esModule||16&o&&"function"==typeof e.then))return e;var n=Object.create(null);s.r(n);var i={};t=t||[null,r({}),r([]),r(r)];for(var a=2&o&&e;"object"==typeof a&&!~t.indexOf(a);a=r(a))Object.getOwnPropertyNames(a).forEach(t=>i[t]=()=>e[t]);return i.default=()=>e,s.d(n,i),n},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,r)=>(s.f[r](e,t),t),[])),s.u=e=>"static/chunks/"+e+".
|
|
1
|
+
(()=>{"use strict";var e,t,r,o,n,i,a,u,l={},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={exports:{}},o=!0;try{l[e].call(r.exports,r,r.exports,s),o=!1}finally{o&&delete c[e]}return r.exports}s.m=l,e=[],s.O=(t,r,o,n)=>{if(r){n=n||0;for(var i=e.length;i>0&&e[i-1][2]>n;i--)e[i]=e[i-1];e[i]=[r,o,n];return}for(var a=1/0,i=0;i<e.length;i++){for(var[r,o,n]=e[i],u=!0,l=0;l<r.length;l++)(!1&n||a>=n)&&Object.keys(s.O).every(e=>s.O[e](r[l]))?r.splice(l--,1):(u=!1,n<a&&(a=n));if(u){e.splice(i--,1);var c=o();void 0!==c&&(t=c)}}return t},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,o){if(1&o&&(e=this(e)),8&o||"object"==typeof e&&e&&(4&o&&e.__esModule||16&o&&"function"==typeof e.then))return e;var n=Object.create(null);s.r(n);var i={};t=t||[null,r({}),r([]),r(r)];for(var a=2&o&&e;"object"==typeof a&&!~t.indexOf(a);a=r(a))Object.getOwnPropertyNames(a).forEach(t=>i[t]=()=>e[t]);return i.default=()=>e,s.d(n,i),n},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,r)=>(s.f[r](e,t),t),[])),s.u=e=>"static/chunks/"+e+".7253319e999e172d.js",s.miniCssF=e=>{},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},s.l=(e,t,r,n)=>{if(o[e])return void o[e].push(t);if(void 0!==r)for(var i,a,u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var c=u[l];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")=="_N_E:"+r){i=c;break}}i||(a=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,s.nc&&i.setAttribute("nonce",s.nc),i.setAttribute("data-webpack","_N_E:"+r),i.src=s.tu(e)),o[e]=[t];var d=(t,r)=>{i.onerror=i.onload=null,clearTimeout(f);var n=o[e];if(delete o[e],i.parentNode&&i.parentNode.removeChild(i),n&&n.forEach(e=>e(r)),t)return t(r)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),a&&document.head.appendChild(i)},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.tt=()=>(void 0===n&&(n={createScriptURL:e=>e},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(n=trustedTypes.createPolicy("nextjs#bundler",n))),n),s.tu=e=>s.tt().createScriptURL(e),s.p="/_next/",i={68:0,334:0},s.f.j=(e,t)=>{var r=s.o(i,e)?i[e]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(334|68)$/.test(e))i[e]=0;else{var o=new Promise((t,o)=>r=i[e]=[t,o]);t.push(r[2]=o);var n=s.p+s.u(e),a=Error();s.l(n,t=>{if(s.o(i,e)&&(0!==(r=i[e])&&(i[e]=void 0),r)){var o=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;a.message="Loading chunk "+e+" failed.\n("+o+": "+n+")",a.name="ChunkLoadError",a.type=o,a.request=n,r[1](a)}},"chunk-"+e,e)}},s.O.j=e=>0===i[e],a=(e,t)=>{var r,o,[n,a,u]=t,l=0;if(n.some(e=>0!==i[e])){for(r in a)s.o(a,r)&&(s.m[r]=a[r]);if(u)var c=u(s)}for(e&&e(t);l<n.length;l++)o=n[l],s.o(i,o)&&i[o]&&i[o][0](),i[o]=0;return s.O(c)},(u=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(a.bind(null,0)),u.push=a.bind(null,u.push.bind(u))})();
|
package/bin/cli.js
CHANGED
|
@@ -3883,14 +3883,45 @@ async function importResultsCommand(config, file, options) {
|
|
|
3883
3883
|
}
|
|
3884
3884
|
|
|
3885
3885
|
// src/commands/test.ts
|
|
3886
|
+
import { join as join6 } from "path";
|
|
3886
3887
|
async function testCommand(config, action, options) {
|
|
3887
3888
|
setConfig(config);
|
|
3888
3889
|
const { getDb: getDb2, closeDb: closeDb2 } = await Promise.resolve().then(() => (init_database(), exports_database));
|
|
3889
3890
|
const { importCucumberResults: importCucumberResults2, loadTestRuns: loadTestRuns2 } = await Promise.resolve().then(() => (init_test_repo(), exports_test_repo));
|
|
3890
3891
|
const { loadRelease: loadRelease2 } = await Promise.resolve().then(() => (init_release_repo(), exports_release_repo));
|
|
3891
|
-
|
|
3892
|
+
if (action !== "run") {
|
|
3893
|
+
getDb2();
|
|
3894
|
+
}
|
|
3892
3895
|
try {
|
|
3893
3896
|
switch (action) {
|
|
3897
|
+
case "run": {
|
|
3898
|
+
const { loadConfiguration, runCucumber } = await import("@cucumber/cucumber/api");
|
|
3899
|
+
const tags = options.tags;
|
|
3900
|
+
let cucumberConfig = config.cucumber || {};
|
|
3901
|
+
if (Object.keys(cucumberConfig).length === 0) {
|
|
3902
|
+
cucumberConfig = {
|
|
3903
|
+
paths: [join6(config.specsDir, "**/*.feature")],
|
|
3904
|
+
require: [join6(config.specsDir, "**/*.ts")],
|
|
3905
|
+
format: ["progress"]
|
|
3906
|
+
};
|
|
3907
|
+
}
|
|
3908
|
+
if (tags) {
|
|
3909
|
+
cucumberConfig = { ...cucumberConfig, tags };
|
|
3910
|
+
}
|
|
3911
|
+
try {
|
|
3912
|
+
const { runConfiguration } = await loadConfiguration({
|
|
3913
|
+
provided: cucumberConfig
|
|
3914
|
+
});
|
|
3915
|
+
const { success } = await runCucumber(runConfiguration);
|
|
3916
|
+
if (!success) {
|
|
3917
|
+
process.exit(1);
|
|
3918
|
+
}
|
|
3919
|
+
} catch (error) {
|
|
3920
|
+
console.error("Error running Cucumber:", error);
|
|
3921
|
+
process.exit(1);
|
|
3922
|
+
}
|
|
3923
|
+
break;
|
|
3924
|
+
}
|
|
3894
3925
|
case "import": {
|
|
3895
3926
|
const { releaseId, jsonPath } = options;
|
|
3896
3927
|
const release = loadRelease2(releaseId);
|
|
@@ -3937,7 +3968,9 @@ async function testCommand(config, action, options) {
|
|
|
3937
3968
|
}
|
|
3938
3969
|
}
|
|
3939
3970
|
} finally {
|
|
3940
|
-
|
|
3971
|
+
if (action !== "run") {
|
|
3972
|
+
closeDb2();
|
|
3973
|
+
}
|
|
3941
3974
|
}
|
|
3942
3975
|
}
|
|
3943
3976
|
|
|
@@ -3998,6 +4031,10 @@ release.command("import-results <file>").description("Import Cucumber JSON resul
|
|
|
3998
4031
|
await importResultsCommand(config, file, { releaseId: options.releaseId });
|
|
3999
4032
|
});
|
|
4000
4033
|
var test = program2.command("test").description("Manage test results");
|
|
4034
|
+
test.command("run").description("Run Cucumber tests").option("-t, --tags <expression>", "Cucumber tags to run").option("-d, --db <path>", "Database path", "./matrix.db").action(async (options) => {
|
|
4035
|
+
const config = await loadConfig({ dbPath: options.db });
|
|
4036
|
+
await testCommand(config, "run", { tags: options.tags });
|
|
4037
|
+
});
|
|
4001
4038
|
test.command("import <jsonPath>").description("Import Cucumber JSON test results").requiredOption("-r, --release <releaseId>", "Release ID").option("-d, --db <path>", "Database path", "./matrix.db").action(async (jsonPath, options) => {
|
|
4002
4039
|
const config = await loadConfig({ dbPath: options.db });
|
|
4003
4040
|
await testCommand(config, "import", { releaseId: options.release, jsonPath });
|
package/bin/cli.ts
CHANGED
|
@@ -148,6 +148,16 @@ const test = program
|
|
|
148
148
|
.command('test')
|
|
149
149
|
.description('Manage test results');
|
|
150
150
|
|
|
151
|
+
test
|
|
152
|
+
.command('run')
|
|
153
|
+
.description('Run Cucumber tests')
|
|
154
|
+
.option('-t, --tags <expression>', 'Cucumber tags to run')
|
|
155
|
+
.option('-d, --db <path>', 'Database path', './matrix.db')
|
|
156
|
+
.action(async (options) => {
|
|
157
|
+
const config = await loadConfig({ dbPath: options.db });
|
|
158
|
+
await testCommand(config, 'run', { tags: options.tags });
|
|
159
|
+
});
|
|
160
|
+
|
|
151
161
|
test
|
|
152
162
|
.command('import <jsonPath>')
|
|
153
163
|
.description('Import Cucumber JSON test results')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nivora/matrix",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"description": "Requirements documentation system with semantic search",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -24,12 +24,13 @@
|
|
|
24
24
|
"scripts": {
|
|
25
25
|
"dev": "bun --bun next dev",
|
|
26
26
|
"build": "bun --bun next build --webpack",
|
|
27
|
-
"build:package": "NEXT_TELEMETRY_DISABLED=1 bun run build && rm -rf .next/cache && bun build ./bin/cli.ts --outdir ./bin --target node --external fastembed",
|
|
27
|
+
"build:package": "NEXT_TELEMETRY_DISABLED=1 bun run build && rm -rf .next/cache && bun build ./bin/cli.ts --outdir ./bin --target node --external fastembed --external @cucumber/cucumber",
|
|
28
28
|
"start": "bun --bun next start",
|
|
29
29
|
"lint": "eslint",
|
|
30
30
|
"db:sync": "bun run src/lib/database/migrate.ts"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
+
"@cucumber/cucumber": "^12.5.0",
|
|
33
34
|
"commander": "^14.0.2",
|
|
34
35
|
"fastembed": "^2.1.0",
|
|
35
36
|
"glob": "^13.0.0",
|
|
@@ -61,4 +62,4 @@
|
|
|
61
62
|
"publishConfig": {
|
|
62
63
|
"access": "public"
|
|
63
64
|
}
|
|
64
|
-
}
|
|
65
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
exports.id=14,exports.ids=[14],exports.modules={11390:(a,b,c)=>{"use strict";c.d(b,{R:()=>h});var d=c(48249),e=c(73142),f=c.n(e);function g({isOpen:a,onClose:b,children:c,width:e="500px"}){return a?(0,d.jsxs)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(4px)",background:"rgba(0, 0, 0, 0.5)",animation:"fadeIn 0.2s ease-out"},className:"jsx-5d567d25508aa188",children:[(0,d.jsx)("div",{onClick:a=>a.stopPropagation(),style:{background:"var(--bg-primary)",borderRadius:"12px",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",width:e,maxWidth:"90%",maxHeight:"90vh",overflow:"auto",border:"1px solid var(--border)",animation:"slideUp 0.2s ease-out"},className:"jsx-5d567d25508aa188",children:c}),(0,d.jsx)(f(),{id:"5d567d25508aa188",children:"@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes slideUp{from{opacity:0;transform:scale(.95)translatey(10px)}to{opacity:1;transform:scale(1)translatey(0)}}"})]}):null}function h({isOpen:a,onClose:b,onConfirm:c,title:e,message:f,confirmLabel:h="Confirm",cancelLabel:i="Cancel",isDangerous:j=!1}){return(0,d.jsx)(g,{isOpen:a,onClose:b,width:"400px",children:(0,d.jsxs)("div",{style:{padding:"1.5rem"},children:[(0,d.jsx)("h3",{style:{margin:"0 0 0.5rem 0",fontSize:"1.25rem",fontWeight:600},children:e}),(0,d.jsx)("p",{style:{margin:"0 0 1.5rem 0",color:"var(--text-secondary)",lineHeight:1.5},children:f}),(0,d.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.75rem"},children:[(0,d.jsx)("button",{onClick:b,className:"btn",style:{background:"transparent",border:"1px solid var(--border)",color:"var(--text-primary)"},children:i}),(0,d.jsx)("button",{onClick:()=>{c(),b()},className:"btn",style:{background:j?"var(--error)":"var(--accent)",color:"white",border:"none",fontWeight:600},children:h})]})]})})}c(67484)},11851:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>e});var d=c(5735);function e({children:a}){return(0,d.jsx)("div",{children:a})}},49663:()=>{},73142:(a,b,c)=>{"use strict";a.exports=c(73895).style},73895:(a,b,c)=>{"use strict";c(49663);var d=c(67484),e=d&&"object"==typeof d&&"default"in d?d:{default:d},f="undefined"!=typeof process&&process.env&&!0,g=function(a){return"[object String]"===Object.prototype.toString.call(a)},h=function(){function a(a){var b=void 0===a?{}:a,c=b.name,d=void 0===c?"stylesheet":c,e=b.optimizeForSpeed,h=void 0===e?f:e;i(g(d),"`name` must be a string"),this._name=d,this._deletedRulePlaceholder="#"+d+"-deleted-rule____{}",i("boolean"==typeof h,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=h,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0,this._nonce=null}var b,c=a.prototype;return c.setOptimizeForSpeed=function(a){i("boolean"==typeof a,"`setOptimizeForSpeed` accepts a boolean"),i(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=a,this.inject()},c.isOptimizeForSpeed=function(){return this._optimizeForSpeed},c.inject=function(){var a=this;i(!this._injected,"sheet already injected"),this._injected=!0,this._serverSheet={cssRules:[],insertRule:function(b,c){return"number"==typeof c?a._serverSheet.cssRules[c]={cssText:b}:a._serverSheet.cssRules.push({cssText:b}),c},deleteRule:function(b){a._serverSheet.cssRules[b]=null}}},c.getSheetForTag=function(a){if(a.sheet)return a.sheet;for(var b=0;b<document.styleSheets.length;b++)if(document.styleSheets[b].ownerNode===a)return document.styleSheets[b]},c.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},c.insertRule=function(a,b){return i(g(a),"`insertRule` accepts only strings"),"number"!=typeof b&&(b=this._serverSheet.cssRules.length),this._serverSheet.insertRule(a,b),this._rulesCount++},c.replaceRule=function(a,b){this._optimizeForSpeed;var c=this._serverSheet;if(b.trim()||(b=this._deletedRulePlaceholder),!c.cssRules[a])return a;c.deleteRule(a);try{c.insertRule(b,a)}catch(d){f||console.warn("StyleSheet: illegal rule: \n\n"+b+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),c.insertRule(this._deletedRulePlaceholder,a)}return a},c.deleteRule=function(a){this._serverSheet.deleteRule(a)},c.flush=function(){this._injected=!1,this._rulesCount=0,this._serverSheet.cssRules=[]},c.cssRules=function(){return this._serverSheet.cssRules},c.makeStyleTag=function(a,b,c){b&&i(g(b),"makeStyleTag accepts only strings as second parameter");var d=document.createElement("style");this._nonce&&d.setAttribute("nonce",this._nonce),d.type="text/css",d.setAttribute("data-"+a,""),b&&d.appendChild(document.createTextNode(b));var e=document.head||document.getElementsByTagName("head")[0];return c?e.insertBefore(d,c):e.appendChild(d),d},b=[{key:"length",get:function(){return this._rulesCount}}],function(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}(a.prototype,b),a}();function i(a,b){if(!a)throw Error("StyleSheet: "+b+".")}var j=function(a){for(var b=5381,c=a.length;c;)b=33*b^a.charCodeAt(--c);return b>>>0},k={};function l(a,b){if(!b)return"jsx-"+a;var c=String(b),d=a+c;return k[d]||(k[d]="jsx-"+j(a+"-"+c)),k[d]}function m(a,b){var c=a+(b=b.replace(/\/style/gi,"\\/style"));return k[c]||(k[c]=b.replace(/__jsx-style-dynamic-selector/g,a)),k[c]}var n=function(){function a(a){var b=void 0===a?{}:a,c=b.styleSheet,d=void 0===c?null:c,e=b.optimizeForSpeed,f=void 0!==e&&e;this._sheet=d||new h({name:"styled-jsx",optimizeForSpeed:f}),this._sheet.inject(),d&&"boolean"==typeof f&&(this._sheet.setOptimizeForSpeed(f),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var b=a.prototype;return b.add=function(a){var b=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(a.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed());var c=this.getIdAndRules(a),d=c.styleId,e=c.rules;if(d in this._instancesCounts){this._instancesCounts[d]+=1;return}var f=e.map(function(a){return b._sheet.insertRule(a)}).filter(function(a){return -1!==a});this._indices[d]=f,this._instancesCounts[d]=1},b.remove=function(a){var b=this,c=this.getIdAndRules(a).styleId;if(function(a,b){if(!a)throw Error("StyleSheetRegistry: "+b+".")}(c in this._instancesCounts,"styleId: `"+c+"` not found"),this._instancesCounts[c]-=1,this._instancesCounts[c]<1){var d=this._fromServer&&this._fromServer[c];d?(d.parentNode.removeChild(d),delete this._fromServer[c]):(this._indices[c].forEach(function(a){return b._sheet.deleteRule(a)}),delete this._indices[c]),delete this._instancesCounts[c]}},b.update=function(a,b){this.add(b),this.remove(a)},b.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},b.cssRules=function(){var a=this,b=this._fromServer?Object.keys(this._fromServer).map(function(b){return[b,a._fromServer[b]]}):[],c=this._sheet.cssRules();return b.concat(Object.keys(this._indices).map(function(b){return[b,a._indices[b].map(function(a){return c[a].cssText}).join(a._optimizeForSpeed?"":"\n")]}).filter(function(a){return!!a[1]}))},b.styles=function(a){var b,c;return b=this.cssRules(),void 0===(c=a)&&(c={}),b.map(function(a){var b=a[0],d=a[1];return e.default.createElement("style",{id:"__"+b,key:"__"+b,nonce:c.nonce?c.nonce:void 0,dangerouslySetInnerHTML:{__html:d}})})},b.getIdAndRules=function(a){var b=a.children,c=a.dynamic,d=a.id;if(c){var e=l(d,c);return{styleId:e,rules:Array.isArray(b)?b.map(function(a){return m(e,a)}):[m(e,b)]}}return{styleId:l(d),rules:Array.isArray(b)?b:[b]}},b.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(a,b){return a[b.id.slice(2)]=b,a},{})},a}(),o=d.createContext(null);o.displayName="StyleSheetContext";e.default.useInsertionEffect||e.default.useLayoutEffect;var p=void 0;function q(a){var b=p||d.useContext(o);return b&&b.add(a),null}q.dynamic=function(a){return a.map(function(a){return l(a[0],a[1])}).join(" ")},b.style=q},87257:(a,b,c)=>{"use strict";c.r(b),c.d(b,{"400ffbcd2d64dd30e1304a9b6efce4582a9db8b7c1":()=>s,"4044669c6fd388333aa29ca18a112fe7aab43c1d3a":()=>u,"40531d61c0c39299a63cbb078123faf8838d60306c":()=>n,"40779b7c851ade3b1acdccd6ab8e909d08b13ae791":()=>w,"4099cc8815e75a5d385d33a1f85c407440c684e2ba":()=>t,"40a222d3a7f7110ebfb737afe6629709ff20a377e4":()=>p,"40aa05229b37bc19e485dbd37bcd77ca253f4afd4e":()=>x,"40fccbb6178b54d93474922f1cb27eccbe41d7df22":()=>v,"609f7bcaf49130ba697675825e76ef988ab44b87c0":()=>r,"60b39224c2cb9af6fd20905a811985e7f1d0456a4a":()=>q,"60e6f04d460652e7cd11dbd7b90a2cb6abff210f9e":()=>o,"70b59372775d5b0f687aadc2cb3513c5970541b9b2":()=>m});var d=c(95349),e=c(29021),f=c.n(e),g=c(33873),h=c.n(g),i=c(42650),j=c(82907),k=c(13454);function l(a,b){let c=a.split("\n"),d=[],e=[],f=!1;for(let a of c){let b=a.trim();if(b.startsWith("@")&&!f){let a=b.split(/\s+/).filter(a=>a.startsWith("@"));e.push(...a)}else if(b.startsWith("Feature:")){f=!0;break}}let g=c.find(a=>a.trim().startsWith("Feature:")),i=g?.match(/Feature:\s*(.+)/),j=i?.[1]||h().basename(b),k=e.find(a=>/^@FS-\d+$/i.test(a))?.replace("@","").toUpperCase(),l=j.match(/^(FS-\d+)/i),m=h().basename(b).match(/^(FS-\d+)/i),n=k||l?.[1].toUpperCase()||m?.[1].toUpperCase()||h().basename(b,".feature").toUpperCase(),o=j;l&&(o=(o=o.substring(l[1].length).trim()).replace(/^[:\-\s]+/,""));let p=c.findIndex(a=>a.trim().startsWith("Feature:")),q="",r=[];for(let a=p+1;a<c.length;a++){let b=c[a].trim();if(b.startsWith("Scenario")||b.startsWith("Background")||b.startsWith("@"))break;b.startsWith("-")?r.push(b.substring(1).trim()):b&&!b.startsWith("Requirements:")&&(q+=(q?" ":"")+b)}let s=null;for(let a=0;a<c.length;a++){let b=c[a].trim();if(b.startsWith("Scenario Outline:")||b.startsWith("Scenario:")){s&&d.push(s);let e=b.startsWith("Scenario Outline:"),f=b.replace(/Scenario( Outline)?:\s*/,""),g=[];for(let b=a-1;b>=0;b--){let a=c[b].trim();if(a.startsWith("@")){let b=a.split(/\s+/).filter(a=>a.startsWith("@"));g.unshift(...b)}else if(a)break}s={name:f,tags:g,steps:[],line:a+1,is_outline:e}}s&&/^(Given|When|Then|And|But)\s/.test(b)&&s.steps.push(b)}s&&d.push(s);let t=e.filter(a=>a.match(/@URS-\d+/)).map(a=>a.replace("@","")),u=e.filter(a=>a.match(/@RISK-\d+/)).map(a=>a.replace("@","")),v=new Date().toISOString().split("T")[0];return{id:n,type:"fs",title:o,file_path:b,description:q,requirements:r,urs_ids:t,risk_ids:u,scenarios:d,scenario_count:d.length,created_at:v,updated_at:v}}async function m(a,b,d){try{let e,g=process.env.MACHINE_SPECS_DIR||h().join(process.cwd(),"specs"),j=a,m=b;if(!d&&a.startsWith("FS-NEW-")){let{getNextId:a}=await Promise.resolve().then(c.bind(c,624));e=a("FS","fs");let d=(m=b.includes("@FS-XXX")?b.replace("@FS-XXX",`@${e}`):b.replace(/Feature: FS-[A-Z0-9]+/,`Feature: ${e}`)).match(/Feature:\s*(.+)/),f=d?.[1]?.trim()||"Untitled",g=(f=f.replace(/^FS-\d+[:\-\s]*/,"")).toLowerCase().replace(/[^a-z0-9]+/g,"-");j=`${e}-${g}.feature`}else{let b=l(m,d||a),c=b.title.toLowerCase().replace(/[^a-z0-9]+/g,"-"),e=b.id;j=`${e}-${c}.feature`}let n=j.replace(/[^a-zA-Z0-9\-_\.]/g,"-").toLowerCase();if(!n.endsWith(".feature"))return{success:!1,error:"Filename must end with .feature"};let o=h().join(g,"fs",n);if(d&&d!==o&&f().existsSync(d)&&f().unlinkSync(d),!d&&f().existsSync(o))return{success:!1,error:`File ${n} already exists`};f().writeFileSync(o,m,"utf-8");let p=l(m,o);return(0,k.Dl)(p),(0,i.revalidatePath)("/"),(0,i.revalidatePath)("/matrix"),(0,i.revalidatePath)("/builder"),(0,i.revalidatePath)("/traceability"),{success:!0,id:p.id}}catch(a){return{success:!1,error:String(a)}}}async function n(a){try{let b=(0,j.r_)(a);return(0,i.revalidatePath)("/"),(0,i.revalidatePath)("/matrix"),(0,i.revalidatePath)("/builder"),(0,i.revalidatePath)("/traceability"),{success:!0,id:b.id}}catch(a){return{success:!1,error:String(a)}}}async function o(a,b){try{let{updateURS:d}=await Promise.resolve().then(c.bind(c,15177)),e=d(a,b);if(!e)return{success:!1,error:"URS not found"};return(0,i.revalidatePath)("/"),(0,i.revalidatePath)("/matrix"),(0,i.revalidatePath)("/builder"),(0,i.revalidatePath)("/traceability"),{success:!0,id:e.id}}catch(a){return{success:!1,error:String(a)}}}async function p(a){try{let b=(0,j.w)(a);return(0,i.revalidatePath)("/"),(0,i.revalidatePath)("/matrix"),(0,i.revalidatePath)("/builder"),(0,i.revalidatePath)("/traceability"),{success:!0,id:b.id}}catch(a){return{success:!1,error:String(a)}}}async function q(a,b){try{let{updateRisk:d}=await Promise.resolve().then(c.bind(c,18986)),e=d(a,b);if(!e)return{success:!1,error:"Risk not found"};return(0,i.revalidatePath)("/"),(0,i.revalidatePath)("/matrix"),(0,i.revalidatePath)("/builder"),(0,i.revalidatePath)("/traceability"),{success:!0,id:e.id}}catch(a){return{success:!1,error:String(a)}}}async function r(a,b){try{let{updateFSURSLinks:d}=await Promise.resolve().then(c.bind(c,13454));if(!d(a,b))return{success:!1,error:"Failed to update links"};return(0,i.revalidatePath)("/"),(0,i.revalidatePath)("/matrix"),(0,i.revalidatePath)("/traceability"),{success:!0,id:a}}catch(a){return{success:!1,error:String(a)}}}async function s(a){(0,j.PM)(a),(0,i.revalidatePath)("/traceability/urs"),(0,i.revalidatePath)(`/traceability/urs/${a}`)}async function t(a){(0,j.tf)(a),(0,i.revalidatePath)("/traceability/urs"),(0,i.revalidatePath)("/traceability/archive")}async function u(a){(0,j.kW)(a),(0,i.revalidatePath)("/traceability/fs"),(0,i.revalidatePath)(`/traceability/fs/${a}`)}async function v(a){(0,j.wO)(a),(0,i.revalidatePath)("/traceability/fs"),(0,i.revalidatePath)("/traceability/archive")}async function w(a){(0,j.Ei)(a),(0,i.revalidatePath)("/traceability/risk"),(0,i.revalidatePath)(`/traceability/risk/${a}`)}async function x(a){(0,j.og)(a),(0,i.revalidatePath)("/traceability/risk"),(0,i.revalidatePath)("/traceability/archive")}(0,c(89337).D)([m,n,o,p,q,r,s,t,u,v,w,x]),(0,d.A)(m,"70b59372775d5b0f687aadc2cb3513c5970541b9b2",null),(0,d.A)(n,"40531d61c0c39299a63cbb078123faf8838d60306c",null),(0,d.A)(o,"60e6f04d460652e7cd11dbd7b90a2cb6abff210f9e",null),(0,d.A)(p,"40a222d3a7f7110ebfb737afe6629709ff20a377e4",null),(0,d.A)(q,"60b39224c2cb9af6fd20905a811985e7f1d0456a4a",null),(0,d.A)(r,"609f7bcaf49130ba697675825e76ef988ab44b87c0",null),(0,d.A)(s,"400ffbcd2d64dd30e1304a9b6efce4582a9db8b7c1",null),(0,d.A)(t,"4099cc8815e75a5d385d33a1f85c407440c684e2ba",null),(0,d.A)(u,"4044669c6fd388333aa29ca18a112fe7aab43c1d3a",null),(0,d.A)(v,"40fccbb6178b54d93474922f1cb27eccbe41d7df22",null),(0,d.A)(w,"40779b7c851ade3b1acdccd6ab8e909d08b13ae791",null),(0,d.A)(x,"40aa05229b37bc19e485dbd37bcd77ca253f4afd4e",null)}};
|
package/.next/server/chunks/2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=2,exports.ids=[2],exports.modules={72002:(a,b,c)=>{c.d(b,{saveFS:()=>j,saveRisk:()=>f,saveURS:()=>e,updateFSLinksAction:()=>g,updateRiskAction:()=>h,updateURSAction:()=>i});var d=c(99829);let e=(0,d.createServerReference)("40531d61c0c39299a63cbb078123faf8838d60306c",d.callServer,void 0,d.findSourceMapURL,"saveURS"),f=(0,d.createServerReference)("40a222d3a7f7110ebfb737afe6629709ff20a377e4",d.callServer,void 0,d.findSourceMapURL,"saveRisk"),g=(0,d.createServerReference)("609f7bcaf49130ba697675825e76ef988ab44b87c0",d.callServer,void 0,d.findSourceMapURL,"updateFSLinksAction"),h=(0,d.createServerReference)("60b39224c2cb9af6fd20905a811985e7f1d0456a4a",d.callServer,void 0,d.findSourceMapURL,"updateRiskAction"),i=(0,d.createServerReference)("60e6f04d460652e7cd11dbd7b90a2cb6abff210f9e",d.callServer,void 0,d.findSourceMapURL,"updateURSAction"),j=(0,d.createServerReference)("70b59372775d5b0f687aadc2cb3513c5970541b9b2",d.callServer,void 0,d.findSourceMapURL,"saveFS")}};
|