@viswa-test/audit-log 0.0.1 → 0.0.2

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),i=require("react/jsx-runtime"),t=require("react"),a=require("./AuditLogPanel.js"),n=require("./Services/AuditLogPanelAdapter.js"),o=require("lucide-react"),r={enabled:!0,lines:2,viewMoreLabel:"...View More",viewLessLabel:"View Less"},s={items:[{change_log_id:"log-1",changeTitle:"REVERTED",modifiedbyname:"Load Test",created_at:"2026-06-18T18:03:04.442613Z",actionType:"REVERTED",isLive:!0,changelog_metadata:[{property_name:"Union",property_value:{previous_value:{Union:"Contract redlining can significantly impact the outcome of a contract by identifying and modifying risky, unclear, or unfavorable terms. It helps reduce legal and financial exposure, improves clarity of obligations, and ensures compliance with company policies."},current_value:{Union:"latest value"}},metadata:{impact:"High priority union status change. High priority union status change. High priority union status change.",severity:"high",tags:["Linent","Grounded"]}}]},{change_log_id:"log-2",changeTitle:"ITERATED",actionType:"ITERATED",modifiedbyname:"AI Agent",created_at:"2026-06-19T10:00:00Z",ai_summary:"Shifted the risk to the vendor.",changelog_metadata:[]},{change_log_id:"log-3",changeTitle:"AI_SUGGESTED",actionType:"AI_SUGGESTED",modifiedbyname:"System Engine",created_at:"2026-06-20T14:30:00Z",changelog_metadata:[]},{change_log_id:"log-4",changeTitle:"REJECTED",modifiedbyname:"Hitesh",created_at:"2026-06-21T09:15:00Z",changelog_metadata:[]}],nextCursor:"eyJ0cyI6IjIwMjYtMDUtMjBUMTU6MTU6NDMuNTEzODM1KzAwOjAwIiwiY2lkIjoiMjA2NDI4YmItYTMzOS00NjkxLWI4ZjEtY2YwMGU4ZDA3YmY1Iiwib3JkZXIiOiJsYXRlc3RGaXJzdCJ9",hasNext:!0};exports.AuditLogSandbox=function(){var l=t.useState(!0),d=l[0],c=l[1],g=t.useState([]);g[0];var p=g[1],u=t.useState();u[0];var h=u[1],x=t.useState(!0),f=x[0],m=x[1],y={emptyState:"No history found for this claim.",impactSectionTitle:"System Impact Score",changedToSuffix:"Changed To:",fromSuffix:"Before:"};return t.useEffect(function(){setTimeout(function(){var e=s.items,i=n.transformBackendLogs(e,y,r),t=n.extractComparisonContext(e,{comparisonTitle:"Final Approved Text Vs. Original",comparisonLatestLabel:"Latest text",comparisonOriginalLabel:"Original text"},r);p(i),h(t),m(!1)},800)},[]),i.jsxs("div",e.__assign({style:{padding:"40px",fontFamily:"system-ui",backgroundColor:"#f1f5f9",minHeight:"100vh"}},{children:[i.jsx("button",e.__assign({onClick:function(){return c(!0)},style:{padding:"12px 24px",background:"#0f172a",color:"white",borderRadius:"8px",cursor:"pointer",border:"none",fontWeight:"bold"}},{children:"Open Redline Sandbox"})),i.jsx(a.AuditLogPanel,{getData:{baseUrl:"https://dev.appmod.ai",endpoint:"/changelog/audit-log/fetch",configId:"6a3e5ddeb4d25cd1bfe68c56",method:"POST"},distinctValuesApi:{baseUrl:"https://dev.appmod.ai",endpoint:"/changelog/audit-log/distinct-values"},query:{externalResourceId:["173a1acc-3266-48c2-85b3-5c45d006945b"],paginationLimit:10},filters:{config:{showFilterButton:!0,showSort:!0,showDateFilter:!0,showSearch:!0,showAnalystFilter:!0,showChangeTitleFilter:!0,showImpactPercentage:!0,sortOptions:{latest:!1,oldest:!0},showApplyButton:!0},labels:{impactHintLabel:"This is hint for impact label"},impactRangeLimits:{min:-100,max:100}},truncationConfig:r,isOpen:d,onClose:function(){return c(!1)},title:"Redline Master History",subtitle:"Tracking all modifications and AI iterations",dataSourceMode:"internal",loading:f,labels:y,filterDisplayMode:"popup",comparisonContext:void 0,globalIcons:{actionTypes:{REJECTED:i.jsx(o.Trash2,{size:16,color:"#dc2626"})}},renderItemHeaderLeft:function(t){var a;return"ITERATED"===(null===(a=t.rawPayload)||void 0===a?void 0:a.changeTitle)?i.jsxs("div",e.__assign({style:{display:"flex",gap:"12px",alignItems:"center"}},{children:[i.jsx("div",e.__assign({style:{padding:"8px",background:"#fdf4ff",borderRadius:"8px",border:"1px solid #f0abfc"}},{children:i.jsx(o.Bot,{size:20,color:"#c026d3"})})),i.jsxs("div",{children:[i.jsx("div",e.__assign({style:{color:"#c026d3",fontWeight:"bold",fontSize:"14px"}},{children:"AI Agent Suggestion"})),i.jsx("div",e.__assign({style:{fontSize:"11px",color:"#64748b"}},{children:"Awaiting your approval..."}))]})]})):null},renderItemHeaderRight:function(t,a,n){var r;return"REJECTED"===(null===(r=t.rawPayload)||void 0===r?void 0:r.changeTitle)?i.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:[i.jsxs("button",e.__assign({onClick:function(e){e.stopPropagation(),alert("Restoring Redline...")},style:{display:"flex",gap:"4px",alignItems:"center",padding:"4px 8px",borderRadius:"4px",border:"1px solid #cbd5e1",cursor:"pointer",background:"white",fontSize:"11px",fontWeight:600,color:"#334155"}},{children:[i.jsx(o.RotateCcw,{size:12})," Restore"]})),i.jsx("span",e.__assign({style:{fontSize:"11px",color:"#94a3b8"}},{children:t.timestamp})),i.jsx("span",e.__assign({style:{color:"#94a3b8"}},{children:a?"▲":"▼"}))]})):null},renderItemExpandedBody:function(t,a){var n;return"ITERATED"===(null===(n=t.rawPayload)||void 0===n?void 0:n.changeTitle)?i.jsxs("div",e.__assign({style:{padding:"16px",background:"#f8fafc",borderRadius:"8px",border:"1px dashed #cbd5e1",display:"flex",flexDirection:"column",gap:"12px"}},{children:[i.jsxs("div",e.__assign({style:{display:"flex",gap:"8px",alignItems:"center",color:"#0f172a",fontWeight:"bold"}},{children:[i.jsx(o.ShieldAlert,{size:16,color:"#eab308"}),"Custom Iteration Review"]})),i.jsxs("div",e.__assign({style:{fontSize:"13px",color:"#475569"}},{children:[i.jsx("strong",{children:"AI Summary: "})," ",t.rawPayload.ai_summary]})),i.jsxs("div",e.__assign({style:{display:"flex",gap:"8px"}},{children:[i.jsx("button",e.__assign({onClick:a.collapse,style:{padding:"6px 12px",background:"#e2e8f0",border:"none",borderRadius:"4px",fontSize:"12px",cursor:"pointer",fontWeight:600}},{children:"Close View"})),i.jsx("button",e.__assign({style:{padding:"6px 12px",background:"#2563eb",color:"white",border:"none",borderRadius:"4px",fontSize:"12px",cursor:"pointer",fontWeight:600}},{children:"Approve Changes"}))]}))]})):null}})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),i=require("react/jsx-runtime"),t=require("react"),a=require("./AuditLogPanel.js"),n=require("./Services/AuditLogPanelAdapter.js"),o=require("lucide-react"),r={enabled:!0,lines:2,viewMoreLabel:"...View More",viewLessLabel:"View Less"},s={items:[{change_log_id:"log-1",changeTitle:"REVERTED",modifiedbyname:"Load Test",created_at:"2026-06-18T18:03:04.442613Z",actionType:"REVERTED",isLive:!0,changelog_metadata:[{property_name:"Union",property_value:{previous_value:{Union:"Contract redlining can significantly impact the outcome of a contract by identifying and modifying risky, unclear, or unfavorable terms. It helps reduce legal and financial exposure, improves clarity of obligations, and ensures compliance with company policies."},current_value:{Union:"latest value"}},metadata:{impact:"High priority union status change. High priority union status change. High priority union status change.",severity:"high",tags:["Linent","Grounded"]}}]},{change_log_id:"log-2",changeTitle:"ITERATED",actionType:"ITERATED",modifiedbyname:"AI Agent",created_at:"2026-06-19T10:00:00Z",ai_summary:"Shifted the risk to the vendor.",changelog_metadata:[]},{change_log_id:"log-3",changeTitle:"AI_SUGGESTED",actionType:"AI_SUGGESTED",modifiedbyname:"System Engine",created_at:"2026-06-20T14:30:00Z",changelog_metadata:[]},{change_log_id:"log-4",changeTitle:"REJECTED",modifiedbyname:"Hitesh",created_at:"2026-06-21T09:15:00Z",changelog_metadata:[]}],nextCursor:"eyJ0cyI6IjIwMjYtMDUtMjBUMTU6MTU6NDMuNTEzODM1KzAwOjAwIiwiY2lkIjoiMjA2NDI4YmItYTMzOS00NjkxLWI4ZjEtY2YwMGU4ZDA3YmY1Iiwib3JkZXIiOiJsYXRlc3RGaXJzdCJ9",hasNext:!0};exports.default=function(){var l=t.useState(!0),d=l[0],c=l[1],g=t.useState([]);g[0];var p=g[1],u=t.useState();u[0];var h=u[1],x=t.useState(!0),f=x[0],m=x[1],y={emptyState:"No history found for this claim.",impactSectionTitle:"System Impact Score",changedToSuffix:"Changed To:",fromSuffix:"Before:"};return t.useEffect(function(){setTimeout(function(){var e=s.items,i=n.transformBackendLogs(e,y,r),t=n.extractComparisonContext(e,{comparisonTitle:"Final Approved Text Vs. Original",comparisonLatestLabel:"Latest text",comparisonOriginalLabel:"Original text"},r);p(i),h(t),m(!1)},800)},[]),i.jsxs("div",e.__assign({style:{padding:"40px",fontFamily:"system-ui",backgroundColor:"#f1f5f9",minHeight:"100vh"}},{children:[i.jsx("button",e.__assign({onClick:function(){return c(!0)},style:{padding:"12px 24px",background:"#0f172a",color:"white",borderRadius:"8px",cursor:"pointer",border:"none",fontWeight:"bold"}},{children:"Open Redline Sandbox"})),i.jsx(a.AuditLogPanel,{getData:{baseUrl:"https://dev.appmod.ai",endpoint:"/changelog/audit-log/fetch",configId:"6a3e5ddeb4d25cd1bfe68c56",method:"POST"},distinctValuesApi:{baseUrl:"https://dev.appmod.ai",endpoint:"/changelog/audit-log/distinct-values"},query:{externalResourceId:["173a1acc-3266-48c2-85b3-5c45d006945b"],paginationLimit:10},filters:{config:{showFilterButton:!0,showSort:!0,showDateFilter:!0,showSearch:!0,showAnalystFilter:!0,showChangeTitleFilter:!0,showImpactPercentage:!0,sortOptions:{latest:!1,oldest:!0},showApplyButton:!0},labels:{impactHintLabel:"This is hint for impact label"},impactRangeLimits:{min:-100,max:100}},truncationConfig:r,isOpen:d,onClose:function(){return c(!1)},title:"Redline Master History",subtitle:"Tracking all modifications and AI iterations",dataSourceMode:"internal",loading:f,labels:y,filterDisplayMode:"popup",comparisonContext:void 0,globalIcons:{actionTypes:{REJECTED:i.jsx(o.Trash2,{size:16,color:"#dc2626"})}},renderItemHeaderLeft:function(t){var a;return"ITERATED"===(null===(a=t.rawPayload)||void 0===a?void 0:a.changeTitle)?i.jsxs("div",e.__assign({style:{display:"flex",gap:"12px",alignItems:"center"}},{children:[i.jsx("div",e.__assign({style:{padding:"8px",background:"#fdf4ff",borderRadius:"8px",border:"1px solid #f0abfc"}},{children:i.jsx(o.Bot,{size:20,color:"#c026d3"})})),i.jsxs("div",{children:[i.jsx("div",e.__assign({style:{color:"#c026d3",fontWeight:"bold",fontSize:"14px"}},{children:"AI Agent Suggestion"})),i.jsx("div",e.__assign({style:{fontSize:"11px",color:"#64748b"}},{children:"Awaiting your approval..."}))]})]})):null},renderItemHeaderRight:function(t,a,n){var r;return"REJECTED"===(null===(r=t.rawPayload)||void 0===r?void 0:r.changeTitle)?i.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:[i.jsxs("button",e.__assign({onClick:function(e){e.stopPropagation(),alert("Restoring Redline...")},style:{display:"flex",gap:"4px",alignItems:"center",padding:"4px 8px",borderRadius:"4px",border:"1px solid #cbd5e1",cursor:"pointer",background:"white",fontSize:"11px",fontWeight:600,color:"#334155"}},{children:[i.jsx(o.RotateCcw,{size:12})," Restore"]})),i.jsx("span",e.__assign({style:{fontSize:"11px",color:"#94a3b8"}},{children:t.timestamp})),i.jsx("span",e.__assign({style:{color:"#94a3b8"}},{children:a?"▲":"▼"}))]})):null},renderItemExpandedBody:function(t,a){var n;return"ITERATED"===(null===(n=t.rawPayload)||void 0===n?void 0:n.changeTitle)?i.jsxs("div",e.__assign({style:{padding:"16px",background:"#f8fafc",borderRadius:"8px",border:"1px dashed #cbd5e1",display:"flex",flexDirection:"column",gap:"12px"}},{children:[i.jsxs("div",e.__assign({style:{display:"flex",gap:"8px",alignItems:"center",color:"#0f172a",fontWeight:"bold"}},{children:[i.jsx(o.ShieldAlert,{size:16,color:"#eab308"}),"Custom Iteration Review"]})),i.jsxs("div",e.__assign({style:{fontSize:"13px",color:"#475569"}},{children:[i.jsx("strong",{children:"AI Summary: "})," ",t.rawPayload.ai_summary]})),i.jsxs("div",e.__assign({style:{display:"flex",gap:"8px"}},{children:[i.jsx("button",e.__assign({onClick:a.collapse,style:{padding:"6px 12px",background:"#e2e8f0",border:"none",borderRadius:"4px",fontSize:"12px",cursor:"pointer",fontWeight:600}},{children:"Close View"})),i.jsx("button",e.__assign({style:{padding:"6px 12px",background:"#2563eb",color:"white",border:"none",borderRadius:"4px",fontSize:"12px",cursor:"pointer",fontWeight:600}},{children:"Approve Changes"}))]}))]})):null}})]}))};
2
2
  //# sourceMappingURL=AuditLogSandBox.js.map
