udp-stencil-component-library 26.3.0-beta.3 → 26.3.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ag-grid-base_63.cjs.entry.js +1 -1
- package/dist/collection/theme/ag-grid-theme-bridge.js +1 -1
- package/dist/components/ag-grid-base2.js +1 -1
- package/dist/docs.json +1 -1
- package/dist/esm/ag-grid-base_63.entry.js +1 -1
- package/dist/stencil-library/ag-grid-base_63.entry.js +1 -1
- package/package.json +1 -1
|
@@ -173,7 +173,7 @@ function createAgGridTheme() {
|
|
|
173
173
|
wrapperBorderRadius: 0,
|
|
174
174
|
wrapperBorder: false,
|
|
175
175
|
headerCellHoverBackgroundColor: 'var(--udp-grid-column-header-bg-hover)',
|
|
176
|
-
borderColor: '
|
|
176
|
+
borderColor: '#E9ECEF',
|
|
177
177
|
accentColor: 'var(--primary-color)',
|
|
178
178
|
browserColorScheme: 'light',
|
|
179
179
|
}, 'light')
|
|
@@ -15,7 +15,7 @@ function createAgGridTheme() {
|
|
|
15
15
|
wrapperBorderRadius: 0,
|
|
16
16
|
wrapperBorder: false,
|
|
17
17
|
headerCellHoverBackgroundColor: 'var(--udp-grid-column-header-bg-hover)',
|
|
18
|
-
borderColor: '
|
|
18
|
+
borderColor: '#E9ECEF',
|
|
19
19
|
accentColor: 'var(--primary-color)',
|
|
20
20
|
browserColorScheme: 'light',
|
|
21
21
|
}, 'light')
|
|
@@ -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,c as f}from"./configureUdpColumnMods.js";import{g as b}from"./tenantUtils.js";import{S as y,I as w,A as k}from"./status-renderer.js";import{isEqual as C}from"lodash-es";import{d as _}from"./ghost-render2.js";import{d as S}from"./grid-header2.js";import{d as x}from"./hint-panel2.js";import{d as N}from"./stencil-icon-button2.js";import{d as E}from"./udp-ambient-tool-tip2.js";import{d as j}from"./udp-avatar2.js";import{d as O}from"./udp-badge2.js";import{d as F}from"./udp-button2.js";import{d as A}from"./udp-dialog2.js";import{d as D}from"./udp-flexbox2.js";import{d as T}from"./udp-fluent-avatar2.js";import{d as R}from"./udp-fluent-badge2.js";import{d as G}from"./udp-fluent-button2.js";import{d as I}from"./udp-fluent-dialog2.js";import{d as B}from"./udp-fluent-icon2.js";import{d as J}from"./udp-fluent-icon-button2.js";import{d as P}from"./udp-fluent-menu2.js";import{d as M}from"./udp-fluent-switch2.js";import{d as V}from"./udp-fluent-text-input2.js";import{d as $}from"./udp-icon2.js";import{d as U}from"./udp-linear-loader2.js";import{d as H}from"./list-item.js";import{d as z}from"./udp-menu-item2.js";import{d as L}from"./udp-pop-over2.js";import{d as W}from"./udp-primary-action-header2.js";import{d as Y}from"./udp-search-input2.js";import{d as q}from"./udp-side-sheet2.js";import{d as K}from"./udp-spinner2.js";import{d as Q}from"./udp-text2.js";import{d as X}from"./udp-tooltip2.js";import{d as Z}from"./unity-typography2.js";let tt=null;function et(){return a.withParams({wrapperBorderRadius:0,wrapperBorder:!1,headerCellHoverBackgroundColor:"var(--udp-grid-column-header-bg-hover)",borderColor:"var(--divider-color)",accentColor:"var(--primary-color)",browserColorScheme:"light"},"light").withParams({wrapperBorderRadius:0,wrapperBorder:!1,headerCellHoverBackgroundColor:"var(--udp-grid-column-header-bg-hover)",borderColor:"var(--divider-color)",accentColor:"var(--primary-color)",browserColorScheme:"dark"},"dark")}function it(t){tt||(tt=et()),document.documentElement.setAttribute("data-ag-theme-mode",t)}function st(){return sessionStorage.getItem("user-id")}const ot=async t=>{(null===document||void 0===document?void 0:document.startViewTransition)?(document.viewTransition&&await document.viewTransition.finished.catch((()=>{})),document.startViewTransition(t)):t()};function at(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 nt(t){var e;return null===(e=t.gridViewGridViewGridConfiguration)||void 0===e?void 0:e.find((t=>1===t.gridViewGridConfigurationGridConfiguration.gridStateTypeId))}function lt(t){var e;return null===(e=t.gridViewGridViewGridConfiguration)||void 0===e?void 0:e.find((t=>4===t.gridViewGridConfigurationGridConfiguration.gridStateTypeId))}function rt(t){switch(t){case"primary":return"primary";case"ghost":return"subtle";default:return"secondary"}}const dt={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;if(!this.baseColumnState)return;const e=this.getPrimaryColIds(),i=t=>t.filter((t=>e.has(t.colId))).map((t=>t.colId)).join(",");i(null!==(t=this.api.getColumnState())&&void 0!==t?t:[])!==i(JSON.parse(this.baseColumnState))&&(this.baseColumnState=JSON.stringify(this.api.getColumnState()),this.isDirty&&(this.isDirty=!1,this.refresh()))},this.getStorageKey=()=>{const t=b();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,ot((()=>{this.api.setGridOption("loading",!1),this.refresh(),this.scheduleDirtyListeners(),this.saveCurrentStateToLocalStorage()}))}},this.getPrimaryColIds=()=>{var t;return new Set((null!==(t=this.api.getColumns())&&void 0!==t?t:[]).filter((t=>t.isPrimary())).map((t=>t.getColId())))},this.serializeUserColumnState=t=>{const e=this.getPrimaryColIds();return JSON.stringify(t.filter((t=>e.has(t.colId))))},this.checkIfDirty=()=>{var t,e;if(null!==this.baselineRecaptureId)return;let i;if(this.activeViewId&&this.activeViewState){const e=this.serializeUserColumnState(null!==(t=this.api.getColumnState())&&void 0!==t?t:[]),s=this.serializeUserColumnState(JSON.parse(this.activeViewState.columnState)),o=JSON.stringify(this.api.getFilterModel());i=e!==s||o!==this.activeViewState.filterModel}else{const t=this.api.getFilterModel(),s=Object.keys(null!=t?t:{}).length>0,o=this.serializeUserColumnState(null!==(e=this.api.getColumnState())&&void 0!==e?e:[]),a=null!==this.baseColumnState?this.serializeUserColumnState(JSON.parse(this.baseColumnState)):null;i=s||null!==a&&o!==a}i!==this.isDirty&&(this.isDirty=i,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(st(),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=lt(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=nt(t),i=lt(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(),ot((()=>{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(),ot((()=>{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=nt(e),o=lt(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,st(),null==i?void 0:i.gridId,v(),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(st(),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(st(),null==i?void 0:i.gridId,v(),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,st(),null==s?void 0:s.gridId,v(),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,st(),null==s?void 0:s.gridId,v(),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,st(),null==s?void 0:s.gridId,v(),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 ${at(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?`(${at(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===st()&&t("udp-fluent-icon-button",{iconName:"edit",size:"small",appearance:"transparent",onClick:()=>this.handleEditRequest(e)}),e.userId===st()&&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;ot((()=>{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:rt(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 ht(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 ct{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(ht(e.title,e.subtitle))}}getGui(){return this.eGui}refresh(){return!1}}class ut{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 pt{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 mt{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(ht(e.title,e.subtitle)),this.eValueContainer.appendChild(i)}destroy(){}}const gt=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")}`:""},vt=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.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.themeChangedHandler=t=>{it(t.detail.mode)},this.onGridReady=async t=>{this.gridApi=t.api,this.updateGridContextValues(),this.columnDefs&&this.setColumnDefs();const e=[];this.gridFunctionInstances=this.gridFunctions.map((t=>{const i=dt[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]),it("light"),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:gt},boolean:{baseDataType:"boolean",extendsDataType:"boolean",columnTypes:"booleanChip"}},gridId:this.gridId,onGridReady:t=>{this.onGridReady(t)},theme:(tt||(tt=et()),tt),components:Object.assign({actionsRenderer:k,avatarRenderer:ct,iconRenderer:w,imageRenderer:ut,linkRenderer:pt,statusRenderer:y,subtitleRenderer:mt},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),window.addEventListener("theme-changed",this.themeChangedHandler),this.gridHeight?this.gridEl.style.height=this.gridHeight:this.attachAutoHeight()}disconnectedCallback(){var t;null===(t=this.gridApi)||void 0===t||t.destroy(),this.detachAutoHeight(),window.removeEventListener("theme-changed",this.themeChangedHandler)}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&&!C(t,e)&&this.setColumnDefs()}setColumnDefs(){var t;const e=f(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:"9a16d8b90b805ed1451eb48db0ba7df90c714457",ref:t=>this.gridContainerEl=t},t("ghost-render",{key:"fe0119315b8b73cd3e49f7521f3c794fc1250238"},t("div",{key:"6a6346c130cc32488ed2e790877e07c1ad5bff89"},t("udp-dialog",{key:"cf73e98bda7a6aa8de4d1c9b5a958927ec1f4a84"}),t("udp-list-item",{key:"d77aa780107896612c5f9f1a07230aa8b1b9b33a"}),t("hint-panel",{key:"c2050efb63fdba5ecf99842550ae067c1206c6e9"}),t("udp-side-sheet",{key:"0ec1f693d133f81a236719dee3c627926057acbc"}),t("udp-fluent-dialog",{key:"eea6076a4fdda9606cd6623f4a38ceab61a56171"}),t("udp-fluent-text",{key:"c12db7b6556f1a8a5972888600deb0d6d09dedc6"}),t("udp-fluent-text-input",{key:"1171561b4331bff6e0e3aea9417e2996ae007811"}),t("udp-fluent-switch",{key:"148678c460ee96cf4015d031241709527490dfc9"}),t("udp-fluent-button",{key:"8e43757246063a8087b362a43004c25c900f8b34"}),t("udp-text",{key:"d6653a02fe0030e288a564296b2422976d1a34ce"}),t("udp-search-input",{key:"9f50750b415c1501ceecc4c4854660556edcb7de"}),t("udp-fluent-avatar",{key:"559183c3e5a1711a7d0cd65d0f7a87c76b4f2c43"}),t("udp-fluent-icon-button",{key:"77e871ca66f2d4177cbaf5a057f1ff4d5e28f8b2"}),t("udp-fluent-icon",{key:"579b0bec7e771bfe6bac0ae649238cfb8e9c317e"}),t("udp-fluent-badge",{key:"7d5a070cfa141e90b4c593cabcd77c401e0376b3"}))),t("grid-header",{key:"6174b78b2359bd4c1693000e5f9aefc969aac885",headerConfig:this.headerConfig,gridFunctions:this.gridFunctions,gridFunctionInstances:this.gridFunctionInstances,refreshKey:this.refreshKey,onHeaderAction:this.onHeaderAction}),t("div",{key:"26f0e971996dddaf3bbe8bac1c0dda70b6388661",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],gridFunctionInstances:[32]},void 0,{gridFunctions:[{handleUpdateGridFunctions:0}],gridHeight:[{handleUpdateGridHeight:0}],columnDefs:[{handleUpdateColumnDefs:0}],entityName:[{handleEntityNameChange:0}],gridId:[{handleEntityNameChange:0}]}]);function ft(){"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),vt);break;case"ghost-render":customElements.get(o(t))||_();break;case"grid-header":customElements.get(o(t))||S();break;case"hint-panel":customElements.get(o(t))||x();break;case"stencil-icon-button":customElements.get(o(t))||N();break;case"udp-ambient-tool-tip":customElements.get(o(t))||E();break;case"udp-avatar":customElements.get(o(t))||j();break;case"udp-badge":customElements.get(o(t))||O();break;case"udp-button":customElements.get(o(t))||F();break;case"udp-dialog":customElements.get(o(t))||A();break;case"udp-flexbox":customElements.get(o(t))||D();break;case"udp-fluent-avatar":customElements.get(o(t))||T();break;case"udp-fluent-badge":customElements.get(o(t))||R();break;case"udp-fluent-button":customElements.get(o(t))||G();break;case"udp-fluent-dialog":customElements.get(o(t))||I();break;case"udp-fluent-icon":customElements.get(o(t))||B();break;case"udp-fluent-icon-button":customElements.get(o(t))||J();break;case"udp-fluent-menu":customElements.get(o(t))||P();break;case"udp-fluent-switch":customElements.get(o(t))||M();break;case"udp-fluent-text-input":customElements.get(o(t))||V();break;case"udp-icon":customElements.get(o(t))||$();break;case"udp-linear-loader":customElements.get(o(t))||U();break;case"udp-list-item":customElements.get(o(t))||H();break;case"udp-menu-item":customElements.get(o(t))||z();break;case"udp-pop-over":customElements.get(o(t))||L();break;case"udp-primary-action-header":customElements.get(o(t))||W();break;case"udp-search-input":customElements.get(o(t))||Y();break;case"udp-side-sheet":customElements.get(o(t))||q();break;case"udp-spinner":customElements.get(o(t))||K();break;case"udp-text":customElements.get(o(t))||Q();break;case"udp-tooltip":customElements.get(o(t))||X();break;case"unity-typography":customElements.get(o(t))||Z()}}))}export{vt as A,ft as d}
|
|
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,c as f}from"./configureUdpColumnMods.js";import{g as b}from"./tenantUtils.js";import{S as y,I as w,A as k}from"./status-renderer.js";import{isEqual as C}from"lodash-es";import{d as _}from"./ghost-render2.js";import{d as S}from"./grid-header2.js";import{d as x}from"./hint-panel2.js";import{d as N}from"./stencil-icon-button2.js";import{d as E}from"./udp-ambient-tool-tip2.js";import{d as j}from"./udp-avatar2.js";import{d as F}from"./udp-badge2.js";import{d as O}from"./udp-button2.js";import{d as A}from"./udp-dialog2.js";import{d as D}from"./udp-flexbox2.js";import{d as T}from"./udp-fluent-avatar2.js";import{d as R}from"./udp-fluent-badge2.js";import{d as G}from"./udp-fluent-button2.js";import{d as I}from"./udp-fluent-dialog2.js";import{d as B}from"./udp-fluent-icon2.js";import{d as J}from"./udp-fluent-icon-button2.js";import{d as P}from"./udp-fluent-menu2.js";import{d as M}from"./udp-fluent-switch2.js";import{d as V}from"./udp-fluent-text-input2.js";import{d as $}from"./udp-icon2.js";import{d as U}from"./udp-linear-loader2.js";import{d as H}from"./list-item.js";import{d as z}from"./udp-menu-item2.js";import{d as L}from"./udp-pop-over2.js";import{d as W}from"./udp-primary-action-header2.js";import{d as Y}from"./udp-search-input2.js";import{d as q}from"./udp-side-sheet2.js";import{d as K}from"./udp-spinner2.js";import{d as Q}from"./udp-text2.js";import{d as X}from"./udp-tooltip2.js";import{d as Z}from"./unity-typography2.js";let tt=null;function et(){return a.withParams({wrapperBorderRadius:0,wrapperBorder:!1,headerCellHoverBackgroundColor:"var(--udp-grid-column-header-bg-hover)",borderColor:"#E9ECEF",accentColor:"var(--primary-color)",browserColorScheme:"light"},"light").withParams({wrapperBorderRadius:0,wrapperBorder:!1,headerCellHoverBackgroundColor:"var(--udp-grid-column-header-bg-hover)",borderColor:"var(--divider-color)",accentColor:"var(--primary-color)",browserColorScheme:"dark"},"dark")}function it(t){tt||(tt=et()),document.documentElement.setAttribute("data-ag-theme-mode",t)}function st(){return sessionStorage.getItem("user-id")}const ot=async t=>{(null===document||void 0===document?void 0:document.startViewTransition)?(document.viewTransition&&await document.viewTransition.finished.catch((()=>{})),document.startViewTransition(t)):t()};function at(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 nt(t){var e;return null===(e=t.gridViewGridViewGridConfiguration)||void 0===e?void 0:e.find((t=>1===t.gridViewGridConfigurationGridConfiguration.gridStateTypeId))}function lt(t){var e;return null===(e=t.gridViewGridViewGridConfiguration)||void 0===e?void 0:e.find((t=>4===t.gridViewGridConfigurationGridConfiguration.gridStateTypeId))}function rt(t){switch(t){case"primary":return"primary";case"ghost":return"subtle";default:return"secondary"}}const dt={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;if(!this.baseColumnState)return;const e=this.getPrimaryColIds(),i=t=>t.filter((t=>e.has(t.colId))).map((t=>t.colId)).join(",");i(null!==(t=this.api.getColumnState())&&void 0!==t?t:[])!==i(JSON.parse(this.baseColumnState))&&(this.baseColumnState=JSON.stringify(this.api.getColumnState()),this.isDirty&&(this.isDirty=!1,this.refresh()))},this.getStorageKey=()=>{const t=b();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,ot((()=>{this.api.setGridOption("loading",!1),this.refresh(),this.scheduleDirtyListeners(),this.saveCurrentStateToLocalStorage()}))}},this.getPrimaryColIds=()=>{var t;return new Set((null!==(t=this.api.getColumns())&&void 0!==t?t:[]).filter((t=>t.isPrimary())).map((t=>t.getColId())))},this.serializeUserColumnState=t=>{const e=this.getPrimaryColIds();return JSON.stringify(t.filter((t=>e.has(t.colId))))},this.checkIfDirty=()=>{var t,e;if(null!==this.baselineRecaptureId)return;let i;if(this.activeViewId&&this.activeViewState){const e=this.serializeUserColumnState(null!==(t=this.api.getColumnState())&&void 0!==t?t:[]),s=this.serializeUserColumnState(JSON.parse(this.activeViewState.columnState)),o=JSON.stringify(this.api.getFilterModel());i=e!==s||o!==this.activeViewState.filterModel}else{const t=this.api.getFilterModel(),s=Object.keys(null!=t?t:{}).length>0,o=this.serializeUserColumnState(null!==(e=this.api.getColumnState())&&void 0!==e?e:[]),a=null!==this.baseColumnState?this.serializeUserColumnState(JSON.parse(this.baseColumnState)):null;i=s||null!==a&&o!==a}i!==this.isDirty&&(this.isDirty=i,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(st(),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=lt(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=nt(t),i=lt(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(),ot((()=>{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(),ot((()=>{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=nt(e),o=lt(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,st(),null==i?void 0:i.gridId,v(),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(st(),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(st(),null==i?void 0:i.gridId,v(),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,st(),null==s?void 0:s.gridId,v(),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,st(),null==s?void 0:s.gridId,v(),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,st(),null==s?void 0:s.gridId,v(),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 ${at(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?`(${at(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===st()&&t("udp-fluent-icon-button",{iconName:"edit",size:"small",appearance:"transparent",onClick:()=>this.handleEditRequest(e)}),e.userId===st()&&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;ot((()=>{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:rt(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 ht(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 ct{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(ht(e.title,e.subtitle))}}getGui(){return this.eGui}refresh(){return!1}}class ut{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 pt{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 mt{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(ht(e.title,e.subtitle)),this.eValueContainer.appendChild(i)}destroy(){}}const gt=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")}`:""},vt=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.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.themeChangedHandler=t=>{it(t.detail.mode)},this.onGridReady=async t=>{this.gridApi=t.api,this.updateGridContextValues(),this.columnDefs&&this.setColumnDefs();const e=[];this.gridFunctionInstances=this.gridFunctions.map((t=>{const i=dt[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]),it("light"),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:gt},boolean:{baseDataType:"boolean",extendsDataType:"boolean",columnTypes:"booleanChip"}},gridId:this.gridId,onGridReady:t=>{this.onGridReady(t)},theme:(tt||(tt=et()),tt),components:Object.assign({actionsRenderer:k,avatarRenderer:ct,iconRenderer:w,imageRenderer:ut,linkRenderer:pt,statusRenderer:y,subtitleRenderer:mt},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),window.addEventListener("theme-changed",this.themeChangedHandler),this.gridHeight?this.gridEl.style.height=this.gridHeight:this.attachAutoHeight()}disconnectedCallback(){var t;null===(t=this.gridApi)||void 0===t||t.destroy(),this.detachAutoHeight(),window.removeEventListener("theme-changed",this.themeChangedHandler)}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&&!C(t,e)&&this.setColumnDefs()}setColumnDefs(){var t;const e=f(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:"9a16d8b90b805ed1451eb48db0ba7df90c714457",ref:t=>this.gridContainerEl=t},t("ghost-render",{key:"fe0119315b8b73cd3e49f7521f3c794fc1250238"},t("div",{key:"6a6346c130cc32488ed2e790877e07c1ad5bff89"},t("udp-dialog",{key:"cf73e98bda7a6aa8de4d1c9b5a958927ec1f4a84"}),t("udp-list-item",{key:"d77aa780107896612c5f9f1a07230aa8b1b9b33a"}),t("hint-panel",{key:"c2050efb63fdba5ecf99842550ae067c1206c6e9"}),t("udp-side-sheet",{key:"0ec1f693d133f81a236719dee3c627926057acbc"}),t("udp-fluent-dialog",{key:"eea6076a4fdda9606cd6623f4a38ceab61a56171"}),t("udp-fluent-text",{key:"c12db7b6556f1a8a5972888600deb0d6d09dedc6"}),t("udp-fluent-text-input",{key:"1171561b4331bff6e0e3aea9417e2996ae007811"}),t("udp-fluent-switch",{key:"148678c460ee96cf4015d031241709527490dfc9"}),t("udp-fluent-button",{key:"8e43757246063a8087b362a43004c25c900f8b34"}),t("udp-text",{key:"d6653a02fe0030e288a564296b2422976d1a34ce"}),t("udp-search-input",{key:"9f50750b415c1501ceecc4c4854660556edcb7de"}),t("udp-fluent-avatar",{key:"559183c3e5a1711a7d0cd65d0f7a87c76b4f2c43"}),t("udp-fluent-icon-button",{key:"77e871ca66f2d4177cbaf5a057f1ff4d5e28f8b2"}),t("udp-fluent-icon",{key:"579b0bec7e771bfe6bac0ae649238cfb8e9c317e"}),t("udp-fluent-badge",{key:"7d5a070cfa141e90b4c593cabcd77c401e0376b3"}))),t("grid-header",{key:"6174b78b2359bd4c1693000e5f9aefc969aac885",headerConfig:this.headerConfig,gridFunctions:this.gridFunctions,gridFunctionInstances:this.gridFunctionInstances,refreshKey:this.refreshKey,onHeaderAction:this.onHeaderAction}),t("div",{key:"26f0e971996dddaf3bbe8bac1c0dda70b6388661",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],gridFunctionInstances:[32]},void 0,{gridFunctions:[{handleUpdateGridFunctions:0}],gridHeight:[{handleUpdateGridHeight:0}],columnDefs:[{handleUpdateColumnDefs:0}],entityName:[{handleEntityNameChange:0}],gridId:[{handleEntityNameChange:0}]}]);function ft(){"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),vt);break;case"ghost-render":customElements.get(o(t))||_();break;case"grid-header":customElements.get(o(t))||S();break;case"hint-panel":customElements.get(o(t))||x();break;case"stencil-icon-button":customElements.get(o(t))||N();break;case"udp-ambient-tool-tip":customElements.get(o(t))||E();break;case"udp-avatar":customElements.get(o(t))||j();break;case"udp-badge":customElements.get(o(t))||F();break;case"udp-button":customElements.get(o(t))||O();break;case"udp-dialog":customElements.get(o(t))||A();break;case"udp-flexbox":customElements.get(o(t))||D();break;case"udp-fluent-avatar":customElements.get(o(t))||T();break;case"udp-fluent-badge":customElements.get(o(t))||R();break;case"udp-fluent-button":customElements.get(o(t))||G();break;case"udp-fluent-dialog":customElements.get(o(t))||I();break;case"udp-fluent-icon":customElements.get(o(t))||B();break;case"udp-fluent-icon-button":customElements.get(o(t))||J();break;case"udp-fluent-menu":customElements.get(o(t))||P();break;case"udp-fluent-switch":customElements.get(o(t))||M();break;case"udp-fluent-text-input":customElements.get(o(t))||V();break;case"udp-icon":customElements.get(o(t))||$();break;case"udp-linear-loader":customElements.get(o(t))||U();break;case"udp-list-item":customElements.get(o(t))||H();break;case"udp-menu-item":customElements.get(o(t))||z();break;case"udp-pop-over":customElements.get(o(t))||L();break;case"udp-primary-action-header":customElements.get(o(t))||W();break;case"udp-search-input":customElements.get(o(t))||Y();break;case"udp-side-sheet":customElements.get(o(t))||q();break;case"udp-spinner":customElements.get(o(t))||K();break;case"udp-text":customElements.get(o(t))||Q();break;case"udp-tooltip":customElements.get(o(t))||X();break;case"unity-typography":customElements.get(o(t))||Z()}}))}export{vt as A,ft as d}
|
package/dist/docs.json
CHANGED
|
@@ -167,7 +167,7 @@ function createAgGridTheme() {
|
|
|
167
167
|
wrapperBorderRadius: 0,
|
|
168
168
|
wrapperBorder: false,
|
|
169
169
|
headerCellHoverBackgroundColor: 'var(--udp-grid-column-header-bg-hover)',
|
|
170
|
-
borderColor: '
|
|
170
|
+
borderColor: '#E9ECEF',
|
|
171
171
|
accentColor: 'var(--primary-color)',
|
|
172
172
|
browserColorScheme: 'light',
|
|
173
173
|
}, 'light')
|