@kong-ui-public/table-data-grid 0.6.1-pr.3884.dc6f18af1.0 → 0.7.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.
@@ -1 +1 @@
1
- (function(O,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("ag-grid-vue3"),require("ag-grid-community"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","ag-grid-vue3","ag-grid-community","@kong-ui-public/i18n"],e):(O=typeof globalThis<"u"?globalThis:O||self,e(O["kong-ui-public-table-data-grid"]={},O.Vue,O.AgGridVue,O.agGridCommunity,O["kong-ui-public-i18n"]))})(this,(function(O,e,X,A,P){"use strict";var $=(t=>(t.PENDING="PENDING",t.LOADING="LOADING",t.SUCCESS="SUCCESS",t.ERROR="ERROR",t))($||{});const Y=t=>!!t?.length;function Z(t,a,o,l=Y){const n=e.computed(()=>l(t.value)),r=e.computed(()=>{const C=t.value!==void 0,s=a.value!==void 0&&a.value!==null;return o.value?"LOADING":n.value?"SUCCESS":s?"ERROR":C?"SUCCESS":"PENDING"});return{fetchState:$,hasData:n,state:r}}const ee=({emitState:t,fetchLifecycleState:a,hasData:o})=>{e.watch(()=>({hasData:o.value,state:a.value}),({hasData:l,state:n})=>{if(n!==$.PENDING){if(n===$.LOADING){t({hasData:l,state:"loading"});return}if(n===$.ERROR){t({hasData:l,state:"error"});return}t({hasData:l,state:"success"})}})},te=({startRow:t,endRow:a})=>{const o=a-t;return{blockIndex:o>0?Math.floor(t/o):0,pageSize:o}},oe=({startRow:t,rowsLength:a,pageSize:o,total:l,hasMore:n})=>{if(typeof l=="number")return l;if(n!==!0&&(n===!1||a<o))return t+a},ae=({fetcher:t,resetKey:a,sort:o})=>{const l=new Map,n=new Map,r=e.ref(0),u=e.ref(0),C=e.shallowRef(),s=e.shallowRef(),p=e.shallowRef(),g=e.ref(0),k=e.ref(!1);let R,T,E=o?.value?.sortColumnKey,G=o?.value?.sortColumnOrder;const i=c=>c===r.value&&R===t.value&&T===a?.value,f=(c,d)=>i(c)&&d===u.value&&E===o?.value?.sortColumnKey&&G===o?.value?.sortColumnOrder,y=c=>{if(!o)return!0;const d=o.value;return!d?.sortColumnKey||!d.sortColumnOrder?c.length===0:c.length===1&&c[0].colId===d.sortColumnKey&&c[0].sort===d.sortColumnOrder},K=()=>{k.value=g.value>0},B=()=>{u.value+=1,E=o?.value?.sortColumnKey,G=o?.value?.sortColumnOrder;for(const c of n.values())c.resolve(!1);l.clear(),n.clear(),s.value=void 0,p.value=void 0,g.value=0,K()},F=()=>{p.value=void 0,g.value+=1,K()},w=()=>{g.value=Math.max(0,g.value-1),K()},V=c=>{const d=n.get(c);if(d)return d;let b;const S={promise:new Promise(h=>{b=h}),resolve:h=>b(h)};return n.set(c,S),S},x=(c,d)=>{d.resolve(!1),n.get(c)===d&&n.delete(c)},z=async({blockIndex:c,currentBlockCompletion:d,datasourceId:b,requestGeneration:S})=>{if(c===0)return"ready";const h=n.get(c-1);if(!h)return x(c,d),"failed";const m=await h.promise;return f(b,S)?m?"ready":(x(c,d),"failed"):(x(c,d),"stale")},_=({blockIndex:c,currentBlockCompletion:d,getRowsParams:b,pageSize:S,result:h})=>{h.cursor!==void 0&&l.set(c,h.cursor),b.successCallback(h.data,oe({startRow:b.startRow,rowsLength:h.data.length,pageSize:S,total:h.total,hasMore:h.hasMore})),b.startRow===0&&(s.value=h.data),d.resolve(!0)},v=({blockIndex:c,currentBlockCompletion:d,fetchError:b,getRowsParams:S})=>{p.value=b,S.failCallback(),x(c,d)},N=()=>{const c=t.value;if(!c)throw new Error("TableDataGrid requires a fetcher in infinite mode");R=c,T=a?.value;const d=r.value+1;return r.value=d,B(),{async getRows(b){if(!i(d)||!y(b.sortModel)){b.failCallback();return}const S=u.value,{blockIndex:h,pageSize:m}=te({startRow:b.startRow,endRow:b.endRow}),D=V(h);if(await z({blockIndex:h,currentBlockCompletion:D,datasourceId:d,requestGeneration:S})!=="ready"||!f(d,S)){b.failCallback(),x(h,D);return}F();try{const L=h>0?l.get(h-1):void 0,Ee=await c({mode:"infinite",pageSize:m,cursor:L,sort:o?.value});if(!f(d,S)){b.failCallback(),x(h,D);return}_({blockIndex:h,currentBlockCompletion:D,getRowsParams:b,pageSize:m,result:Ee})}catch(L){if(!f(d,S)){b.failCallback(),x(h,D);return}v({blockIndex:h,currentBlockCompletion:D,fetchError:L,getRowsParams:b})}finally{f(d,S)&&w()}}}},I=()=>{C.value=N()};return e.watch([t,()=>a?.value],()=>{I()},{immediate:!0}),e.watch([()=>o?.value?.sortColumnKey,()=>o?.value?.sortColumnOrder],()=>B()),{datasource:e.readonly(C),data:e.shallowReadonly(s),error:e.readonly(p),isFetching:e.readonly(k)}},W=(t,a)=>{const o=Reflect.get(a,t.key);return t.valueFormatter?t.valueFormatter(o,a):String(o??"")},U=t=>typeof t!="number"?null:Number.isFinite(t)?t:null,j=(t,a)=>t.reduce((o,l)=>{const n=U(Reflect.get(l,a.key));return n===null?o:{sum:o.sum+n,max:Math.max(o.max,n)}},{sum:0,max:0}),le=(t,a)=>{const o=(a??[]).filter(r=>Number.isFinite(r.value)&&t>=r.value);if(!o.length)return;const l=Math.max(...o.map(r=>r.value));return o.filter(r=>r.value===l).some(r=>r.type==="error")?"error":"warning"},ne=(t,a,o)=>{if(t===null)return 0;const l=o==="relative"?a.sum:a.max;return!l||l<=0?0:Math.min(Math.max(t/l,0),1)},re=(t,a="en-US")=>{const o=new Intl.NumberFormat(a,{maximumFractionDigits:2}),l=o.format(t);return t>0&&t<.01?`< ${o.format(.01)} %`:`${l} %`},H=({value:t,stats:a,header:o,locale:l})=>{if(t===null||a.sum<=0)return;const n=t/a.sum*100;return o.percentageFormatter?.(n)??re(n,l)},Q=(t,a)=>a!==void 0&&a.length>(t?.length??-1)?a:t,se=({rows:t,header:a,stats:o,locale:l})=>t.reduce((n,r)=>({value:Q(n.value,W(a,r))??"",relative:a.showPercentage?Q(n.relative,H({value:U(Reflect.get(r,a.key)),stats:o,header:a,locale:l})):void 0}),{value:""}),ie=["data-threshold"],ce={class:"table-data-grid-cell-label-track"},ue={class:"table-data-grid-cell-label"},de={key:0,class:"table-data-grid-cell-relative","data-testid":"table-data-grid-cell-relative"},me={key:0,"aria-hidden":"true",class:"table-data-grid-cell-label table-data-grid-cell-label-sizer"},fe=["data-text"],pe=["data-text"],Ce=["data-threshold"],ge=e.defineComponent({name:"TableDataGridCellRenderer",__name:"TableDataGridCellRenderer",props:{params:{}},setup(t,{expose:a}){const o=e.shallowRef(t.params),l=e.ref(null),n=e.ref(!1),r=e.computed(()=>o.value.headerDef??{key:"",label:""}),u=e.computed(()=>o.value.context?.presentation),C=e.computed(()=>o.value.context?.cells?.tooltipTarget?.value??"body"),s=e.computed(()=>{const v=o.value;return v.valueFormatted!==void 0&&v.valueFormatted!==null?String(v.valueFormatted):String(v.value??"")}),p=e.computed(()=>o.value.value),g=e.computed(()=>U(p.value)),k=e.computed(()=>u.value?.stats[r.value.key]),R=e.computed(()=>u.value?.mode==="unpaginated"),T=e.computed(()=>R.value&&r.value.showPercentage&&k.value?H({value:g.value,stats:k.value,header:r.value,locale:u.value?.locale??"en-US"}):void 0),E=e.computed(()=>R.value&&!!r.value.bar&&(g.value!==null||p.value===null||p.value===void 0)),G=e.computed(()=>E.value&&k.value?ne(g.value,k.value,r.value.bar)*100:0),i=e.computed(()=>E.value?u.value?.labelSizers[r.value.key]:void 0),f=e.computed(()=>r.value.thresholds?.length&&g.value!==null?le(g.value,r.value.thresholds):void 0),y=e.computed(()=>({column:r.value,refreshCell:()=>{const v=o.value.node;v&&o.value.api.refreshCells({force:!0,rowNodes:[v]})},row:o.value.data??{},rowIndex:o.value.node?.rowIndex??0,rowValue:o.value.value,selected:o.value.node?.isSelected()??!1})),K=(v,{slots:N})=>{const I=o.value.colDef?.colId,c=o.value.context?.cells?.slots;return!I||I==="cell-icon"||!c?.[I]?N.default?.():e.h("span",{class:"table-data-grid-cell-slot-content"},e.renderSlot(c,I,y.value,()=>N.default?.()??[]))},B=()=>{const v=o.value.context?.cells?.slots;return v?.["cell-icon"]?e.renderSlot(v,"cell-icon",y.value):null};let F,w,V=!1;const x=()=>{const v=l.value;n.value=!!v&&v.scrollWidth>v.clientWidth},z=()=>{V||(w!==void 0&&cancelAnimationFrame(w),w=requestAnimationFrame(()=>{w=void 0,x()}))},_=v=>{if(F?.disconnect(),v){F?.observe(v);const N=v.closest(".ag-cell");N&&F?.observe(N)}z()};return e.onMounted(()=>{F=new ResizeObserver(z),_(l.value)}),e.watch(l,_),e.onUnmounted(()=>{V=!0,F?.disconnect(),w!==void 0&&cancelAnimationFrame(w)}),a({refresh(v){return o.value=v,e.nextTick(z),!0}}),(v,N)=>{const I=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["table-data-grid-cell-renderer",{"table-data-grid-cell-renderer--bar":E.value,"table-data-grid-cell-renderer--percentage":!!T.value,[`table-data-grid-cell-renderer--text-${f.value}`]:!E.value&&!!f.value}]),"data-threshold":f.value},[e.createElementVNode("span",ce,[e.createElementVNode("span",ue,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(B))),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(K),null,{default:e.withCtx(()=>[e.createVNode(I,{class:"table-data-grid-cell-tooltip",disabled:!n.value,"kpop-attributes":{popoverDelay:400},"max-width":"300",placement:"bottom-start",target:C.value,text:s.value},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"contentElement",ref:l,class:"table-data-grid-cell-content"},e.toDisplayString(s.value),513)]),_:1},8,["disabled","target","text"])]),_:1})),T.value?(e.openBlock(),e.createElementBlock("span",de,"("+e.toDisplayString(T.value)+")",1)):e.createCommentVNode("",!0)]),i.value?(e.openBlock(),e.createElementBlock("span",me,[e.createElementVNode("span",{class:"table-data-grid-cell-sizer-value","data-text":i.value.value},null,8,fe),i.value.relative?(e.openBlock(),e.createElementBlock("span",{key:0,class:"table-data-grid-cell-sizer-relative","data-text":`(${i.value.relative})`},null,8,pe)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),E.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:"table-data-grid-cell-bar","data-testid":"table-data-grid-cell-bar","data-threshold":f.value},[e.createElementVNode("span",{class:"table-data-grid-cell-bar-fill","data-testid":"table-data-grid-cell-bar-fill",style:e.normalizeStyle({width:`${G.value}%`})},null,4)],8,Ce)):e.createCommentVNode("",!0)],10,ie)}}}),ve=({headers:t,slots:a,initialSort:o,mode:l,rows:n,locale:r,tooltipTarget:u})=>{const C=l??"infinite",s=new Set,p=i=>!!(i.showPercentage||i.bar||i.thresholds?.length),g=()=>{t.value.forEach(i=>{if(!p(i))return;let f;if(C==="infinite"&&(i.showPercentage||i.bar)?f="percentage and bar presentation is only supported in unpaginated mode":C==="unpaginated"&&n?.value?.some(K=>{const B=Reflect.get(K,i.key);return B!=null&&U(B)===null})&&(f="contains non-finite or nonnumeric values; numeric presentation skips those values"),!f)return;const y=`${i.key}:${f}`;s.has(y)||(s.add(y),console.warn(`[TableDataGrid] Column "${i.key}" ${f}.`))})};e.watch([t,()=>n?.value],g,{deep:!0,immediate:!0});const k=e.computed(()=>{if(C!=="unpaginated")return{};const i=n?.value??[];return Object.fromEntries(t.value.filter(f=>f.showPercentage||f.bar).map(f=>[f.key,j(i,f)]))}),R=e.computed(()=>{if(C!=="unpaginated")return{};const i=n?.value??[],f=r?.value??"en-US";return Object.fromEntries(t.value.filter(y=>y.bar).map(y=>[y.key,se({rows:i,header:y,stats:k.value[y.key]??j(i,y),locale:f})]))}),T=e.computed(()=>({cells:{slots:a,tooltipTarget:u},presentation:{mode:C,locale:r?.value??"en-US",stats:k.value,labelSizers:R.value}})),E=i=>{const f=o?.sortColumnKey===i.key;return{colId:i.key,flex:!i.width&&!i.maxWidth?1:void 0,headerName:i.label,maxWidth:i.maxWidth,minWidth:i.minWidth,sortable:i.sortable??!1,unSortIcon:i.showSortIcon,...f?{initialSort:o?.sortColumnOrder,initialSortIndex:0}:{},valueGetter:y=>y.data?.[i.key],valueFormatter:y=>y.data?W(i,y.data):String(y.value??""),width:i.width,cellRenderer:ge,cellRendererParams:{headerDef:i}}};return{columnDefs:e.computed(()=>t.value.map(E)),gridContext:T}},q=({config:t,headers:a,pageSize:o})=>{const l=new Set(a.filter(r=>r.sortable).map(r=>r.key)),n=t?.sortColumnKey&&l.has(t.sortColumnKey)?t.sortColumnKey:void 0;return{sortColumnKey:n,sortColumnOrder:n?t?.sortColumnOrder:void 0,pageSize:t?.pageSize??o,...t?.fitToContent!==void 0?{fitToContent:t.fitToContent}:{}}},J=(t,a)=>t.sortColumnKey===a.sortColumnKey&&t.sortColumnOrder===a.sortColumnOrder&&t.pageSize===a.pageSize&&t.fitToContent===a.fitToContent,he=({headers:t,pageSize:a,tableConfig:o,emitTableConfigUpdate:l,onExternalConfigChange:n})=>{const r=e.computed(()=>o.value?q({config:o.value,headers:t.value,pageSize:a.value}):void 0),u=e.ref(r.value??q({config:void 0,headers:t.value,pageSize:a.value}));e.watch(r,g=>{g&&!J(g,u.value)&&(u.value=g,n?.(g))});const C=g=>{const k=q({config:{...u.value,...g},headers:t.value,pageSize:a.value});J(k,u.value)||(u.value=k,l(k))};e.watch(t,()=>{o.value||C({})});const s=e.computed(()=>({sortColumnKey:u.value.sortColumnKey,sortColumnOrder:u.value.sortColumnOrder})),p=e.computed(()=>o.value?.pageSize??a.value);return{activeTableConfig:e.readonly(u),activeSort:s,activePageSize:p,patchTableConfig:C}},ye=({cellClick:t,headers:a,rowClick:o})=>{const l=e.computed(()=>new Set(a.value.filter(s=>s.disableRowClick).map(s=>s.key))),n=s=>{const p=s.event?.target;return p instanceof Element?p.closest(".ag-cell")?.getAttribute("col-id")??void 0:void 0},r=s=>{const p=n(s);return!!(p&&l.value.has(p))};return{onCellClick:s=>{const p=s.colDef.colId;!s.data||!p||t({columnKey:p,row:s.data,value:s.value})},onRowClick:s=>{s.data&&!r(s)&&o(s.data,s)}}},be=({activeSort:t,emitSort:a,patchTableConfig:o})=>{const l=(r,u)=>{r.applyColumnState({state:u.sortColumnKey?[{colId:u.sortColumnKey,sort:u.sortColumnOrder??null,sortIndex:0}]:[],defaultState:{sort:null,sortIndex:null}})};return{onSortChanged:r=>{const u=r.api.getColumnState().filter(p=>p.sort).sort((p,g)=>(p.sortIndex??0)-(g.sortIndex??0)),C=u[u.length-1],s=C?{sortColumnKey:C.colId,sortColumnOrder:C.sort}:{sortColumnKey:void 0,sortColumnOrder:void 0};s.sortColumnKey===t.value.sortColumnKey&&s.sortColumnOrder===t.value.sortColumnOrder||(a(s),o(s),u.length>1&&l(r.api,s))},applySortToGrid:l}},Se={emptyState:{title:"No Data",message:"There is no data to display."},errorState:{title:"An error occurred",message:"Data cannot be displayed due to an error."}};function ke(){const t=P.createI18n("en-us",Se);return{i18n:t,i18nT:P.i18nTComponent(t)}}const we={key:0,class:"table-error-state","data-testid":"table-error-state"},Re={key:1,class:"table-empty-state","data-testid":"table-empty-state"},De=((t,a)=>{const o=t.__vccOpts||t;for(const[l,n]of a)o[l]=n;return o})(e.defineComponent({__name:"TableDataGrid",props:{headers:{},error:{type:Boolean,default:!1},tableConfig:{},fetcher:{type:Function},mode:{},pageSize:{default:25},refreshKey:{type:[String,Number,Boolean]},rows:{}},emits:["grid:ready","state","row:click","cell:click","sort","update:tableConfig"],setup(t,{emit:a}){A.ModuleRegistry.registerModules([A.AllCommunityModule,A.ClientSideRowModelModule,A.InfiniteRowModelModule]);const o=t.mode??"infinite",l=a,{i18n:n}=ke(),{t:r}=n,u=e.useSlots(),C=e.shallowRef(),s=e.useTemplateRef("rootElement"),p=e.shallowRef("body"),g=()=>{const m=document.fullscreenElement;p.value=m instanceof HTMLElement&&m.contains(s.value??null)?m:"body"};e.onMounted(()=>{g(),document.addEventListener("fullscreenchange",g)}),e.onBeforeUnmount(()=>{document.removeEventListener("fullscreenchange",g)});const{activeTableConfig:k,activeSort:R,activePageSize:T,patchTableConfig:E}=he({headers:e.toRef(()=>t.headers),pageSize:e.toRef(()=>t.pageSize),tableConfig:e.toRef(()=>t.tableConfig),emitTableConfigUpdate:m=>l("update:tableConfig",m),onExternalConfigChange:m=>{C.value&&i(C.value,m)}}),{onSortChanged:G,applySortToGrid:i}=be({activeSort:R,emitSort:m=>l("sort",m),patchTableConfig:E}),f=e.computed(()=>o==="unpaginated"&&!!k.value.fitToContent),{onCellClick:y,onRowClick:K}=ye({cellClick:m=>l("cell:click",m),headers:e.toRef(()=>t.headers),rowClick:(m,D)=>l("row:click",m,D)}),B={resizable:!1,sortable:!1,suppressMovable:!0},F=e.computed(()=>[T.value,t.refreshKey]),w=o==="infinite"?ae({fetcher:e.toRef(()=>t.fetcher),resetKey:F,sort:R}):void 0,V=w?.datasource,x=e.computed(()=>w?w.data.value:t.rows),z=e.computed(()=>w?.isFetching.value??!1),_=e.computed(()=>t.rows?Array.from(t.rows):void 0),{columnDefs:v,gridContext:N}=ve({headers:e.toRef(()=>t.headers),locale:e.computed(()=>n.locale),mode:o,rows:_,slots:u,tooltipTarget:p,initialSort:R.value}),{fetchState:I,hasData:c,state:d}=Z(x,e.toRef(()=>w?.error.value),z),b=e.computed(()=>d.value===I.SUCCESS&&!c.value);w&&ee({emitState:m=>l("state",m),fetchLifecycleState:d,hasData:c});const S=()=>{const m=C.value;if(!m||m.isDestroyed())return;const D=R.value,M=m.getColumnState().find(L=>L.sort);M?.colId===D.sortColumnKey&&(M?.sort??void 0)===D.sortColumnOrder||i(m,D)};e.watch([C,R],S);const h=m=>{C.value=m.api,l("grid:ready",m.api)};return(m,D)=>{const M=e.resolveComponent("KEmptyState");return e.openBlock(),e.createElementBlock("div",{ref_key:"rootElement",ref:s,class:e.normalizeClass(["kong-ui-public-table-data-grid",{"fit-to-content":f.value}]),"data-testid":"table-data-grid"},[t.error?(e.openBlock(),e.createElementBlock("div",we,[e.renderSlot(m.$slots,"error-state",{},()=>[e.createVNode(M,{"icon-variant":"error",message:e.unref(r)("errorState.message"),title:e.unref(r)("errorState.title")},null,8,["message","title"])],!0)])):b.value?(e.openBlock(),e.createElementBlock("div",Re,[e.renderSlot(m.$slots,"empty-state",{},()=>[e.createVNode(M,{message:e.unref(r)("emptyState.message"),title:e.unref(r)("emptyState.title")},null,8,["message","title"])],!0)])):(e.openBlock(),e.createBlock(e.unref(X.AgGridVue),{key:2,"cache-block-size":e.unref(o)==="infinite"?e.unref(T):void 0,class:"table-data-grid-grid","column-defs":e.unref(v),context:e.unref(N),datasource:e.unref(o)==="infinite"?e.unref(V):void 0,"default-col-def":B,"dom-layout":f.value?"autoHeight":"normal","infinite-initial-row-count":e.unref(o)==="infinite"?1:void 0,loading:z.value,"row-data":e.unref(o)==="unpaginated"?_.value:void 0,"row-model-type":e.unref(o)==="unpaginated"?"clientSide":"infinite","suppress-cell-focus":!0,"suppress-multi-sort":!0,theme:e.unref(A.themeQuartz),onCellClicked:e.unref(y),onGridReady:h,onNewColumnsLoaded:S,onRowClicked:e.unref(K),onSortChanged:e.unref(G)},null,8,["cache-block-size","column-defs","context","datasource","dom-layout","infinite-initial-row-count","loading","row-data","row-model-type","theme","onCellClicked","onRowClicked","onSortChanged"]))],2)}}}),[["__scopeId","data-v-0465fb02"]]);O.TableDataGrid=De,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(E,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("ag-grid-vue3"),require("ag-grid-community"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","ag-grid-vue3","ag-grid-community","@kong-ui-public/i18n"],e):(E=typeof globalThis<"u"?globalThis:E||self,e(E["kong-ui-public-table-data-grid"]={},E.Vue,E.AgGridVue,E.agGridCommunity,E["kong-ui-public-i18n"]))})(this,(function(E,e,J,I,G){"use strict";var F=(t=>(t.PENDING="PENDING",t.LOADING="LOADING",t.SUCCESS="SUCCESS",t.ERROR="ERROR",t))(F||{});const X=t=>!!t?.length;function Y(t,a,o,l=X){const r=e.computed(()=>l(t.value)),n=e.computed(()=>{const v=t.value!==void 0,s=a.value!==void 0&&a.value!==null;return o.value?"LOADING":r.value?"SUCCESS":s?"ERROR":v?"SUCCESS":"PENDING"});return{fetchState:F,hasData:r,state:n}}const Z=({emitState:t,fetchLifecycleState:a,hasData:o})=>{e.watch(()=>({hasData:o.value,state:a.value}),({hasData:l,state:r})=>{if(r!==F.PENDING){if(r===F.LOADING){t({hasData:l,state:"loading"});return}if(r===F.ERROR){t({hasData:l,state:"error"});return}t({hasData:l,state:"success"})}})},ee=({startRow:t,endRow:a})=>{const o=a-t;return{blockIndex:o>0?Math.floor(t/o):0,pageSize:o}},te=({startRow:t,rowsLength:a,pageSize:o,total:l,hasMore:r})=>{if(typeof l=="number")return l;if(r!==!0&&(r===!1||a<o))return t+a},oe=({fetcher:t,resetKey:a,sort:o})=>{const l=new Map,r=new Map,n=e.ref(0),u=e.shallowRef(),v=e.shallowRef(),s=e.shallowRef(),m=e.ref(0),h=e.ref(!1);let y,R;const k=g=>g===n.value&&y===t.value&&R===a?.value,N=()=>{h.value=m.value>0},c=()=>{s.value=void 0,m.value+=1,N()},f=()=>{m.value=Math.max(0,m.value-1),N()},S=g=>{const d=r.get(g);if(d)return d;let i;const p={promise:new Promise(C=>{i=C}),resolve:C=>i(C)};return r.set(g,p),p},w=(g,d)=>{d.resolve(!1),r.get(g)===d&&r.delete(g)},x=async({blockIndex:g,currentBlockCompletion:d,datasourceId:i})=>{if(g===0)return"ready";const p=r.get(g-1);if(!p)return w(g,d),"failed";const C=await p.promise;return k(i)?C?"ready":(w(g,d),"failed"):(w(g,d),"stale")},B=({blockIndex:g,currentBlockCompletion:d,getRowsParams:i,pageSize:p,result:C})=>{C.cursor!==void 0&&l.set(g,C.cursor),i.successCallback(C.data,te({startRow:i.startRow,rowsLength:C.data.length,pageSize:p,total:C.total,hasMore:C.hasMore})),i.startRow===0&&(v.value=C.data),d.resolve(!0)},T=({blockIndex:g,currentBlockCompletion:d,fetchError:i,getRowsParams:p})=>{s.value=i,p.failCallback(),w(g,d)},O=()=>{const g=t.value;if(!g)throw new Error("TableDataGrid requires a fetcher in infinite mode");y=g,R=a?.value;const d=n.value+1;return n.value=d,l.clear(),r.clear(),v.value=void 0,s.value=void 0,m.value=0,N(),{async getRows(i){if(!k(d)){i.failCallback();return}const{blockIndex:p,pageSize:C}=ee({startRow:i.startRow,endRow:i.endRow}),D=S(p);if(await x({blockIndex:p,currentBlockCompletion:D,datasourceId:d})!=="ready"||!k(d)){i.failCallback(),w(p,D);return}c();try{const K=p>0?l.get(p-1):void 0,V=await g({mode:"infinite",pageSize:C,cursor:K,sort:o?.value});if(!k(d)){i.failCallback(),w(p,D);return}B({blockIndex:p,currentBlockCompletion:D,getRowsParams:i,pageSize:C,result:V})}catch(K){if(!k(d)){i.failCallback(),w(p,D);return}T({blockIndex:p,currentBlockCompletion:D,fetchError:K,getRowsParams:i})}finally{k(d)&&f()}}}},z=()=>{u.value=O()};return e.watch([t,()=>a?.value],()=>{z()},{immediate:!0}),{datasource:e.readonly(u),data:e.shallowReadonly(v),error:e.readonly(s),isFetching:e.readonly(h)}},ae={emptyState:{title:"No Data",message:"There is no data to display."},errorState:{title:"An error occurred",message:"Data cannot be displayed due to an error."}};function A(){const t=G.createI18n("en-us",ae);return{i18n:t,i18nT:G.i18nTComponent(t)}}const{i18n:le}=A(),$=(t,a)=>{const o=Reflect.get(a,t.key);return t.valueFormatter?t.valueFormatter(o,a):String(o??"")},_=t=>typeof t!="number"?null:Number.isFinite(t)?t:null,ne=(t,a)=>t.reduce((o,l)=>{const r=_(Reflect.get(l,a.key));return r===null?o:{sum:o.sum+r,max:Math.max(o.max,r)}},{sum:0,max:0}),re=(t,a)=>{const o=(a??[]).filter(n=>Number.isFinite(n.value)&&t>=n.value);if(!o.length)return;const l=Math.max(...o.map(n=>n.value));return o.filter(n=>n.value===l).some(n=>n.type==="error")?"error":"warning"},se=(t,a,o)=>{if(t===null)return 0;const l=o==="relative"?a.sum:a.max;return l>0?Math.min(Math.max(t/l,0),1):0},ie=t=>{const a=o=>le.formatNumber(o,{maximumFractionDigits:2});return t>0&&t<.01?`< ${a(.01)} %`:`${a(t)} %`},L=({value:t,stats:a,header:o})=>{if(t===null||a.sum<=0)return;const l=t/a.sum*100;return o.percentageFormatter?.(l)??ie(l)},P=(t,a)=>a!==void 0&&a.length>(t?.length??-1)?a:t,ce=({rows:t,header:a,stats:o})=>t.reduce((l,r)=>({value:P(l.value,$(a,r))??"",relative:a.showPercentage?P(l.relative,L({value:_(Reflect.get(r,a.key)),stats:o,header:a})):void 0}),{value:""}),ue=["data-threshold"],de={class:"table-data-grid-cell-label-track"},me={class:"table-data-grid-cell-label"},fe={key:0,class:"table-data-grid-cell-relative","data-testid":"table-data-grid-cell-relative"},pe={key:0,"aria-hidden":"true",class:"table-data-grid-cell-label table-data-grid-cell-label-sizer"},ge=["data-text"],Ce=["data-text"],he=["data-threshold"],ve=e.defineComponent({name:"TableDataGridCellRenderer",__name:"TableDataGridCellRenderer",props:{params:{}},setup(t,{expose:a}){const o=e.shallowRef(t.params),l=e.ref(null),r=e.ref(!1),n=e.computed(()=>o.value.headerDef??{key:"",label:""}),u=e.computed(()=>o.value.context?.presentation),v=e.computed(()=>o.value.context?.cells?.tooltipTarget?.value??"body"),s=e.computed(()=>o.value.valueFormatted??String(o.value.value??"")),m=e.computed(()=>o.value.value),h=e.computed(()=>_(m.value)),y=e.computed(()=>u.value?.stats[n.value.key]),R=e.computed(()=>n.value.showPercentage&&y.value?L({value:h.value,stats:y.value,header:n.value}):void 0),k=e.computed(()=>!!n.value.bar&&!!y.value&&(h.value!==null||m.value===null||m.value===void 0)),N=e.computed(()=>k.value&&y.value?se(h.value,y.value,n.value.bar)*100:0),c=e.computed(()=>k.value?u.value?.labelSizers[n.value.key]:void 0),f=e.computed(()=>n.value.thresholds?.length&&h.value!==null?re(h.value,n.value.thresholds):void 0),S=e.computed(()=>({column:n.value,refreshCell:()=>{const i=o.value.node;i&&o.value.api.refreshCells({force:!0,rowNodes:[i]})},row:o.value.data??{},rowIndex:o.value.node?.rowIndex??0,rowValue:o.value.value,selected:o.value.node?.isSelected()??!1})),w=(i,{slots:p})=>{const C=o.value.colDef?.colId,D=o.value.context?.cells?.slots;return!C||C==="cell-icon"||!D?.[C]?p.default?.():e.h("span",{class:"table-data-grid-cell-slot-content"},e.renderSlot(D,C,S.value,()=>p.default?.()??[]))},x=()=>{const i=o.value.context?.cells?.slots;return i?.["cell-icon"]?e.renderSlot(i,"cell-icon",S.value):null};let B,T,O=!1;const z=()=>{const i=l.value;r.value=!!i&&i.scrollWidth>i.clientWidth},g=()=>{O||(T!==void 0&&cancelAnimationFrame(T),T=requestAnimationFrame(()=>{T=void 0,z()}))},d=i=>{if(B?.disconnect(),i){B?.observe(i);const p=i.closest(".ag-cell");p&&B?.observe(p)}g()};return e.onMounted(()=>{B=new ResizeObserver(g),d(l.value)}),e.watch(l,d),e.onUnmounted(()=>{O=!0,B?.disconnect(),T!==void 0&&cancelAnimationFrame(T)}),a({refresh(i){return o.value=i,e.nextTick(g),!0}}),(i,p)=>{const C=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["table-data-grid-cell-renderer",{"table-data-grid-cell-renderer--bar":k.value,"table-data-grid-cell-renderer--percentage":!!R.value,[`table-data-grid-cell-renderer--text-${f.value}`]:!k.value&&!!f.value}]),"data-threshold":f.value},[e.createElementVNode("span",de,[e.createElementVNode("span",me,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x))),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),null,{default:e.withCtx(()=>[e.createVNode(C,{class:"table-data-grid-cell-tooltip",disabled:!r.value,"kpop-attributes":{popoverDelay:400},"max-width":"300",placement:"bottom-start",target:v.value,text:s.value},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"contentElement",ref:l,class:"table-data-grid-cell-content"},e.toDisplayString(s.value),513)]),_:1},8,["disabled","target","text"])]),_:1})),R.value?(e.openBlock(),e.createElementBlock("span",fe,"("+e.toDisplayString(R.value)+")",1)):e.createCommentVNode("",!0)]),c.value?(e.openBlock(),e.createElementBlock("span",pe,[e.createElementVNode("span",{class:"table-data-grid-cell-sizer-value","data-text":c.value.value},null,8,ge),c.value.relative?(e.openBlock(),e.createElementBlock("span",{key:0,class:"table-data-grid-cell-sizer-relative","data-text":`(${c.value.relative})`},null,8,Ce)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),k.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:"table-data-grid-cell-bar","data-testid":"table-data-grid-cell-bar","data-threshold":f.value},[e.createElementVNode("span",{class:"table-data-grid-cell-bar-fill","data-testid":"table-data-grid-cell-bar-fill",style:e.normalizeStyle({width:`${N.value}%`})},null,4)],8,he)):e.createCommentVNode("",!0)],10,ue)}}}),be=({headers:t,slots:a,initialSort:o,mode:l,rows:r,tooltipTarget:n})=>{const u=l??"infinite",v=new Set,s=c=>!!(c.showPercentage||c.bar||c.thresholds?.length),m=()=>{t.value.forEach(c=>{if(!s(c))return;let f;if(u==="infinite"&&(c.showPercentage||c.bar)?f="percentage and bar presentation is only supported in unpaginated mode":u==="unpaginated"&&r?.value?.some(w=>{const x=Reflect.get(w,c.key);return x!=null&&_(x)===null})&&(f="contains non-finite or nonnumeric values; numeric presentation skips those values"),!f)return;const S=`${c.key}:${f}`;v.has(S)||(v.add(S),console.warn(`[TableDataGrid] Column "${c.key}" ${f}.`))})};e.watch([t,()=>r?.value],m,{immediate:!0});const h=e.computed(()=>{if(u!=="unpaginated")return{};const c=r?.value??[];return Object.fromEntries(t.value.filter(f=>f.showPercentage||f.bar).map(f=>[f.key,ne(c,f)]))}),y=e.computed(()=>{if(u!=="unpaginated")return{};const c=r?.value??[];return Object.fromEntries(t.value.filter(f=>f.bar).map(f=>[f.key,ce({rows:c,header:f,stats:h.value[f.key]})]))}),R=e.computed(()=>({cells:{slots:a,tooltipTarget:n},presentation:{stats:h.value,labelSizers:y.value}})),k=c=>{const f=o?.sortColumnKey===c.key;return{colId:c.key,flex:!c.width&&!c.maxWidth?1:void 0,headerName:c.label,maxWidth:c.maxWidth,minWidth:c.minWidth,sortable:c.sortable??!1,unSortIcon:c.showSortIcon,...f?{initialSort:o?.sortColumnOrder,initialSortIndex:0}:{},valueGetter:S=>S.data?.[c.key],valueFormatter:S=>S.data?$(c,S.data):String(S.value??""),width:c.width,cellRenderer:ve,cellRendererParams:{headerDef:c}}};return{columnDefs:e.computed(()=>t.value.map(k)),gridContext:R}},M=({config:t,headers:a,pageSize:o})=>{const l=new Set(a.filter(n=>n.sortable).map(n=>n.key)),r=t?.sortColumnKey&&l.has(t.sortColumnKey)?t.sortColumnKey:void 0;return{sortColumnKey:r,sortColumnOrder:r?t?.sortColumnOrder:void 0,pageSize:t?.pageSize??o,...t?.fitToContent!==void 0?{fitToContent:t.fitToContent}:{}}},U=(t,a)=>t.sortColumnKey===a.sortColumnKey&&t.sortColumnOrder===a.sortColumnOrder&&t.pageSize===a.pageSize&&t.fitToContent===a.fitToContent,ye=({headers:t,pageSize:a,tableConfig:o,emitTableConfigUpdate:l,onExternalConfigChange:r})=>{const n=e.computed(()=>o.value?M({config:o.value,headers:t.value,pageSize:a.value}):void 0),u=e.ref(n.value??M({config:void 0,headers:t.value,pageSize:a.value}));e.watch(n,h=>{h&&!U(h,u.value)&&(u.value=h,r?.(h))});const v=h=>{const y=M({config:{...u.value,...h},headers:t.value,pageSize:a.value});U(y,u.value)||(u.value=y,l(y))},s=e.computed(()=>({sortColumnKey:u.value.sortColumnKey,sortColumnOrder:u.value.sortColumnOrder})),m=e.computed(()=>o.value?.pageSize??a.value);return{activeTableConfig:e.readonly(u),activeSort:s,activePageSize:m,patchTableConfig:v}},ke=({cellClick:t,headers:a,rowClick:o})=>{const l=e.computed(()=>new Set(a.value.filter(s=>s.disableRowClick).map(s=>s.key))),r=s=>{const m=s.event?.target;return m instanceof Element?m.closest(".ag-cell")?.getAttribute("col-id")??void 0:void 0},n=s=>{const m=r(s);return!!(m&&l.value.has(m))};return{onCellClick:s=>{const m=s.colDef.colId;!s.data||!m||t({columnKey:m,row:s.data,value:s.value})},onRowClick:s=>{s.data&&!n(s)&&o(s.data,s)}}},Se=({activeSort:t,emitSort:a,patchTableConfig:o})=>{const l=(n,u)=>{n.applyColumnState({state:u.sortColumnKey?[{colId:u.sortColumnKey,sort:u.sortColumnOrder??null,sortIndex:0}]:[],defaultState:{sort:null,sortIndex:null}})};return{onSortChanged:n=>{const u=n.api.getColumnState().filter(m=>m.sort).sort((m,h)=>(m.sortIndex??0)-(h.sortIndex??0)),v=u[u.length-1],s=v?{sortColumnKey:v.colId,sortColumnOrder:v.sort}:{sortColumnKey:void 0,sortColumnOrder:void 0};s.sortColumnKey===t.value.sortColumnKey&&s.sortColumnOrder===t.value.sortColumnOrder||(a(s),o(s),u.length>1&&l(n.api,s))},applySortToGrid:l}},we={key:0,class:"table-error-state","data-testid":"table-error-state"},Re={key:1,class:"table-empty-state","data-testid":"table-empty-state"},De=((t,a)=>{const o=t.__vccOpts||t;for(const[l,r]of a)o[l]=r;return o})(e.defineComponent({__name:"TableDataGrid",props:{headers:{},error:{type:Boolean,default:!1},tableConfig:{},fetcher:{type:Function},mode:{},pageSize:{default:25},refreshKey:{type:[String,Number,Boolean]},rows:{}},emits:["grid:ready","state","row:click","cell:click","sort","update:tableConfig"],setup(t,{emit:a}){I.ModuleRegistry.registerModules([I.AllCommunityModule,I.ClientSideRowModelModule,I.InfiniteRowModelModule]);const o=t.mode??"infinite",l=a,{i18n:r}=A(),{t:n}=r,u=e.useSlots(),v=e.shallowRef(),s=e.useTemplateRef("rootElement"),m=e.shallowRef("body"),h=()=>{const b=document.fullscreenElement;m.value=b instanceof HTMLElement&&b.contains(s.value??null)?b:"body"};e.onMounted(()=>{h(),document.addEventListener("fullscreenchange",h)}),e.onBeforeUnmount(()=>{document.removeEventListener("fullscreenchange",h)});const{activeTableConfig:y,activeSort:R,activePageSize:k,patchTableConfig:N}=ye({headers:e.toRef(()=>t.headers),pageSize:e.toRef(()=>t.pageSize),tableConfig:e.toRef(()=>t.tableConfig),emitTableConfigUpdate:b=>l("update:tableConfig",b),onExternalConfigChange:b=>{v.value&&f(v.value,b)}}),{onSortChanged:c,applySortToGrid:f}=Se({activeSort:R,emitSort:b=>l("sort",b),patchTableConfig:N}),S=e.computed(()=>o==="unpaginated"&&!!y.value.fitToContent),w=I.themeQuartz.withParams({autoHeightMinBodyHeight:0}),{onCellClick:x,onRowClick:B}=ke({cellClick:b=>l("cell:click",b),headers:e.toRef(()=>t.headers),rowClick:(b,H)=>l("row:click",b,H)}),T={resizable:!1,sortable:!1,suppressMovable:!0},O=e.computed(()=>y.value.sortColumnKey),z=e.computed(()=>y.value.sortColumnOrder),g=e.computed(()=>[k.value,t.refreshKey,O.value,z.value]),d=o==="infinite"?oe({fetcher:e.toRef(()=>t.fetcher),resetKey:g,sort:R}):void 0,i=d?.datasource,p=e.computed(()=>d?d.data.value:t.rows),C=e.computed(()=>d?.isFetching.value??!1),D=e.computed(()=>t.rows?Array.from(t.rows):void 0),{columnDefs:W,gridContext:K}=be({headers:e.toRef(()=>t.headers),mode:o,rows:D,slots:u,tooltipTarget:m,initialSort:R.value}),{fetchState:V,hasData:q,state:j}=Y(p,e.toRef(()=>d?.error.value),C),Ee=e.computed(()=>j.value===V.SUCCESS&&!q.value);d&&Z({emitState:b=>l("state",b),fetchLifecycleState:j,hasData:q});const Te=b=>{v.value=b.api,l("grid:ready",b.api)};return(b,H)=>{const Q=e.resolveComponent("KEmptyState");return e.openBlock(),e.createElementBlock("div",{ref_key:"rootElement",ref:s,class:e.normalizeClass(["kong-ui-public-table-data-grid",{"fit-to-content":S.value}]),"data-testid":"table-data-grid"},[t.error?(e.openBlock(),e.createElementBlock("div",we,[e.renderSlot(b.$slots,"error-state",{},()=>[e.createVNode(Q,{"icon-variant":"error",message:e.unref(n)("errorState.message"),title:e.unref(n)("errorState.title")},null,8,["message","title"])],!0)])):Ee.value?(e.openBlock(),e.createElementBlock("div",Re,[e.renderSlot(b.$slots,"empty-state",{},()=>[e.createVNode(Q,{message:e.unref(n)("emptyState.message"),title:e.unref(n)("emptyState.title")},null,8,["message","title"])],!0)])):(e.openBlock(),e.createBlock(e.unref(J.AgGridVue),{key:2,"cache-block-size":e.unref(o)==="infinite"?e.unref(k):void 0,class:"table-data-grid-grid","column-defs":e.unref(W),context:e.unref(K),datasource:e.unref(o)==="infinite"?e.unref(i):void 0,"default-col-def":T,"dom-layout":S.value?"autoHeight":"normal","infinite-initial-row-count":e.unref(o)==="infinite"?1:void 0,loading:C.value,"row-data":e.unref(o)==="unpaginated"?D.value:void 0,"row-model-type":e.unref(o)==="unpaginated"?"clientSide":"infinite","suppress-cell-focus":!0,"suppress-multi-sort":!0,theme:e.unref(w),onCellClicked:e.unref(x),onGridReady:Te,onRowClicked:e.unref(B),onSortChanged:e.unref(c)},null,8,["cache-block-size","column-defs","context","datasource","dom-layout","infinite-initial-row-count","loading","row-data","row-model-type","theme","onCellClicked","onRowClicked","onSortChanged"]))],2)}}}),[["__scopeId","data-v-85f88484"]]);E.TableDataGrid=De,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
@@ -1 +1 @@
1
- {"version":3,"file":"TableDataGrid.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TableDataGrid.vue"],"names":[],"mappings":"AAmUA,OAAO,KAAK,EACV,6BAA6B,EAC7B,0BAA0B,EAC1B,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAEV,OAAO,EACP,cAAc,EACd,eAAe,EAChB,MAAM,mBAAmB,CAAA;AAmB1B,QAAA,MAAM,YAAY,GAAK,GAAG,SAAS,MAAM,EACxC,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAA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AAA;SAAE,CAAA;QAC9E,YAAY,CAAC,EAAE,gCAAgC,CAAA;KAChD,CAAA;CACF,CAAA;AAMD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,kBAAkB,CAAA;CAC3B,CAAC;AAsTF,QAAA,MAAM,YAAY;wBA7JI,kBAAkB;oPAgKtC,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"TableDataGridCellRenderer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TableDataGridCellRenderer.vue"],"names":[],"mappings":"AA2YA,OAAO,KAAK,EAEV,mBAAmB,EACpB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,KAAK,EAAuB,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,CAAA;AAY1D,OAAO,EAKL,KAAK,gCAAgC,EACtC,MAAM,oCAAoC,CAAA;AAE3C,KAAK,kBAAkB,GAAG,mBAAmB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG;IACvE;iFAC6E;IAC7E,SAAS,CAAC,EAAE,mBAAmB,CAAA;IAC/B,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,KAAK,CAAC;YAAC,aAAa,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,GAAG,WAAW,CAAC,CAAC,CAAA;SAAE,CAAA;QAC9E,YAAY,CAAC,EAAE,gCAAgC,CAAA;KAChD,CAAA;CACF,CAAA;AAMD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,kBAAkB,CAAA;CAC3B,CAAC;AA6SF,QAAA,MAAM,YAAY;wBA7JI,kBAAkB;oPAgKtC,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -23,15 +23,14 @@ interface UseFetchInfiniteOptions<Row extends object = TableDataGridRow> {
23
23
  *
24
24
  * Callers provide the public fetcher and an optional reset key, then observe
25
25
  * readonly fetch state and pass the returned datasource to AG Grid. Cursor maps,
26
- * block completion gates, pending counts, and stale request guards stay
26
+ * block completion gates, pending counts, and stale datasource guards stay
27
27
  * private to this composable so component code cannot mutate fetch lifecycle
28
28
  * state directly.
29
29
  *
30
30
  * @param fetcher Host-supplied fetcher that uses TableDataGrid's cursor-first
31
31
  * infinite mode contract.
32
32
  * @param resetKey Optional reactive invalidation key that rebuilds the
33
- * datasource and restarts the cursor chain. Sort changes reset the chain
34
- * without replacing the datasource.
33
+ * datasource and restarts the cursor chain.
35
34
  * @returns Readonly datasource, first-block data, error, and fetching state
36
35
  * refs for the active AG Grid infinite datasource.
37
36
  */
@@ -1 +1 @@
1
- {"version":3,"file":"useFetchInfinite.d.ts","sourceRoot":"","sources":["../../../src/composables/useFetchInfinite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EAEpB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACpE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAW9B,UAAU,uBAAuB,CAAC,GAAG,SAAS,MAAM,GAAG,gBAAgB;IACrE;;;OAGG;IACH,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,oBAAoB,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC,CAAA;IAC7D;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAA;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAC,CAAA;CACpD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,GAAI,GAAG,SAAS,MAAM,GAAG,gBAAgB,EAAE,8BAIrE,uBAAuB,CAAC,GAAG,CAAC;;;;;;;;;;;;;CAiY9B,CAAA"}
1
+ {"version":3,"file":"useFetchInfinite.d.ts","sourceRoot":"","sources":["../../../src/composables/useFetchInfinite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EAEpB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACpE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAW9B,UAAU,uBAAuB,CAAC,GAAG,SAAS,MAAM,GAAG,gBAAgB;IACrE;;;OAGG;IACH,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,oBAAoB,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC,CAAA;IAC7D;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAA;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAC,CAAA;CACpD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,GAAI,GAAG,SAAS,MAAM,GAAG,gBAAgB,EAAE,8BAIrE,uBAAuB,CAAC,GAAG,CAAC;;;;;;;;;;;;;CAmV9B,CAAA"}
@@ -6,13 +6,12 @@ import { type TableDataGridColumnStats, type TableDataGridLabelSizer } from '../
6
6
  * Converts `headers` into what AG Grid needs to render the table's columns:
7
7
  * the column definitions themselves, and the shared grid `context`.
8
8
  */
9
- export declare const useTableDataGridColumnDefs: <Row extends object = TableDataGridRow>({ headers, slots, initialSort, mode, rows, locale, tooltipTarget, }: {
9
+ export declare const useTableDataGridColumnDefs: <Row extends object = TableDataGridRow>({ headers, slots, initialSort, mode, rows, tooltipTarget, }: {
10
10
  headers: Readonly<Ref<Array<TableDataGridHeader<Row>>>>;
11
11
  slots: Slots;
12
12
  initialSort?: TableDataGridSort;
13
13
  mode?: "infinite" | "unpaginated";
14
14
  rows?: Readonly<Ref<readonly Row[] | undefined>>;
15
- locale?: Readonly<Ref<string>>;
16
15
  tooltipTarget?: Readonly<Ref<string | HTMLElement>>;
17
16
  }) => {
18
17
  columnDefs: import("vue").ComputedRef<ColDef<Row, any>[]>;
@@ -24,8 +23,6 @@ export declare const useTableDataGridColumnDefs: <Row extends object = TableData
24
23
  tooltipTarget: Readonly<Ref<string | HTMLElement, string | HTMLElement>> | undefined;
25
24
  };
26
25
  presentation: {
27
- mode: "infinite" | "unpaginated";
28
- locale: string;
29
26
  stats: Record<string, TableDataGridColumnStats>;
30
27
  labelSizers: Record<string, TableDataGridLabelSizer>;
31
28
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useTableDataGridColumnDefs.d.ts","sourceRoot":"","sources":["../../../src/composables/useTableDataGridColumnDefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AACxF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,CAAA;AAGrC,OAAO,EAKL,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC7B,MAAM,oCAAoC,CAAA;AAE3C;;;GAGG;AACH,eAAO,MAAM,0BAA0B,GAAI,GAAG,SAAS,MAAM,GAAG,gBAAgB,EAAE,qEAQ/E;IACD,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IACvD,KAAK,EAAE,KAAK,CAAA;IACZ,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,IAAI,CAAC,EAAE,UAAU,GAAG,aAAa,CAAA;IACjC,IAAI,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,SAAS,GAAG,EAAE,GAAG,SAAS,CAAC,CAAC,CAAA;IAChD,MAAM,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IAC9B,aAAa,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,GAAG,WAAW,CAAC,CAAC,CAAA;CACpD;;;;;;;;;;;;;;;;CAsHA,CAAA"}
1
+ {"version":3,"file":"useTableDataGridColumnDefs.d.ts","sourceRoot":"","sources":["../../../src/composables/useTableDataGridColumnDefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AACxF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,CAAA;AAGrC,OAAO,EAKL,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC7B,MAAM,oCAAoC,CAAA;AAE3C;;;GAGG;AACH,eAAO,MAAM,0BAA0B,GAAI,GAAG,SAAS,MAAM,GAAG,gBAAgB,EAAE,6DAO/E;IACD,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IACvD,KAAK,EAAE,KAAK,CAAA;IACZ,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,IAAI,CAAC,EAAE,UAAU,GAAG,aAAa,CAAA;IACjC,IAAI,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,SAAS,GAAG,EAAE,GAAG,SAAS,CAAC,CAAC,CAAA;IAChD,aAAa,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,GAAG,WAAW,CAAC,CAAC,CAAA;CACpD;;;;;;;;;;;;;;CAkHA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTableDataGridConfig.d.ts","sourceRoot":"","sources":["../../../src/composables/useTableDataGridConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAC7G,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAI9B;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,GAAI,GAAG,SAAS,MAAM,GAAG,gBAAgB,EAAE,qGAM3E;IACD,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IACvD,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IAC/B,WAAW,EAAE,QAAQ,CAAC,GAAG,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAAC,CAAA;IAC3D,qBAAqB,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IAC5D,sBAAsB,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;CAC/D;;;;;;;;;;;;;;8BAsBkC,OAAO,CAAC,mBAAmB,CAAC;CAqC9D,CAAA"}
1
+ {"version":3,"file":"useTableDataGridConfig.d.ts","sourceRoot":"","sources":["../../../src/composables/useTableDataGridConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAC7G,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAI9B;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,GAAI,GAAG,SAAS,MAAM,GAAG,gBAAgB,EAAE,qGAM3E;IACD,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IACvD,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IAC/B,WAAW,EAAE,QAAQ,CAAC,GAAG,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAAC,CAAA;IAC3D,qBAAqB,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IAC5D,sBAAsB,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;CAC/D;;;;;;;;;;;;;;8BAsBkC,OAAO,CAAC,mBAAmB,CAAC;CA8B9D,CAAA"}
@@ -8,9 +8,8 @@ export type TableDataGridLabelSizer = {
8
8
  value: string;
9
9
  relative?: string;
10
10
  };
11
+ /** Stats and label sizers are only present for unpaginated columns with percentage or bar presentation. */
11
12
  export type TableDataGridPresentationContext = {
12
- mode: 'infinite' | 'unpaginated';
13
- locale: string;
14
13
  stats: Record<string, TableDataGridColumnStats>;
15
14
  labelSizers: Record<string, TableDataGridLabelSizer>;
16
15
  };
@@ -55,28 +54,18 @@ export declare const getThresholdType: (value: number, thresholds: readonly Tabl
55
54
  * @returns A ratio between zero and one; zero for missing values or nonpositive denominators.
56
55
  */
57
56
  export declare const getBarRatio: (value: number | null, stats: TableDataGridColumnStats, mode: TableDataGridHeader["bar"]) => number;
58
- /**
59
- * Format a percentage already on the 0–100 scale, preserving the small-value placeholder.
60
- *
61
- * @param percentage - Percentage expressed on the 0–100 scale.
62
- * @param locale - Number formatting locale; defaults to en-US.
63
- * @returns Localized percentage text, including the small-value placeholder.
64
- */
65
- export declare const formatPercentage: (percentage: number, locale?: string) => string;
66
57
  /**
67
58
  * Format a value as its share of the column total.
68
59
  *
69
60
  * @param value - Numeric cell value, or null when missing.
70
61
  * @param stats - Sum and maximum of the complete column.
71
62
  * @param header - Column whose optional percentage formatter applies.
72
- * @param locale - Number formatting locale.
73
63
  * @returns Percentage text, or undefined when the share is undefined.
74
64
  */
75
- export declare const formatRelativeValue: ({ value, stats, header, locale, }: {
65
+ export declare const formatRelativeValue: ({ value, stats, header, }: {
76
66
  value: number | null;
77
67
  stats: TableDataGridColumnStats;
78
68
  header: Pick<TableDataGridHeader, "percentageFormatter">;
79
- locale: string;
80
69
  }) => string | undefined;
81
70
  /**
82
71
  * Find the longest value and percentage text in the complete result.
@@ -88,13 +77,11 @@ export declare const formatRelativeValue: ({ value, stats, header, locale, }: {
88
77
  * @param rows - Complete result for the current query.
89
78
  * @param header - Bar column to measure.
90
79
  * @param stats - Sum and maximum of the complete column.
91
- * @param locale - Number formatting locale.
92
80
  * @returns The longest value text and, when percentages show, the longest percentage text.
93
81
  */
94
- export declare const getLabelSizer: <Row extends object>({ rows, header, stats, locale, }: {
82
+ export declare const getLabelSizer: <Row extends object>({ rows, header, stats, }: {
95
83
  rows: readonly Row[];
96
84
  header: TableDataGridHeader<Row>;
97
85
  stats: TableDataGridColumnStats;
98
- locale: string;
99
86
  }) => TableDataGridLabelSizer;
100
87
  //# sourceMappingURL=tableDataGridPresentation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tableDataGridPresentation.d.ts","sourceRoot":"","sources":["../../../src/utils/tableDataGridPresentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,UAAU,CAAA;AAEjB,MAAM,MAAM,wBAAwB,GAAG;IACrC,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,4FAA4F;AAC5F,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,gCAAgC,GAAG;IAC7C,IAAI,EAAE,UAAU,GAAG,aAAa,CAAA;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAA;IAC/C,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,uBAA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ACpB,MAAM,EAAE,mBAAmB,CAAC,GAAG,CAAC,CAAA;IAChC,KAAK,EAAE,wBAAwB,CAAA;IAC/B,MAAM,EAAE,MAAM,CAAA;CACf,KAAG,uBAaH,CAAA"}
1
+ {"version":3,"file":"tableDataGridPresentation.d.ts","sourceRoot":"","sources":["../../../src/utils/tableDataGridPresentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,UAAU,CAAA;AAKjB,MAAM,MAAM,wBAAwB,GAAG;IACrC,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,4FAA4F;AAC5F,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,2GAA2G;AAC3G,MAAM,MAAM,gCAAgC,GAAG;IAC7C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAA;IAC/C,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAA;CACrD,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,GAAG,SAAS,MAAM,EAChD,QAAQ,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,gBAAgB,CAAC,EAChE,KAAK,GAAG,KACP,MAMF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,OAAO,KAAG,MAAM,GAAG,IAMxD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GACzB,MAAM,SAAS,MAAM,EAAE,EACvB,QAAQ,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC,KACvC,wBAcF,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,GAC3B,OAAO,MAAM,EACb,YAAY,SAAS,sBAAsB,EAAE,GAAG,SAAS,KACxD,sBAAsB,CAAC,MAAM,CAAC,GAAG,SAanC,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GACtB,OAAO,MAAM,GAAG,IAAI,EACpB,OAAO,wBAAwB,EAC/B,MAAM,mBAAmB,CAAC,KAAK,CAAC,KAC/B,MAYF,CAAA;AAgBD;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAAI,2BAIjC;IACD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,KAAK,EAAE,wBAAwB,CAAA;IAC/B,MAAM,EAAE,IAAI,CAAC,mBAAmB,EAAE,qBAAqB,CAAC,CAAA;CACzD,KAAG,MAAM,GAAG,SAQZ,CAAA;AAMD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,GAAI,GAAG,SAAS,MAAM,EAAE,0BAI/C;IACD,IAAI,EAAE,SAAS,GAAG,EAAE,CAAA;IACpB,MAAM,EAAE,mBAAmB,CAAC,GAAG,CAAC,CAAA;IAChC,KAAK,EAAE,wBAAwB,CAAA;CAChC,KAAG,uBAYH,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/table-data-grid",
3
- "version": "0.6.1-pr.3884.dc6f18af1.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "main": "./dist/table-data-grid.umd.js",
6
6
  "module": "./dist/table-data-grid.es.js",
@@ -68,7 +68,6 @@
68
68
  "test:component": "BABEL_ENV=cypress cross-env FORCE_COLOR=1 cypress run --component -b chrome --spec './src/**/*.cy.ts' --project '../../../.'",
69
69
  "test:component:open": "BABEL_ENV=cypress cross-env FORCE_COLOR=1 cypress open --component -b chrome --project '../../../.'",
70
70
  "test:unit": "cross-env FORCE_COLOR=1 vitest run",
71
- "test:unit:open": "cross-env FORCE_COLOR=1 vitest --ui",
72
- "test:browser": "vitest run --config ../../../vitest.browser.config.ts"
71
+ "test:unit:open": "cross-env FORCE_COLOR=1 vitest --ui"
73
72
  }
74
73
  }