package/dist/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./AuditLog.js"),o=require("./components/AuditLogPanel/AuditLogPanel.js"),t=require("./components/AuditLogPanel/AuditLogSandBox.js"),r=require("./components/LogTable.js"),s=require("./components/LogFilters.js"),n=require("./components/LogFiltersSidebar.js"),u=require("./components/LogFilterDropdown.js"),i=require("./components/ActionTakenBody.js"),a=require("./components/DateRangeSelector.js"),l=require("./components/ImpactRangeSelector.js"),d=require("./components/CustomMultiSelect.js");exports.AuditLog=e.default,exports.AuditLogPanel=o.AuditLogPanel,exports.AuditLogSandbox=t.AuditLogSandbox,exports.LogTable=r.default,exports.LogFilters=s.default,exports.LogFiltersSidebar=n.default,exports.LogFilterDropdown=u.default,exports.ActionTakenBody=i.default,exports.DateRangeSelector=a.default,exports.ImpactRangeSelector=l.default,exports.CustomMultiSelect=d.default;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./AuditLog.js"),o=require("./components/AuditLogPanel/AuditLogPanel.js"),t=require("./components/AuditLogPanel/AuditLogSandBox.js"),r=require("./components/LogTable.js"),s=require("./components/LogFilters.js"),n=require("./components/LogFiltersSidebar.js"),u=require("./components/LogFilterDropdown.js"),i=require("./components/ActionTakenBody.js"),a=require("./components/DateRangeSelector.js"),l=require("./components/ImpactRangeSelector.js"),d=require("./components/CustomMultiSelect.js");exports.AuditLog=e.default,exports.AuditLogPanel=o.AuditLogPanel,exports.AuditLogSandbox=t.default,exports.LogTable=r.default,exports.LogFilters=s.default,exports.LogFiltersSidebar=n.default,exports.LogFilterDropdown=u.default,exports.ActionTakenBody=i.default,exports.DateRangeSelector=a.default,exports.ImpactRangeSelector=l.default,exports.CustomMultiSelect=d.default;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"../../_virtual/_tslib.js";import{jsxs as i,jsx as t}from"react/jsx-runtime";import{useState as o,useEffect as n}from"react";import{AuditLogPanel as a}from"./AuditLogPanel.js";import{transformBackendLogs as r,extractComparisonContext as l}from"./Services/AuditLogPanelAdapter.js";import{Trash2 as d,Bot as c,RotateCcw as s,ShieldAlert as p}from"lucide-react";var g={enabled:!0,lines:2,viewMoreLabel:"...View More",viewLessLabel:"View Less"},u={items:[{change_log_id:"log-1",changeTitle:"REVERTED",modifiedbyname:"Load Test",created_at:"2026-06-18T18:03:04.442613Z",actionType:"REVERTED",isLive:!0,changelog_metadata:[{property_name:"Union",property_value:{previous_value:{Union:"Contract redlining can significantly impact the outcome of a contract by identifying and modifying risky, unclear, or unfavorable terms. It helps reduce legal and financial exposure, improves clarity of obligations, and ensures compliance with company policies."},current_value:{Union:"latest value"}},metadata:{impact:"High priority union status change. High priority union status change. High priority union status change.",severity:"high",tags:["Linent","Grounded"]}}]},{change_log_id:"log-2",changeTitle:"ITERATED",actionType:"ITERATED",modifiedbyname:"AI Agent",created_at:"2026-06-19T10:00:00Z",ai_summary:"Shifted the risk to the vendor.",changelog_metadata:[]},{change_log_id:"log-3",changeTitle:"AI_SUGGESTED",actionType:"AI_SUGGESTED",modifiedbyname:"System Engine",created_at:"2026-06-20T14:30:00Z",changelog_metadata:[]},{change_log_id:"log-4",changeTitle:"REJECTED",modifiedbyname:"Hitesh",created_at:"2026-06-21T09:15:00Z",changelog_metadata:[]}],nextCursor:"eyJ0cyI6IjIwMjYtMDUtMjBUMTU6MTU6NDMuNTEzODM1KzAwOjAwIiwiY2lkIjoiMjA2NDI4YmItYTMzOS00NjkxLWI4ZjEtY2YwMGU4ZDA3YmY1Iiwib3JkZXIiOiJsYXRlc3RGaXJzdCJ9",hasNext:!0},h=function(){var h=o(!0),m=h[0],f=h[1],y=o([]);y[0];var b=y[1],x=o();x[0];var v=x[1],T=o(!0),I=T[0],E=T[1],w={emptyState:"No history found for this claim.",impactSectionTitle:"System Impact Score",changedToSuffix:"Changed To:",fromSuffix:"Before:"};return n(function(){setTimeout(function(){var e=u.items,i=r(e,w,g),t=l(e,{comparisonTitle:"Final Approved Text Vs. Original",comparisonLatestLabel:"Latest text",comparisonOriginalLabel:"Original text"},g);b(i),v(t),E(!1)},800)},[]),i("div",e({style:{padding:"40px",fontFamily:"system-ui",backgroundColor:"#f1f5f9",minHeight:"100vh"}},{children:[t("button",e({onClick:function(){return f(!0)},style:{padding:"12px 24px",background:"#0f172a",color:"white",borderRadius:"8px",cursor:"pointer",border:"none",fontWeight:"bold"}},{children:"Open Redline Sandbox"})),t(a,{getData:{baseUrl:"https://dev.appmod.ai",endpoint:"/changelog/audit-log/fetch",configId:"6a3e5ddeb4d25cd1bfe68c56",method:"POST"},distinctValuesApi:{baseUrl:"https://dev.appmod.ai",endpoint:"/changelog/audit-log/distinct-values"},query:{externalResourceId:["173a1acc-3266-48c2-85b3-5c45d006945b"],paginationLimit:10},filters:{config:{showFilterButton:!0,showSort:!0,showDateFilter:!0,showSearch:!0,showAnalystFilter:!0,showChangeTitleFilter:!0,showImpactPercentage:!0,sortOptions:{latest:!1,oldest:!0},showApplyButton:!0},labels:{impactHintLabel:"This is hint for impact label"},impactRangeLimits:{min:-100,max:100}},truncationConfig:g,isOpen:m,onClose:function(){return f(!1)},title:"Redline Master History",subtitle:"Tracking all modifications and AI iterations",dataSourceMode:"internal",loading:I,labels:w,filterDisplayMode:"popup",comparisonContext:void 0,globalIcons:{actionTypes:{REJECTED:t(d,{size:16,color:"#dc2626"})}},renderItemHeaderLeft:function(o){var n;return"ITERATED"===(null===(n=o.rawPayload)||void 0===n?void 0:n.changeTitle)?i("div",e({style:{display:"flex",gap:"12px",alignItems:"center"}},{children:[t("div",e({style:{padding:"8px",background:"#fdf4ff",borderRadius:"8px",border:"1px solid #f0abfc"}},{children:t(c,{size:20,color:"#c026d3"})})),i("div",{children:[t("div",e({style:{color:"#c026d3",fontWeight:"bold",fontSize:"14px"}},{children:"AI Agent Suggestion"})),t("div",e({style:{fontSize:"11px",color:"#64748b"}},{children:"Awaiting your approval..."}))]})]})):null},renderItemHeaderRight:function(o,n,a){var r;return"REJECTED"===(null===(r=o.rawPayload)||void 0===r?void 0:r.changeTitle)?i("div",e({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:[i("button",e({onClick:function(e){e.stopPropagation(),alert("Restoring Redline...")},style:{display:"flex",gap:"4px",alignItems:"center",padding:"4px 8px",borderRadius:"4px",border:"1px solid #cbd5e1",cursor:"pointer",background:"white",fontSize:"11px",fontWeight:600,color:"#334155"}},{children:[t(s,{size:12})," Restore"]})),t("span",e({style:{fontSize:"11px",color:"#94a3b8"}},{children:o.timestamp})),t("span",e({style:{color:"#94a3b8"}},{children:n?"▲":"▼"}))]})):null},renderItemExpandedBody:function(o,n){var a;return"ITERATED"===(null===(a=o.rawPayload)||void 0===a?void 0:a.changeTitle)?i("div",e({style:{padding:"16px",background:"#f8fafc",borderRadius:"8px",border:"1px dashed #cbd5e1",display:"flex",flexDirection:"column",gap:"12px"}},{children:[i("div",e({style:{display:"flex",gap:"8px",alignItems:"center",color:"#0f172a",fontWeight:"bold"}},{children:[t(p,{size:16,color:"#eab308"}),"Custom Iteration Review"]})),i("div",e({style:{fontSize:"13px",color:"#475569"}},{children:[t("strong",{children:"AI Summary: "})," ",o.rawPayload.ai_summary]})),i("div",e({style:{display:"flex",gap:"8px"}},{children:[t("button",e({onClick:n.collapse,style:{padding:"6px 12px",background:"#e2e8f0",border:"none",borderRadius:"4px",fontSize:"12px",cursor:"pointer",fontWeight:600}},{children:"Close View"})),t("button",e({style:{padding:"6px 12px",background:"#2563eb",color:"white",border:"none",borderRadius:"4px",fontSize:"12px",cursor:"pointer",fontWeight:600}},{children:"Approve Changes"}))]}))]})):null}})]}))};export{h as AuditLogSandbox};
1
+ import{__assign as e}from"../../_virtual/_tslib.js";import{jsxs as i,jsx as t}from"react/jsx-runtime";import{useState as o,useEffect as a}from"react";import{AuditLogPanel as n}from"./AuditLogPanel.js";import{transformBackendLogs as r,extractComparisonContext as l}from"./Services/AuditLogPanelAdapter.js";import{Trash2 as d,Bot as c,RotateCcw as s,ShieldAlert as p}from"lucide-react";var g={enabled:!0,lines:2,viewMoreLabel:"...View More",viewLessLabel:"View Less"},u={items:[{change_log_id:"log-1",changeTitle:"REVERTED",modifiedbyname:"Load Test",created_at:"2026-06-18T18:03:04.442613Z",actionType:"REVERTED",isLive:!0,changelog_metadata:[{property_name:"Union",property_value:{previous_value:{Union:"Contract redlining can significantly impact the outcome of a contract by identifying and modifying risky, unclear, or unfavorable terms. It helps reduce legal and financial exposure, improves clarity of obligations, and ensures compliance with company policies."},current_value:{Union:"latest value"}},metadata:{impact:"High priority union status change. High priority union status change. High priority union status change.",severity:"high",tags:["Linent","Grounded"]}}]},{change_log_id:"log-2",changeTitle:"ITERATED",actionType:"ITERATED",modifiedbyname:"AI Agent",created_at:"2026-06-19T10:00:00Z",ai_summary:"Shifted the risk to the vendor.",changelog_metadata:[]},{change_log_id:"log-3",changeTitle:"AI_SUGGESTED",actionType:"AI_SUGGESTED",modifiedbyname:"System Engine",created_at:"2026-06-20T14:30:00Z",changelog_metadata:[]},{change_log_id:"log-4",changeTitle:"REJECTED",modifiedbyname:"Hitesh",created_at:"2026-06-21T09:15:00Z",changelog_metadata:[]}],nextCursor:"eyJ0cyI6IjIwMjYtMDUtMjBUMTU6MTU6NDMuNTEzODM1KzAwOjAwIiwiY2lkIjoiMjA2NDI4YmItYTMzOS00NjkxLWI4ZjEtY2YwMGU4ZDA3YmY1Iiwib3JkZXIiOiJsYXRlc3RGaXJzdCJ9",hasNext:!0},h=function(){var h=o(!0),m=h[0],f=h[1],y=o([]);y[0];var b=y[1],x=o();x[0];var v=x[1],T=o(!0),I=T[0],E=T[1],w={emptyState:"No history found for this claim.",impactSectionTitle:"System Impact Score",changedToSuffix:"Changed To:",fromSuffix:"Before:"};return a(function(){setTimeout(function(){var e=u.items,i=r(e,w,g),t=l(e,{comparisonTitle:"Final Approved Text Vs. Original",comparisonLatestLabel:"Latest text",comparisonOriginalLabel:"Original text"},g);b(i),v(t),E(!1)},800)},[]),i("div",e({style:{padding:"40px",fontFamily:"system-ui",backgroundColor:"#f1f5f9",minHeight:"100vh"}},{children:[t("button",e({onClick:function(){return f(!0)},style:{padding:"12px 24px",background:"#0f172a",color:"white",borderRadius:"8px",cursor:"pointer",border:"none",fontWeight:"bold"}},{children:"Open Redline Sandbox"})),t(n,{getData:{baseUrl:"https://dev.appmod.ai",endpoint:"/changelog/audit-log/fetch",configId:"6a3e5ddeb4d25cd1bfe68c56",method:"POST"},distinctValuesApi:{baseUrl:"https://dev.appmod.ai",endpoint:"/changelog/audit-log/distinct-values"},query:{externalResourceId:["173a1acc-3266-48c2-85b3-5c45d006945b"],paginationLimit:10},filters:{config:{showFilterButton:!0,showSort:!0,showDateFilter:!0,showSearch:!0,showAnalystFilter:!0,showChangeTitleFilter:!0,showImpactPercentage:!0,sortOptions:{latest:!1,oldest:!0},showApplyButton:!0},labels:{impactHintLabel:"This is hint for impact label"},impactRangeLimits:{min:-100,max:100}},truncationConfig:g,isOpen:m,onClose:function(){return f(!1)},title:"Redline Master History",subtitle:"Tracking all modifications and AI iterations",dataSourceMode:"internal",loading:I,labels:w,filterDisplayMode:"popup",comparisonContext:void 0,globalIcons:{actionTypes:{REJECTED:t(d,{size:16,color:"#dc2626"})}},renderItemHeaderLeft:function(o){var a;return"ITERATED"===(null===(a=o.rawPayload)||void 0===a?void 0:a.changeTitle)?i("div",e({style:{display:"flex",gap:"12px",alignItems:"center"}},{children:[t("div",e({style:{padding:"8px",background:"#fdf4ff",borderRadius:"8px",border:"1px solid #f0abfc"}},{children:t(c,{size:20,color:"#c026d3"})})),i("div",{children:[t("div",e({style:{color:"#c026d3",fontWeight:"bold",fontSize:"14px"}},{children:"AI Agent Suggestion"})),t("div",e({style:{fontSize:"11px",color:"#64748b"}},{children:"Awaiting your approval..."}))]})]})):null},renderItemHeaderRight:function(o,a,n){var r;return"REJECTED"===(null===(r=o.rawPayload)||void 0===r?void 0:r.changeTitle)?i("div",e({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:[i("button",e({onClick:function(e){e.stopPropagation(),alert("Restoring Redline...")},style:{display:"flex",gap:"4px",alignItems:"center",padding:"4px 8px",borderRadius:"4px",border:"1px solid #cbd5e1",cursor:"pointer",background:"white",fontSize:"11px",fontWeight:600,color:"#334155"}},{children:[t(s,{size:12})," Restore"]})),t("span",e({style:{fontSize:"11px",color:"#94a3b8"}},{children:o.timestamp})),t("span",e({style:{color:"#94a3b8"}},{children:a?"▲":"▼"}))]})):null},renderItemExpandedBody:function(o,a){var n;return"ITERATED"===(null===(n=o.rawPayload)||void 0===n?void 0:n.changeTitle)?i("div",e({style:{padding:"16px",background:"#f8fafc",borderRadius:"8px",border:"1px dashed #cbd5e1",display:"flex",flexDirection:"column",gap:"12px"}},{children:[i("div",e({style:{display:"flex",gap:"8px",alignItems:"center",color:"#0f172a",fontWeight:"bold"}},{children:[t(p,{size:16,color:"#eab308"}),"Custom Iteration Review"]})),i("div",e({style:{fontSize:"13px",color:"#475569"}},{children:[t("strong",{children:"AI Summary: "})," ",o.rawPayload.ai_summary]})),i("div",e({style:{display:"flex",gap:"8px"}},{children:[t("button",e({onClick:a.collapse,style:{padding:"6px 12px",background:"#e2e8f0",border:"none",borderRadius:"4px",fontSize:"12px",cursor:"pointer",fontWeight:600}},{children:"Close View"})),t("button",e({style:{padding:"6px 12px",background:"#2563eb",color:"white",border:"none",borderRadius:"4px",fontSize:"12px",cursor:"pointer",fontWeight:600}},{children:"Approve Changes"}))]}))]})):null}})]}))};export{h as default};
2
2
  //# sourceMappingURL=AuditLogSandBox.js.map
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{default as AuditLog}from"./AuditLog.js";export{AuditLogPanel}from"./components/AuditLogPanel/AuditLogPanel.js";export{AuditLogSandbox}from"./components/AuditLogPanel/AuditLogSandBox.js";export{default as LogTable}from"./components/LogTable.js";export{default as LogFilters}from"./components/LogFilters.js";export{default as LogFiltersSidebar}from"./components/LogFiltersSidebar.js";export{default as LogFilterDropdown}from"./components/LogFilterDropdown.js";export{default as ActionTakenBody}from"./components/ActionTakenBody.js";export{default as DateRangeSelector}from"./components/DateRangeSelector.js";export{default as ImpactRangeSelector}from"./components/ImpactRangeSelector.js";export{default as CustomMultiSelect}from"./components/CustomMultiSelect.js";
1
+ export{default as AuditLog}from"./AuditLog.js";export{AuditLogPanel}from"./components/AuditLogPanel/AuditLogPanel.js";export{default as AuditLogSandbox}from"./components/AuditLogPanel/AuditLogSandBox.js";export{default as LogTable}from"./components/LogTable.js";export{default as LogFilters}from"./components/LogFilters.js";export{default as LogFiltersSidebar}from"./components/LogFiltersSidebar.js";export{default as LogFilterDropdown}from"./components/LogFilterDropdown.js";export{default as ActionTakenBody}from"./components/ActionTakenBody.js";export{default as DateRangeSelector}from"./components/DateRangeSelector.js";export{default as ImpactRangeSelector}from"./components/ImpactRangeSelector.js";export{default as CustomMultiSelect}from"./components/CustomMultiSelect.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,3 @@
1
- export declare const AuditLogSandbox: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const AuditLogSandbox: () => import("react/jsx-runtime").JSX.Element;
2
+ export default AuditLogSandbox;
2
3
  //# sourceMappingURL=AuditLogSandBox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AuditLogSandBox.d.ts","sourceRoot":"","sources":["../../../../src/components/AuditLogPanel/AuditLogSandBox.tsx"],"names":[],"mappings":"AA+EA,eAAO,MAAM,eAAe,+CAgR3B,CAAC"}
