lula2 0.8.11-nightly.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_app/immutable/chunks/CdJEnKns.js +1 -0
- package/dist/_app/immutable/chunks/{BydneR37.js → D0gFZGZF.js} +1 -1
- package/dist/_app/immutable/chunks/{Cbsfk0v7.js → S6YlURmO.js} +1 -1
- package/dist/_app/immutable/chunks/{Di_3MAY_.js → hVr0KxW1.js} +1 -1
- package/dist/_app/immutable/entry/{app.BewuJGLx.js → app.ByeCP5Xm.js} +2 -2
- package/dist/_app/immutable/entry/start.FuG7wFo0.js +1 -0
- package/dist/_app/immutable/nodes/{0.BkMv-VOO.js → 0.CjWUor9S.js} +1 -1
- package/dist/_app/immutable/nodes/{1.CVWrzUA3.js → 1.GZ_FtWiS.js} +1 -1
- package/dist/_app/immutable/nodes/{2.DWeNveln.js → 2.DaglxKDX.js} +1 -1
- package/dist/_app/immutable/nodes/{3.9nbKMi7z.js → 3.DROCg9aC.js} +1 -1
- package/dist/_app/immutable/nodes/{4.Dgx-7X9g.js → 4.DueKxC_Y.js} +1 -1
- package/dist/_app/version.json +1 -1
- package/dist/cli/commands/ui.js +19 -18
- package/dist/cli/server/index.js +19 -18
- package/dist/cli/server/server.js +19 -18
- package/dist/cli/server/spreadsheetRoutes.js +19 -18
- package/dist/cli/server/websocketServer.js +19 -18
- package/dist/index.html +6 -6
- package/dist/index.js +19 -18
- package/package.json +129 -128
- package/dist/_app/immutable/chunks/SJbJsR2v.js +0 -1
- package/dist/_app/immutable/entry/start.D1fqyZJI.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as Ne,a as d,s as I,f as x,e as c,c as Ae,t as tr}from"../chunks/DSxRA67V.js";import{i as We}from"../chunks/kRA7ZCNG.js";import{p as Xe,af as Ve,b as a,U as k,y as pe,g as e,ag as $r,c as o,n as ke,r as t,a as Ke,t as P,ah as Nr,s as i,f as we,ai as xr,a1 as ze,ae as hr,aj as yr,i as de,o as ot,W as lt}from"../chunks/DHuA7MQr.js";import{l as ar,p as Je,i as M,a as st,s as it}from"../chunks/Ew6_cz_0.js";import{a as Lr,s as le,r as Tr,e as ge,b as Ye,c as Vr,d as _r,i as Cr,f as Sr,w as wr}from"../chunks/DznG4VMX.js";import{g as nt}from"../chunks/SJbJsR2v.js";function dt(ue){return function(...U){var F=U[0];return F.stopPropagation(),ue?.apply(this,U)}}var vt=Ne("<title> </title>"),ct=Ne('<svg><!><path d="M11 18L12.41 19.41 15 16.83 15 29 17 29 17 16.83 19.59 19.41 21 18 16 13 11 18z"></path><path d="M23.5,22H23V20h.5a4.5,4.5,0,0,0,.36-9L23,11l-.1-.82a7,7,0,0,0-13.88,0L9,11,8.14,11a4.5,4.5,0,0,0,.36,9H9v2H8.5A6.5,6.5,0,0,1,7.2,9.14a9,9,0,0,1,17.6,0A6.5,6.5,0,0,1,23.5,22Z"></path></svg>');function gt(ue,U){const F=ar(U,["children","$$slots","$$events","$$legacy"]),Y=ar(F,["size","title"]);Xe(U,!1);const E=k(),T=k();let Z=Je(U,"size",8,16),b=Je(U,"title",8,void 0);Ve(()=>(pe(F),pe(b())),()=>{a(E,F["aria-label"]||F["aria-labelledby"]||b())}),Ve(()=>(e(E),pe(F)),()=>{a(T,{"aria-hidden":e(E)?void 0:!0,role:e(E)?"img":void 0,focusable:Number(F.tabindex)===0?!0:void 0})}),$r(),We();var $=ct();Lr($,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:Z(),height:Z(),...e(T),...Y}));var K=o($);{var G=H=>{var g=vt(),N=o(g,!0);t(g),P(()=>I(N,b())),d(H,g)};M(K,H=>{b()&&H(G)})}ke(2),t($),d(ue,$),Ke()}var pt=Ne("<title> </title>"),ut=Ne('<svg><!><path d="M10 6H14V10H10zM18 6H22V10H18zM10 14H14V18H10zM18 14H22V18H18zM10 22H14V26H10zM18 22H22V26H18z"></path></svg>');function kr(ue,U){const F=ar(U,["children","$$slots","$$events","$$legacy"]),Y=ar(F,["size","title"]);Xe(U,!1);const E=k(),T=k();let Z=Je(U,"size",8,16),b=Je(U,"title",8,void 0);Ve(()=>(pe(F),pe(b())),()=>{a(E,F["aria-label"]||F["aria-labelledby"]||b())}),Ve(()=>(e(E),pe(F)),()=>{a(T,{"aria-hidden":e(E)?void 0:!0,role:e(E)?"img":void 0,focusable:Number(F.tabindex)===0?!0:void 0})}),$r(),We();var $=ut();Lr($,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:Z(),height:Z(),...e(T),...Y}));var K=o($);{var G=H=>{var g=pt(),N=o(g,!0);t(g),P(()=>I(N,b())),d(H,g)};M(K,H=>{b()&&H(G)})}ke(),t($),d(ue,$),Ke()}var bt=x('<div class="p-4 text-sm text-blue-800 rounded-lg bg-blue-50 dark:bg-gray-800 dark:text-blue-400"><div class="flex items-center"><svg class="flex-shrink-0 inline w-4 h-4 mr-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"></path></svg> <div><span class="font-medium">File loaded:</span> <div class="mt-1"><span class="font-medium">Sheets:</span> <span class="font-medium">Fields:</span> <span class="font-medium">Controls found:</span> </div></div></div></div>'),ft=x('<div class="p-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400"><div class="flex items-center"><svg class="flex-shrink-0 inline w-4 h-4 mr-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"></path></svg> <span> </span></div></div>'),mt=x('<div class="p-4 text-sm text-green-800 rounded-lg bg-green-50 dark:bg-gray-800 dark:text-green-400"><div class="flex items-center"><svg class="flex-shrink-0 inline w-4 h-4 mr-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"></path></svg> <span> </span></div></div>'),xt=x("<option> </option>"),ht=x("<option> </option>"),yt=x("<option> </option>"),_t=x('<span class="ml-auto text-xs text-blue-600 dark:text-blue-400">ID</span>'),wt=x('<div draggable="true" role="button" tabindex="0" class="flex items-center px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-500 dark:text-gray-400 rounded text-sm cursor-move hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors opacity-75"><svg class="w-3 h-3 mr-2 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20"><path d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"></path></svg> <span class="truncate line-through"> </span> <!></div>'),kt=x('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">No excluded fields</p>'),Ct=x('<div draggable="true" role="button" tabindex="0"><!> <span class="truncate"> </span></div>'),St=x('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p>'),$t=x('<div draggable="true" role="button" tabindex="0"><!> <span class="truncate"> </span></div>'),Dt=x('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p>'),Mt=x('<div draggable="true" role="button" tabindex="0"><!> <span class="truncate"> </span></div>'),zt=x('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p>'),At=x('<div draggable="false" role="button" tabindex="0" class="flex items-center px-3 py-2 bg-orange-100 dark:bg-orange-900/30 text-orange-800 dark:text-orange-300 rounded text-sm hover:bg-orange-200 dark:hover:bg-orange-800/30 transition-colors"><span class="truncate"> </span> <button class="ml-auto text-gray-400 hover:text-red-500 dark:text-gray-500 dark:hover:text-red-400" title="Remove from mappings">×</button></div>'),Ft=x('<div role="region" aria-label="Justification field drop zone"><p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p></div>'),Ot=x('<th class="px-4 py-2"> </th>'),Pt=x('<td class="px-4 py-2"> </td>'),Ht=x('<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700"></tr>'),Et=x('<div class="bg-gradient-to-br from-gray-50 to-gray-100 dark:from-gray-800 dark:to-gray-900 rounded-lg p-4 border border-gray-200 dark:border-gray-700"><h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-4">Sample Data Preview</h3> <div class="overflow-x-auto"><table class="w-full text-sm text-left text-gray-500 dark:text-gray-400"><thead class="text-xs text-gray-700 uppercase bg-gray-100 dark:bg-gray-600 dark:text-gray-400"><tr></tr></thead><tbody></tbody></table></div></div>'),It=x('<span class="flex items-center"><svg class="animate-spin -ml-1 mr-3 h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> Importing...</span>'),jt=x(`<div class="bg-gradient-to-br from-gray-50 to-gray-100 dark:from-gray-800 dark:to-gray-900 rounded-lg p-4 border border-gray-200 dark:border-gray-700"><h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-4">Import Options</h3> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4"><div><label for="controlSetName" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Control Set Name <span class="text-red-500">*</span></label> <input type="text" id="controlSetName" placeholder="e.g., NIST 800-53 Rev 4" class="bg-white border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:text-white" required/> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">This will be used as the display name and folder name</p></div> <div><label for="controlSetDescription" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Description</label> <input type="text" id="controlSetDescription" placeholder="Optional description" class="bg-white border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:text-white"/> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Brief description of this control set</p></div></div> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"><div><label for="sheet" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Sheet</label> <select id="sheet" class="bg-white border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:text-white"></select> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Select which worksheet contains your control data</p></div> <div><label for="headerRow" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Select Header Row</label> <select id="headerRow" class="bg-white border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:text-white"></select> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Select the row containing column headers</p></div> <div><label for="controlIdField" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Control ID Field <span class="text-red-500">*</span></label> <select id="controlIdField" required><option disabled>Select Control ID field</option><!></select> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Column containing unique control identifiers (e.g., AC-1, SC-7)</p></div></div></div> <div class="bg-gradient-to-br from-gray-50 to-gray-100 dark:from-gray-800 dark:to-gray-900 rounded-lg p-4 border border-gray-200 dark:border-gray-700"><h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-2">Organize Fields</h3> <p class="text-sm text-gray-600 dark:text-gray-400 mb-4">Drag fields to organize them. <strong>Overview fields</strong> will appear as table columns in
|
|
1
|
+
import{b as Ne,a as d,s as I,f as x,e as c,c as Ae,t as tr}from"../chunks/DSxRA67V.js";import{i as We}from"../chunks/kRA7ZCNG.js";import{p as Xe,af as Ve,b as a,U as k,y as pe,g as e,ag as $r,c as o,n as ke,r as t,a as Ke,t as P,ah as Nr,s as i,f as we,ai as xr,a1 as ze,ae as hr,aj as yr,i as de,o as ot,W as lt}from"../chunks/DHuA7MQr.js";import{l as ar,p as Je,i as M,a as st,s as it}from"../chunks/Ew6_cz_0.js";import{a as Lr,s as le,r as Tr,e as ge,b as Ye,c as Vr,d as _r,i as Cr,f as Sr,w as wr}from"../chunks/DznG4VMX.js";import{g as nt}from"../chunks/CdJEnKns.js";function dt(ue){return function(...U){var F=U[0];return F.stopPropagation(),ue?.apply(this,U)}}var vt=Ne("<title> </title>"),ct=Ne('<svg><!><path d="M11 18L12.41 19.41 15 16.83 15 29 17 29 17 16.83 19.59 19.41 21 18 16 13 11 18z"></path><path d="M23.5,22H23V20h.5a4.5,4.5,0,0,0,.36-9L23,11l-.1-.82a7,7,0,0,0-13.88,0L9,11,8.14,11a4.5,4.5,0,0,0,.36,9H9v2H8.5A6.5,6.5,0,0,1,7.2,9.14a9,9,0,0,1,17.6,0A6.5,6.5,0,0,1,23.5,22Z"></path></svg>');function gt(ue,U){const F=ar(U,["children","$$slots","$$events","$$legacy"]),Y=ar(F,["size","title"]);Xe(U,!1);const E=k(),T=k();let Z=Je(U,"size",8,16),b=Je(U,"title",8,void 0);Ve(()=>(pe(F),pe(b())),()=>{a(E,F["aria-label"]||F["aria-labelledby"]||b())}),Ve(()=>(e(E),pe(F)),()=>{a(T,{"aria-hidden":e(E)?void 0:!0,role:e(E)?"img":void 0,focusable:Number(F.tabindex)===0?!0:void 0})}),$r(),We();var $=ct();Lr($,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:Z(),height:Z(),...e(T),...Y}));var K=o($);{var G=H=>{var g=vt(),N=o(g,!0);t(g),P(()=>I(N,b())),d(H,g)};M(K,H=>{b()&&H(G)})}ke(2),t($),d(ue,$),Ke()}var pt=Ne("<title> </title>"),ut=Ne('<svg><!><path d="M10 6H14V10H10zM18 6H22V10H18zM10 14H14V18H10zM18 14H22V18H18zM10 22H14V26H10zM18 22H22V26H18z"></path></svg>');function kr(ue,U){const F=ar(U,["children","$$slots","$$events","$$legacy"]),Y=ar(F,["size","title"]);Xe(U,!1);const E=k(),T=k();let Z=Je(U,"size",8,16),b=Je(U,"title",8,void 0);Ve(()=>(pe(F),pe(b())),()=>{a(E,F["aria-label"]||F["aria-labelledby"]||b())}),Ve(()=>(e(E),pe(F)),()=>{a(T,{"aria-hidden":e(E)?void 0:!0,role:e(E)?"img":void 0,focusable:Number(F.tabindex)===0?!0:void 0})}),$r(),We();var $=ut();Lr($,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:Z(),height:Z(),...e(T),...Y}));var K=o($);{var G=H=>{var g=pt(),N=o(g,!0);t(g),P(()=>I(N,b())),d(H,g)};M(K,H=>{b()&&H(G)})}ke(),t($),d(ue,$),Ke()}var bt=x('<div class="p-4 text-sm text-blue-800 rounded-lg bg-blue-50 dark:bg-gray-800 dark:text-blue-400"><div class="flex items-center"><svg class="flex-shrink-0 inline w-4 h-4 mr-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"></path></svg> <div><span class="font-medium">File loaded:</span> <div class="mt-1"><span class="font-medium">Sheets:</span> <span class="font-medium">Fields:</span> <span class="font-medium">Controls found:</span> </div></div></div></div>'),ft=x('<div class="p-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400"><div class="flex items-center"><svg class="flex-shrink-0 inline w-4 h-4 mr-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"></path></svg> <span> </span></div></div>'),mt=x('<div class="p-4 text-sm text-green-800 rounded-lg bg-green-50 dark:bg-gray-800 dark:text-green-400"><div class="flex items-center"><svg class="flex-shrink-0 inline w-4 h-4 mr-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"></path></svg> <span> </span></div></div>'),xt=x("<option> </option>"),ht=x("<option> </option>"),yt=x("<option> </option>"),_t=x('<span class="ml-auto text-xs text-blue-600 dark:text-blue-400">ID</span>'),wt=x('<div draggable="true" role="button" tabindex="0" class="flex items-center px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-500 dark:text-gray-400 rounded text-sm cursor-move hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors opacity-75"><svg class="w-3 h-3 mr-2 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20"><path d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"></path></svg> <span class="truncate line-through"> </span> <!></div>'),kt=x('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">No excluded fields</p>'),Ct=x('<div draggable="true" role="button" tabindex="0"><!> <span class="truncate"> </span></div>'),St=x('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p>'),$t=x('<div draggable="true" role="button" tabindex="0"><!> <span class="truncate"> </span></div>'),Dt=x('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p>'),Mt=x('<div draggable="true" role="button" tabindex="0"><!> <span class="truncate"> </span></div>'),zt=x('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p>'),At=x('<div draggable="false" role="button" tabindex="0" class="flex items-center px-3 py-2 bg-orange-100 dark:bg-orange-900/30 text-orange-800 dark:text-orange-300 rounded text-sm hover:bg-orange-200 dark:hover:bg-orange-800/30 transition-colors"><span class="truncate"> </span> <button class="ml-auto text-gray-400 hover:text-red-500 dark:text-gray-500 dark:hover:text-red-400" title="Remove from mappings">×</button></div>'),Ft=x('<div role="region" aria-label="Justification field drop zone"><p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p></div>'),Ot=x('<th class="px-4 py-2"> </th>'),Pt=x('<td class="px-4 py-2"> </td>'),Ht=x('<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700"></tr>'),Et=x('<div class="bg-gradient-to-br from-gray-50 to-gray-100 dark:from-gray-800 dark:to-gray-900 rounded-lg p-4 border border-gray-200 dark:border-gray-700"><h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-4">Sample Data Preview</h3> <div class="overflow-x-auto"><table class="w-full text-sm text-left text-gray-500 dark:text-gray-400"><thead class="text-xs text-gray-700 uppercase bg-gray-100 dark:bg-gray-600 dark:text-gray-400"><tr></tr></thead><tbody></tbody></table></div></div>'),It=x('<span class="flex items-center"><svg class="animate-spin -ml-1 mr-3 h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> Importing...</span>'),jt=x(`<div class="bg-gradient-to-br from-gray-50 to-gray-100 dark:from-gray-800 dark:to-gray-900 rounded-lg p-4 border border-gray-200 dark:border-gray-700"><h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-4">Import Options</h3> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4"><div><label for="controlSetName" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Control Set Name <span class="text-red-500">*</span></label> <input type="text" id="controlSetName" placeholder="e.g., NIST 800-53 Rev 4" class="bg-white border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:text-white" required/> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">This will be used as the display name and folder name</p></div> <div><label for="controlSetDescription" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Description</label> <input type="text" id="controlSetDescription" placeholder="Optional description" class="bg-white border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:text-white"/> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Brief description of this control set</p></div></div> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"><div><label for="sheet" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Sheet</label> <select id="sheet" class="bg-white border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:text-white"></select> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Select which worksheet contains your control data</p></div> <div><label for="headerRow" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Select Header Row</label> <select id="headerRow" class="bg-white border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:text-white"></select> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Select the row containing column headers</p></div> <div><label for="controlIdField" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Control ID Field <span class="text-red-500">*</span></label> <select id="controlIdField" required><option disabled>Select Control ID field</option><!></select> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Column containing unique control identifiers (e.g., AC-1, SC-7)</p></div></div></div> <div class="bg-gradient-to-br from-gray-50 to-gray-100 dark:from-gray-800 dark:to-gray-900 rounded-lg p-4 border border-gray-200 dark:border-gray-700"><h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-2">Organize Fields</h3> <p class="text-sm text-gray-600 dark:text-gray-400 mb-4">Drag fields to organize them. <strong>Overview fields</strong> will appear as table columns in
|
|
2
2
|
the controls list.</p> <div class="grid grid-cols-1 lg:grid-cols-5 gap-4"><div class="border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800"><div class="p-3 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-700 rounded-t-lg"><h4 class="text-sm font-semibold text-gray-700 dark:text-gray-300">Excluded Fields</h4> <p class="text-xs text-gray-500 dark:text-gray-400 mt-1">Not imported</p></div> <div role="region" aria-label="Excluded fields drop zone"><!> <!></div></div> <div class="border border-blue-300 dark:border-blue-700 rounded-lg bg-white dark:bg-gray-800"><div class="p-3 border-b border-blue-200 dark:border-blue-800 bg-blue-50 dark:bg-blue-900/20 rounded-t-lg"><h4 class="text-sm font-semibold text-blue-700 dark:text-blue-300">Overview Tab</h4> <p class="text-xs text-blue-600 dark:text-blue-400 mt-1">Shows in details & table columns</p></div> <div role="region" aria-label="Overview tab drop zone"><!> <!></div></div> <div class="border border-green-300 dark:border-green-700 rounded-lg bg-white dark:bg-gray-800"><div class="p-3 border-b border-green-200 dark:border-green-800 bg-green-50 dark:bg-green-900/20 rounded-t-lg"><h4 class="text-sm font-semibold text-green-700 dark:text-green-300">Implementation Tab</h4> <p class="text-xs text-green-600 dark:text-green-400 mt-1">Status & compliance</p></div> <div role="region" aria-label="Implementation tab drop zone"><!> <!></div></div> <div class="border border-purple-300 dark:border-purple-700 rounded-lg bg-white dark:bg-gray-800"><div class="p-3 border-b border-purple-200 dark:border-purple-800 bg-purple-50 dark:bg-purple-900/20 rounded-t-lg"><h4 class="text-sm font-semibold text-purple-700 dark:text-purple-300">Custom Tab</h4> <p class="text-xs text-purple-600 dark:text-purple-400 mt-1">Additional fields</p></div> <div role="region" aria-label="Custom fields drop zone"><!> <!></div></div> <div class="border border-orange-300 dark:border-orange-700 rounded-lg bg-white dark:bg-gray-800"><div class="p-3 border-b border-orange-200 dark:border-orange-800 bg-orange-50 dark:bg-orange-900/20 rounded-t-lg"><h4 class="text-sm font-semibold text-orange-700 dark:text-orange-300">Mappings Tab</h4> <p class="text-xs text-orange-600 dark:text-orange-400 mt-1">Pre-populate justification for a control mapping</p></div> <div role="region" aria-label="Justifications tab drop zone"><div class="space-y-2"><!></div></div></div></div></div> <!> <div class="flex justify-center"><button class="px-5 py-2.5 text-white bg-blue-600 hover:bg-blue-700 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm disabled:opacity-50 disabled:cursor-not-allowed"><!></button></div>`,1),Tt=x('<div class="space-y-6"><div role="button" tabindex="0" class="relative"><label><div class="flex flex-col items-center justify-center pt-5 pb-6"><!> <p class="mb-2 text-sm text-gray-500 dark:text-gray-400"><span class="font-semibold">Click to upload</span> or drag and drop</p> <p class="text-xs text-gray-500 dark:text-gray-400">XLSX, XLS or CSV files</p></div> <input type="file" class="hidden" accept=".xlsx,.xls,.csv"/></label></div> <!> <!> <!> <!></div>');function Vt(ue,U){Xe(U,!1);const F=Nr();let Y=k(null),E=k(""),T=k(""),Z=k([]),b=k([]),$=k([]),K=k(0),G=k([]),H=k([]),g=k(new Map),N=k(1),L=k(""),xe=k(""),J=k(""),Q=k(!1),ee=k(""),be=k(""),Ce=k(!1),te=k(!1),C=k(null),B=k(null),re=k(null);function Se(){a(b,[]),a($,[]),a(K,0),e(g).clear(),a(g,new Map),a(H,[]),a(L,""),a(ee,""),a(be,""),a(C,null),a(B,null),a(re,null)}function p(l){l.preventDefault(),a(te,!0)}function u(){a(te,!1)}function D(l){l.preventDefault(),a(te,!1);const n=l.dataTransfer?.files;n&&n.length>0&&j(n[0])}function V(l){const n=l.target;n.files&&n.files.length>0&&j(n.files[0])}async function j(l){Se(),a(E,l.name),a(Y,l),a(ee,""),a(Q,!0),a(xe,e(E).replace(/\.[^.]+$/,"").replace(/[-_]/g," ")),a(J,`Imported from ${e(E)}`);try{const n=new FormData;n.append("file",l);const y=await fetch("/api/parse-excel",{method:"POST",body:n});if(!y.ok){const z=await y.json();throw new Error(z.error||"Failed to parse file")}const h=await y.json();a(Z,h.sheets||[]),a(T,h.selectedSheet||e(Z)[0]),a(G,h.rowPreviews||[]),e(G).length>0&&e(N)===1&&a(N,e(G)[0].row),await q(),a(Ce,!0)}catch(n){a(ee,"Error reading file: "+n.message)}finally{a(Q,!1)}}async function q(){if(!(!e(Y)||!e(T))){a(Q,!0),e(g).clear(),a(g,new Map),a(L,""),a(H,[]),a(C,null),a(B,null),a(re,null);try{const l=new FormData;l.append("file",e(Y)),l.append("sheetName",e(T));const n=await fetch("/api/parse-excel-sheet-previews",{method:"POST",body:l});if(n.ok){const w=await n.json();a(G,w.rowPreviews||[]),e(G).length>0&&!e(G).some(A=>A.row===e(N))&&a(N,e(G)[0].row)}else{const w=await n.json();throw new Error(w.error||"Failed to load sheet previews")}const y=new FormData;y.append("file",e(Y)),y.append("sheetName",e(T)),y.append("headerRow",e(N).toString());const h=await fetch("/api/parse-excel-sheet",{method:"POST",body:y});if(!h.ok){const w=await h.json();throw new Error(w.error||"Failed to parse sheet")}const z=await h.json();if(a(b,z.fields||[]),a($,z.sampleData||[]),a(K,z.controlCount||0),e(b).forEach((w,A)=>{const _=w.toLowerCase();let ce="custom",fe="text";_.includes("implementation")||_.includes("status")||_.includes("narrative")||_.includes("guidance")?ce="implementation":(_.includes("id")||_.includes("title")||_.includes("family")||_.includes("cci")||_.includes("control")||_.includes("acronym"))&&(ce="overview"),_.includes("description")||_.includes("narrative")||_.includes("guidance")||_.includes("statement")?fe="textarea":_.includes("status")||_.includes("type")||_.includes("designation")?fe="select":_.includes("date")?fe="date":(_.includes("count")||_.includes("number"))&&(fe="number"),e(g).set(w,{originalName:w,tab:ce,displayOrder:A,fieldType:fe,required:_.includes("id")||_.includes("title")})}),a(g,e(g)),e(L)&&!e(b).includes(e(L))&&a(L,""),!e(L)&&e(b).includes("AP Acronym")){const w=!e($).length||e($).every(ne=>!ne["AP Acronym"]||String(ne["AP Acronym"]).length<25),A=e($).map(ne=>ne["AP Acronym"]).filter(ne=>ne!=null&&ne!==""&&String(ne).trim()!==""),_=new Set(A),ce=!A.length||_.size===A.length,fe=A.length>0;w&&ce&&fe&&a(L,"AP Acronym")}}catch(l){a(ee,"Error loading sheet data: "+l.message)}finally{a(Q,!1)}}}function ve(l){if(!l)return l;let n=l.trim().replace(/\r?\n/g," ").replace(/\s+/g," ").trim();return Le(n)}function Le(l){return l.replace(/\W+/g," ").split(/ |\s/).map(n=>n.toLowerCase()).join("-")}function he(l,n){a(C,n),l.dataTransfer&&(l.dataTransfer.effectAllowed="move",l.dataTransfer.setData("text/plain",n))}function ae(){a(C,null),a(B,null),a(re,null)}function S(l,n){l.preventDefault(),a(B,n),l.dataTransfer&&(l.dataTransfer.dropEffect="move")}function se(){a(B,null)}function ie(l,n,y){if(l.preventDefault(),e(C)&&e(g).has(e(C))){const h=e(g).get(e(C));if(n==="mappings")e(H).includes(e(C))||a(H,[...e(H),e(C)]);else{if(h.tab=n,y!==void 0&&n!==null){const w=Array.from(e(g).entries()).filter(([A,_])=>_.tab===n).sort((A,_)=>A[1].displayOrder-_[1].displayOrder).filter(([A])=>A!==e(C));w.splice(y,0,[e(C),h]),w.forEach(([A,_],ce)=>{_.displayOrder=ce,e(g).set(A,_)})}else if(n!==null){const z=Math.max(0,...Array.from(e(g).values()).filter(w=>w.tab===n).map(w=>w.displayOrder));h.displayOrder=z+1}e(g).set(e(C),h),a(g,e(g))}}a(C,null),a(B,null)}function Fe(l,n){l.preventDefault(),l.stopPropagation(),a(re,n)}function $e(){a(re,null)}function De(l,n,y){if(l.preventDefault(),l.stopPropagation(),e(C)&&e(C)!==n){const z=Array.from(e(g).entries()).filter(([w,A])=>A.tab===y).sort((w,A)=>w[1].displayOrder-A[1].displayOrder).findIndex(([w])=>w===n);z!==-1&&ie(l,y,z)}a(re,null)}async function Be(){if(!(!e(Y)||!e(E))){if(!e(L)){a(ee,"Please select a Control ID field before importing"),a(be,"");return}if(!e(xe)||e(xe).trim()===""){a(ee,"Please enter a Control Set Name before importing"),a(be,"");return}a(Q,!0),a(ee,""),a(be,"");try{const l=new FormData;l.append("file",e(Y),e(E)),l.append("controlIdField",e(L)),l.append("startRow",e(N).toString()),l.append("sheetName",e(T)),l.append("namingConvention","kebab-case"),l.append("skipEmpty","true"),l.append("skipEmptyRows","true"),l.append("controlSetName",e(xe)||e(E).replace(/\.[^.]+$/,"")),l.append("controlSetDescription",e(J)||`Imported from ${e(E)}`);const n=Array.from(e(g).entries()).filter(([h,z])=>z.tab!==null).map(([h,z])=>({fieldName:ve(h),...z}));l.append("fieldSchema",JSON.stringify(n)),l.append("justificationFields",JSON.stringify(e(H).map(h=>ve(h))));let y;try{if(y=await fetch("/api/import-spreadsheet",{method:"POST",body:l}),!y.ok){const z=await y.json();throw new Error(z.error||"Import failed")}const h=await y.json();a(be,`Successfully imported ${h.controlCount} controls into ${h.families.length} families`),F("created",{path:h.outputDir})}catch(h){console.error("Error importing spreadsheet:",h)}}catch(l){a(ee,"Error importing spreadsheet: "+l.message)}finally{a(Q,!1)}}}We();var Re=Tt(),ye=o(Re),Ze=o(ye),Oe=o(Ze),or=o(Oe);gt(or,{class:"w-8 h-8 mb-4 text-gray-500 dark:text-gray-400"}),ke(4),t(Oe);var Ge=i(Oe,2);t(Ze),t(ye);var Pe=i(ye,2);{var lr=l=>{var n=bt(),y=o(n),h=i(o(y),2),z=i(o(h)),w=i(z),A=i(o(w)),_=i(A,2),ce=i(_,2);t(w),t(h),t(y),t(n),P(()=>{I(z,` ${e(E)??""} `),I(A,` ${e(Z).length??""} | `),I(_,` ${e(b).length??""} | `),I(ce,` ${e(K)??""}`)}),d(l,n)};M(Pe,l=>{e(E)&&l(lr)})}var Qe=i(Pe,2);{var sr=l=>{var n=ft(),y=o(n),h=i(o(y),2),z=o(h,!0);t(h),t(y),t(n),P(()=>I(z,e(ee))),d(l,n)};M(Qe,l=>{e(ee)&&l(sr)})}var qe=i(Qe,2);{var ir=l=>{var n=mt(),y=o(n),h=i(o(y),2),z=o(h,!0);t(h),t(y),t(n),P(()=>I(z,e(be))),d(l,n)};M(qe,l=>{e(be)&&l(ir)})}var nr=i(qe,2);{var dr=l=>{var n=jt(),y=we(n),h=i(o(y),2),z=o(h),w=i(o(z),2);Tr(w),ke(2),t(z);var A=i(z,2),_=i(o(A),2);Tr(_),ke(2),t(A),t(h);var ce=i(h,2),fe=o(ce),ne=i(o(fe),2);P(()=>{e(T),xr(()=>{e(Z)})}),ge(ne,5,()=>e(Z),r=>r,(r,s)=>{var f=xt(),m=o(f,!0);t(f);var v={};P(()=>{I(m,e(s)),v!==(v=e(s))&&(f.value=(f.__value=e(s))??"")}),d(r,f)}),t(ne),ke(2),t(fe);var vr=i(fe,2),er=i(o(vr),2);P(()=>{e(N),xr(()=>{e(G)})}),ge(er,5,()=>e(G),r=>r.row,(r,s)=>{var f=ht(),m=o(f);t(f);var v={};P(()=>{I(m,`Row ${e(s).row??""}: ${e(s).preview??""}`),v!==(v=e(s).row)&&(f.value=(f.__value=e(s).row)??"")}),d(r,f)}),t(er),ke(2),t(vr);var Dr=i(vr,2),rr=i(o(Dr),2);P(()=>{e(L),xr(()=>{e(b),e($)})});var cr=o(rr);cr.value=cr.__value="";var Br=i(cr);ge(Br,1,()=>e(b),r=>r,(r,s)=>{const f=ze(()=>e($).length>0&&e($)[0][e(s)]?String(e($)[0][e(s)]).slice(0,30):""),m=ze(()=>!e($).length||e($).every(oe=>!oe[e(s)]||String(oe[e(s)]).length<25)),v=ze(()=>e($).map(oe=>oe[e(s)]).filter(oe=>oe!=null&&oe!==""&&String(oe).trim()!=="")),W=ze(()=>new Set(e(v))),X=ze(()=>!e(v).length||e(W).size===e(v).length),R=ze(()=>e(v).length>0);var O=Ae(),me=we(O);{var Me=oe=>{var _e=yt(),mr=o(_e);t(_e);var jr={};P(()=>{I(mr,`${e(s)??""}${e(f)?` (e.g., ${e(f)})`:""}`),jr!==(jr=e(s))&&(_e.value=(_e.__value=e(s))??"")}),d(oe,_e)};M(me,oe=>{e(m)&&e(X)&&e(R)&&oe(Me)})}d(r,O)}),t(rr),ke(2),t(Dr),t(ce),t(y);var gr=i(y,2),Mr=i(o(gr),4),pr=o(Mr),He=i(o(pr),2),zr=o(He);ge(zr,1,()=>e(b).filter(r=>!e(g).get(r)||e(g).get(r)?.tab===null),r=>r,(r,s)=>{var f=wt(),m=i(o(f),2),v=o(m,!0);t(m);var W=i(m,2);{var X=R=>{var O=_t();d(R,O)};M(W,R=>{e(s)===e(L)&&R(X)})}t(f),P(()=>{Ye(f,"aria-label",`Drag ${e(s)??""} field`),I(v,e(s))}),c("dragstart",f,R=>he(R,e(s))),c("dragend",f,ae),d(r,f)});var Rr=i(zr,2);{var Zr=r=>{var s=kt();d(r,s)};M(Rr,r=>{e(b).filter(s=>!e(g).get(s)||e(g).get(s)?.tab===null).length===0&&r(Zr)})}t(He),t(pr);var ur=i(pr,2),Ee=i(o(ur),2),Ar=o(Ee);ge(Ar,3,()=>Array.from(e(g).entries()).filter(([r,s])=>s.tab==="overview").sort((r,s)=>r[1].displayOrder-s[1].displayOrder),([r,s])=>r,(r,s)=>{var f=hr(()=>yr(e(s),2));let m=()=>e(f)[0];var v=Ct(),W=o(v);kr(W,{class:"w-3 h-3 mr-2 flex-shrink-0"});var X=i(W,2),R=o(X,!0);t(X),t(v),P(()=>{Ye(v,"aria-label",`${m()??""} field in Overview tab`),le(v,1,`flex items-center px-3 py-2 bg-blue-100 dark:bg-blue-900/30 text-blue-800 dark:text-blue-300 rounded text-sm cursor-move hover:bg-blue-200 dark:hover:bg-blue-800/30 transition-colors
|
|
3
3
|
${e(re)===m()&&e(C)!==m()?"border-t-2 border-blue-500":""}`),I(R,m())}),c("dragstart",v,O=>he(O,m())),c("dragend",v,ae),c("dragover",v,O=>Fe(O,m())),c("dragleave",v,$e),c("drop",v,O=>De(O,m(),"overview")),d(r,v)});var qr=i(Ar,2);{var Ur=r=>{var s=St();d(r,s)};M(qr,r=>{Array.from(e(g).entries()).filter(([s,f])=>f.tab==="overview").length===0&&r(Ur)})}t(Ee),t(ur);var br=i(ur,2),Ie=i(o(br),2),Fr=o(Ie);ge(Fr,3,()=>Array.from(e(g).entries()).filter(([r,s])=>s.tab==="implementation").sort((r,s)=>r[1].displayOrder-s[1].displayOrder),([r,s])=>r,(r,s)=>{var f=hr(()=>yr(e(s),2));let m=()=>e(f)[0];var v=$t(),W=o(v);kr(W,{class:"w-3 h-3 mr-2 flex-shrink-0"});var X=i(W,2),R=o(X,!0);t(X),t(v),P(()=>{Ye(v,"aria-label",`${m()??""} field in Implementation tab`),le(v,1,`flex items-center px-3 py-2 bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-300 rounded text-sm cursor-move hover:bg-green-200 dark:hover:bg-green-800/30 transition-colors
|
|
4
4
|
${e(re)===m()&&e(C)!==m()?"border-t-2 border-green-500":""}`),I(R,m())}),c("dragstart",v,O=>he(O,m())),c("dragend",v,ae),c("dragover",v,O=>Fe(O,m())),c("dragleave",v,$e),c("drop",v,O=>De(O,m(),"implementation")),d(r,v)});var Yr=i(Fr,2);{var Jr=r=>{var s=Dt();d(r,s)};M(Yr,r=>{Array.from(e(g).entries()).filter(([s,f])=>f.tab==="implementation").length===0&&r(Jr)})}t(Ie),t(br);var fr=i(br,2),je=i(o(fr),2),Or=o(je);ge(Or,3,()=>Array.from(e(g).entries()).filter(([r,s])=>s.tab==="custom").sort((r,s)=>r[1].displayOrder-s[1].displayOrder),([r,s])=>r,(r,s)=>{var f=hr(()=>yr(e(s),2));let m=()=>e(f)[0];var v=Mt(),W=o(v);kr(W,{class:"w-3 h-3 mr-2 flex-shrink-0"});var X=i(W,2),R=o(X,!0);t(X),t(v),P(()=>{Ye(v,"aria-label",`${m()??""} field in Custom tab`),le(v,1,`flex items-center px-3 py-2 bg-purple-100 dark:bg-purple-900/30 text-purple-800 dark:text-purple-300 rounded text-sm cursor-move hover:bg-purple-200 dark:hover:bg-purple-800/30 transition-colors
|
package/dist/_app/version.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1766167081858"}
|
package/dist/cli/commands/ui.js
CHANGED
|
@@ -3169,6 +3169,7 @@ __export(spreadsheetRoutes_exports, {
|
|
|
3169
3169
|
default: () => spreadsheetRoutes_default,
|
|
3170
3170
|
detectValueType: () => detectValueType,
|
|
3171
3171
|
extractFamilyFromControlId: () => extractFamilyFromControlId,
|
|
3172
|
+
formatMappingEntry: () => formatMappingEntry,
|
|
3172
3173
|
parseCSV: () => parseCSV,
|
|
3173
3174
|
parseUploadedFile: () => parseUploadedFile,
|
|
3174
3175
|
processImportParameters: () => processImportParameters,
|
|
@@ -3649,6 +3650,16 @@ function extractFamilyFromControlId(controlId) {
|
|
|
3649
3650
|
}
|
|
3650
3651
|
return controlId.substring(0, 2).toUpperCase();
|
|
3651
3652
|
}
|
|
3653
|
+
function formatMappingEntry(mapping) {
|
|
3654
|
+
const justification = mapping.description || mapping.justification || "";
|
|
3655
|
+
const status = mapping.status || "Unknown";
|
|
3656
|
+
const cci = mapping.cci || "";
|
|
3657
|
+
const finalJustification = justification.trim() !== "" ? justification : `[${status}]`;
|
|
3658
|
+
if (cci.trim() !== "") {
|
|
3659
|
+
return `CCI ${cci}: ${finalJustification}`;
|
|
3660
|
+
}
|
|
3661
|
+
return finalJustification;
|
|
3662
|
+
}
|
|
3652
3663
|
function exportAsCSV(controls, metadata, mappingsColumn, res) {
|
|
3653
3664
|
return exportAsCSVWithMapping(controls, metadata, { mappings: mappingsColumn }, res);
|
|
3654
3665
|
}
|
|
@@ -3740,11 +3751,7 @@ function exportAsCSVWithMapping(controls, metadata, columnMappings, res) {
|
|
|
3740
3751
|
}
|
|
3741
3752
|
if (value === void 0 || value === null) return '""';
|
|
3742
3753
|
if (fieldName === "mappings" && Array.isArray(value)) {
|
|
3743
|
-
const mappingsStr = value.map((m) =>
|
|
3744
|
-
const justification = m.description || m.justification || "";
|
|
3745
|
-
const status = m.status || "Unknown";
|
|
3746
|
-
return justification.trim() !== "" ? justification : `[${status}]`;
|
|
3747
|
-
}).join("\n");
|
|
3754
|
+
const mappingsStr = value.map((m) => formatMappingEntry(m)).join("\n\n");
|
|
3748
3755
|
return `"${mappingsStr.replace(/"/g, '""')}"`;
|
|
3749
3756
|
}
|
|
3750
3757
|
if (Array.isArray(value)) return `"${value.join("; ").replace(/"/g, '""')}"`;
|
|
@@ -3835,12 +3842,8 @@ async function exportAsExcelWithMapping(controls, metadata, columnMappings, res)
|
|
|
3835
3842
|
if (isMappingColumn) {
|
|
3836
3843
|
const mappingsValue = control["mappings"];
|
|
3837
3844
|
if (Array.isArray(mappingsValue) && mappingsValue.length > 0) {
|
|
3838
|
-
const mappingsStr = mappingsValue.map((m) => m
|
|
3839
|
-
|
|
3840
|
-
value = mappingsStr;
|
|
3841
|
-
} else {
|
|
3842
|
-
value = control[fieldName];
|
|
3843
|
-
}
|
|
3845
|
+
const mappingsStr = mappingsValue.map((m) => formatMappingEntry(m)).join("\n\n");
|
|
3846
|
+
value = mappingsStr;
|
|
3844
3847
|
} else {
|
|
3845
3848
|
value = control[fieldName];
|
|
3846
3849
|
}
|
|
@@ -3848,11 +3851,7 @@ async function exportAsExcelWithMapping(controls, metadata, columnMappings, res)
|
|
|
3848
3851
|
value = control[fieldName];
|
|
3849
3852
|
}
|
|
3850
3853
|
if (fieldName === "mappings" && Array.isArray(value)) {
|
|
3851
|
-
const mappingsStr = value.map((m) =>
|
|
3852
|
-
const justification = m.description || m.justification || "";
|
|
3853
|
-
const status = m.status || "Unknown";
|
|
3854
|
-
return justification.trim() !== "" ? justification : `[${status}]`;
|
|
3855
|
-
}).join("\n");
|
|
3854
|
+
const mappingsStr = value.map((m) => formatMappingEntry(m)).join("\n\n");
|
|
3856
3855
|
exportControl[displayName] = mappingsStr;
|
|
3857
3856
|
} else if (Array.isArray(value)) {
|
|
3858
3857
|
exportControl[displayName] = value.join("; ");
|
|
@@ -3988,7 +3987,8 @@ var init_spreadsheetRoutes = __esm({
|
|
|
3988
3987
|
mappings: controlMappings.map((m) => ({
|
|
3989
3988
|
uuid: m.uuid,
|
|
3990
3989
|
status: m.status,
|
|
3991
|
-
description: m.justification || ""
|
|
3990
|
+
description: m.justification || "",
|
|
3991
|
+
cci: m.cci || ""
|
|
3992
3992
|
}))
|
|
3993
3993
|
};
|
|
3994
3994
|
});
|
|
@@ -4098,7 +4098,8 @@ var init_spreadsheetRoutes = __esm({
|
|
|
4098
4098
|
mappings: controlMappings.map((m) => ({
|
|
4099
4099
|
uuid: m.uuid,
|
|
4100
4100
|
status: m.status,
|
|
4101
|
-
description: m.justification || ""
|
|
4101
|
+
description: m.justification || "",
|
|
4102
|
+
cci: m.cci || ""
|
|
4102
4103
|
}))
|
|
4103
4104
|
};
|
|
4104
4105
|
});
|
package/dist/cli/server/index.js
CHANGED
|
@@ -3151,6 +3151,7 @@ __export(spreadsheetRoutes_exports, {
|
|
|
3151
3151
|
default: () => spreadsheetRoutes_default,
|
|
3152
3152
|
detectValueType: () => detectValueType,
|
|
3153
3153
|
extractFamilyFromControlId: () => extractFamilyFromControlId,
|
|
3154
|
+
formatMappingEntry: () => formatMappingEntry,
|
|
3154
3155
|
parseCSV: () => parseCSV,
|
|
3155
3156
|
parseUploadedFile: () => parseUploadedFile,
|
|
3156
3157
|
processImportParameters: () => processImportParameters,
|
|
@@ -3631,6 +3632,16 @@ function extractFamilyFromControlId(controlId) {
|
|
|
3631
3632
|
}
|
|
3632
3633
|
return controlId.substring(0, 2).toUpperCase();
|
|
3633
3634
|
}
|
|
3635
|
+
function formatMappingEntry(mapping) {
|
|
3636
|
+
const justification = mapping.description || mapping.justification || "";
|
|
3637
|
+
const status = mapping.status || "Unknown";
|
|
3638
|
+
const cci = mapping.cci || "";
|
|
3639
|
+
const finalJustification = justification.trim() !== "" ? justification : `[${status}]`;
|
|
3640
|
+
if (cci.trim() !== "") {
|
|
3641
|
+
return `CCI ${cci}: ${finalJustification}`;
|
|
3642
|
+
}
|
|
3643
|
+
return finalJustification;
|
|
3644
|
+
}
|
|
3634
3645
|
function exportAsCSV(controls, metadata, mappingsColumn, res) {
|
|
3635
3646
|
return exportAsCSVWithMapping(controls, metadata, { mappings: mappingsColumn }, res);
|
|
3636
3647
|
}
|
|
@@ -3722,11 +3733,7 @@ function exportAsCSVWithMapping(controls, metadata, columnMappings, res) {
|
|
|
3722
3733
|
}
|
|
3723
3734
|
if (value === void 0 || value === null) return '""';
|
|
3724
3735
|
if (fieldName === "mappings" && Array.isArray(value)) {
|
|
3725
|
-
const mappingsStr = value.map((m) =>
|
|
3726
|
-
const justification = m.description || m.justification || "";
|
|
3727
|
-
const status = m.status || "Unknown";
|
|
3728
|
-
return justification.trim() !== "" ? justification : `[${status}]`;
|
|
3729
|
-
}).join("\n");
|
|
3736
|
+
const mappingsStr = value.map((m) => formatMappingEntry(m)).join("\n\n");
|
|
3730
3737
|
return `"${mappingsStr.replace(/"/g, '""')}"`;
|
|
3731
3738
|
}
|
|
3732
3739
|
if (Array.isArray(value)) return `"${value.join("; ").replace(/"/g, '""')}"`;
|
|
@@ -3817,12 +3824,8 @@ async function exportAsExcelWithMapping(controls, metadata, columnMappings, res)
|
|
|
3817
3824
|
if (isMappingColumn) {
|
|
3818
3825
|
const mappingsValue = control["mappings"];
|
|
3819
3826
|
if (Array.isArray(mappingsValue) && mappingsValue.length > 0) {
|
|
3820
|
-
const mappingsStr = mappingsValue.map((m) => m
|
|
3821
|
-
|
|
3822
|
-
value = mappingsStr;
|
|
3823
|
-
} else {
|
|
3824
|
-
value = control[fieldName];
|
|
3825
|
-
}
|
|
3827
|
+
const mappingsStr = mappingsValue.map((m) => formatMappingEntry(m)).join("\n\n");
|
|
3828
|
+
value = mappingsStr;
|
|
3826
3829
|
} else {
|
|
3827
3830
|
value = control[fieldName];
|
|
3828
3831
|
}
|
|
@@ -3830,11 +3833,7 @@ async function exportAsExcelWithMapping(controls, metadata, columnMappings, res)
|
|
|
3830
3833
|
value = control[fieldName];
|
|
3831
3834
|
}
|
|
3832
3835
|
if (fieldName === "mappings" && Array.isArray(value)) {
|
|
3833
|
-
const mappingsStr = value.map((m) =>
|
|
3834
|
-
const justification = m.description || m.justification || "";
|
|
3835
|
-
const status = m.status || "Unknown";
|
|
3836
|
-
return justification.trim() !== "" ? justification : `[${status}]`;
|
|
3837
|
-
}).join("\n");
|
|
3836
|
+
const mappingsStr = value.map((m) => formatMappingEntry(m)).join("\n\n");
|
|
3838
3837
|
exportControl[displayName] = mappingsStr;
|
|
3839
3838
|
} else if (Array.isArray(value)) {
|
|
3840
3839
|
exportControl[displayName] = value.join("; ");
|
|
@@ -3970,7 +3969,8 @@ var init_spreadsheetRoutes = __esm({
|
|
|
3970
3969
|
mappings: controlMappings.map((m) => ({
|
|
3971
3970
|
uuid: m.uuid,
|
|
3972
3971
|
status: m.status,
|
|
3973
|
-
description: m.justification || ""
|
|
3972
|
+
description: m.justification || "",
|
|
3973
|
+
cci: m.cci || ""
|
|
3974
3974
|
}))
|
|
3975
3975
|
};
|
|
3976
3976
|
});
|
|
@@ -4080,7 +4080,8 @@ var init_spreadsheetRoutes = __esm({
|
|
|
4080
4080
|
mappings: controlMappings.map((m) => ({
|
|
4081
4081
|
uuid: m.uuid,
|
|
4082
4082
|
status: m.status,
|
|
4083
|
-
description: m.justification || ""
|
|
4083
|
+
description: m.justification || "",
|
|
4084
|
+
cci: m.cci || ""
|
|
4084
4085
|
}))
|
|
4085
4086
|
};
|
|
4086
4087
|
});
|
|
@@ -3151,6 +3151,7 @@ __export(spreadsheetRoutes_exports, {
|
|
|
3151
3151
|
default: () => spreadsheetRoutes_default,
|
|
3152
3152
|
detectValueType: () => detectValueType,
|
|
3153
3153
|
extractFamilyFromControlId: () => extractFamilyFromControlId,
|
|
3154
|
+
formatMappingEntry: () => formatMappingEntry,
|
|
3154
3155
|
parseCSV: () => parseCSV,
|
|
3155
3156
|
parseUploadedFile: () => parseUploadedFile,
|
|
3156
3157
|
processImportParameters: () => processImportParameters,
|
|
@@ -3631,6 +3632,16 @@ function extractFamilyFromControlId(controlId) {
|
|
|
3631
3632
|
}
|
|
3632
3633
|
return controlId.substring(0, 2).toUpperCase();
|
|
3633
3634
|
}
|
|
3635
|
+
function formatMappingEntry(mapping) {
|
|
3636
|
+
const justification = mapping.description || mapping.justification || "";
|
|
3637
|
+
const status = mapping.status || "Unknown";
|
|
3638
|
+
const cci = mapping.cci || "";
|
|
3639
|
+
const finalJustification = justification.trim() !== "" ? justification : `[${status}]`;
|
|
3640
|
+
if (cci.trim() !== "") {
|
|
3641
|
+
return `CCI ${cci}: ${finalJustification}`;
|
|
3642
|
+
}
|
|
3643
|
+
return finalJustification;
|
|
3644
|
+
}
|
|
3634
3645
|
function exportAsCSV(controls, metadata, mappingsColumn, res) {
|
|
3635
3646
|
return exportAsCSVWithMapping(controls, metadata, { mappings: mappingsColumn }, res);
|
|
3636
3647
|
}
|
|
@@ -3722,11 +3733,7 @@ function exportAsCSVWithMapping(controls, metadata, columnMappings, res) {
|
|
|
3722
3733
|
}
|
|
3723
3734
|
if (value === void 0 || value === null) return '""';
|
|
3724
3735
|
if (fieldName === "mappings" && Array.isArray(value)) {
|
|
3725
|
-
const mappingsStr = value.map((m) =>
|
|
3726
|
-
const justification = m.description || m.justification || "";
|
|
3727
|
-
const status = m.status || "Unknown";
|
|
3728
|
-
return justification.trim() !== "" ? justification : `[${status}]`;
|
|
3729
|
-
}).join("\n");
|
|
3736
|
+
const mappingsStr = value.map((m) => formatMappingEntry(m)).join("\n\n");
|
|
3730
3737
|
return `"${mappingsStr.replace(/"/g, '""')}"`;
|
|
3731
3738
|
}
|
|
3732
3739
|
if (Array.isArray(value)) return `"${value.join("; ").replace(/"/g, '""')}"`;
|
|
@@ -3817,12 +3824,8 @@ async function exportAsExcelWithMapping(controls, metadata, columnMappings, res)
|
|
|
3817
3824
|
if (isMappingColumn) {
|
|
3818
3825
|
const mappingsValue = control["mappings"];
|
|
3819
3826
|
if (Array.isArray(mappingsValue) && mappingsValue.length > 0) {
|
|
3820
|
-
const mappingsStr = mappingsValue.map((m) => m
|
|
3821
|
-
|
|
3822
|
-
value = mappingsStr;
|
|
3823
|
-
} else {
|
|
3824
|
-
value = control[fieldName];
|
|
3825
|
-
}
|
|
3827
|
+
const mappingsStr = mappingsValue.map((m) => formatMappingEntry(m)).join("\n\n");
|
|
3828
|
+
value = mappingsStr;
|
|
3826
3829
|
} else {
|
|
3827
3830
|
value = control[fieldName];
|
|
3828
3831
|
}
|
|
@@ -3830,11 +3833,7 @@ async function exportAsExcelWithMapping(controls, metadata, columnMappings, res)
|
|
|
3830
3833
|
value = control[fieldName];
|
|
3831
3834
|
}
|
|
3832
3835
|
if (fieldName === "mappings" && Array.isArray(value)) {
|
|
3833
|
-
const mappingsStr = value.map((m) =>
|
|
3834
|
-
const justification = m.description || m.justification || "";
|
|
3835
|
-
const status = m.status || "Unknown";
|
|
3836
|
-
return justification.trim() !== "" ? justification : `[${status}]`;
|
|
3837
|
-
}).join("\n");
|
|
3836
|
+
const mappingsStr = value.map((m) => formatMappingEntry(m)).join("\n\n");
|
|
3838
3837
|
exportControl[displayName] = mappingsStr;
|
|
3839
3838
|
} else if (Array.isArray(value)) {
|
|
3840
3839
|
exportControl[displayName] = value.join("; ");
|
|
@@ -3970,7 +3969,8 @@ var init_spreadsheetRoutes = __esm({
|
|
|
3970
3969
|
mappings: controlMappings.map((m) => ({
|
|
3971
3970
|
uuid: m.uuid,
|
|
3972
3971
|
status: m.status,
|
|
3973
|
-
description: m.justification || ""
|
|
3972
|
+
description: m.justification || "",
|
|
3973
|
+
cci: m.cci || ""
|
|
3974
3974
|
}))
|
|
3975
3975
|
};
|
|
3976
3976
|
});
|
|
@@ -4080,7 +4080,8 @@ var init_spreadsheetRoutes = __esm({
|
|
|
4080
4080
|
mappings: controlMappings.map((m) => ({
|
|
4081
4081
|
uuid: m.uuid,
|
|
4082
4082
|
status: m.status,
|
|
4083
|
-
description: m.justification || ""
|
|
4083
|
+
description: m.justification || "",
|
|
4084
|
+
cci: m.cci || ""
|
|
4084
4085
|
}))
|
|
4085
4086
|
};
|
|
4086
4087
|
});
|
|
@@ -1384,7 +1384,8 @@ router.get("/export-controls", async (req, res) => {
|
|
|
1384
1384
|
mappings: controlMappings.map((m) => ({
|
|
1385
1385
|
uuid: m.uuid,
|
|
1386
1386
|
status: m.status,
|
|
1387
|
-
description: m.justification || ""
|
|
1387
|
+
description: m.justification || "",
|
|
1388
|
+
cci: m.cci || ""
|
|
1388
1389
|
}))
|
|
1389
1390
|
};
|
|
1390
1391
|
});
|
|
@@ -1405,6 +1406,16 @@ router.get("/export-controls", async (req, res) => {
|
|
|
1405
1406
|
res.status(500).json({ error: error.message });
|
|
1406
1407
|
}
|
|
1407
1408
|
});
|
|
1409
|
+
function formatMappingEntry(mapping) {
|
|
1410
|
+
const justification = mapping.description || mapping.justification || "";
|
|
1411
|
+
const status = mapping.status || "Unknown";
|
|
1412
|
+
const cci = mapping.cci || "";
|
|
1413
|
+
const finalJustification = justification.trim() !== "" ? justification : `[${status}]`;
|
|
1414
|
+
if (cci.trim() !== "") {
|
|
1415
|
+
return `CCI ${cci}: ${finalJustification}`;
|
|
1416
|
+
}
|
|
1417
|
+
return finalJustification;
|
|
1418
|
+
}
|
|
1408
1419
|
function exportAsCSV(controls, metadata, mappingsColumn, res) {
|
|
1409
1420
|
return exportAsCSVWithMapping(controls, metadata, { mappings: mappingsColumn }, res);
|
|
1410
1421
|
}
|
|
@@ -1496,11 +1507,7 @@ function exportAsCSVWithMapping(controls, metadata, columnMappings, res) {
|
|
|
1496
1507
|
}
|
|
1497
1508
|
if (value === void 0 || value === null) return '""';
|
|
1498
1509
|
if (fieldName === "mappings" && Array.isArray(value)) {
|
|
1499
|
-
const mappingsStr = value.map((m) =>
|
|
1500
|
-
const justification = m.description || m.justification || "";
|
|
1501
|
-
const status = m.status || "Unknown";
|
|
1502
|
-
return justification.trim() !== "" ? justification : `[${status}]`;
|
|
1503
|
-
}).join("\n");
|
|
1510
|
+
const mappingsStr = value.map((m) => formatMappingEntry(m)).join("\n\n");
|
|
1504
1511
|
return `"${mappingsStr.replace(/"/g, '""')}"`;
|
|
1505
1512
|
}
|
|
1506
1513
|
if (Array.isArray(value)) return `"${value.join("; ").replace(/"/g, '""')}"`;
|
|
@@ -1591,12 +1598,8 @@ async function exportAsExcelWithMapping(controls, metadata, columnMappings, res)
|
|
|
1591
1598
|
if (isMappingColumn) {
|
|
1592
1599
|
const mappingsValue = control["mappings"];
|
|
1593
1600
|
if (Array.isArray(mappingsValue) && mappingsValue.length > 0) {
|
|
1594
|
-
const mappingsStr = mappingsValue.map((m) => m
|
|
1595
|
-
|
|
1596
|
-
value = mappingsStr;
|
|
1597
|
-
} else {
|
|
1598
|
-
value = control[fieldName];
|
|
1599
|
-
}
|
|
1601
|
+
const mappingsStr = mappingsValue.map((m) => formatMappingEntry(m)).join("\n\n");
|
|
1602
|
+
value = mappingsStr;
|
|
1600
1603
|
} else {
|
|
1601
1604
|
value = control[fieldName];
|
|
1602
1605
|
}
|
|
@@ -1604,11 +1607,7 @@ async function exportAsExcelWithMapping(controls, metadata, columnMappings, res)
|
|
|
1604
1607
|
value = control[fieldName];
|
|
1605
1608
|
}
|
|
1606
1609
|
if (fieldName === "mappings" && Array.isArray(value)) {
|
|
1607
|
-
const mappingsStr = value.map((m) =>
|
|
1608
|
-
const justification = m.description || m.justification || "";
|
|
1609
|
-
const status = m.status || "Unknown";
|
|
1610
|
-
return justification.trim() !== "" ? justification : `[${status}]`;
|
|
1611
|
-
}).join("\n");
|
|
1610
|
+
const mappingsStr = value.map((m) => formatMappingEntry(m)).join("\n\n");
|
|
1612
1611
|
exportControl[displayName] = mappingsStr;
|
|
1613
1612
|
} else if (Array.isArray(value)) {
|
|
1614
1613
|
exportControl[displayName] = value.join("; ");
|
|
@@ -1743,7 +1742,8 @@ router.post("/export-csv", async (req, res) => {
|
|
|
1743
1742
|
mappings: controlMappings.map((m) => ({
|
|
1744
1743
|
uuid: m.uuid,
|
|
1745
1744
|
status: m.status,
|
|
1746
|
-
description: m.justification || ""
|
|
1745
|
+
description: m.justification || "",
|
|
1746
|
+
cci: m.cci || ""
|
|
1747
1747
|
}))
|
|
1748
1748
|
};
|
|
1749
1749
|
});
|
|
@@ -1903,6 +1903,7 @@ export {
|
|
|
1903
1903
|
spreadsheetRoutes_default as default,
|
|
1904
1904
|
detectValueType,
|
|
1905
1905
|
extractFamilyFromControlId,
|
|
1906
|
+
formatMappingEntry,
|
|
1906
1907
|
parseCSV,
|
|
1907
1908
|
parseUploadedFile,
|
|
1908
1909
|
processImportParameters,
|
|
@@ -1598,6 +1598,7 @@ __export(spreadsheetRoutes_exports, {
|
|
|
1598
1598
|
default: () => spreadsheetRoutes_default,
|
|
1599
1599
|
detectValueType: () => detectValueType,
|
|
1600
1600
|
extractFamilyFromControlId: () => extractFamilyFromControlId,
|
|
1601
|
+
formatMappingEntry: () => formatMappingEntry,
|
|
1601
1602
|
parseCSV: () => parseCSV,
|
|
1602
1603
|
parseUploadedFile: () => parseUploadedFile,
|
|
1603
1604
|
processImportParameters: () => processImportParameters,
|
|
@@ -2078,6 +2079,16 @@ function extractFamilyFromControlId(controlId) {
|
|
|
2078
2079
|
}
|
|
2079
2080
|
return controlId.substring(0, 2).toUpperCase();
|
|
2080
2081
|
}
|
|
2082
|
+
function formatMappingEntry(mapping) {
|
|
2083
|
+
const justification = mapping.description || mapping.justification || "";
|
|
2084
|
+
const status = mapping.status || "Unknown";
|
|
2085
|
+
const cci = mapping.cci || "";
|
|
2086
|
+
const finalJustification = justification.trim() !== "" ? justification : `[${status}]`;
|
|
2087
|
+
if (cci.trim() !== "") {
|
|
2088
|
+
return `CCI ${cci}: ${finalJustification}`;
|
|
2089
|
+
}
|
|
2090
|
+
return finalJustification;
|
|
2091
|
+
}
|
|
2081
2092
|
function exportAsCSV(controls, metadata, mappingsColumn, res) {
|
|
2082
2093
|
return exportAsCSVWithMapping(controls, metadata, { mappings: mappingsColumn }, res);
|
|
2083
2094
|
}
|
|
@@ -2169,11 +2180,7 @@ function exportAsCSVWithMapping(controls, metadata, columnMappings, res) {
|
|
|
2169
2180
|
}
|
|
2170
2181
|
if (value === void 0 || value === null) return '""';
|
|
2171
2182
|
if (fieldName === "mappings" && Array.isArray(value)) {
|
|
2172
|
-
const mappingsStr = value.map((m) =>
|
|
2173
|
-
const justification = m.description || m.justification || "";
|
|
2174
|
-
const status = m.status || "Unknown";
|
|
2175
|
-
return justification.trim() !== "" ? justification : `[${status}]`;
|
|
2176
|
-
}).join("\n");
|
|
2183
|
+
const mappingsStr = value.map((m) => formatMappingEntry(m)).join("\n\n");
|
|
2177
2184
|
return `"${mappingsStr.replace(/"/g, '""')}"`;
|
|
2178
2185
|
}
|
|
2179
2186
|
if (Array.isArray(value)) return `"${value.join("; ").replace(/"/g, '""')}"`;
|
|
@@ -2264,12 +2271,8 @@ async function exportAsExcelWithMapping(controls, metadata, columnMappings, res)
|
|
|
2264
2271
|
if (isMappingColumn) {
|
|
2265
2272
|
const mappingsValue = control["mappings"];
|
|
2266
2273
|
if (Array.isArray(mappingsValue) && mappingsValue.length > 0) {
|
|
2267
|
-
const mappingsStr = mappingsValue.map((m) => m
|
|
2268
|
-
|
|
2269
|
-
value = mappingsStr;
|
|
2270
|
-
} else {
|
|
2271
|
-
value = control[fieldName];
|
|
2272
|
-
}
|
|
2274
|
+
const mappingsStr = mappingsValue.map((m) => formatMappingEntry(m)).join("\n\n");
|
|
2275
|
+
value = mappingsStr;
|
|
2273
2276
|
} else {
|
|
2274
2277
|
value = control[fieldName];
|
|
2275
2278
|
}
|
|
@@ -2277,11 +2280,7 @@ async function exportAsExcelWithMapping(controls, metadata, columnMappings, res)
|
|
|
2277
2280
|
value = control[fieldName];
|
|
2278
2281
|
}
|
|
2279
2282
|
if (fieldName === "mappings" && Array.isArray(value)) {
|
|
2280
|
-
const mappingsStr = value.map((m) =>
|
|
2281
|
-
const justification = m.description || m.justification || "";
|
|
2282
|
-
const status = m.status || "Unknown";
|
|
2283
|
-
return justification.trim() !== "" ? justification : `[${status}]`;
|
|
2284
|
-
}).join("\n");
|
|
2283
|
+
const mappingsStr = value.map((m) => formatMappingEntry(m)).join("\n\n");
|
|
2285
2284
|
exportControl[displayName] = mappingsStr;
|
|
2286
2285
|
} else if (Array.isArray(value)) {
|
|
2287
2286
|
exportControl[displayName] = value.join("; ");
|
|
@@ -2417,7 +2416,8 @@ var init_spreadsheetRoutes = __esm({
|
|
|
2417
2416
|
mappings: controlMappings.map((m) => ({
|
|
2418
2417
|
uuid: m.uuid,
|
|
2419
2418
|
status: m.status,
|
|
2420
|
-
description: m.justification || ""
|
|
2419
|
+
description: m.justification || "",
|
|
2420
|
+
cci: m.cci || ""
|
|
2421
2421
|
}))
|
|
2422
2422
|
};
|
|
2423
2423
|
});
|
|
@@ -2527,7 +2527,8 @@ var init_spreadsheetRoutes = __esm({
|
|
|
2527
2527
|
mappings: controlMappings.map((m) => ({
|
|
2528
2528
|
uuid: m.uuid,
|
|
2529
2529
|
status: m.status,
|
|
2530
|
-
description: m.justification || ""
|
|
2530
|
+
description: m.justification || "",
|
|
2531
|
+
cci: m.cci || ""
|
|
2531
2532
|
}))
|
|
2532
2533
|
};
|
|
2533
2534
|
});
|
package/dist/index.html
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
<link rel="icon" href="/lula.png" />
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
8
8
|
|
|
9
|
-
<link rel="modulepreload" href="/_app/immutable/entry/start.
|
|
10
|
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
|
9
|
+
<link rel="modulepreload" href="/_app/immutable/entry/start.FuG7wFo0.js">
|
|
10
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/CdJEnKns.js">
|
|
11
11
|
<link rel="modulepreload" href="/_app/immutable/chunks/DHuA7MQr.js">
|
|
12
|
-
<link rel="modulepreload" href="/_app/immutable/entry/app.
|
|
12
|
+
<link rel="modulepreload" href="/_app/immutable/entry/app.ByeCP5Xm.js">
|
|
13
13
|
<link rel="modulepreload" href="/_app/immutable/chunks/DSxRA67V.js">
|
|
14
14
|
<link rel="modulepreload" href="/_app/immutable/chunks/Ew6_cz_0.js">
|
|
15
15
|
<link rel="modulepreload" href="/_app/immutable/chunks/CC6oS456.js">
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
<div style="display: contents">
|
|
20
20
|
<script>
|
|
21
21
|
{
|
|
22
|
-
|
|
22
|
+
__sveltekit_1h3h5rz = {
|
|
23
23
|
base: ""
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const element = document.currentScript.parentElement;
|
|
27
27
|
|
|
28
28
|
Promise.all([
|
|
29
|
-
import("/_app/immutable/entry/start.
|
|
30
|
-
import("/_app/immutable/entry/app.
|
|
29
|
+
import("/_app/immutable/entry/start.FuG7wFo0.js"),
|
|
30
|
+
import("/_app/immutable/entry/app.ByeCP5Xm.js")
|
|
31
31
|
]).then(([kit, app]) => {
|
|
32
32
|
kit.start(app, element);
|
|
33
33
|
});
|