udp-stencil-component-library 26.1.0 → 26.1.1-beta.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.
@@ -266,6 +266,8 @@ class SavedViews {
266
266
  this.api.addEventListener('columnPinned', this.checkIfDirty);
267
267
  this.api.addEventListener('columnMoved', this.checkIfDirty);
268
268
  this.api.addEventListener('columnPivotChanged', this.checkIfDirty);
269
+ this.api.addEventListener('columnRowGroupChanged', this.checkIfDirty);
270
+ this.api.addEventListener('columnValueChanged', this.checkIfDirty);
269
271
  this.api.addEventListener('columnsReset', this.checkIfDirty);
270
272
  this.api.addEventListener('filterChanged', this.checkIfDirty);
271
273
  this.api.addEventListener('sortChanged', this.checkIfDirty);
@@ -275,6 +277,8 @@ class SavedViews {
275
277
  this.api.removeEventListener('columnPinned', this.checkIfDirty);
276
278
  this.api.removeEventListener('columnMoved', this.checkIfDirty);
277
279
  this.api.removeEventListener('columnPivotChanged', this.checkIfDirty);
280
+ this.api.removeEventListener('columnRowGroupChanged', this.checkIfDirty);
281
+ this.api.removeEventListener('columnValueChanged', this.checkIfDirty);
278
282
  this.api.removeEventListener('columnsReset', this.checkIfDirty);
279
283
  this.api.removeEventListener('filterChanged', this.checkIfDirty);
280
284
  this.api.removeEventListener('sortChanged', this.checkIfDirty);
@@ -54,6 +54,8 @@ export class SavedViews {
54
54
  this.api.addEventListener('columnPinned', this.checkIfDirty);
55
55
  this.api.addEventListener('columnMoved', this.checkIfDirty);
56
56
  this.api.addEventListener('columnPivotChanged', this.checkIfDirty);
57
+ this.api.addEventListener('columnRowGroupChanged', this.checkIfDirty);
58
+ this.api.addEventListener('columnValueChanged', this.checkIfDirty);
57
59
  this.api.addEventListener('columnsReset', this.checkIfDirty);
58
60
  this.api.addEventListener('filterChanged', this.checkIfDirty);
59
61
  this.api.addEventListener('sortChanged', this.checkIfDirty);
@@ -63,6 +65,8 @@ export class SavedViews {
63
65
  this.api.removeEventListener('columnPinned', this.checkIfDirty);
64
66
  this.api.removeEventListener('columnMoved', this.checkIfDirty);
65
67
  this.api.removeEventListener('columnPivotChanged', this.checkIfDirty);
68
+ this.api.removeEventListener('columnRowGroupChanged', this.checkIfDirty);
69
+ this.api.removeEventListener('columnValueChanged', this.checkIfDirty);
66
70
  this.api.removeEventListener('columnsReset', this.checkIfDirty);
67
71
  this.api.removeEventListener('filterChanged', this.checkIfDirty);
68
72
  this.api.removeEventListener('sortChanged', this.checkIfDirty);
@@ -1 +1 @@
1
- import{h as t,p as e,H as i,c as s,t as o}from"./index2.js";import{themeQuartz as a,ModuleRegistry as n,AllEnterpriseModule as l,LicenseManager as r,createGrid as d}from"ag-grid-enterprise-v33";import{w as h,i as c,r as u,s as p,u as m,p as g}from"./apiUtils.js";import{g as v}from"./tenantUtils.js";import{S as f,I as b,A as y}from"./status-renderer.js";import{c as k}from"./configureUdpColumnMods.js";import{isEqual as w}from"lodash-es";import{d as _}from"./ghost-render2.js";import{d as x}from"./grid-header2.js";import{d as C}from"./hint-panel2.js";import{d as S}from"./stencil-icon-button2.js";import{d as N}from"./udp-ambient-tool-tip2.js";import{d as E}from"./udp-avatar2.js";import{d as j}from"./udp-badge2.js";import{d as F}from"./udp-button2.js";import{d as O}from"./udp-dialog2.js";import{d as A}from"./udp-flexbox2.js";import{d as D}from"./udp-fluent-avatar2.js";import{d as T}from"./udp-fluent-badge2.js";import{d as R}from"./udp-fluent-button2.js";import{d as G}from"./udp-fluent-dialog2.js";import{d as I}from"./udp-fluent-icon2.js";import{d as P}from"./udp-fluent-icon-button2.js";import{d as J}from"./udp-fluent-menu2.js";import{d as M}from"./udp-fluent-switch2.js";import{d as B}from"./udp-fluent-text-input2.js";import{d as $}from"./udp-icon2.js";import{d as V}from"./udp-linear-loader2.js";import{d as U}from"./list-item.js";import{d as z}from"./udp-menu-item2.js";import{d as H}from"./udp-pop-over2.js";import{d as L}from"./udp-primary-action-header2.js";import{d as W}from"./udp-search-input2.js";import{d as Y}from"./udp-side-sheet2.js";import{d as q}from"./udp-spinner2.js";import{d as K}from"./udp-text2.js";import{d as Q}from"./udp-tooltip2.js";import{d as X}from"./unity-typography2.js";function Z(){return sessionStorage.getItem("user-id")}const tt=async t=>{(null===document||void 0===document?void 0:document.startViewTransition)?(document.viewTransition&&await document.viewTransition.finished.catch((()=>{})),document.startViewTransition(t)):t()};function et(){return sessionStorage.getItem("current-api-catalog-id")}function it(t){const e=new Date(t),i=Math.floor((Date.now()-e.getTime())/1e3);if(i<60)return`${i} second${1!==i?"s":""} ago`;const s=Math.floor(i/60);if(s<60)return`${s} minute${1!==s?"s":""} ago`;const o=Math.floor(s/60);if(o<24)return`${o} hour${1!==o?"s":""} ago`;const a=Math.floor(o/24);return`${a} day${1!==a?"s":""} ago`}function st(t){var e;return null===(e=t.gridViewGridViewGridConfiguration)||void 0===e?void 0:e.find((t=>1===t.gridViewGridConfigurationGridConfiguration.gridStateTypeId))}function ot(t){var e;return null===(e=t.gridViewGridViewGridConfiguration)||void 0===e?void 0:e.find((t=>4===t.gridViewGridConfigurationGridConfiguration.gridStateTypeId))}function at(t){switch(t){case"primary":return"primary";case"ghost":return"subtle";default:return"secondary"}}const nt={agGridExport:class{constructor(t="export.csv"){this.fileName=t}init(t){this.gridApi=t}onAction(t){"agGridExport"===t&&this.gridApi.exportDataAsCsv({fileName:this.fileName})}},openSavedViews:class{constructor(){this.filteredViews=[],this.allViewData=[],this.activeViewId=null,this.activeViewState=null,this.loading=!1,this.isDirty=!1,this.viewDialogMode=null,this.hoveredViewId=null,this.loadingViewId=null,this.deleteConfirmView=null,this.editingView=null,this.dialogName="",this.dialogIsPublic=!1,this.dialogMode="create",this.baseColumnState=null,this.localRestoredState=null,this.localStorageDebounceId=null,this.baselineRecaptureId=null,this.initialLoad=!0,this.dirtyListenerTimeoutId=null,this.scheduleDirtyListeners=()=>{null!==this.dirtyListenerTimeoutId&&clearTimeout(this.dirtyListenerTimeoutId),this.dirtyListenerTimeoutId=setTimeout((()=>{this.dirtyListenerTimeoutId=null,this.addDirtyListeners()}),300)},this.addDirtyListeners=()=>{this.api.addEventListener("columnVisible",this.checkIfDirty),this.api.addEventListener("columnPinned",this.checkIfDirty),this.api.addEventListener("columnMoved",this.checkIfDirty),this.api.addEventListener("columnPivotChanged",this.checkIfDirty),this.api.addEventListener("columnsReset",this.checkIfDirty),this.api.addEventListener("filterChanged",this.checkIfDirty),this.api.addEventListener("sortChanged",this.checkIfDirty)},this.removeDirtyListeners=()=>{this.api.removeEventListener("columnVisible",this.checkIfDirty),this.api.removeEventListener("columnPinned",this.checkIfDirty),this.api.removeEventListener("columnMoved",this.checkIfDirty),this.api.removeEventListener("columnPivotChanged",this.checkIfDirty),this.api.removeEventListener("columnsReset",this.checkIfDirty),this.api.removeEventListener("filterChanged",this.checkIfDirty),this.api.removeEventListener("sortChanged",this.checkIfDirty)},this.onColumnsChanged=()=>{var t;this.baseColumnState&&(null!==(t=this.api.getColumnState())&&void 0!==t?t:[]).map((t=>t.colId)).join(",")!==JSON.parse(this.baseColumnState).map((t=>t.colId)).join(",")&&(this.baseColumnState=JSON.stringify(this.api.getColumnState()),this.isDirty&&(this.isDirty=!1,this.refresh()))},this.getStorageKey=()=>{const t=v();return`saved-grid-state-${this.gridId}-${t}`},this.saveCurrentStateToLocalStorage=()=>{null!==this.localStorageDebounceId&&clearTimeout(this.localStorageDebounceId),this.localStorageDebounceId=setTimeout((()=>{if(this.localStorageDebounceId=null,!this.gridId)return;const t=this.getStorageKey(),e={date:(new Date).toISOString(),columnState:JSON.stringify(this.api.getColumnState()),filterModel:JSON.stringify(this.api.getFilterModel())};localStorage.setItem(t,JSON.stringify(e))}),500)},this.applyLocalRestoredState=()=>{if(this.localRestoredState){this.removeDirtyListeners(),this.api.setGridOption("loading",!0);try{const t=JSON.parse(this.localRestoredState.columnState);t&&this.api.applyColumnState({state:t,applyOrder:!0});const e=JSON.parse(this.localRestoredState.filterModel);this.api.setFilterModel(e)}catch(t){console.error("Failed to apply restored state",t)}this.localRestoredState=null,this.isDirty=!0,tt((()=>{this.api.setGridOption("loading",!1),this.refresh(),this.scheduleDirtyListeners(),this.saveCurrentStateToLocalStorage()}))}},this.checkIfDirty=()=>{if(null!==this.baselineRecaptureId)return;let t;if(this.activeViewId&&this.activeViewState){const e=JSON.stringify(this.api.getColumnState()),i=JSON.stringify(this.api.getFilterModel());t=e!==this.activeViewState.columnState||i!==this.activeViewState.filterModel}else{const e=this.api.getFilterModel(),i=Object.keys(null!=e?e:{}).length>0,s=this.api.getColumnState(),o=null!==this.baseColumnState&&JSON.stringify(s)!==this.baseColumnState;t=i||o}t!==this.isDirty&&(this.isDirty=t,this.refresh()),this.saveCurrentStateToLocalStorage()},this.scheduleBaselineRecapture=()=>{null!==this.baselineRecaptureId&&clearTimeout(this.baselineRecaptureId),this.baselineRecaptureId=setTimeout((()=>{this.baselineRecaptureId=null,this.activeViewId||(this.baseColumnState=JSON.stringify(this.api.getColumnState())),this.isDirty&&(this.isDirty=!1,this.refresh())}),0)},this.fetchViews=async()=>{var t;this.loading=!0,this.refresh();const e=this.api.getGridOption("context");if(this.gridId=null!==(t=null==e?void 0:e.gridId)&&void 0!==t?t:"",!this.gridId)return console.warn("[SavedViews] No gridId provided in grid context — saved views will not work."),this.loading=!1,void this.refresh();const i=this.getStorageKey(),s=localStorage.getItem(i);if(s)try{this.localRestoredState=JSON.parse(s)}catch(t){console.warn("[SavedViews] Failed to parse local restored state",t)}this.allViewData=await h(Z(),this.gridId),this.filterData(),this.initialLoad&&(this.baseColumnState=JSON.stringify(this.api.getColumnState()),this.applyDefaultView()),this.loading=!1,this.refresh()},this.filterData=()=>{var t,e,i;const s=this.api.getGridOption("context");this.entityName=null!==(t=null==s?void 0:s.entityName)&&void 0!==t?t:"",this.filteredViews=this.entityName?(null!==(e=this.allViewData)&&void 0!==e?e:[]).filter((t=>t.domain===this.entityName)):null!==(i=this.allViewData)&&void 0!==i?i:[],this.activeViewId&&!this.filteredViews.some((t=>t.gridViewId===this.activeViewId))&&(this.activeViewId=null,this.activeViewState=null,this.isDirty=!1),this.refresh()},this.pendingReapplyFilter=null,this.removeReapplyFilterListener=()=>{this.pendingReapplyFilter&&(this.api.removeEventListener("rowDataUpdated",this.pendingReapplyFilter),this.pendingReapplyFilter=null)},this.applyDefaultView=()=>{const t=this.filteredViews.find((t=>t.isDefault));if(t&&(this.setActiveView(t),"clientSide"===this.api.getGridOption("rowModelType"))){const e=ot(t),i=this.api.getGridOption("rowData");if(e&&(!i||0===i.length)){const t=JSON.parse(e.gridViewGridConfigurationGridConfiguration.values);this.api.setGridOption("loading",!0);const i=()=>{const e=this.api.getGridOption("rowData");e&&0!==e.length&&(null!==this.dirtyListenerTimeoutId&&(clearTimeout(this.dirtyListenerTimeoutId),this.dirtyListenerTimeoutId=null),this.removeDirtyListeners(),this.api.setFilterModel(t),this.activeViewState={columnState:JSON.stringify(this.api.getColumnState()),filterModel:JSON.stringify(this.api.getFilterModel())},this.isDirty=!1,this.scheduleDirtyListeners(),this.removeReapplyFilterListener(),this.api.setGridOption("loading",!1),this.refresh())};this.pendingReapplyFilter=i,this.api.addEventListener("rowDataUpdated",i),null!==this.dirtyListenerTimeoutId&&(clearTimeout(this.dirtyListenerTimeoutId),this.dirtyListenerTimeoutId=null),this.removeDirtyListeners()}}this.initialLoad=!1},this.setActiveView=t=>{this.removeDirtyListeners();const e=st(t),i=ot(t);e&&this.api.applyColumnState({state:JSON.parse(e.gridViewGridConfigurationGridConfiguration.values),applyOrder:!0});const s=i?JSON.parse(i.gridViewGridConfigurationGridConfiguration.values):null;this.api.setFilterModel(s),this.activeViewId=t.gridViewId,this.activeViewState={columnState:JSON.stringify(this.api.getColumnState()),filterModel:JSON.stringify(this.api.getFilterModel())},this.isDirty=!1,this.saveCurrentStateToLocalStorage(),tt((()=>{this.refresh(),this.scheduleDirtyListeners()}))},this.clearView=()=>{this.removeDirtyListeners(),this.baseColumnState?this.api.applyColumnState({state:JSON.parse(this.baseColumnState),applyOrder:!0}):this.api.resetColumnState(),this.api.setFilterModel(null),this.activeViewId=null,this.activeViewState=null,this.isDirty=!1,this.saveCurrentStateToLocalStorage(),tt((()=>{this.refresh(),this.scheduleDirtyListeners()}))},this.deleteView=async t=>{this.loading=!0,this.refresh();const e=this.activeViewId===t.gridViewId;try{await c(t.gridViewId,(()=>null)),e&&this.clearView(),await this.fetchViews()}catch(t){console.error(t)}finally{this.loading=!1,this.refresh()}},this.handleDirtyReset=()=>{const t=this.activeView;t&&(this.isDirty=!1,this.setActiveView(t))},this.handleUpdateCurrentView=async()=>{var t;const e=this.activeView;if(!e)return;this.loading=!0,this.refresh();const i=this.api.getGridOption("context"),s=st(e),o=ot(e),a=[{gridConfigurationId:null==s?void 0:s.gridViewGridConfigurationGridConfiguration.gridConfigurationId,gridStateTypeId:1,gridId:null==i?void 0:i.gridId,values:JSON.stringify(this.api.getColumnState())},{gridConfigurationId:null==o?void 0:o.gridViewGridConfigurationGridConfiguration.gridConfigurationId,gridStateTypeId:4,gridId:null==i?void 0:i.gridId,values:JSON.stringify(this.api.getFilterModel())}];try{await u(e.gridViewId,Z(),null==i?void 0:i.gridId,et(),e.name,a,e.isDefault?1:0,null==i?void 0:i.entityName,null!==(t=e.gridViewVisibilityTypeId)&&void 0!==t?t:1,(()=>null)),await this.fetchViews();const s=this.filteredViews.find((t=>t.gridViewId===e.gridViewId));s&&this.setActiveView(s)}catch(t){console.error(t)}finally{this.loading=!1,this.refresh()}},this.handleSaveAsNew=()=>{this.dialogName="",this.dialogIsPublic=!1,this.dialogMode="create",this.viewDialogMode="create",this.refresh()},this.handleEditRequest=t=>{this.dialogName=t.name,this.dialogIsPublic=2===t.gridViewVisibilityTypeId,this.dialogMode="edit",this.editingView=t,this.viewDialogMode="edit",this.refresh()},this.handleDialogNameInput=t=>{this.dialogName=t.detail,this.refresh()},this.handleDialogIsPublicChange=t=>{this.dialogIsPublic=t.detail,this.refresh()},this.handleDialogConfirm=async()=>{const t=this.dialogName.trim();if(!t)return;const e=this.dialogIsPublic?2:1,i=this.editingView;"edit"===this.viewDialogMode&&i?await this.renameView(i,t,e):await this.postView(t,e),this.viewDialogMode=null,this.refresh()},this.handleDialogCancel=()=>{this.viewDialogMode=null,this.refresh()},this.handleDeleteRequest=t=>{this.deleteConfirmView=t,this.refresh()},this.handleDeleteConfirm=async()=>{const t=this.deleteConfirmView;t&&(this.deleteConfirmView=null,await this.deleteView(t))},this.handleDeleteCancel=()=>{this.deleteConfirmView=null,this.refresh()}}get activeView(){var t;return null!==(t=this.filteredViews.find((t=>t.gridViewId===this.activeViewId)))&&void 0!==t?t:null}async init(t,e){var i,s,o;this.api=t,this.refresh=e;const a=this.api.getGridOption("context");if(this.gridId=null!==(i=null==a?void 0:a.gridId)&&void 0!==i?i:"",!this.gridId)return void console.warn("[SavedViews] No gridId provided in grid context — saved views will not work.");const n=this.getStorageKey(),l=localStorage.getItem(n);if(l)try{this.localRestoredState=JSON.parse(l)}catch(t){console.warn("[SavedViews] Failed to parse local restored state",t)}this.loading=!0,this.refresh();const r=h(Z(),this.gridId);0===(null!==(o=null===(s=this.api.getColumnDefs())||void 0===s?void 0:s.length)&&void 0!==o?o:0)&&await new Promise((t=>{const e=()=>{var i,s;(null!==(s=null===(i=this.api.getColumnDefs())||void 0===i?void 0:i.length)&&void 0!==s?s:0)>0&&(this.api.removeEventListener("gridColumnsChanged",e),t())};this.api.addEventListener("gridColumnsChanged",e)})),this.allViewData=await r,this.filterData(),this.baseColumnState=JSON.stringify(this.api.getColumnState()),this.applyDefaultView(),this.initialLoad=!1,this.loading=!1,this.refresh(),this.api.addEventListener("gridColumnsChanged",this.onColumnsChanged),this.scheduleDirtyListeners(),this.pendingReapplyFilter||this.addDirtyListeners(),this.scheduleBaselineRecapture()}destroy(){null!==this.baselineRecaptureId&&clearTimeout(this.baselineRecaptureId),this.removeDirtyListeners(),this.removeReapplyFilterListener(),this.api.removeEventListener("gridColumnsChanged",this.onColumnsChanged)}onAction(t){}async postView(t,e){this.loading=!0,this.refresh();const i=this.api.getGridOption("context"),s=[{gridStateTypeId:1,gridId:null==i?void 0:i.gridId,values:JSON.stringify(this.api.getColumnState())},{gridStateTypeId:4,gridId:null==i?void 0:i.gridId,values:JSON.stringify(this.api.getFilterModel())}];try{await p(Z(),null==i?void 0:i.gridId,et(),t,null==i?void 0:i.entityName,s,e,0,(()=>null)),await this.fetchViews();const o=this.filteredViews.find((e=>e.name===t));o&&this.setActiveView(o)}catch(t){console.error(t)}finally{this.loading=!1,this.refresh()}}async renameView(t,e,i){this.loading=!0,this.refresh();const s=this.api.getGridOption("context");try{await m(t.gridViewId,Z(),null==s?void 0:s.gridId,et(),e,t.isDefault?1:0,null==s?void 0:s.entityName,i,(()=>null)),await this.fetchViews()}catch(t){console.error(t)}finally{this.loading=!1,this.refresh()}}async setViewAsDefault(t){var e,i;this.loadingViewId=t.gridViewId,this.refresh();const s=this.api.getGridOption("context"),o=t.isDefault;try{if(await m(t.gridViewId,Z(),null==s?void 0:s.gridId,et(),t.name,o?0:1,null==s?void 0:s.entityName,null!==(e=t.gridViewVisibilityTypeId)&&void 0!==e?e:1,(()=>null)),!o){const t=this.filteredViews.find((t=>t.isDefault));t&&await m(t.gridViewId,Z(),null==s?void 0:s.gridId,et(),t.name,0,null==s?void 0:s.entityName,null!==(i=t.gridViewVisibilityTypeId)&&void 0!==i?i:1,(()=>null)).catch((t=>console.log(t)))}await this.fetchViews()}catch(t){console.log(t)}finally{this.loadingViewId=null,this.refresh()}}render(){var e;const i=this.activeView,s=!!i,o=s?this.isDirty?`${i.name} *`:i.name:this.isDirty?"All Records *":"All Records",a=this.filteredViews,n=[...this.localRestoredState?[{id:"restore-local-state",text:`Restore state from ${it(this.localRestoredState.date)}`,startIconName:"clock",sectionNumber:1,onClick:()=>this.applyLocalRestoredState()}]:[],...a.map((t=>({id:`view-${t.gridViewId}`,text:t.name,sectionNumber:2,onClick:()=>{this.setActiveView(t)},onMouseEnter:()=>{this.hoveredViewId=t.gridViewId,this.refresh()},onMouseLeave:()=>{this.hoveredViewId=null,this.refresh()}}))),...this.isDirty&&s?[{id:"update-view",startIconName:"save",text:"Update current view",sectionNumber:3,onClick:()=>this.handleUpdateCurrentView()}]:[],{id:"save-view",startIconName:"add",text:"Create new view",sectionNumber:3,onClick:()=>this.handleSaveAsNew()},{id:"clear-view",text:"Clear active view",startIconName:"dismiss",disabled:!s,sectionNumber:3,onClick:()=>this.clearView()}];return t("div",{class:"view-selector-wrapper"},t("udp-fluent-menu",{class:s?"has-active-view":void 0,label:o,items:n,style:{"--udp-menu-min-width":"200px"}},t("span",{slot:"clear-view-body",style:{fontWeight:"var(--fontWeightSemibold)"}},"Clear Active View"),t("span",{slot:"save-view-body",style:{fontWeight:"var(--fontWeightSemibold)"}},"Create View"),t("span",{slot:"update-view-body",style:{fontWeight:"var(--fontWeightSemibold)"}},"Update Current View"),t("span",{slot:"restore-local-state-body",style:{fontStyle:"italic",color:"var(--colorNeutralForeground2)"}},"Restore unsaved state "+(this.localRestoredState?`(${it(this.localRestoredState.date)})`:"")),a.map((e=>t("div",{key:`start-${e.gridViewId}`,slot:`view-${e.gridViewId}-start`,class:"view-slot-action",style:{opacity:e.isDefault||this.hoveredViewId===e.gridViewId?"1":"0",transition:"opacity 100ms ease"},onClick:t=>t.stopPropagation()},t("udp-fluent-icon-button",{iconName:"star",iconVariant:e.isDefault?"filled":"regular",size:"small",appearance:"transparent",loading:this.loadingViewId===e.gridViewId,onClick:()=>{this.setViewAsDefault(e)}})))),a.map((e=>t("div",{key:`end-${e.gridViewId}`,slot:`view-${e.gridViewId}-end`,class:"view-slot-action",style:{opacity:this.hoveredViewId===e.gridViewId?"1":"0",transition:"opacity 100ms ease"},onClick:t=>t.stopPropagation()},e.userId===Z()&&t("udp-fluent-icon-button",{iconName:"edit",size:"small",appearance:"transparent",onClick:()=>this.handleEditRequest(e)}),e.userId===Z()&&t("udp-fluent-icon-button",{iconName:"delete",size:"small",appearance:"transparent",onClick:()=>this.handleDeleteRequest(e)}))))),(s||this.isDirty)&&t("div",{class:"view-dirty-actions"},t("udp-tooltip",{content:s&&this.isDirty?"Reset to saved view":s?"Clear active view":"Reset to default"},t("udp-fluent-icon-button",{iconName:this.isDirty?"arrow-reset":"dismiss",appearance:"subtle",disabled:this.loading,onClick:s&&this.isDirty?this.handleDirtyReset:this.clearView,shape:"rounded"})),this.isDirty&&(s?t("udp-fluent-menu",{buttonType:"icon",startIconName:"save",shape:"rounded",appearance:"subtle",disabled:this.loading,items:[{text:"Update Current View",startIconName:"save",onClick:()=>{this.handleUpdateCurrentView()}},{text:"Create View",startIconName:"add",onClick:()=>this.handleSaveAsNew()}]}):t("udp-tooltip",{content:"Create View"},t("udp-fluent-icon-button",{iconName:"save",shape:"rounded",appearance:"subtle",disabled:this.loading,onClick:this.handleSaveAsNew})))),t("udp-fluent-dialog",{open:!!this.deleteConfirmView,dialogTitle:"Delete View",onDialogClose:this.handleDeleteCancel},t("udp-fluent-text",null,'Are you sure you want to delete "',null===(e=this.deleteConfirmView)||void 0===e?void 0:e.name,'"?'),t("udp-fluent-button",{slot:"action",appearance:"subtle",onClick:this.handleDeleteCancel},"Cancel"),t("udp-fluent-button",{slot:"action",appearance:"primary",loading:this.loading,onClick:()=>{this.handleDeleteConfirm()}},"Delete")),t("udp-fluent-dialog",{open:!!this.viewDialogMode,dialogTitle:"edit"===this.dialogMode?"Edit View":"Save View",onDialogClose:this.handleDialogCancel},t("udp-fluent-text-input",{value:this.dialogName,label:"Name",onValueChanged:this.handleDialogNameInput,onKeyDown:t=>{"Enter"===t.key&&this.dialogName.trim()&&(t.preventDefault(),this.handleDialogConfirm())}}),t("udp-fluent-switch",{checked:this.dialogIsPublic,label:"Public",onValueChanged:this.handleDialogIsPublicChange}),t("udp-fluent-button",{slot:"action",appearance:"subtle",onClick:this.handleDialogCancel},"Cancel"),t("udp-fluent-button",{slot:"action",appearance:"primary",disabled:!this.dialogName.trim(),loading:this.loading,onClick:()=>{this.handleDialogConfirm()}},"edit"===this.dialogMode?"Update":"Save")))}},agGridSizeColumnsToFit:class{init(t){this.gridApi=t}onAction(t){"agGridSizeColumnsToFit"===t&&this.gridApi.sizeColumnsToFit()}},agGridAutoSizeColumns:class{init(t){this.gridApi=t}onAction(t){"agGridAutoSizeColumns"===t&&this.gridApi.autoSizeAllColumns()}},bulkActions:class{constructor(){this.bulkActions=[],this.selectedRowCount=0,this.fetchedData=!1,this.serverActionData=[],this.onRowSelectionChanged=()=>{var t;tt((()=>{const t=this.api.getSelectedRows();this.selectedRows=t,this.selectedRowCount=t.length,this.refresh()})),(!this.fetchedData&&this.gridId||this.gridId&&(null===(t=this.api.getGridOption("context"))||void 0===t?void 0:t.gridId)!==this.gridId)&&this.fetchBulkActions()},this.setBulkActions=t=>{this.serverActionData=t;const e=t.map((t=>({text:t.name,onClick:()=>this.executeActionProviderAction(t.actionId)}))),i=this.localFunctions.map((t=>({text:t.label,startIconName:t.startIconName,buttonIntent:t.buttonIntent,loading:t.loading,onClick:()=>this.executeLocalFunction(t.label)})));this.bulkActions=[...e,...i],this.fetchedData=!0,this.refresh()},this.executeLocalFunction=t=>{const e=this.localFunctions.find((e=>e.label===t));e&&e.callback(this.selectedRows),this.refresh()},this.executeActionProviderAction=t=>{this.actionProviderCallback&&this.actionProviderCallback(t,this.selectedRows),this.refresh()},this.clearSelection=()=>{this.api.deselectAll()}}init(t,e,i){var s,o;this.api=t,this.refresh=e,this.actionProviderCallback=null==i?void 0:i.actionProviderCallback,this.localFunctions=null!==(s=null==i?void 0:i.localFunctions)&&void 0!==s?s:[];const a=this.api.getGridOption("rowModelType");this.api.setGridOption("rowSelection","clientSide"===a?{mode:"multiRow",enableClickSelection:!0}:{mode:"multiRow",enableClickSelection:!0,headerCheckbox:!1}),this.gridId=null===(o=this.api.getGridOption("context"))||void 0===o?void 0:o.gridId,this.gridId?this.fetchBulkActions():this.setBulkActions([]),this.api.addEventListener("selectionChanged",this.onRowSelectionChanged)}update(t){var e,i;this.localFunctions=null!==(e=null==t?void 0:t.localFunctions)&&void 0!==e?e:[],this.actionProviderCallback=null!==(i=null==t?void 0:t.actionProviderCallback)&&void 0!==i?i:this.actionProviderCallback,this.setBulkActions(this.serverActionData)}onAction(t){"executeBulkAction"===t&&this.refresh()}async fetchBulkActions(){var t;try{this.gridId=null===(t=this.api.getGridOption("context"))||void 0===t?void 0:t.gridId,await g(this.gridId,!1,[],this.setBulkActions)}catch(t){console.error(t)}}isActive(){return this.selectedRowCount>0}render(){return t("div",{class:"bulk-actions-bar"},t("udp-fluent-icon-button",{iconName:"dismiss",appearance:"subtle",shape:"circular",ariaLabel:"Clear selection",onClick:this.clearSelection,style:{animationDelay:"10ms"}}),t("udp-text",{variant:"body1",style:{animationDelay:"20ms"}},this.selectedRowCount," Selected"),this.bulkActions.length>0&&t("div",{class:"bulk-actions-divider",style:{animationDelay:"20ms"}}),this.bulkActions.map((e=>t("udp-fluent-button",{appearance:at(e.buttonIntent),class:"danger"===e.buttonIntent?"bulk-action-danger":void 0,startIconName:e.startIconName,onClick:e.onClick,style:{animationDelay:"20ms"},loading:e.loading},e.text))))}},agGridResetColumns:class{init(t){this.gridApi=t}onAction(t){"agGridResetColumns"===t&&this.gridApi.resetColumnState()}},advancedSearch:class{init(t,e,i){this.onOpenCallback=null==i?void 0:i.callback}onAction(t){var e;"advancedSearch"===t&&(null===(e=this.onOpenCallback)||void 0===e||e.call(this))}},agGridHideShowColumns:class{init(t){this.gridApi=t}onAction(t){"agGridHideShowColumns"===t&&this.gridApi.showColumnChooser()}},udpExport:class{init(t,e,i){this.onOpenCallback=null==i?void 0:i.callback,this.api=t}onAction(t){var e;if("udpExport"===t){const t=this.api.getGridOption("context");null===(e=this.onOpenCallback)||void 0===e||e.call(this,null==t?void 0:t.searchObject,null==t?void 0:t.entityName)}}},quickFilter:class{constructor(){this.searchValue="",this.debounce=0,this.applyFilter=t=>{var e;this.api.setGridOption("quickFilterText",t),null===(e=this.callback)||void 0===e||e.call(this,t),this.refresh()},this.handleSearch=t=>{this.searchValue=t.detail,clearTimeout(this.debounceTimer),this.debounce>0?this.debounceTimer=setTimeout((()=>this.applyFilter(this.searchValue)),this.debounce):this.applyFilter(this.searchValue)}}init(t,e,i){var s;this.api=t,this.refresh=e,this.callback=null==i?void 0:i.callback,this.debounce=null!==(s=null==i?void 0:i.debounce)&&void 0!==s?s:0}update(t){var e;this.callback=null==t?void 0:t.callback,this.debounce=null!==(e=null==t?void 0:t.debounce)&&void 0!==e?e:0}destroy(){clearTimeout(this.debounceTimer),this.api.setGridOption("quickFilterText","")}render(){return t("div",{style:{width:"200px"}},t("udp-search-input",{value:this.searchValue,placeholder:"Search",onValueChanged:this.handleSearch,includeErrorPadding:!1,autocomplete:"off"}))}},agGridRefreshData:class{constructor(){this.loading=!1,this.handleStoreRefreshed=()=>{var t;this.loading=!1,this.refresh(),null===(t=this.onRefreshComplete)||void 0===t||t.call(this)}}init(t,e,i){this.api=t,this.refresh=e,this.onRefreshStart=null==i?void 0:i.onRefreshStart,this.onRefreshComplete=null==i?void 0:i.onRefreshComplete,this.api.addEventListener("storeRefreshed",this.handleStoreRefreshed),this.api.addEventListener("rowDataUpdated",this.handleStoreRefreshed)}update(t){this.onRefreshStart=null==t?void 0:t.onRefreshStart,this.onRefreshComplete=null==t?void 0:t.onRefreshComplete}destroy(){this.api.removeEventListener("storeRefreshed",this.handleStoreRefreshed),this.api.removeEventListener("rowDataUpdated",this.handleStoreRefreshed)}isRefreshing(){return this.loading}onAction(t){var e;"agGridRefreshData"===t&&(this.loading=!0,this.refresh(),null===(e=this.onRefreshStart)||void 0===e||e.call(this),"serverSide"===this.api.getGridOption("rowModelType")&&this.api.refreshServerSide())}},agGridExpandCollapseAll:class{constructor(){this.expanded=!1}init(t,e){this.api=t,this.refresh=e}isExpanded(){return this.expanded}onAction(t){"agGridExpandCollapseAll"===t&&(this.expanded?this.api.collapseAll():this.api.expandAll(),this.expanded=!this.expanded,this.refresh())}}};function lt(t,e){const i=document.createElement("div");i.style.cssText="display: flex; flex-direction: column; justify-content: center; line-height: 1; gap: 2px;";const s=document.createElement("span");if(s.textContent=null!=t?t:"-",s.style.cssText="display: block;",i.appendChild(s),e){const t=document.createElement("span");t.textContent=e,t.style.cssText="display: block; font-size: 0.9em; opacity: 0.65;",i.appendChild(t)}return i}class rt{init(t){var e,i;this.eGui=document.createElement("div"),this.eGui.style.cssText="display: flex; height: 100%; align-items: center; gap: 8px;";const s=document.createElement("udp-fluent-avatar");t.getSrc&&(s.src=t.getSrc(t)),t.getIconName&&(s.iconName=t.getIconName(t),t.iconVariant&&(s.iconVariant=t.iconVariant)),t.getName&&(s.name=t.getName(t)),t.getInitials&&(s.initials=t.getInitials(t)),s.size=null!==(e=t.size)&&void 0!==e?e:28,t.shape&&(s.shape=t.shape),t.getColor?s.color=t.getColor(t):t.color&&(s.color=t.color);const o=`${null!==(i=t.size)&&void 0!==i?i:28}px`;if(s.style.cssText=`align-self: center; flex-shrink: 0; width: ${o}; height: ${o};`,this.eGui.appendChild(s),t.getValues){const e=t.getValues(t);e&&this.eGui.appendChild(lt(e.title,e.subtitle))}}getGui(){return this.eGui}refresh(){return!1}}class dt{init(t){var e,i;this.eGui=document.createElement("div"),this.eGui.style.cssText="display: flex; height: 100%; width: 100%; align-items: center; overflow: hidden;";const s=t.getSrc(t),o=document.createElement("udp-fluent-image");t.fit&&(o.fit=t.fit),t.shape&&(o.shape=t.shape),o.style.cssText="display: block; height: 100%; width: 100%; overflow: hidden;";const a=document.createElement("img");a.src=s,a.alt=null!==(e=t.alt)&&void 0!==e?e:"",a.style.cssText=`height: 100%; width: 100%; max-height: 100%; max-width: 100%; object-fit: ${null!==(i=t.fit)&&void 0!==i?i:"contain"}; display: block;`,o.appendChild(a),this.eGui.appendChild(o)}getGui(){return this.eGui}refresh(){return!1}}class ht{init(t){var e,i;this.eGui=document.createElement("div"),this.eGui.style.cssText="display: flex; height: 100%; align-items: center;";const s=t.getHref?t.getHref(t):null!==(e=t.href)&&void 0!==e?e:"",o=document.createElement("udp-fluent-link");o.href=s,o.target=null!==(i=t.target)&&void 0!==i?i:"_self",o.textContent=t.value,this.eGui.appendChild(o)}getGui(){return this.eGui}refresh(){return!1}}class ct{init(t){this.node=t.node,this.eGui=document.createElement("div"),this.eGui.setAttribute("style","display: flex; align-items: center; height: 100%;"),this.eValueContainer=document.createElement("span"),this.eValueContainer.setAttribute("class","eValueContainer"),this.eGui.appendChild(this.eValueContainer),this.renderContent(t)}getGui(){return this.eGui}refresh(t){return!(!this.eValueContainer||!this.node||(this.renderContent(t),0))}renderContent(t){this.eValueContainer.innerHTML="";let e=null;if(this.node.group&&(null==t?void 0:t.getHeaderValues)?e=t.getHeaderValues(t):!this.node.group&&(null==t?void 0:t.getValues)&&(e=t.getValues(t)),!e)return;const i=document.createElement("div");i.className="custom-group-column",i.appendChild(lt(e.title,e.subtitle)),this.eValueContainer.appendChild(i)}destroy(){}}const ut=t=>{const e=t.value;if(null==e)return"";const i=new Date(e);return i?`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,"0")}-${String(i.getDate()).padStart(2,"0")} ${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`:""},pt=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.gridReady=s(this,"gridReady",7),this.gridFunctions=[],this.refreshKey=0,this.gridFunctionInstances=[],this.myTheme=a.withParams({wrapperBorderRadius:0,wrapperBorder:!1,headerCellHoverBackgroundColor:"var(--udp-grid-column-header-bg-hover)",borderColor:"#E9ECEF"}),this.updateGridHeight=()=>{if(this.gridEl&&this.gridContainerEl.clientWidth>0){const t=this.gridEl.getBoundingClientRect(),e=window.innerHeight-t.top,i=10;this.gridEl.style.height=(e-i>400?e-i:400)+"px"}},this.scheduleHeightUpdate=()=>{clearTimeout(this.resizeDebounce),this.resizeDebounce=setTimeout(this.updateGridHeight,100)},this.attachAutoHeight=()=>{this.resizeObserver||(this.updateGridHeight(),this.resizeObserver=new ResizeObserver(this.scheduleHeightUpdate),this.resizeObserver.observe(this.gridContainerEl),window.addEventListener("resize",this.scheduleHeightUpdate))},this.detachAutoHeight=()=>{var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.resizeObserver=void 0,window.removeEventListener("resize",this.scheduleHeightUpdate),clearTimeout(this.resizeDebounce)},this.refreshGridFunctions=()=>{this.refreshKey++},this.onGridReady=async t=>{this.gridApi=t.api,this.updateGridContextValues(),this.columnDefs&&this.setColumnDefs();const e=[];this.gridFunctionInstances=this.gridFunctions.map((t=>{const i=nt[t.name];if(!i)return null;const s=new i,o=s.init(this.gridApi,this.refreshGridFunctions,t.params);return o&&e.push(o),s})).filter((t=>!!t)),await Promise.all(e),this.gridApiCallback&&this.gridApiCallback({refreshServerSide:()=>this.gridApi.refreshServerSide(),applyTransaction:t=>this.gridApi.applyTransaction(t),ensureIndexVisible:(t,e)=>this.gridApi.ensureIndexVisible(t,e),getSelectedRows:()=>this.gridApi.getSelectedRows(),getSelectedNodes:()=>this.gridApi.getSelectedNodes(),getSearchObject:()=>this.gridApi.getGridOption("context").searchObject,getEntityName:()=>this.gridApi.getGridOption("context").entityName,getRowCount:()=>this.gridApi.getGridOption("context").rowCount,getFilterModel:()=>this.gridApi.getFilterModel(),setFilterModel:t=>this.gridApi.setFilterModel(t),onFilterChanged:()=>this.gridApi.onFilterChanged(),expandAll:()=>this.gridApi.expandAll(),collapseAll:()=>this.gridApi.collapseAll(),toggleLoadingOverlay:t=>this.gridApi.setGridOption("loading",t),refreshCells:()=>this.gridApi.refreshCells(),refreshClientSideRowModel:t=>this.gridApi.refreshClientSideRowModel(t),selectAll:(t,e)=>this.gridApi.selectAll(t,e),deselectAll:(t,e)=>this.gridApi.deselectAll(t,e),getServerSideSelectionState:()=>this.gridApi.getServerSideSelectionState(),setServerSideSelectionState:t=>this.gridApi.setServerSideSelectionState(t),forEachNode:t=>this.gridApi.forEachNode(t),forEachNodeAfterFilterAndSort:t=>this.gridApi.forEachNodeAfterFilterAndSort(t),stopEditing:t=>this.gridApi.stopEditing(t),getFocusedCell:()=>this.gridApi.getFocusedCell()}),this.gridReady.emit(this.gridApi)},this.onHeaderAction=t=>{this.gridFunctionInstances.forEach((e=>{var i;return null===(i=e.onAction)||void 0===i?void 0:i.call(e,t.detail.name,t.detail.payload)}))},this.updateGridContextValues=()=>{this.gridApi.setGridOption("context",Object.assign(Object.assign({},this.gridApi.getGridOption("context")),{entityName:this.entityName,gridId:this.gridId}))}}componentWillLoad(){n.registerModules([l]),r.setLicenseKey("Using_this_{AG_Grid}_Enterprise_key_{AG-080613}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{Univerus_Software_Inc}_is_granted_a_{Single_Application}_Developer_License_for_the_application_{MAIS_eRec}_only_for_{1}_Front-End_JavaScript_developer___All_Front-End_JavaScript_developers_working_on_{MAIS_eRec}_need_to_be_licensed___{MAIS_eRec}_has_not_been_granted_a_Deployment_License_Add-on___This_key_works_with_{AG_Grid}_Enterprise_versions_released_before_{28_June_2026}____[v3]_[01]_MTc4MjYwMTIwMDAwMA==5c7d1487ecb13b28e75415d34b7cf694")}componentDidLoad(){var t,e,i,s;const o=Object.assign(Object.assign({tooltipShowMode:"whenTruncated",tooltipShowDelay:500},this.gridOptions),{columnTypes:{booleanChip:{cellRenderer:"iconRenderer",cellRendererParams:{iconMappingConfig:{true:{iconName:"checkMark24",color:"success"},false:{iconName:"close24",color:"error"}}}}},dataTypeDefinitions:{dateTimeString:{baseDataType:"dateTimeString",extendsDataType:"dateTimeString",valueFormatter:ut},boolean:{baseDataType:"boolean",extendsDataType:"boolean",columnTypes:"booleanChip"}},gridId:this.gridId,onGridReady:t=>{this.onGridReady(t)},theme:this.myTheme,components:Object.assign({actionsRenderer:y,avatarRenderer:rt,iconRenderer:b,imageRenderer:dt,linkRenderer:ht,statusRenderer:f,subtitleRenderer:ct},null===(t=this.gridOptions)||void 0===t?void 0:t.components),domLayout:"normal",defaultColDef:Object.assign(Object.assign({cellDataType:!1,sortable:!0,filter:!0,flex:1,minWidth:150,suppressHeaderMenuButton:!0},null===(e=this.gridOptions)||void 0===e?void 0:e.defaultColDef),{filterParams:Object.assign({buttons:["reset","apply"],closeOnApply:!0,maxNumConditions:10},null===(s=null===(i=this.gridOptions)||void 0===i?void 0:i.defaultColDef)||void 0===s?void 0:s.filterParams)})});d(this.gridEl,o),this.gridHeight?this.gridEl.style.height=this.gridHeight:this.attachAutoHeight()}disconnectedCallback(){var t;null===(t=this.gridApi)||void 0===t||t.destroy(),this.detachAutoHeight()}handleUpdateGridFunctions(t,e){this.gridApi&&t!==e&&t.forEach(((t,e)=>{var i,s;null===(s=null===(i=this.gridFunctionInstances[e])||void 0===i?void 0:i.update)||void 0===s||s.call(i,t.params)}))}handleUpdateGridHeight(t){this.gridEl&&(t?(this.detachAutoHeight(),this.gridEl.style.height=t):this.attachAutoHeight())}handleUpdateColumnDefs(t,e){this.gridApi&&!w(t,e)&&this.setColumnDefs()}setColumnDefs(){var t;const e=k(this.columnDefs,null===(t=this.gridFunctions)||void 0===t?void 0:t.some((t=>"advancedSearch"===(null==t?void 0:t.name))));this.gridApi.setGridOption("columnDefs",e)}handleEntityNameChange(){this.updateGridContextValues()}render(){return t("div",{key:"32fb39625ea3f5e8db81cb2fb95983a00f054667",ref:t=>this.gridContainerEl=t},t("ghost-render",{key:"6f89ddd42a951a39c5dbc76b50fc466ce95e396a"},t("div",{key:"a8dd75c7b9917082326f906eeecf3d719a3f3211"},t("udp-dialog",{key:"4ab7cb2ae574d60988198dc31e026f7a5f8ca7c1"}),t("udp-list-item",{key:"1d299cf32fd3c12ef33cd0c715527ff1f1b842e8"}),t("hint-panel",{key:"e6489912e2a445ddc2103ae24dbca4dda618a397"}),t("udp-side-sheet",{key:"111ed55434d986f41a2b13e25d74adc8e98abdc0"}),t("udp-fluent-dialog",{key:"e7939fcbb25f790de56a1171d2d6c5b2d6a6a4f3"}),t("udp-fluent-text",{key:"7f1b26e89796a5d16e7004c897912f2887974dda"}),t("udp-fluent-text-input",{key:"b39c26dad8a53172f7edff195fdd2c7cb0281ce0"}),t("udp-fluent-switch",{key:"f42d8dffa2b97ffca9cc9be727de9d2280725026"}),t("udp-fluent-button",{key:"afe19aad546a453402735dbb27136bca0fd6a65c"}),t("udp-text",{key:"a5f42d44acc592e21a4bc4f5449ee27291254e2d"}),t("udp-search-input",{key:"f871b4064f415725cf05f95ff7b7a5269d6af4a1"}),t("udp-fluent-avatar",{key:"33cf6c3f5d5925b03dc4fbe70f6c6574f05e4ab3"}),t("udp-fluent-icon-button",{key:"ed11b4726e2f99b6d8da23c9ed276aafd2b56a9a"}),t("udp-fluent-icon",{key:"4bca6b6e7673f6b08c985383596947bca4d97248"}),t("udp-fluent-badge",{key:"e7ca3d94bc7ddc9efc1228845bcba6818d8be906"}))),t("grid-header",{key:"59758842e99d3b8f95ce3414e11c542282de1d39",headerConfig:this.headerConfig,gridFunctions:this.gridFunctions,gridFunctionInstances:this.gridFunctionInstances,refreshKey:this.refreshKey,onHeaderAction:this.onHeaderAction}),t("div",{key:"a7c2636e08d6d54566f305e06b1c9fa1e281cd52",ref:t=>this.gridEl=t}))}static get watchers(){return{gridFunctions:[{handleUpdateGridFunctions:0}],gridHeight:[{handleUpdateGridHeight:0}],columnDefs:[{handleUpdateColumnDefs:0}],entityName:[{handleEntityNameChange:0}],gridId:[{handleEntityNameChange:0}]}}static get style(){return".variant-dark{--udp-grid-column-header-bg:#F8F9FA;--udp-grid-column-header-bg-hover:#dce6f2;--udp-grid-column-header-text:var(--primary-color-dark)}.variant-light{--udp-grid-column-header-bg:#f2f4f5;--udp-grid-column-header-bg-hover:#eef3f9;--udp-grid-column-header-text:var(--primary-color-dark)}::view-transition-group(*){animation-duration:0.2s}.grid-wrapper{display:flex;flex-direction:column;height:100%}#myNewGrid{flex:1}.ag-cell.udp-col-brand{background-color:var(--colorBrandBackground2) !important;color:var(--colorBrandForeground2)}.ag-header-cell.udp-col-brand-header{background-color:var(--colorBrandBackground2) !important}.ag-header-cell.udp-col-brand-header .ag-header-cell-text{color:var(--colorBrandForeground2)}.ag-cell.udp-col-danger{background-color:var(--colorPaletteRedBackground1) !important;color:var(--colorPaletteRedForeground1)}.ag-header-cell.udp-col-danger-header{background-color:var(--colorPaletteRedBackground1) !important}.ag-header-cell.udp-col-danger-header .ag-header-cell-text{color:var(--colorPaletteRedForeground1)}.ag-cell.udp-col-important{background-color:color-mix(in srgb, var(--colorNeutralForeground1) 20%, transparent) !important;color:var(--colorNeutralForeground1)}.ag-header-cell.udp-col-important-header{background-color:color-mix(in srgb, var(--colorNeutralForeground1) 20%, transparent) !important}.ag-header-cell.udp-col-important-header .ag-header-cell-text{color:var(--colorNeutralForeground1)}.ag-cell.udp-col-informative{background-color:color-mix(in srgb, var(--colorPaletteBlueBackground2) 20%, transparent) !important;color:color-mix(in srgb, var(--colorPaletteBlueForeground2) 85%, transparent)}.ag-header-cell.udp-col-informative-header{background-color:color-mix(in srgb, var(--colorPaletteBlueBackground2) 20%, transparent) !important}.ag-header-cell.udp-col-informative-header .ag-header-cell-text{color:color-mix(in srgb, var(--colorPaletteBlueForeground2) 85%, transparent)}.ag-cell.udp-col-severe{background-color:var(--colorPaletteDarkOrangeBackground1) !important;color:var(--colorPaletteDarkOrangeForeground1)}.ag-header-cell.udp-col-severe-header{background-color:var(--colorPaletteDarkOrangeBackground1) !important}.ag-header-cell.udp-col-severe-header .ag-header-cell-text{color:var(--colorPaletteDarkOrangeForeground1)}.ag-cell.udp-col-subtle{background-color:var(--colorNeutralBackground1) !important;color:var(--colorNeutralForeground3)}.ag-header-cell.udp-col-subtle-header{background-color:var(--colorNeutralBackground1) !important}.ag-header-cell.udp-col-subtle-header .ag-header-cell-text{color:var(--colorNeutralForeground3)}.ag-cell.udp-col-success{background-color:var(--colorPaletteGreenBackground1) !important;color:var(--colorPaletteGreenForeground1)}.ag-header-cell.udp-col-success-header{background-color:var(--colorPaletteGreenBackground1) !important}.ag-header-cell.udp-col-success-header .ag-header-cell-text{color:var(--colorPaletteGreenForeground1)}.ag-cell.udp-col-warning{background-color:var(--colorPaletteYellowBackground1) !important;color:var(--colorPaletteYellowForeground2)}.ag-header-cell.udp-col-warning-header{background-color:var(--colorPaletteYellowBackground1) !important}.ag-header-cell.udp-col-warning-header .ag-header-cell-text{color:var(--colorPaletteYellowForeground2)}"}},[0,"ag-grid-base",{columnDefs:[16],gridOptions:[16],headerConfig:[16],gridHeight:[1,"grid-height"],gridFunctions:[16],gridId:[1,"grid-id"],entityName:[1,"entity-name"],gridApiCallback:[16],refreshKey:[32]},void 0,{gridFunctions:[{handleUpdateGridFunctions:0}],gridHeight:[{handleUpdateGridHeight:0}],columnDefs:[{handleUpdateColumnDefs:0}],entityName:[{handleEntityNameChange:0}],gridId:[{handleEntityNameChange:0}]}]);function mt(){"undefined"!=typeof customElements&&["ag-grid-base","ghost-render","grid-header","hint-panel","stencil-icon-button","udp-ambient-tool-tip","udp-avatar","udp-badge","udp-button","udp-dialog","udp-flexbox","udp-fluent-avatar","udp-fluent-badge","udp-fluent-button","udp-fluent-dialog","udp-fluent-icon","udp-fluent-icon-button","udp-fluent-menu","udp-fluent-switch","udp-fluent-text-input","udp-icon","udp-linear-loader","udp-list-item","udp-menu-item","udp-pop-over","udp-primary-action-header","udp-search-input","udp-side-sheet","udp-spinner","udp-text","udp-tooltip","unity-typography"].forEach((t=>{switch(t){case"ag-grid-base":customElements.get(o(t))||customElements.define(o(t),pt);break;case"ghost-render":customElements.get(o(t))||_();break;case"grid-header":customElements.get(o(t))||x();break;case"hint-panel":customElements.get(o(t))||C();break;case"stencil-icon-button":customElements.get(o(t))||S();break;case"udp-ambient-tool-tip":customElements.get(o(t))||N();break;case"udp-avatar":customElements.get(o(t))||E();break;case"udp-badge":customElements.get(o(t))||j();break;case"udp-button":customElements.get(o(t))||F();break;case"udp-dialog":customElements.get(o(t))||O();break;case"udp-flexbox":customElements.get(o(t))||A();break;case"udp-fluent-avatar":customElements.get(o(t))||D();break;case"udp-fluent-badge":customElements.get(o(t))||T();break;case"udp-fluent-button":customElements.get(o(t))||R();break;case"udp-fluent-dialog":customElements.get(o(t))||G();break;case"udp-fluent-icon":customElements.get(o(t))||I();break;case"udp-fluent-icon-button":customElements.get(o(t))||P();break;case"udp-fluent-menu":customElements.get(o(t))||J();break;case"udp-fluent-switch":customElements.get(o(t))||M();break;case"udp-fluent-text-input":customElements.get(o(t))||B();break;case"udp-icon":customElements.get(o(t))||$();break;case"udp-linear-loader":customElements.get(o(t))||V();break;case"udp-list-item":customElements.get(o(t))||U();break;case"udp-menu-item":customElements.get(o(t))||z();break;case"udp-pop-over":customElements.get(o(t))||H();break;case"udp-primary-action-header":customElements.get(o(t))||L();break;case"udp-search-input":customElements.get(o(t))||W();break;case"udp-side-sheet":customElements.get(o(t))||Y();break;case"udp-spinner":customElements.get(o(t))||q();break;case"udp-text":customElements.get(o(t))||K();break;case"udp-tooltip":customElements.get(o(t))||Q();break;case"unity-typography":customElements.get(o(t))||X()}}))}export{pt as A,mt as d,et as g}
1
+ import{h as t,p as e,H as i,c as s,t as o}from"./index2.js";import{themeQuartz as a,ModuleRegistry as n,AllEnterpriseModule as l,LicenseManager as r,createGrid as d}from"ag-grid-enterprise-v33";import{w as h,i as c,r as u,s as p,u as m,p as g}from"./apiUtils.js";import{g as v}from"./tenantUtils.js";import{S as f,I as b,A as y}from"./status-renderer.js";import{c as k}from"./configureUdpColumnMods.js";import{isEqual as w}from"lodash-es";import{d as _}from"./ghost-render2.js";import{d as C}from"./grid-header2.js";import{d as x}from"./hint-panel2.js";import{d as S}from"./stencil-icon-button2.js";import{d as N}from"./udp-ambient-tool-tip2.js";import{d as E}from"./udp-avatar2.js";import{d as j}from"./udp-badge2.js";import{d as F}from"./udp-button2.js";import{d as O}from"./udp-dialog2.js";import{d as A}from"./udp-flexbox2.js";import{d as D}from"./udp-fluent-avatar2.js";import{d as T}from"./udp-fluent-badge2.js";import{d as R}from"./udp-fluent-button2.js";import{d as G}from"./udp-fluent-dialog2.js";import{d as I}from"./udp-fluent-icon2.js";import{d as P}from"./udp-fluent-icon-button2.js";import{d as J}from"./udp-fluent-menu2.js";import{d as M}from"./udp-fluent-switch2.js";import{d as B}from"./udp-fluent-text-input2.js";import{d as V}from"./udp-icon2.js";import{d as $}from"./udp-linear-loader2.js";import{d as U}from"./list-item.js";import{d as z}from"./udp-menu-item2.js";import{d as H}from"./udp-pop-over2.js";import{d as L}from"./udp-primary-action-header2.js";import{d as W}from"./udp-search-input2.js";import{d as Y}from"./udp-side-sheet2.js";import{d as q}from"./udp-spinner2.js";import{d as K}from"./udp-text2.js";import{d as Q}from"./udp-tooltip2.js";import{d as X}from"./unity-typography2.js";function Z(){return sessionStorage.getItem("user-id")}const tt=async t=>{(null===document||void 0===document?void 0:document.startViewTransition)?(document.viewTransition&&await document.viewTransition.finished.catch((()=>{})),document.startViewTransition(t)):t()};function et(){return sessionStorage.getItem("current-api-catalog-id")}function it(t){const e=new Date(t),i=Math.floor((Date.now()-e.getTime())/1e3);if(i<60)return`${i} second${1!==i?"s":""} ago`;const s=Math.floor(i/60);if(s<60)return`${s} minute${1!==s?"s":""} ago`;const o=Math.floor(s/60);if(o<24)return`${o} hour${1!==o?"s":""} ago`;const a=Math.floor(o/24);return`${a} day${1!==a?"s":""} ago`}function st(t){var e;return null===(e=t.gridViewGridViewGridConfiguration)||void 0===e?void 0:e.find((t=>1===t.gridViewGridConfigurationGridConfiguration.gridStateTypeId))}function ot(t){var e;return null===(e=t.gridViewGridViewGridConfiguration)||void 0===e?void 0:e.find((t=>4===t.gridViewGridConfigurationGridConfiguration.gridStateTypeId))}function at(t){switch(t){case"primary":return"primary";case"ghost":return"subtle";default:return"secondary"}}const nt={agGridExport:class{constructor(t="export.csv"){this.fileName=t}init(t){this.gridApi=t}onAction(t){"agGridExport"===t&&this.gridApi.exportDataAsCsv({fileName:this.fileName})}},openSavedViews:class{constructor(){this.filteredViews=[],this.allViewData=[],this.activeViewId=null,this.activeViewState=null,this.loading=!1,this.isDirty=!1,this.viewDialogMode=null,this.hoveredViewId=null,this.loadingViewId=null,this.deleteConfirmView=null,this.editingView=null,this.dialogName="",this.dialogIsPublic=!1,this.dialogMode="create",this.baseColumnState=null,this.localRestoredState=null,this.localStorageDebounceId=null,this.baselineRecaptureId=null,this.initialLoad=!0,this.dirtyListenerTimeoutId=null,this.scheduleDirtyListeners=()=>{null!==this.dirtyListenerTimeoutId&&clearTimeout(this.dirtyListenerTimeoutId),this.dirtyListenerTimeoutId=setTimeout((()=>{this.dirtyListenerTimeoutId=null,this.addDirtyListeners()}),300)},this.addDirtyListeners=()=>{this.api.addEventListener("columnVisible",this.checkIfDirty),this.api.addEventListener("columnPinned",this.checkIfDirty),this.api.addEventListener("columnMoved",this.checkIfDirty),this.api.addEventListener("columnPivotChanged",this.checkIfDirty),this.api.addEventListener("columnRowGroupChanged",this.checkIfDirty),this.api.addEventListener("columnValueChanged",this.checkIfDirty),this.api.addEventListener("columnsReset",this.checkIfDirty),this.api.addEventListener("filterChanged",this.checkIfDirty),this.api.addEventListener("sortChanged",this.checkIfDirty)},this.removeDirtyListeners=()=>{this.api.removeEventListener("columnVisible",this.checkIfDirty),this.api.removeEventListener("columnPinned",this.checkIfDirty),this.api.removeEventListener("columnMoved",this.checkIfDirty),this.api.removeEventListener("columnPivotChanged",this.checkIfDirty),this.api.removeEventListener("columnRowGroupChanged",this.checkIfDirty),this.api.removeEventListener("columnValueChanged",this.checkIfDirty),this.api.removeEventListener("columnsReset",this.checkIfDirty),this.api.removeEventListener("filterChanged",this.checkIfDirty),this.api.removeEventListener("sortChanged",this.checkIfDirty)},this.onColumnsChanged=()=>{var t;this.baseColumnState&&(null!==(t=this.api.getColumnState())&&void 0!==t?t:[]).map((t=>t.colId)).join(",")!==JSON.parse(this.baseColumnState).map((t=>t.colId)).join(",")&&(this.baseColumnState=JSON.stringify(this.api.getColumnState()),this.isDirty&&(this.isDirty=!1,this.refresh()))},this.getStorageKey=()=>{const t=v();return`saved-grid-state-${this.gridId}-${t}`},this.saveCurrentStateToLocalStorage=()=>{null!==this.localStorageDebounceId&&clearTimeout(this.localStorageDebounceId),this.localStorageDebounceId=setTimeout((()=>{if(this.localStorageDebounceId=null,!this.gridId)return;const t=this.getStorageKey(),e={date:(new Date).toISOString(),columnState:JSON.stringify(this.api.getColumnState()),filterModel:JSON.stringify(this.api.getFilterModel())};localStorage.setItem(t,JSON.stringify(e))}),500)},this.applyLocalRestoredState=()=>{if(this.localRestoredState){this.removeDirtyListeners(),this.api.setGridOption("loading",!0);try{const t=JSON.parse(this.localRestoredState.columnState);t&&this.api.applyColumnState({state:t,applyOrder:!0});const e=JSON.parse(this.localRestoredState.filterModel);this.api.setFilterModel(e)}catch(t){console.error("Failed to apply restored state",t)}this.localRestoredState=null,this.isDirty=!0,tt((()=>{this.api.setGridOption("loading",!1),this.refresh(),this.scheduleDirtyListeners(),this.saveCurrentStateToLocalStorage()}))}},this.checkIfDirty=()=>{if(null!==this.baselineRecaptureId)return;let t;if(this.activeViewId&&this.activeViewState){const e=JSON.stringify(this.api.getColumnState()),i=JSON.stringify(this.api.getFilterModel());t=e!==this.activeViewState.columnState||i!==this.activeViewState.filterModel}else{const e=this.api.getFilterModel(),i=Object.keys(null!=e?e:{}).length>0,s=this.api.getColumnState(),o=null!==this.baseColumnState&&JSON.stringify(s)!==this.baseColumnState;t=i||o}t!==this.isDirty&&(this.isDirty=t,this.refresh()),this.saveCurrentStateToLocalStorage()},this.scheduleBaselineRecapture=()=>{null!==this.baselineRecaptureId&&clearTimeout(this.baselineRecaptureId),this.baselineRecaptureId=setTimeout((()=>{this.baselineRecaptureId=null,this.activeViewId||(this.baseColumnState=JSON.stringify(this.api.getColumnState())),this.isDirty&&(this.isDirty=!1,this.refresh())}),0)},this.fetchViews=async()=>{var t;this.loading=!0,this.refresh();const e=this.api.getGridOption("context");if(this.gridId=null!==(t=null==e?void 0:e.gridId)&&void 0!==t?t:"",!this.gridId)return console.warn("[SavedViews] No gridId provided in grid context — saved views will not work."),this.loading=!1,void this.refresh();const i=this.getStorageKey(),s=localStorage.getItem(i);if(s)try{this.localRestoredState=JSON.parse(s)}catch(t){console.warn("[SavedViews] Failed to parse local restored state",t)}this.allViewData=await h(Z(),this.gridId),this.filterData(),this.initialLoad&&(this.baseColumnState=JSON.stringify(this.api.getColumnState()),this.applyDefaultView()),this.loading=!1,this.refresh()},this.filterData=()=>{var t,e,i;const s=this.api.getGridOption("context");this.entityName=null!==(t=null==s?void 0:s.entityName)&&void 0!==t?t:"",this.filteredViews=this.entityName?(null!==(e=this.allViewData)&&void 0!==e?e:[]).filter((t=>t.domain===this.entityName)):null!==(i=this.allViewData)&&void 0!==i?i:[],this.activeViewId&&!this.filteredViews.some((t=>t.gridViewId===this.activeViewId))&&(this.activeViewId=null,this.activeViewState=null,this.isDirty=!1),this.refresh()},this.pendingReapplyFilter=null,this.removeReapplyFilterListener=()=>{this.pendingReapplyFilter&&(this.api.removeEventListener("rowDataUpdated",this.pendingReapplyFilter),this.pendingReapplyFilter=null)},this.applyDefaultView=()=>{const t=this.filteredViews.find((t=>t.isDefault));if(t&&(this.setActiveView(t),"clientSide"===this.api.getGridOption("rowModelType"))){const e=ot(t),i=this.api.getGridOption("rowData");if(e&&(!i||0===i.length)){const t=JSON.parse(e.gridViewGridConfigurationGridConfiguration.values);this.api.setGridOption("loading",!0);const i=()=>{const e=this.api.getGridOption("rowData");e&&0!==e.length&&(null!==this.dirtyListenerTimeoutId&&(clearTimeout(this.dirtyListenerTimeoutId),this.dirtyListenerTimeoutId=null),this.removeDirtyListeners(),this.api.setFilterModel(t),this.activeViewState={columnState:JSON.stringify(this.api.getColumnState()),filterModel:JSON.stringify(this.api.getFilterModel())},this.isDirty=!1,this.scheduleDirtyListeners(),this.removeReapplyFilterListener(),this.api.setGridOption("loading",!1),this.refresh())};this.pendingReapplyFilter=i,this.api.addEventListener("rowDataUpdated",i),null!==this.dirtyListenerTimeoutId&&(clearTimeout(this.dirtyListenerTimeoutId),this.dirtyListenerTimeoutId=null),this.removeDirtyListeners()}}this.initialLoad=!1},this.setActiveView=t=>{this.removeDirtyListeners();const e=st(t),i=ot(t);e&&this.api.applyColumnState({state:JSON.parse(e.gridViewGridConfigurationGridConfiguration.values),applyOrder:!0});const s=i?JSON.parse(i.gridViewGridConfigurationGridConfiguration.values):null;this.api.setFilterModel(s),this.activeViewId=t.gridViewId,this.activeViewState={columnState:JSON.stringify(this.api.getColumnState()),filterModel:JSON.stringify(this.api.getFilterModel())},this.isDirty=!1,this.saveCurrentStateToLocalStorage(),tt((()=>{this.refresh(),this.scheduleDirtyListeners()}))},this.clearView=()=>{this.removeDirtyListeners(),this.baseColumnState?this.api.applyColumnState({state:JSON.parse(this.baseColumnState),applyOrder:!0}):this.api.resetColumnState(),this.api.setFilterModel(null),this.activeViewId=null,this.activeViewState=null,this.isDirty=!1,this.saveCurrentStateToLocalStorage(),tt((()=>{this.refresh(),this.scheduleDirtyListeners()}))},this.deleteView=async t=>{this.loading=!0,this.refresh();const e=this.activeViewId===t.gridViewId;try{await c(t.gridViewId,(()=>null)),e&&this.clearView(),await this.fetchViews()}catch(t){console.error(t)}finally{this.loading=!1,this.refresh()}},this.handleDirtyReset=()=>{const t=this.activeView;t&&(this.isDirty=!1,this.setActiveView(t))},this.handleUpdateCurrentView=async()=>{var t;const e=this.activeView;if(!e)return;this.loading=!0,this.refresh();const i=this.api.getGridOption("context"),s=st(e),o=ot(e),a=[{gridConfigurationId:null==s?void 0:s.gridViewGridConfigurationGridConfiguration.gridConfigurationId,gridStateTypeId:1,gridId:null==i?void 0:i.gridId,values:JSON.stringify(this.api.getColumnState())},{gridConfigurationId:null==o?void 0:o.gridViewGridConfigurationGridConfiguration.gridConfigurationId,gridStateTypeId:4,gridId:null==i?void 0:i.gridId,values:JSON.stringify(this.api.getFilterModel())}];try{await u(e.gridViewId,Z(),null==i?void 0:i.gridId,et(),e.name,a,e.isDefault?1:0,null==i?void 0:i.entityName,null!==(t=e.gridViewVisibilityTypeId)&&void 0!==t?t:1,(()=>null)),await this.fetchViews();const s=this.filteredViews.find((t=>t.gridViewId===e.gridViewId));s&&this.setActiveView(s)}catch(t){console.error(t)}finally{this.loading=!1,this.refresh()}},this.handleSaveAsNew=()=>{this.dialogName="",this.dialogIsPublic=!1,this.dialogMode="create",this.viewDialogMode="create",this.refresh()},this.handleEditRequest=t=>{this.dialogName=t.name,this.dialogIsPublic=2===t.gridViewVisibilityTypeId,this.dialogMode="edit",this.editingView=t,this.viewDialogMode="edit",this.refresh()},this.handleDialogNameInput=t=>{this.dialogName=t.detail,this.refresh()},this.handleDialogIsPublicChange=t=>{this.dialogIsPublic=t.detail,this.refresh()},this.handleDialogConfirm=async()=>{const t=this.dialogName.trim();if(!t)return;const e=this.dialogIsPublic?2:1,i=this.editingView;"edit"===this.viewDialogMode&&i?await this.renameView(i,t,e):await this.postView(t,e),this.viewDialogMode=null,this.refresh()},this.handleDialogCancel=()=>{this.viewDialogMode=null,this.refresh()},this.handleDeleteRequest=t=>{this.deleteConfirmView=t,this.refresh()},this.handleDeleteConfirm=async()=>{const t=this.deleteConfirmView;t&&(this.deleteConfirmView=null,await this.deleteView(t))},this.handleDeleteCancel=()=>{this.deleteConfirmView=null,this.refresh()}}get activeView(){var t;return null!==(t=this.filteredViews.find((t=>t.gridViewId===this.activeViewId)))&&void 0!==t?t:null}async init(t,e){var i,s,o;this.api=t,this.refresh=e;const a=this.api.getGridOption("context");if(this.gridId=null!==(i=null==a?void 0:a.gridId)&&void 0!==i?i:"",!this.gridId)return void console.warn("[SavedViews] No gridId provided in grid context — saved views will not work.");const n=this.getStorageKey(),l=localStorage.getItem(n);if(l)try{this.localRestoredState=JSON.parse(l)}catch(t){console.warn("[SavedViews] Failed to parse local restored state",t)}this.loading=!0,this.refresh();const r=h(Z(),this.gridId);0===(null!==(o=null===(s=this.api.getColumnDefs())||void 0===s?void 0:s.length)&&void 0!==o?o:0)&&await new Promise((t=>{const e=()=>{var i,s;(null!==(s=null===(i=this.api.getColumnDefs())||void 0===i?void 0:i.length)&&void 0!==s?s:0)>0&&(this.api.removeEventListener("gridColumnsChanged",e),t())};this.api.addEventListener("gridColumnsChanged",e)})),this.allViewData=await r,this.filterData(),this.baseColumnState=JSON.stringify(this.api.getColumnState()),this.applyDefaultView(),this.initialLoad=!1,this.loading=!1,this.refresh(),this.api.addEventListener("gridColumnsChanged",this.onColumnsChanged),this.scheduleDirtyListeners(),this.pendingReapplyFilter||this.addDirtyListeners(),this.scheduleBaselineRecapture()}destroy(){null!==this.baselineRecaptureId&&clearTimeout(this.baselineRecaptureId),this.removeDirtyListeners(),this.removeReapplyFilterListener(),this.api.removeEventListener("gridColumnsChanged",this.onColumnsChanged)}onAction(t){}async postView(t,e){this.loading=!0,this.refresh();const i=this.api.getGridOption("context"),s=[{gridStateTypeId:1,gridId:null==i?void 0:i.gridId,values:JSON.stringify(this.api.getColumnState())},{gridStateTypeId:4,gridId:null==i?void 0:i.gridId,values:JSON.stringify(this.api.getFilterModel())}];try{await p(Z(),null==i?void 0:i.gridId,et(),t,null==i?void 0:i.entityName,s,e,0,(()=>null)),await this.fetchViews();const o=this.filteredViews.find((e=>e.name===t));o&&this.setActiveView(o)}catch(t){console.error(t)}finally{this.loading=!1,this.refresh()}}async renameView(t,e,i){this.loading=!0,this.refresh();const s=this.api.getGridOption("context");try{await m(t.gridViewId,Z(),null==s?void 0:s.gridId,et(),e,t.isDefault?1:0,null==s?void 0:s.entityName,i,(()=>null)),await this.fetchViews()}catch(t){console.error(t)}finally{this.loading=!1,this.refresh()}}async setViewAsDefault(t){var e,i;this.loadingViewId=t.gridViewId,this.refresh();const s=this.api.getGridOption("context"),o=t.isDefault;try{if(await m(t.gridViewId,Z(),null==s?void 0:s.gridId,et(),t.name,o?0:1,null==s?void 0:s.entityName,null!==(e=t.gridViewVisibilityTypeId)&&void 0!==e?e:1,(()=>null)),!o){const t=this.filteredViews.find((t=>t.isDefault));t&&await m(t.gridViewId,Z(),null==s?void 0:s.gridId,et(),t.name,0,null==s?void 0:s.entityName,null!==(i=t.gridViewVisibilityTypeId)&&void 0!==i?i:1,(()=>null)).catch((t=>console.log(t)))}await this.fetchViews()}catch(t){console.log(t)}finally{this.loadingViewId=null,this.refresh()}}render(){var e;const i=this.activeView,s=!!i,o=s?this.isDirty?`${i.name} *`:i.name:this.isDirty?"All Records *":"All Records",a=this.filteredViews,n=[...this.localRestoredState?[{id:"restore-local-state",text:`Restore state from ${it(this.localRestoredState.date)}`,startIconName:"clock",sectionNumber:1,onClick:()=>this.applyLocalRestoredState()}]:[],...a.map((t=>({id:`view-${t.gridViewId}`,text:t.name,sectionNumber:2,onClick:()=>{this.setActiveView(t)},onMouseEnter:()=>{this.hoveredViewId=t.gridViewId,this.refresh()},onMouseLeave:()=>{this.hoveredViewId=null,this.refresh()}}))),...this.isDirty&&s?[{id:"update-view",startIconName:"save",text:"Update current view",sectionNumber:3,onClick:()=>this.handleUpdateCurrentView()}]:[],{id:"save-view",startIconName:"add",text:"Create new view",sectionNumber:3,onClick:()=>this.handleSaveAsNew()},{id:"clear-view",text:"Clear active view",startIconName:"dismiss",disabled:!s,sectionNumber:3,onClick:()=>this.clearView()}];return t("div",{class:"view-selector-wrapper"},t("udp-fluent-menu",{class:s?"has-active-view":void 0,label:o,items:n,style:{"--udp-menu-min-width":"200px"}},t("span",{slot:"clear-view-body",style:{fontWeight:"var(--fontWeightSemibold)"}},"Clear Active View"),t("span",{slot:"save-view-body",style:{fontWeight:"var(--fontWeightSemibold)"}},"Create View"),t("span",{slot:"update-view-body",style:{fontWeight:"var(--fontWeightSemibold)"}},"Update Current View"),t("span",{slot:"restore-local-state-body",style:{fontStyle:"italic",color:"var(--colorNeutralForeground2)"}},"Restore unsaved state "+(this.localRestoredState?`(${it(this.localRestoredState.date)})`:"")),a.map((e=>t("div",{key:`start-${e.gridViewId}`,slot:`view-${e.gridViewId}-start`,class:"view-slot-action",style:{opacity:e.isDefault||this.hoveredViewId===e.gridViewId?"1":"0",transition:"opacity 100ms ease"},onClick:t=>t.stopPropagation()},t("udp-fluent-icon-button",{iconName:"star",iconVariant:e.isDefault?"filled":"regular",size:"small",appearance:"transparent",loading:this.loadingViewId===e.gridViewId,onClick:()=>{this.setViewAsDefault(e)}})))),a.map((e=>t("div",{key:`end-${e.gridViewId}`,slot:`view-${e.gridViewId}-end`,class:"view-slot-action",style:{opacity:this.hoveredViewId===e.gridViewId?"1":"0",transition:"opacity 100ms ease"},onClick:t=>t.stopPropagation()},e.userId===Z()&&t("udp-fluent-icon-button",{iconName:"edit",size:"small",appearance:"transparent",onClick:()=>this.handleEditRequest(e)}),e.userId===Z()&&t("udp-fluent-icon-button",{iconName:"delete",size:"small",appearance:"transparent",onClick:()=>this.handleDeleteRequest(e)}))))),(s||this.isDirty)&&t("div",{class:"view-dirty-actions"},t("udp-tooltip",{content:s&&this.isDirty?"Reset to saved view":s?"Clear active view":"Reset to default"},t("udp-fluent-icon-button",{iconName:this.isDirty?"arrow-reset":"dismiss",appearance:"subtle",disabled:this.loading,onClick:s&&this.isDirty?this.handleDirtyReset:this.clearView,shape:"rounded"})),this.isDirty&&(s?t("udp-fluent-menu",{buttonType:"icon",startIconName:"save",shape:"rounded",appearance:"subtle",disabled:this.loading,items:[{text:"Update Current View",startIconName:"save",onClick:()=>{this.handleUpdateCurrentView()}},{text:"Create View",startIconName:"add",onClick:()=>this.handleSaveAsNew()}]}):t("udp-tooltip",{content:"Create View"},t("udp-fluent-icon-button",{iconName:"save",shape:"rounded",appearance:"subtle",disabled:this.loading,onClick:this.handleSaveAsNew})))),t("udp-fluent-dialog",{open:!!this.deleteConfirmView,dialogTitle:"Delete View",onDialogClose:this.handleDeleteCancel},t("udp-fluent-text",null,'Are you sure you want to delete "',null===(e=this.deleteConfirmView)||void 0===e?void 0:e.name,'"?'),t("udp-fluent-button",{slot:"action",appearance:"subtle",onClick:this.handleDeleteCancel},"Cancel"),t("udp-fluent-button",{slot:"action",appearance:"primary",loading:this.loading,onClick:()=>{this.handleDeleteConfirm()}},"Delete")),t("udp-fluent-dialog",{open:!!this.viewDialogMode,dialogTitle:"edit"===this.dialogMode?"Edit View":"Save View",onDialogClose:this.handleDialogCancel},t("udp-fluent-text-input",{value:this.dialogName,label:"Name",onValueChanged:this.handleDialogNameInput,onKeyDown:t=>{"Enter"===t.key&&this.dialogName.trim()&&(t.preventDefault(),this.handleDialogConfirm())}}),t("udp-fluent-switch",{checked:this.dialogIsPublic,label:"Public",onValueChanged:this.handleDialogIsPublicChange}),t("udp-fluent-button",{slot:"action",appearance:"subtle",onClick:this.handleDialogCancel},"Cancel"),t("udp-fluent-button",{slot:"action",appearance:"primary",disabled:!this.dialogName.trim(),loading:this.loading,onClick:()=>{this.handleDialogConfirm()}},"edit"===this.dialogMode?"Update":"Save")))}},agGridSizeColumnsToFit:class{init(t){this.gridApi=t}onAction(t){"agGridSizeColumnsToFit"===t&&this.gridApi.sizeColumnsToFit()}},agGridAutoSizeColumns:class{init(t){this.gridApi=t}onAction(t){"agGridAutoSizeColumns"===t&&this.gridApi.autoSizeAllColumns()}},bulkActions:class{constructor(){this.bulkActions=[],this.selectedRowCount=0,this.fetchedData=!1,this.serverActionData=[],this.onRowSelectionChanged=()=>{var t;tt((()=>{const t=this.api.getSelectedRows();this.selectedRows=t,this.selectedRowCount=t.length,this.refresh()})),(!this.fetchedData&&this.gridId||this.gridId&&(null===(t=this.api.getGridOption("context"))||void 0===t?void 0:t.gridId)!==this.gridId)&&this.fetchBulkActions()},this.setBulkActions=t=>{this.serverActionData=t;const e=t.map((t=>({text:t.name,onClick:()=>this.executeActionProviderAction(t.actionId)}))),i=this.localFunctions.map((t=>({text:t.label,startIconName:t.startIconName,buttonIntent:t.buttonIntent,loading:t.loading,onClick:()=>this.executeLocalFunction(t.label)})));this.bulkActions=[...e,...i],this.fetchedData=!0,this.refresh()},this.executeLocalFunction=t=>{const e=this.localFunctions.find((e=>e.label===t));e&&e.callback(this.selectedRows),this.refresh()},this.executeActionProviderAction=t=>{this.actionProviderCallback&&this.actionProviderCallback(t,this.selectedRows),this.refresh()},this.clearSelection=()=>{this.api.deselectAll()}}init(t,e,i){var s,o;this.api=t,this.refresh=e,this.actionProviderCallback=null==i?void 0:i.actionProviderCallback,this.localFunctions=null!==(s=null==i?void 0:i.localFunctions)&&void 0!==s?s:[];const a=this.api.getGridOption("rowModelType");this.api.setGridOption("rowSelection","clientSide"===a?{mode:"multiRow",enableClickSelection:!0}:{mode:"multiRow",enableClickSelection:!0,headerCheckbox:!1}),this.gridId=null===(o=this.api.getGridOption("context"))||void 0===o?void 0:o.gridId,this.gridId?this.fetchBulkActions():this.setBulkActions([]),this.api.addEventListener("selectionChanged",this.onRowSelectionChanged)}update(t){var e,i;this.localFunctions=null!==(e=null==t?void 0:t.localFunctions)&&void 0!==e?e:[],this.actionProviderCallback=null!==(i=null==t?void 0:t.actionProviderCallback)&&void 0!==i?i:this.actionProviderCallback,this.setBulkActions(this.serverActionData)}onAction(t){"executeBulkAction"===t&&this.refresh()}async fetchBulkActions(){var t;try{this.gridId=null===(t=this.api.getGridOption("context"))||void 0===t?void 0:t.gridId,await g(this.gridId,!1,[],this.setBulkActions)}catch(t){console.error(t)}}isActive(){return this.selectedRowCount>0}render(){return t("div",{class:"bulk-actions-bar"},t("udp-fluent-icon-button",{iconName:"dismiss",appearance:"subtle",shape:"circular",ariaLabel:"Clear selection",onClick:this.clearSelection,style:{animationDelay:"10ms"}}),t("udp-text",{variant:"body1",style:{animationDelay:"20ms"}},this.selectedRowCount," Selected"),this.bulkActions.length>0&&t("div",{class:"bulk-actions-divider",style:{animationDelay:"20ms"}}),this.bulkActions.map((e=>t("udp-fluent-button",{appearance:at(e.buttonIntent),class:"danger"===e.buttonIntent?"bulk-action-danger":void 0,startIconName:e.startIconName,onClick:e.onClick,style:{animationDelay:"20ms"},loading:e.loading},e.text))))}},agGridResetColumns:class{init(t){this.gridApi=t}onAction(t){"agGridResetColumns"===t&&this.gridApi.resetColumnState()}},advancedSearch:class{init(t,e,i){this.onOpenCallback=null==i?void 0:i.callback}onAction(t){var e;"advancedSearch"===t&&(null===(e=this.onOpenCallback)||void 0===e||e.call(this))}},agGridHideShowColumns:class{init(t){this.gridApi=t}onAction(t){"agGridHideShowColumns"===t&&this.gridApi.showColumnChooser()}},udpExport:class{init(t,e,i){this.onOpenCallback=null==i?void 0:i.callback,this.api=t}onAction(t){var e;if("udpExport"===t){const t=this.api.getGridOption("context");null===(e=this.onOpenCallback)||void 0===e||e.call(this,null==t?void 0:t.searchObject,null==t?void 0:t.entityName)}}},quickFilter:class{constructor(){this.searchValue="",this.debounce=0,this.applyFilter=t=>{var e;this.api.setGridOption("quickFilterText",t),null===(e=this.callback)||void 0===e||e.call(this,t),this.refresh()},this.handleSearch=t=>{this.searchValue=t.detail,clearTimeout(this.debounceTimer),this.debounce>0?this.debounceTimer=setTimeout((()=>this.applyFilter(this.searchValue)),this.debounce):this.applyFilter(this.searchValue)}}init(t,e,i){var s;this.api=t,this.refresh=e,this.callback=null==i?void 0:i.callback,this.debounce=null!==(s=null==i?void 0:i.debounce)&&void 0!==s?s:0}update(t){var e;this.callback=null==t?void 0:t.callback,this.debounce=null!==(e=null==t?void 0:t.debounce)&&void 0!==e?e:0}destroy(){clearTimeout(this.debounceTimer),this.api.setGridOption("quickFilterText","")}render(){return t("div",{style:{width:"200px"}},t("udp-search-input",{value:this.searchValue,placeholder:"Search",onValueChanged:this.handleSearch,includeErrorPadding:!1,autocomplete:"off"}))}},agGridRefreshData:class{constructor(){this.loading=!1,this.handleStoreRefreshed=()=>{var t;this.loading=!1,this.refresh(),null===(t=this.onRefreshComplete)||void 0===t||t.call(this)}}init(t,e,i){this.api=t,this.refresh=e,this.onRefreshStart=null==i?void 0:i.onRefreshStart,this.onRefreshComplete=null==i?void 0:i.onRefreshComplete,this.api.addEventListener("storeRefreshed",this.handleStoreRefreshed),this.api.addEventListener("rowDataUpdated",this.handleStoreRefreshed)}update(t){this.onRefreshStart=null==t?void 0:t.onRefreshStart,this.onRefreshComplete=null==t?void 0:t.onRefreshComplete}destroy(){this.api.removeEventListener("storeRefreshed",this.handleStoreRefreshed),this.api.removeEventListener("rowDataUpdated",this.handleStoreRefreshed)}isRefreshing(){return this.loading}onAction(t){var e;"agGridRefreshData"===t&&(this.loading=!0,this.refresh(),null===(e=this.onRefreshStart)||void 0===e||e.call(this),"serverSide"===this.api.getGridOption("rowModelType")&&this.api.refreshServerSide())}},agGridExpandCollapseAll:class{constructor(){this.expanded=!1}init(t,e){this.api=t,this.refresh=e}isExpanded(){return this.expanded}onAction(t){"agGridExpandCollapseAll"===t&&(this.expanded?this.api.collapseAll():this.api.expandAll(),this.expanded=!this.expanded,this.refresh())}}};function lt(t,e){const i=document.createElement("div");i.style.cssText="display: flex; flex-direction: column; justify-content: center; line-height: 1; gap: 2px;";const s=document.createElement("span");if(s.textContent=null!=t?t:"-",s.style.cssText="display: block;",i.appendChild(s),e){const t=document.createElement("span");t.textContent=e,t.style.cssText="display: block; font-size: 0.9em; opacity: 0.65;",i.appendChild(t)}return i}class rt{init(t){var e,i;this.eGui=document.createElement("div"),this.eGui.style.cssText="display: flex; height: 100%; align-items: center; gap: 8px;";const s=document.createElement("udp-fluent-avatar");t.getSrc&&(s.src=t.getSrc(t)),t.getIconName&&(s.iconName=t.getIconName(t),t.iconVariant&&(s.iconVariant=t.iconVariant)),t.getName&&(s.name=t.getName(t)),t.getInitials&&(s.initials=t.getInitials(t)),s.size=null!==(e=t.size)&&void 0!==e?e:28,t.shape&&(s.shape=t.shape),t.getColor?s.color=t.getColor(t):t.color&&(s.color=t.color);const o=`${null!==(i=t.size)&&void 0!==i?i:28}px`;if(s.style.cssText=`align-self: center; flex-shrink: 0; width: ${o}; height: ${o};`,this.eGui.appendChild(s),t.getValues){const e=t.getValues(t);e&&this.eGui.appendChild(lt(e.title,e.subtitle))}}getGui(){return this.eGui}refresh(){return!1}}class dt{init(t){var e,i;this.eGui=document.createElement("div"),this.eGui.style.cssText="display: flex; height: 100%; width: 100%; align-items: center; overflow: hidden;";const s=t.getSrc(t),o=document.createElement("udp-fluent-image");t.fit&&(o.fit=t.fit),t.shape&&(o.shape=t.shape),o.style.cssText="display: block; height: 100%; width: 100%; overflow: hidden;";const a=document.createElement("img");a.src=s,a.alt=null!==(e=t.alt)&&void 0!==e?e:"",a.style.cssText=`height: 100%; width: 100%; max-height: 100%; max-width: 100%; object-fit: ${null!==(i=t.fit)&&void 0!==i?i:"contain"}; display: block;`,o.appendChild(a),this.eGui.appendChild(o)}getGui(){return this.eGui}refresh(){return!1}}class ht{init(t){var e,i;this.eGui=document.createElement("div"),this.eGui.style.cssText="display: flex; height: 100%; align-items: center;";const s=t.getHref?t.getHref(t):null!==(e=t.href)&&void 0!==e?e:"",o=document.createElement("udp-fluent-link");o.href=s,o.target=null!==(i=t.target)&&void 0!==i?i:"_self",o.textContent=t.value,this.eGui.appendChild(o)}getGui(){return this.eGui}refresh(){return!1}}class ct{init(t){this.node=t.node,this.eGui=document.createElement("div"),this.eGui.setAttribute("style","display: flex; align-items: center; height: 100%;"),this.eValueContainer=document.createElement("span"),this.eValueContainer.setAttribute("class","eValueContainer"),this.eGui.appendChild(this.eValueContainer),this.renderContent(t)}getGui(){return this.eGui}refresh(t){return!(!this.eValueContainer||!this.node||(this.renderContent(t),0))}renderContent(t){this.eValueContainer.innerHTML="";let e=null;if(this.node.group&&(null==t?void 0:t.getHeaderValues)?e=t.getHeaderValues(t):!this.node.group&&(null==t?void 0:t.getValues)&&(e=t.getValues(t)),!e)return;const i=document.createElement("div");i.className="custom-group-column",i.appendChild(lt(e.title,e.subtitle)),this.eValueContainer.appendChild(i)}destroy(){}}const ut=t=>{const e=t.value;if(null==e)return"";const i=new Date(e);return i?`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,"0")}-${String(i.getDate()).padStart(2,"0")} ${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`:""},pt=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.gridReady=s(this,"gridReady",7),this.gridFunctions=[],this.refreshKey=0,this.gridFunctionInstances=[],this.myTheme=a.withParams({wrapperBorderRadius:0,wrapperBorder:!1,headerCellHoverBackgroundColor:"var(--udp-grid-column-header-bg-hover)",borderColor:"#E9ECEF"}),this.updateGridHeight=()=>{if(this.gridEl&&this.gridContainerEl.clientWidth>0){const t=this.gridEl.getBoundingClientRect(),e=window.innerHeight-t.top,i=10;this.gridEl.style.height=(e-i>400?e-i:400)+"px"}},this.scheduleHeightUpdate=()=>{clearTimeout(this.resizeDebounce),this.resizeDebounce=setTimeout(this.updateGridHeight,100)},this.attachAutoHeight=()=>{this.resizeObserver||(this.updateGridHeight(),this.resizeObserver=new ResizeObserver(this.scheduleHeightUpdate),this.resizeObserver.observe(this.gridContainerEl),window.addEventListener("resize",this.scheduleHeightUpdate))},this.detachAutoHeight=()=>{var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.resizeObserver=void 0,window.removeEventListener("resize",this.scheduleHeightUpdate),clearTimeout(this.resizeDebounce)},this.refreshGridFunctions=()=>{this.refreshKey++},this.onGridReady=async t=>{this.gridApi=t.api,this.updateGridContextValues(),this.columnDefs&&this.setColumnDefs();const e=[];this.gridFunctionInstances=this.gridFunctions.map((t=>{const i=nt[t.name];if(!i)return null;const s=new i,o=s.init(this.gridApi,this.refreshGridFunctions,t.params);return o&&e.push(o),s})).filter((t=>!!t)),await Promise.all(e),this.gridApiCallback&&this.gridApiCallback({refreshServerSide:()=>this.gridApi.refreshServerSide(),applyTransaction:t=>this.gridApi.applyTransaction(t),ensureIndexVisible:(t,e)=>this.gridApi.ensureIndexVisible(t,e),getSelectedRows:()=>this.gridApi.getSelectedRows(),getSelectedNodes:()=>this.gridApi.getSelectedNodes(),getSearchObject:()=>this.gridApi.getGridOption("context").searchObject,getEntityName:()=>this.gridApi.getGridOption("context").entityName,getRowCount:()=>this.gridApi.getGridOption("context").rowCount,getFilterModel:()=>this.gridApi.getFilterModel(),setFilterModel:t=>this.gridApi.setFilterModel(t),onFilterChanged:()=>this.gridApi.onFilterChanged(),expandAll:()=>this.gridApi.expandAll(),collapseAll:()=>this.gridApi.collapseAll(),toggleLoadingOverlay:t=>this.gridApi.setGridOption("loading",t),refreshCells:()=>this.gridApi.refreshCells(),refreshClientSideRowModel:t=>this.gridApi.refreshClientSideRowModel(t),selectAll:(t,e)=>this.gridApi.selectAll(t,e),deselectAll:(t,e)=>this.gridApi.deselectAll(t,e),getServerSideSelectionState:()=>this.gridApi.getServerSideSelectionState(),setServerSideSelectionState:t=>this.gridApi.setServerSideSelectionState(t),forEachNode:t=>this.gridApi.forEachNode(t),forEachNodeAfterFilterAndSort:t=>this.gridApi.forEachNodeAfterFilterAndSort(t),stopEditing:t=>this.gridApi.stopEditing(t),getFocusedCell:()=>this.gridApi.getFocusedCell()}),this.gridReady.emit(this.gridApi)},this.onHeaderAction=t=>{this.gridFunctionInstances.forEach((e=>{var i;return null===(i=e.onAction)||void 0===i?void 0:i.call(e,t.detail.name,t.detail.payload)}))},this.updateGridContextValues=()=>{this.gridApi.setGridOption("context",Object.assign(Object.assign({},this.gridApi.getGridOption("context")),{entityName:this.entityName,gridId:this.gridId}))}}componentWillLoad(){n.registerModules([l]),r.setLicenseKey("Using_this_{AG_Grid}_Enterprise_key_{AG-080613}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{Univerus_Software_Inc}_is_granted_a_{Single_Application}_Developer_License_for_the_application_{MAIS_eRec}_only_for_{1}_Front-End_JavaScript_developer___All_Front-End_JavaScript_developers_working_on_{MAIS_eRec}_need_to_be_licensed___{MAIS_eRec}_has_not_been_granted_a_Deployment_License_Add-on___This_key_works_with_{AG_Grid}_Enterprise_versions_released_before_{28_June_2026}____[v3]_[01]_MTc4MjYwMTIwMDAwMA==5c7d1487ecb13b28e75415d34b7cf694")}componentDidLoad(){var t,e,i,s;const o=Object.assign(Object.assign({tooltipShowMode:"whenTruncated",tooltipShowDelay:500},this.gridOptions),{columnTypes:{booleanChip:{cellRenderer:"iconRenderer",cellRendererParams:{iconMappingConfig:{true:{iconName:"checkMark24",color:"success"},false:{iconName:"close24",color:"error"}}}}},dataTypeDefinitions:{dateTimeString:{baseDataType:"dateTimeString",extendsDataType:"dateTimeString",valueFormatter:ut},boolean:{baseDataType:"boolean",extendsDataType:"boolean",columnTypes:"booleanChip"}},gridId:this.gridId,onGridReady:t=>{this.onGridReady(t)},theme:this.myTheme,components:Object.assign({actionsRenderer:y,avatarRenderer:rt,iconRenderer:b,imageRenderer:dt,linkRenderer:ht,statusRenderer:f,subtitleRenderer:ct},null===(t=this.gridOptions)||void 0===t?void 0:t.components),domLayout:"normal",defaultColDef:Object.assign(Object.assign({cellDataType:!1,sortable:!0,filter:!0,flex:1,minWidth:150,suppressHeaderMenuButton:!0},null===(e=this.gridOptions)||void 0===e?void 0:e.defaultColDef),{filterParams:Object.assign({buttons:["reset","apply"],closeOnApply:!0,maxNumConditions:10},null===(s=null===(i=this.gridOptions)||void 0===i?void 0:i.defaultColDef)||void 0===s?void 0:s.filterParams)})});d(this.gridEl,o),this.gridHeight?this.gridEl.style.height=this.gridHeight:this.attachAutoHeight()}disconnectedCallback(){var t;null===(t=this.gridApi)||void 0===t||t.destroy(),this.detachAutoHeight()}handleUpdateGridFunctions(t,e){this.gridApi&&t!==e&&t.forEach(((t,e)=>{var i,s;null===(s=null===(i=this.gridFunctionInstances[e])||void 0===i?void 0:i.update)||void 0===s||s.call(i,t.params)}))}handleUpdateGridHeight(t){this.gridEl&&(t?(this.detachAutoHeight(),this.gridEl.style.height=t):this.attachAutoHeight())}handleUpdateColumnDefs(t,e){this.gridApi&&!w(t,e)&&this.setColumnDefs()}setColumnDefs(){var t;const e=k(this.columnDefs,null===(t=this.gridFunctions)||void 0===t?void 0:t.some((t=>"advancedSearch"===(null==t?void 0:t.name))));this.gridApi.setGridOption("columnDefs",e)}handleEntityNameChange(){this.updateGridContextValues()}render(){return t("div",{key:"32fb39625ea3f5e8db81cb2fb95983a00f054667",ref:t=>this.gridContainerEl=t},t("ghost-render",{key:"6f89ddd42a951a39c5dbc76b50fc466ce95e396a"},t("div",{key:"a8dd75c7b9917082326f906eeecf3d719a3f3211"},t("udp-dialog",{key:"4ab7cb2ae574d60988198dc31e026f7a5f8ca7c1"}),t("udp-list-item",{key:"1d299cf32fd3c12ef33cd0c715527ff1f1b842e8"}),t("hint-panel",{key:"e6489912e2a445ddc2103ae24dbca4dda618a397"}),t("udp-side-sheet",{key:"111ed55434d986f41a2b13e25d74adc8e98abdc0"}),t("udp-fluent-dialog",{key:"e7939fcbb25f790de56a1171d2d6c5b2d6a6a4f3"}),t("udp-fluent-text",{key:"7f1b26e89796a5d16e7004c897912f2887974dda"}),t("udp-fluent-text-input",{key:"b39c26dad8a53172f7edff195fdd2c7cb0281ce0"}),t("udp-fluent-switch",{key:"f42d8dffa2b97ffca9cc9be727de9d2280725026"}),t("udp-fluent-button",{key:"afe19aad546a453402735dbb27136bca0fd6a65c"}),t("udp-text",{key:"a5f42d44acc592e21a4bc4f5449ee27291254e2d"}),t("udp-search-input",{key:"f871b4064f415725cf05f95ff7b7a5269d6af4a1"}),t("udp-fluent-avatar",{key:"33cf6c3f5d5925b03dc4fbe70f6c6574f05e4ab3"}),t("udp-fluent-icon-button",{key:"ed11b4726e2f99b6d8da23c9ed276aafd2b56a9a"}),t("udp-fluent-icon",{key:"4bca6b6e7673f6b08c985383596947bca4d97248"}),t("udp-fluent-badge",{key:"e7ca3d94bc7ddc9efc1228845bcba6818d8be906"}))),t("grid-header",{key:"59758842e99d3b8f95ce3414e11c542282de1d39",headerConfig:this.headerConfig,gridFunctions:this.gridFunctions,gridFunctionInstances:this.gridFunctionInstances,refreshKey:this.refreshKey,onHeaderAction:this.onHeaderAction}),t("div",{key:"a7c2636e08d6d54566f305e06b1c9fa1e281cd52",ref:t=>this.gridEl=t}))}static get watchers(){return{gridFunctions:[{handleUpdateGridFunctions:0}],gridHeight:[{handleUpdateGridHeight:0}],columnDefs:[{handleUpdateColumnDefs:0}],entityName:[{handleEntityNameChange:0}],gridId:[{handleEntityNameChange:0}]}}static get style(){return".variant-dark{--udp-grid-column-header-bg:#F8F9FA;--udp-grid-column-header-bg-hover:#dce6f2;--udp-grid-column-header-text:var(--primary-color-dark)}.variant-light{--udp-grid-column-header-bg:#f2f4f5;--udp-grid-column-header-bg-hover:#eef3f9;--udp-grid-column-header-text:var(--primary-color-dark)}::view-transition-group(*){animation-duration:0.2s}.grid-wrapper{display:flex;flex-direction:column;height:100%}#myNewGrid{flex:1}.ag-cell.udp-col-brand{background-color:var(--colorBrandBackground2) !important;color:var(--colorBrandForeground2)}.ag-header-cell.udp-col-brand-header{background-color:var(--colorBrandBackground2) !important}.ag-header-cell.udp-col-brand-header .ag-header-cell-text{color:var(--colorBrandForeground2)}.ag-cell.udp-col-danger{background-color:var(--colorPaletteRedBackground1) !important;color:var(--colorPaletteRedForeground1)}.ag-header-cell.udp-col-danger-header{background-color:var(--colorPaletteRedBackground1) !important}.ag-header-cell.udp-col-danger-header .ag-header-cell-text{color:var(--colorPaletteRedForeground1)}.ag-cell.udp-col-important{background-color:color-mix(in srgb, var(--colorNeutralForeground1) 20%, transparent) !important;color:var(--colorNeutralForeground1)}.ag-header-cell.udp-col-important-header{background-color:color-mix(in srgb, var(--colorNeutralForeground1) 20%, transparent) !important}.ag-header-cell.udp-col-important-header .ag-header-cell-text{color:var(--colorNeutralForeground1)}.ag-cell.udp-col-informative{background-color:color-mix(in srgb, var(--colorPaletteBlueBackground2) 20%, transparent) !important;color:color-mix(in srgb, var(--colorPaletteBlueForeground2) 85%, transparent)}.ag-header-cell.udp-col-informative-header{background-color:color-mix(in srgb, var(--colorPaletteBlueBackground2) 20%, transparent) !important}.ag-header-cell.udp-col-informative-header .ag-header-cell-text{color:color-mix(in srgb, var(--colorPaletteBlueForeground2) 85%, transparent)}.ag-cell.udp-col-severe{background-color:var(--colorPaletteDarkOrangeBackground1) !important;color:var(--colorPaletteDarkOrangeForeground1)}.ag-header-cell.udp-col-severe-header{background-color:var(--colorPaletteDarkOrangeBackground1) !important}.ag-header-cell.udp-col-severe-header .ag-header-cell-text{color:var(--colorPaletteDarkOrangeForeground1)}.ag-cell.udp-col-subtle{background-color:var(--colorNeutralBackground1) !important;color:var(--colorNeutralForeground3)}.ag-header-cell.udp-col-subtle-header{background-color:var(--colorNeutralBackground1) !important}.ag-header-cell.udp-col-subtle-header .ag-header-cell-text{color:var(--colorNeutralForeground3)}.ag-cell.udp-col-success{background-color:var(--colorPaletteGreenBackground1) !important;color:var(--colorPaletteGreenForeground1)}.ag-header-cell.udp-col-success-header{background-color:var(--colorPaletteGreenBackground1) !important}.ag-header-cell.udp-col-success-header .ag-header-cell-text{color:var(--colorPaletteGreenForeground1)}.ag-cell.udp-col-warning{background-color:var(--colorPaletteYellowBackground1) !important;color:var(--colorPaletteYellowForeground2)}.ag-header-cell.udp-col-warning-header{background-color:var(--colorPaletteYellowBackground1) !important}.ag-header-cell.udp-col-warning-header .ag-header-cell-text{color:var(--colorPaletteYellowForeground2)}"}},[0,"ag-grid-base",{columnDefs:[16],gridOptions:[16],headerConfig:[16],gridHeight:[1,"grid-height"],gridFunctions:[16],gridId:[1,"grid-id"],entityName:[1,"entity-name"],gridApiCallback:[16],refreshKey:[32]},void 0,{gridFunctions:[{handleUpdateGridFunctions:0}],gridHeight:[{handleUpdateGridHeight:0}],columnDefs:[{handleUpdateColumnDefs:0}],entityName:[{handleEntityNameChange:0}],gridId:[{handleEntityNameChange:0}]}]);function mt(){"undefined"!=typeof customElements&&["ag-grid-base","ghost-render","grid-header","hint-panel","stencil-icon-button","udp-ambient-tool-tip","udp-avatar","udp-badge","udp-button","udp-dialog","udp-flexbox","udp-fluent-avatar","udp-fluent-badge","udp-fluent-button","udp-fluent-dialog","udp-fluent-icon","udp-fluent-icon-button","udp-fluent-menu","udp-fluent-switch","udp-fluent-text-input","udp-icon","udp-linear-loader","udp-list-item","udp-menu-item","udp-pop-over","udp-primary-action-header","udp-search-input","udp-side-sheet","udp-spinner","udp-text","udp-tooltip","unity-typography"].forEach((t=>{switch(t){case"ag-grid-base":customElements.get(o(t))||customElements.define(o(t),pt);break;case"ghost-render":customElements.get(o(t))||_();break;case"grid-header":customElements.get(o(t))||C();break;case"hint-panel":customElements.get(o(t))||x();break;case"stencil-icon-button":customElements.get(o(t))||S();break;case"udp-ambient-tool-tip":customElements.get(o(t))||N();break;case"udp-avatar":customElements.get(o(t))||E();break;case"udp-badge":customElements.get(o(t))||j();break;case"udp-button":customElements.get(o(t))||F();break;case"udp-dialog":customElements.get(o(t))||O();break;case"udp-flexbox":customElements.get(o(t))||A();break;case"udp-fluent-avatar":customElements.get(o(t))||D();break;case"udp-fluent-badge":customElements.get(o(t))||T();break;case"udp-fluent-button":customElements.get(o(t))||R();break;case"udp-fluent-dialog":customElements.get(o(t))||G();break;case"udp-fluent-icon":customElements.get(o(t))||I();break;case"udp-fluent-icon-button":customElements.get(o(t))||P();break;case"udp-fluent-menu":customElements.get(o(t))||J();break;case"udp-fluent-switch":customElements.get(o(t))||M();break;case"udp-fluent-text-input":customElements.get(o(t))||B();break;case"udp-icon":customElements.get(o(t))||V();break;case"udp-linear-loader":customElements.get(o(t))||$();break;case"udp-list-item":customElements.get(o(t))||U();break;case"udp-menu-item":customElements.get(o(t))||z();break;case"udp-pop-over":customElements.get(o(t))||H();break;case"udp-primary-action-header":customElements.get(o(t))||L();break;case"udp-search-input":customElements.get(o(t))||W();break;case"udp-side-sheet":customElements.get(o(t))||Y();break;case"udp-spinner":customElements.get(o(t))||q();break;case"udp-text":customElements.get(o(t))||K();break;case"udp-tooltip":customElements.get(o(t))||Q();break;case"unity-typography":customElements.get(o(t))||X()}}))}export{pt as A,mt as d,et as g}
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-05-01T16:07:06",
2
+ "timestamp": "2026-05-11T18:00:24",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.41.3",
@@ -260,6 +260,8 @@ class SavedViews {
260
260
  this.api.addEventListener('columnPinned', this.checkIfDirty);
261
261
  this.api.addEventListener('columnMoved', this.checkIfDirty);
262
262
  this.api.addEventListener('columnPivotChanged', this.checkIfDirty);
263
+ this.api.addEventListener('columnRowGroupChanged', this.checkIfDirty);
264
+ this.api.addEventListener('columnValueChanged', this.checkIfDirty);
263
265
  this.api.addEventListener('columnsReset', this.checkIfDirty);
264
266
  this.api.addEventListener('filterChanged', this.checkIfDirty);
265
267
  this.api.addEventListener('sortChanged', this.checkIfDirty);
@@ -269,6 +271,8 @@ class SavedViews {
269
271
  this.api.removeEventListener('columnPinned', this.checkIfDirty);
270
272
  this.api.removeEventListener('columnMoved', this.checkIfDirty);
271
273
  this.api.removeEventListener('columnPivotChanged', this.checkIfDirty);
274
+ this.api.removeEventListener('columnRowGroupChanged', this.checkIfDirty);
275
+ this.api.removeEventListener('columnValueChanged', this.checkIfDirty);
272
276
  this.api.removeEventListener('columnsReset', this.checkIfDirty);
273
277
  this.api.removeEventListener('filterChanged', this.checkIfDirty);
274
278
  this.api.removeEventListener('sortChanged', this.checkIfDirty);