1
+ {"version":3,"file":"AuditLogSandBox.d.ts","sourceRoot":"","sources":["../../../../src/components/AuditLogPanel/AuditLogSandBox.tsx"],"names":[],"mappings":"AA+EA,QAAA,MAAM,eAAe,+CAgRpB,CAAC;AAGF,eAAe,eAAe,CAAC"}
@@ -1,6 +1,6 @@
1
1
  export { default as AuditLog } from './AuditLog';
2
2
  export { AuditLogPanel } from './components/AuditLogPanel/AuditLogPanel';
3
- export { AuditLogSandbox } from './components/AuditLogPanel/AuditLogSandBox';
3
+ export { default as AuditLogSandbox } from './components/AuditLogPanel/AuditLogSandBox';
4
4
  export { default as LogTable } from './components/LogTable';
5
5
  export { default as LogFilters } from './components/LogFilters';
6
6
  export { default as LogFiltersSidebar } from './components/LogFiltersSidebar';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAG,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAG,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAG9E,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtG,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC1E,YAAY,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACtG,YAAY,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACtG,YAAY,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,YAAY,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,YAAY,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAG,OAAO,IAAI,eAAe,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAG9E,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtG,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC1E,YAAY,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACtG,YAAY,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACtG,YAAY,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,YAAY,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,YAAY,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viswa-test/audit-log",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "author": "Viswa Koduru",
5
5
  "description": "",
6
6
  "license": "MIT",