@genesislcap/design-system-configurator 14.374.2-alpha-2b5362b.0 → 14.375.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -125,7 +125,7 @@
125
125
  </${r}>
126
126
  </div>
127
127
  `)}
128
- `}},32610:(a,e,r)=>{r.d(e,{BW:()=>s,Ie:()=>p,XV:()=>l,cF:()=>o,mC:()=>d,nh:()=>i,sL:()=>n,yY:()=>c});var t=r(12066);function o(a){switch(null==a?void 0:a.toLowerCase()){case"int":case"long":case"double":case"bigdecimal":case"number":return"agNumberColumnFilter";case"date":case"datetime":return"agDateColumnFilter";default:return"agTextColumnFilter"}}function i(a){switch(null==a?void 0:a.toLowerCase()){case"int":case"long":case"double":case"bigdecimal":case"number":return"numericColumn"}}function n({value:a}){return(0,t.CL)(a)}function l({value:a}){return(0,t.zT)(a)}const g=19;function d(a){return new Date(a).toISOString().slice(0,g).replace(/-/g,"").replace("T","-")}const s=5,c={datasourceErrorClose:"datasource-error-close"},p={datasource:"datasource",unknown:"unknown"}},35610:(a,e,r)=>{r.d(e,{ML:()=>k,NC:()=>w,S5:()=>x,W_:()=>y,yu:()=>z});var t=r(55823),o=r(17465),i=r(41119),n=r(6884),l=r(40370),g=r(9033),d=r(39087),s=r(96730),c=r(26347),p=r(33681),u=r(84674),h=r(97156),v=r(79270),m=r(32610),b=r(55365),f=r(18070);const w=";",y=" && ";class z extends((0,l.C)(u.FoundationElement)){constructor(){super(...arguments),this.isSnapshot=!1,this.maxRows=n.OD.MAX_ROWS_250,this.maxView=n.OD.MAX_VIEW_1000,this.movingView=!1,this.reverse=!1,this.disablePolling=!1,this.offset=n.OD.DEFAULT_REQ_REP_OFFSET,this.pollingInterval=n.OD.REQ_REP_POLLING_INTERVAL_MS,this.pollTriggerEvents=[],this.requestAutoSetup=!0,this.restartOnReconnection=!0,this.criteriaFromFilters=new Map,this.update=new h.t(new Map)}get rowId(){return this.rowIdAttr?this.rowIdAttr:this.isRequestServer?n.OD.REQUEST_SERVER_ROW_ID:n.OD.DATASERVER_ROW_ID}get hasDefaultRowId(){return!this.rowIdAttr||this.rowIdAttr===n.OD.REQUEST_SERVER_ROW_ID||this.rowIdAttr===n.OD.DATASERVER_ROW_ID}get defaultRowIdByResourceType(){return this.isRequestServer?n.OD.REQUEST_SERVER_ROW_ID:n.OD.DATASERVER_ROW_ID}datasourceOptions(){return{criteria:this.buildCriteria(),isSnapshot:this.isSnapshot,maxRows:+this.maxRows,orderBy:this.orderBy,resourceName:this.resourceName,viewNumber:+this.viewNumber,fields:this.fields,maxView:+this.maxView,movingView:this.movingView,reverse:this.reverse,disablePolling:this.disablePolling,offset:this.offset,pollingInterval:this.pollingInterval,pollTriggerEvents:this.pollTriggerEvents,request:this.request,requestAutoSetup:this.requestAutoSetup}}buildCriteria(){var a;const e=((null===(a=this.criteria)||void 0===a?void 0:a.split(w))||[]).concat(Array.from(this.criteriaFromFilters.values())),r=(0,s.Q)(e.join(y),w);return r||void 0}setFilter(a,e){this.criteriaFromFilters.set(a,e),this.update.next(this.criteriaFromFilters)}removeFilter(a){this.criteriaFromFilters.delete(a),this.update.next(this.criteriaFromFilters)}get isRequestServer(){var a;return(null===(a=this.datasource.status)||void 0===a?void 0:a.type)===d.v.REQUEST_SERVER}datasourceStatusChanged(a,e){}handleErrors(a,e="unknown"){let r;if(Array.isArray(a)){r=a.map(a=>"string"==typeof a?a:"object"==typeof a&&null!==a&&"TEXT"in a?a.TEXT:String(a)).join(", ")}else r="string"==typeof a?a:String(a);r&&(o.v.error(`${e}: ${r}`),this.$emit(f.L.error,{message:r,type:e}),this.$emit(v.c.error,{message:r,type:e}))}clearErrors(){this.$emit(f.L.connected)}initializeDatasource(a){return(0,t.sH)(this,arguments,void 0,function*(a,e=!0,r=!0){try{if(yield this.datasource.init(a,e,r))return this.clearErrors(),!0;{const e=a.resourceName;if(e)if(this.connect.isConnected){(yield this.connect.getMetadata(e).catch(()=>null))?this.handleErrors(`Failed to initialize datasource for ${e}`,"unknown"):this.handleErrors(`Resource '${e}' does not exist on ${this.connect.host}`,"resource-validation")}else this.handleErrors(`Unable to connect to ${this.connect.host}`,"connection");else this.handleErrors("Resource name is required","resource-validation");return!1}}catch(a){let e="Unknown initialization error",r="unknown";return a instanceof Error&&(e=a.message,e.includes("connect")||e.includes("connection")?r="connection":e.includes("resource")||e.includes("does not exist")?r="resource-validation":e.includes("metadata")?r="metadata":e.includes("stream")?r="stream":e.includes("criteria")&&(r="criteria")),this.handleErrors(e,r),!1}})}}var x;(0,t.Cg)([c.dm],z.prototype,"connect",void 0),(0,t.Cg)([g.yW],z.prototype,"datasource",void 0),(0,t.Cg)([p.observable],z.prototype,"deferredGridOptions",void 0),(0,t.Cg)([p.observable],z.prototype,"deferredColumnStates",void 0),(0,t.Cg)([p.observable],z.prototype,"rowDataMapper",void 0),(0,t.Cg)([p.attr],z.prototype,"criteria",void 0),(0,t.Cg)([(0,p.attr)({mode:"boolean",attribute:"is-snapshot"})],z.prototype,"isSnapshot",void 0),(0,t.Cg)([(0,p.attr)({attribute:"max-rows",converter:p.nullableNumberConverter})],z.prototype,"maxRows",void 0),(0,t.Cg)([(0,p.attr)({attribute:"order-by"})],z.prototype,"orderBy",void 0),(0,t.Cg)([(0,p.attr)({attribute:"resource-name"})],z.prototype,"resourceName",void 0),(0,t.Cg)([(0,p.attr)({attribute:"view-number",converter:p.nullableNumberConverter})],z.prototype,"viewNumber",void 0),(0,t.Cg)([p.attr],z.prototype,"fields",void 0),(0,t.Cg)([(0,p.attr)({attribute:"max-view",converter:p.nullableNumberConverter})],z.prototype,"maxView",void 0),(0,t.Cg)([(0,p.attr)({mode:"boolean",attribute:"moving-view"})],z.prototype,"movingView",void 0),(0,t.Cg)([(0,p.attr)({mode:"boolean"})],z.prototype,"reverse",void 0),(0,t.Cg)([(0,p.attr)({mode:"boolean",attribute:"disable-polling"})],z.prototype,"disablePolling",void 0),(0,t.Cg)([(0,p.attr)({converter:p.nullableNumberConverter})],z.prototype,"offset",void 0),(0,t.Cg)([(0,p.attr)({attribute:"polling-interval"})],z.prototype,"pollingInterval",void 0),(0,t.Cg)([p.observable],z.prototype,"pollTriggerEvents",void 0),(0,t.Cg)([p.observable],z.prototype,"request",void 0),(0,t.Cg)([(0,p.attr)({mode:"boolean",attribute:"request-auto-setup"})],z.prototype,"requestAutoSetup",void 0),(0,t.Cg)([(0,p.attr)({attribute:"row-id"})],z.prototype,"rowIdAttr",void 0),(0,t.Cg)([(0,p.attr)({mode:"boolean",attribute:"restart-on-reconnection"})],z.prototype,"restartOnReconnection",void 0),(0,t.Cg)([p.volatile],z.prototype,"isRequestServer",null),function(a){a.Add="add",a.Update="update",a.Remove="remove"}(x||(x={}));class k extends z{constructor(){super(...arguments),this.dataSubWasLoggedOff=!1,this.keepColDefsOnClearRowData=!1,this.rowData=new Map,this.transactionData={add:[],remove:[],update:[]},this._isDisconnected=!1}subscribeToConnection(){var a;this.connect&&this.connect.isConnected$&&(null===(a=this.connectionSub)||void 0===a||a.unsubscribe(),this.connectionSub=this.connect.isConnected$.subscribe(a=>{a&&this.isDisconnected()?(this.setDisconnected(!1),this.restartOnReconnection&&this.reloadResourceData()):a||this.setDisconnected(!0)}))}unsubscribeFromConnection(){var a;null===(a=this.connectionSub)||void 0===a||a.unsubscribe(),this.connectionSub=void 0}generateColumnDefsFromMetadata(a,e){return null==a?void 0:a.flatMap(a=>{const r={};switch(r.filterParams=e(a.type),a.type){case i.w.STRING:r.cellEditor=b.IX.stringEditor;break;case i.w.NUMBER:r.cellEditor=b.IX.numberEditor;break;case i.w.BOOLEAN:r.cellRenderer=b.IX.boolean,r.cellEditor=b.IX.boolean;break;case i.w.DATE:r.valueFormatter=m.sL,r.cellEditor=b.IX.dateEditor;break;case i.w.DATETIME:r.valueFormatter=m.XV,r.cellEditor=b.IX.dateEditor,r.cellEditorParams={withTime:!0};break;case i.w.ENUM:a.enumOptions?(r.cellEditor=b.IX.selectEditor,r.cellEditorParams={values:a.enumOptions.map(a=>({value:a,label:a})),valueField:"value",labelField:"label"},r.filterParams={values:a.enumOptions}):o.v.warn(`No enumOptions found for field ${a.name}. Default cell editor applied.`)}return this.fields&&!this.fields.includes(a.name)?[]:Object.assign({field:a.name,type:(0,m.nh)(a.type),filter:(0,m.cF)(a.type)},r)})}handleStreamInserts(a,e=0){let r=e;null==a||a.forEach(a=>{const t=a[this.rowId];if(!t)return void o.v.warn("Attempted to insert row without valid rowId",a);if(this.rowData.has(t)||this.dataSubWasLoggedOff){const e=this.rowData.get(t),r=Object.assign(Object.assign({},e),a);this.transactionData.update.push(r),this.rowData.set(t,r)}else this.transactionData.add.push(a),this.transactionData.addIndex=r,this.rowData.set(t,a),e>0&&(r+=1)})}handleStreamDeletes(a){null==a||a.forEach(a=>{if(this.hasDefaultRowId||this.isRequestServer)this.transactionData.remove.push({[this.rowId]:a[this.rowId]});else{const e=Object.values(Object.fromEntries(this.rowData)).find(e=>e[this.defaultRowIdByResourceType]===a[this.defaultRowIdByResourceType]);this.transactionData.remove.push({[this.rowId]:e[this.rowId]})}this.rowData.delete(a[this.rowId])})}handleStreamUpdates(a){null==a||a.forEach(a=>{let e;if(this.hasDefaultRowId||this.isRequestServer){const r=this.rowData.get(a[this.rowId]);e=Object.assign(Object.assign({},r),a),this.transactionData.update.push(e)}else{const r=Object.values(Object.fromEntries(this.rowData)).find(e=>e[this.defaultRowIdByResourceType]===a[this.defaultRowIdByResourceType]);e=Object.assign(Object.assign({},r),a),this.transactionData.update.push(e)}this.rowData.set(a[this.rowId],e)})}applyAllTransactions(){var a,e,r,t,o,i;if(!(null===(a=this.transactionData.add)||void 0===a?void 0:a.length)&&!(null===(e=this.transactionData.update)||void 0===e?void 0:e.length)&&!(null===(r=this.transactionData.remove)||void 0===r?void 0:r.length))return this.$emit(v.c.loadingFinished),void(0===this.rowData.size&&this.$emit(v.c.noDataAvailable));(null===(t=this.transactionData.add)||void 0===t?void 0:t.length)>0&&this.applyMappedTransaction({add:this.transactionData.add,addIndex:this.transactionData.addIndex},x.Add),(null===(o=this.transactionData.remove)||void 0===o?void 0:o.length)>0&&this.applyMappedTransaction({remove:this.transactionData.remove},x.Remove),(null===(i=this.transactionData.update)||void 0===i?void 0:i.length)>0&&this.applyMappedTransaction({update:this.transactionData.update},x.Update)}applyMappedTransaction(a,e){const r=this.mapTransaction(a,[e]);this.$emit(v.c.dataChanged,{changes:r})}applyTransaction(a){throw new Error("Method not implemented.")}mapTransaction(a,e=Object.values(x)){if(!this.rowDataMapper)return a;const r={};return e.includes(x.Add)&&(r.add=this.rowDataMapper(a.add,this.rowData)),e.includes(x.Remove)&&(r.remove=this.rowDataMapper(a.remove,this.rowData)),e.includes(x.Update)&&(r.update=this.rowDataMapper(a.update,this.rowData)),void 0!==a.addIndex&&(r.addIndex=a.addIndex),r}loadMore(){throw new Error("loadMore() method must be implemented by subclass")}restart(){throw new Error("restart() method must be implemented by subclass")}reloadResourceData(){throw new Error("reloadResourceData() method must be implemented by subclass")}destroy(){throw new Error("destroy() method must be implemented by subclass")}setDisconnected(a){this._isDisconnected=a,a?this.$emit(v.c.error,{message:"Datasource disconnected",type:"connection"}):this.clearErrors()}isDisconnected(){return this._isDisconnected}getStatusBarActionConfig(a){return"boolean"==typeof a?{enabled:a}:"object"==typeof a&&null!==a?{enabled:!0,config:a}:{enabled:!1}}getDatasourceStatusBarPanels(a,e){var r,t,o,i,n,l;const g=[],d=this.getStatusBarActionConfig(null==e?void 0:e.loadMore);if(d.enabled&&!a){const a={};(null===(r=d.config)||void 0===r?void 0:r.onLoadMore)?a.onLoadMore=d.config.onLoadMore:a.onLoadMore=this.loadMore.bind(this),(null===(t=d.config)||void 0===t?void 0:t.appearance)&&(a.appearance=d.config.appearance),a.tooltip=(null===(o=d.config)||void 0===o?void 0:o.tooltip)||"Load More",g.push({statusPanel:b.k7.loadMore,statusPanelParams:a,align:this.pagination?"left":"right"})}const s=this.getStatusBarActionConfig(null==e?void 0:e.reload);if(s.enabled){const a={};(null===(i=s.config)||void 0===i?void 0:i.onReload)?a.onReload=s.config.onReload:a.onReload=this.reloadResourceData.bind(this),(null===(n=s.config)||void 0===n?void 0:n.icon)&&(a.icon=s.config.icon),a.tooltip=(null===(l=s.config)||void 0===l?void 0:l.tooltip)||"Reload",g.push({statusPanel:b.k7.reload,statusPanelParams:a,align:"right"})}return g}}},39604:(a,e,r)=>{r.d(e,{Al:()=>s,cN:()=>g,su:()=>d});var t=r(55823),o=r(33681),i=r(84674),n=r(55365),l=r(50103);class g extends i.FoundationElement{init(a){a&&(this.params=a)}getGui(){return this}refresh(a){return!1}}(0,t.Cg)([o.observable],g.prototype,"params",void 0);const d=g.compose({baseName:"grid-pro-actions-menu-renderer",template:o.html`
128
+ `}},32610:(a,e,r)=>{r.d(e,{BW:()=>s,Ie:()=>p,XV:()=>l,cF:()=>o,mC:()=>d,nh:()=>i,sL:()=>n,yY:()=>c});var t=r(12066);function o(a){switch(null==a?void 0:a.toLowerCase()){case"int":case"long":case"double":case"bigdecimal":case"number":return"agNumberColumnFilter";case"date":case"datetime":return"agDateColumnFilter";case"string":case"enum":return"agMultiColumnFilter";default:return"agTextColumnFilter"}}function i(a){switch(null==a?void 0:a.toLowerCase()){case"int":case"long":case"double":case"bigdecimal":case"number":return"numericColumn"}}function n({value:a}){return(0,t.CL)(a)}function l({value:a}){return(0,t.zT)(a)}const g=19;function d(a){return new Date(a).toISOString().slice(0,g).replace(/-/g,"").replace("T","-")}const s=5,c={datasourceErrorClose:"datasource-error-close"},p={datasource:"datasource",unknown:"unknown"}},35610:(a,e,r)=>{r.d(e,{ML:()=>k,NC:()=>w,S5:()=>x,W_:()=>y,yu:()=>z});var t=r(55823),o=r(17465),i=r(41119),n=r(6884),l=r(40370),g=r(9033),d=r(39087),s=r(96730),c=r(26347),p=r(33681),u=r(84674),h=r(97156),v=r(79270),m=r(32610),b=r(55365),f=r(18070);const w=";",y=" && ";class z extends((0,l.C)(u.FoundationElement)){constructor(){super(...arguments),this.isSnapshot=!1,this.maxRows=n.OD.MAX_ROWS_250,this.maxView=n.OD.MAX_VIEW_1000,this.movingView=!1,this.reverse=!1,this.disablePolling=!1,this.offset=n.OD.DEFAULT_REQ_REP_OFFSET,this.pollingInterval=n.OD.REQ_REP_POLLING_INTERVAL_MS,this.pollTriggerEvents=[],this.requestAutoSetup=!0,this.restartOnReconnection=!0,this.criteriaFromFilters=new Map,this.update=new h.t(new Map)}get rowId(){return this.rowIdAttr?this.rowIdAttr:this.isRequestServer?n.OD.REQUEST_SERVER_ROW_ID:n.OD.DATASERVER_ROW_ID}get hasDefaultRowId(){return!this.rowIdAttr||this.rowIdAttr===n.OD.REQUEST_SERVER_ROW_ID||this.rowIdAttr===n.OD.DATASERVER_ROW_ID}get defaultRowIdByResourceType(){return this.isRequestServer?n.OD.REQUEST_SERVER_ROW_ID:n.OD.DATASERVER_ROW_ID}datasourceOptions(){return{criteria:this.buildCriteria(),isSnapshot:this.isSnapshot,maxRows:+this.maxRows,orderBy:this.orderBy,resourceName:this.resourceName,viewNumber:+this.viewNumber,fields:this.fields,maxView:+this.maxView,movingView:this.movingView,reverse:this.reverse,disablePolling:this.disablePolling,offset:this.offset,pollingInterval:this.pollingInterval,pollTriggerEvents:this.pollTriggerEvents,request:this.request,requestAutoSetup:this.requestAutoSetup}}buildCriteria(){var a;const e=((null===(a=this.criteria)||void 0===a?void 0:a.split(w))||[]).concat(Array.from(this.criteriaFromFilters.values())),r=(0,s.Q)(e.join(y),w);return r||void 0}setFilter(a,e){this.criteriaFromFilters.set(a,e),this.update.next(this.criteriaFromFilters)}removeFilter(a){this.criteriaFromFilters.delete(a),this.update.next(this.criteriaFromFilters)}get isRequestServer(){var a;return(null===(a=this.datasource.status)||void 0===a?void 0:a.type)===d.v.REQUEST_SERVER}datasourceStatusChanged(a,e){}handleErrors(a,e="unknown"){let r;if(Array.isArray(a)){r=a.map(a=>"string"==typeof a?a:"object"==typeof a&&null!==a&&"TEXT"in a?a.TEXT:String(a)).join(", ")}else r="string"==typeof a?a:String(a);r&&(o.v.error(`${e}: ${r}`),this.$emit(f.L.error,{message:r,type:e}),this.$emit(v.c.error,{message:r,type:e}))}clearErrors(){this.$emit(f.L.connected)}initializeDatasource(a){return(0,t.sH)(this,arguments,void 0,function*(a,e=!0,r=!0){try{if(yield this.datasource.init(a,e,r))return this.clearErrors(),!0;{const e=a.resourceName;if(e)if(this.connect.isConnected){(yield this.connect.getMetadata(e).catch(()=>null))?this.handleErrors(`Failed to initialize datasource for ${e}`,"unknown"):this.handleErrors(`Resource '${e}' does not exist on ${this.connect.host}`,"resource-validation")}else this.handleErrors(`Unable to connect to ${this.connect.host}`,"connection");else this.handleErrors("Resource name is required","resource-validation");return!1}}catch(a){let e="Unknown initialization error",r="unknown";return a instanceof Error&&(e=a.message,e.includes("connect")||e.includes("connection")?r="connection":e.includes("resource")||e.includes("does not exist")?r="resource-validation":e.includes("metadata")?r="metadata":e.includes("stream")?r="stream":e.includes("criteria")&&(r="criteria")),this.handleErrors(e,r),!1}})}}var x;(0,t.Cg)([c.dm],z.prototype,"connect",void 0),(0,t.Cg)([g.yW],z.prototype,"datasource",void 0),(0,t.Cg)([p.observable],z.prototype,"deferredGridOptions",void 0),(0,t.Cg)([p.observable],z.prototype,"deferredColumnStates",void 0),(0,t.Cg)([p.observable],z.prototype,"rowDataMapper",void 0),(0,t.Cg)([p.attr],z.prototype,"criteria",void 0),(0,t.Cg)([(0,p.attr)({mode:"boolean",attribute:"is-snapshot"})],z.prototype,"isSnapshot",void 0),(0,t.Cg)([(0,p.attr)({attribute:"max-rows",converter:p.nullableNumberConverter})],z.prototype,"maxRows",void 0),(0,t.Cg)([(0,p.attr)({attribute:"order-by"})],z.prototype,"orderBy",void 0),(0,t.Cg)([(0,p.attr)({attribute:"resource-name"})],z.prototype,"resourceName",void 0),(0,t.Cg)([(0,p.attr)({attribute:"view-number",converter:p.nullableNumberConverter})],z.prototype,"viewNumber",void 0),(0,t.Cg)([p.attr],z.prototype,"fields",void 0),(0,t.Cg)([(0,p.attr)({attribute:"max-view",converter:p.nullableNumberConverter})],z.prototype,"maxView",void 0),(0,t.Cg)([(0,p.attr)({mode:"boolean",attribute:"moving-view"})],z.prototype,"movingView",void 0),(0,t.Cg)([(0,p.attr)({mode:"boolean"})],z.prototype,"reverse",void 0),(0,t.Cg)([(0,p.attr)({mode:"boolean",attribute:"disable-polling"})],z.prototype,"disablePolling",void 0),(0,t.Cg)([(0,p.attr)({converter:p.nullableNumberConverter})],z.prototype,"offset",void 0),(0,t.Cg)([(0,p.attr)({attribute:"polling-interval"})],z.prototype,"pollingInterval",void 0),(0,t.Cg)([p.observable],z.prototype,"pollTriggerEvents",void 0),(0,t.Cg)([p.observable],z.prototype,"request",void 0),(0,t.Cg)([(0,p.attr)({mode:"boolean",attribute:"request-auto-setup"})],z.prototype,"requestAutoSetup",void 0),(0,t.Cg)([(0,p.attr)({attribute:"row-id"})],z.prototype,"rowIdAttr",void 0),(0,t.Cg)([(0,p.attr)({mode:"boolean",attribute:"restart-on-reconnection"})],z.prototype,"restartOnReconnection",void 0),(0,t.Cg)([p.volatile],z.prototype,"isRequestServer",null),function(a){a.Add="add",a.Update="update",a.Remove="remove"}(x||(x={}));class k extends z{constructor(){super(...arguments),this.dataSubWasLoggedOff=!1,this.keepColDefsOnClearRowData=!1,this.rowData=new Map,this.transactionData={add:[],remove:[],update:[]},this._isDisconnected=!1}subscribeToConnection(){var a;this.connect&&this.connect.isConnected$&&(null===(a=this.connectionSub)||void 0===a||a.unsubscribe(),this.connectionSub=this.connect.isConnected$.subscribe(a=>{a&&this.isDisconnected()?(this.setDisconnected(!1),this.restartOnReconnection&&this.reloadResourceData()):a||this.setDisconnected(!0)}))}unsubscribeFromConnection(){var a;null===(a=this.connectionSub)||void 0===a||a.unsubscribe(),this.connectionSub=void 0}generateColumnDefsFromMetadata(a,e){return null==a?void 0:a.flatMap(a=>{const r={};switch(r.filterParams=e(a.type),a.type){case i.w.STRING:r.cellEditor=b.IX.stringEditor;break;case i.w.NUMBER:r.cellEditor=b.IX.numberEditor;break;case i.w.BOOLEAN:r.cellRenderer=b.IX.boolean,r.cellEditor=b.IX.boolean;break;case i.w.DATE:r.valueFormatter=m.sL,r.cellEditor=b.IX.dateEditor;break;case i.w.DATETIME:r.valueFormatter=m.XV,r.cellEditor=b.IX.dateEditor,r.cellEditorParams={withTime:!0};break;case i.w.ENUM:a.enumOptions?(r.cellEditor=b.IX.selectEditor,r.cellEditorParams={values:a.enumOptions.map(a=>({value:a,label:a})),valueField:"value",labelField:"label"},r.filterParams={values:a.enumOptions}):o.v.warn(`No enumOptions found for field ${a.name}. Default cell editor applied.`)}return this.fields&&!this.fields.includes(a.name)?[]:Object.assign({field:a.name,type:(0,m.nh)(a.type),filter:(0,m.cF)(a.type)},r)})}handleStreamInserts(a,e=0){let r=e;null==a||a.forEach(a=>{const t=a[this.rowId];if(!t)return void o.v.warn("Attempted to insert row without valid rowId",a);if(this.rowData.has(t)||this.dataSubWasLoggedOff){const e=this.rowData.get(t),r=Object.assign(Object.assign({},e),a);this.transactionData.update.push(r),this.rowData.set(t,r)}else this.transactionData.add.push(a),this.transactionData.addIndex=r,this.rowData.set(t,a),e>0&&(r+=1)})}handleStreamDeletes(a){null==a||a.forEach(a=>{if(this.hasDefaultRowId||this.isRequestServer)this.transactionData.remove.push({[this.rowId]:a[this.rowId]});else{const e=Object.values(Object.fromEntries(this.rowData)).find(e=>e[this.defaultRowIdByResourceType]===a[this.defaultRowIdByResourceType]);this.transactionData.remove.push({[this.rowId]:e[this.rowId]})}this.rowData.delete(a[this.rowId])})}handleStreamUpdates(a){null==a||a.forEach(a=>{let e;if(this.hasDefaultRowId||this.isRequestServer){const r=this.rowData.get(a[this.rowId]);e=Object.assign(Object.assign({},r),a),this.transactionData.update.push(e)}else{const r=Object.values(Object.fromEntries(this.rowData)).find(e=>e[this.defaultRowIdByResourceType]===a[this.defaultRowIdByResourceType]);e=Object.assign(Object.assign({},r),a),this.transactionData.update.push(e)}this.rowData.set(a[this.rowId],e)})}applyAllTransactions(){var a,e,r,t,o,i;if(!(null===(a=this.transactionData.add)||void 0===a?void 0:a.length)&&!(null===(e=this.transactionData.update)||void 0===e?void 0:e.length)&&!(null===(r=this.transactionData.remove)||void 0===r?void 0:r.length))return this.$emit(v.c.loadingFinished),void(0===this.rowData.size&&this.$emit(v.c.noDataAvailable));(null===(t=this.transactionData.add)||void 0===t?void 0:t.length)>0&&this.applyMappedTransaction({add:this.transactionData.add,addIndex:this.transactionData.addIndex},x.Add),(null===(o=this.transactionData.remove)||void 0===o?void 0:o.length)>0&&this.applyMappedTransaction({remove:this.transactionData.remove},x.Remove),(null===(i=this.transactionData.update)||void 0===i?void 0:i.length)>0&&this.applyMappedTransaction({update:this.transactionData.update},x.Update)}applyMappedTransaction(a,e){const r=this.mapTransaction(a,[e]);this.$emit(v.c.dataChanged,{changes:r})}applyTransaction(a){throw new Error("Method not implemented.")}mapTransaction(a,e=Object.values(x)){if(!this.rowDataMapper)return a;const r={};return e.includes(x.Add)&&(r.add=this.rowDataMapper(a.add,this.rowData)),e.includes(x.Remove)&&(r.remove=this.rowDataMapper(a.remove,this.rowData)),e.includes(x.Update)&&(r.update=this.rowDataMapper(a.update,this.rowData)),void 0!==a.addIndex&&(r.addIndex=a.addIndex),r}loadMore(){throw new Error("loadMore() method must be implemented by subclass")}restart(){throw new Error("restart() method must be implemented by subclass")}reloadResourceData(){throw new Error("reloadResourceData() method must be implemented by subclass")}destroy(){throw new Error("destroy() method must be implemented by subclass")}setDisconnected(a){this._isDisconnected=a,a?this.$emit(v.c.error,{message:"Datasource disconnected",type:"connection"}):this.clearErrors()}isDisconnected(){return this._isDisconnected}getStatusBarActionConfig(a){return"boolean"==typeof a?{enabled:a}:"object"==typeof a&&null!==a?{enabled:!0,config:a}:{enabled:!1}}getDatasourceStatusBarPanels(a,e){var r,t,o,i,n,l;const g=[],d=this.getStatusBarActionConfig(null==e?void 0:e.loadMore);if(d.enabled&&!a){const a={};(null===(r=d.config)||void 0===r?void 0:r.onLoadMore)?a.onLoadMore=d.config.onLoadMore:a.onLoadMore=this.loadMore.bind(this),(null===(t=d.config)||void 0===t?void 0:t.appearance)&&(a.appearance=d.config.appearance),a.tooltip=(null===(o=d.config)||void 0===o?void 0:o.tooltip)||"Load More",g.push({statusPanel:b.k7.loadMore,statusPanelParams:a,align:this.pagination?"left":"right"})}const s=this.getStatusBarActionConfig(null==e?void 0:e.reload);if(s.enabled){const a={};(null===(i=s.config)||void 0===i?void 0:i.onReload)?a.onReload=s.config.onReload:a.onReload=this.reloadResourceData.bind(this),(null===(n=s.config)||void 0===n?void 0:n.icon)&&(a.icon=s.config.icon),a.tooltip=(null===(l=s.config)||void 0===l?void 0:l.tooltip)||"Reload",g.push({statusPanel:b.k7.reload,statusPanelParams:a,align:"right"})}return g}}},39604:(a,e,r)=>{r.d(e,{Al:()=>s,cN:()=>g,su:()=>d});var t=r(55823),o=r(33681),i=r(84674),n=r(55365),l=r(50103);class g extends i.FoundationElement{init(a){a&&(this.params=a)}getGui(){return this}refresh(a){return!1}}(0,t.Cg)([o.observable],g.prototype,"params",void 0);const d=g.compose({baseName:"grid-pro-actions-menu-renderer",template:o.html`
129
129
  <foundation-actions-menu
130
130
  name="${a=>a.params.headerName}"
131
131
  :definition=${a=>a.params}
@@ -8581,4 +8581,4 @@
8581
8581
  transition: transform 0.2s ease;
8582
8582
  }
8583
8583
  `}}]);
8584
- //# sourceMappingURL=445.c6daee010fbecacac70859b2a968ea96.js.map
8584
+ //# sourceMappingURL=445.284432ef2ee3850ac4fc356580b7ac69.js.map
@@ -757,7 +757,7 @@
757
757
  ${Y}
758
758
  ${j}
759
759
  ${Z}
760
- `;var J=t(82128);const q=(0,J.U)("rapid");var ee=t(51174),ae=t(84674),te=t(83912);const re="#cccccc",ie="#879ba6",oe="#1f2126",se="#2e3339",ne="#2b2e34",ge="#000000",de="#181d1f",le="#FFFFFF",ce="#babfc7",he="#2196f3",pe={foregroundSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(re)),headerForegroundSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(ie)),backgroundSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(oe)),borderSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(se)),rowHoverSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(ne))},ue={foregroundSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(ge)),headerForegroundSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(de)),backgroundSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(le)),borderSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(ce)),rowHoverSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(he))},{create:me}=ae.DesignToken,ve={backgroundColor:me("rapid-ag-background-color").withDefault(e=>s.baseLayerLuminance.getValueFor(e)===s.StandardLuminance.LightMode?ue.backgroundSwatch:pe.backgroundSwatch),borderColor:me("rapid-ag-border-color").withDefault(e=>s.baseLayerLuminance.getValueFor(e)===s.StandardLuminance.LightMode?ue.borderSwatch:pe.borderSwatch),foregroundColor:me("rapid-ag-foreground-color").withDefault(e=>s.baseLayerLuminance.getValueFor(e)===s.StandardLuminance.LightMode?ue.foregroundSwatch:pe.foregroundSwatch),headerForegroundColor:me("rapid-ag-header-foreground-color").withDefault(e=>s.baseLayerLuminance.getValueFor(e)===s.StandardLuminance.LightMode?ue.headerForegroundSwatch:pe.headerForegroundSwatch),rowHoverColor:me("rapid-ag-row-hover-color").withDefault(e=>s.baseLayerLuminance.getValueFor(e)===s.StandardLuminance.LightMode?ue.rowHoverSwatch:pe.rowHoverSwatch)},be=()=>{const e=(0,ee.designTokensMap)();if(!e.value)return null;const{style:a,space:t}=e.value.design_tokens;return(a.baseHeightMultiplier.$value+a.density.$value)*t.designUnit.$value-8},fe="ag-theme-genesis-rapid-dark",Ce="ag-theme-genesis-rapid-light";class ye extends i.cF{constructor(){super(...arguments),this.theme="light"===localStorage.getItem("luminance")?Ce:fe}connectedCallback(){super.connectedCallback(),s.baseLayerLuminance.subscribe({handleChange:e=>{const a=s.baseLayerLuminance.getValueFor(e.target);this.theme=a===s.StandardLuminance.DarkMode?fe:Ce}},this.provider)}themeChanged(e,a){(e||a===fe)&&super.themeChanged(e,a)}set gridOptions(e){var a,t,r,i,s;e.components=Object.assign({[o.IX.action]:R,[o.IX.actionsMenu]:x,[o.IX.boolean]:P,[o.IX.editable]:O,[o.IX.select]:F,[o.IX.selectEditor]:d,[o.IX.numberEditor]:h,[o.IX.multiselectEditor]:m,[o.IX.dateEditor]:f,[o.IX.stringEditor]:S,[o.IX.statusPill]:N},null!==(a=e.components)&&void 0!==a?a:{});(this.theme===V||this.theme===K||this.theme===W)&&(this.headerHeight=null!==(r=null!==(t=e.headerHeight)&&void 0!==t?t:be())&&void 0!==r?r:32,this.rowHeight=null!==(s=null!==(i=e.rowHeight)&&void 0!==i?i:be())&&void 0!==s?s:32),super.gridOptions=e}}(0,r.Cg)([n.observable],ye.prototype,"provider",void 0);const Se=i.LU,Ee=i.Z$,ke=ye.compose(Object.assign({baseName:"grid-pro",template:q,styles:Q,shadowOptions:Se},Ee));var Re=t(6884),Ae=t(21409),we=t(17190),xe=t(48046),De=t(98682),Ge=t(62051),Pe=t.n(Ge),Te=t(56943),Le=t(64315),Oe=t(63296),_e=t(24638),ze=t(18070),Fe=t(26062),Ie=t(90509),$e=t(79270),Ne=t(32610),Be=t(53397),He=t(52540),Me=t(49104),Ue=t(19060),Xe=t(88863),Ve=t(71964),Ye=t(73203),Ke=t(1510),je=t(23201);Fe.D,Oe.L,_e.X,Te.O,Le.G,xe.syG.registerModules([xe.n76,xe.Q90,xe.x6L,xe.YN8,xe.YzW,xe.Lt,xe.I95,xe.O4V,xe.H18,xe.mfG,xe.Iws,xe.nSw,xe.FUS,xe.Ss0,xe.tkg,xe.ZDV]);const We="gridReady";class Ze extends((0,Ae.S)(ae.FoundationElement)){rowDataChanged(e,a){this.initialised&&this.gridApi.setGridOption("rowData",a)}getfilterModel(){return(0,r.sH)(this,void 0,void 0,function*(){if(!this.persistFilterModelKey)return this._filterConfig;return yield this.statePersistence.getFilterModel(this.persistFilterModelKey)})}setFilterModel(e){return(0,r.sH)(this,void 0,void 0,function*(){this.persistFilterModelKey?yield this.statePersistence.saveFilterModel(this.persistFilterModelKey,e):this._filterConfig=e})}constructor(){super(),this.gridErrorItems=[],this.autoCellRendererByType=!1,this.onlyTemplateColDefs=!1,this.gridAutosizingEnabled=!1,this.enableCellFlashing=!1,this.enableRowFlashing=!1,this.columnComponentName="grid-pro-column",this.themeMode="dark",this.pagination=!1,this.statusBarConfig=o.o2,this.withStatusBar=!1,this.rehydrationAttempted=!1,this.rootEventsListeners=[],this.gridEventsQueue=[],this.registeredGridEvents=new Set,this._filterConfig=void 0;const e=this.hideDatasourceError.bind(this);this.rootEventsListeners.push([Ie.V.dataInit,e],[Ne.yY.datasourceErrorClose,e],[ze.L.error,this.handleBaseDatasourceError.bind(this)],[ze.L.connected,e])}addEventListener(e,a,t){super.addEventListener(e,a,t),this.gridApi?this.addGridEventListener(e):this.gridEventsQueue.includes(e)||this.gridEventsQueue.push(e)}addGridEventListener(e){this.registeredGridEvents.has(e)||(this.registeredGridEvents.add(e),this.gridApi.addEventListener(e,a=>{this.$emit(e,a)}))}handleError(e,a){this.gridErrorItems=[...this.gridErrorItems,{detail:a.detail,type:e}]}handleBaseDatasourceError(e){const a={detail:{message:e.detail.message},type:Ne.Ie.datasource};this.gridErrorItems=[...this.gridErrorItems,{detail:a.detail,type:a.type}]}hideDatasourceError(){this.gridErrorItems=this.gridErrorItems.filter(e=>e.type!==Ne.Ie.datasource),this.removeAttribute("ds-disconnected")}connectedCallback(){super.connectedCallback(),s.baseLayerLuminance.subscribe({handleChange:e=>{const a=s.baseLayerLuminance.getValueFor(e.target);this.themeMode=a===s.StandardLuminance.DarkMode?"dark":"light"}},this.provider),this.gridAutosizingEnabled&&(0,we.j)(this,e=>{e&&this.debouncedColumnAutosize.bind(this)()}),this.rehydrationAttempted=!1,this.shouldRunConnect&&(this.rootEventsListeners.forEach(([e,a])=>{this.addEventListener(e,a)}),this.toggleDatasourceEventListeners(!0),this.paginationPageSize=this.isServerSide?this.gridProDatasource.maxRows:Re.OD.DEFAULT_PAGINATION_PAGE_SIZE)}disconnectedCallback(){super.disconnectedCallback(),this.rehydrationAttempted=!1;const e=this.shouldRunDisconnect;this.rootEventsListeners.forEach(([e,a])=>{this.removeEventListener(e,a)}),this.toggleDatasourceEventListeners(!1),n.DOM.queueUpdate(()=>{var a;e&&(this.initialised=!1,null===(a=this.gridApi)||void 0===a||a.destroy(),this.registeredGridEvents.clear())})}toggleDatasourceEventListeners(e){const a=[[$e.c.initialize,this.handleInitialize],[$e.c.dataLoaded,this.handleDataLoaded],[$e.c.dataChanged,this.handleDataChanged],[$e.c.schemaUpdated,this.handleSchemaUpdated],[$e.c.dataCleared,this.handleDataCleared],[$e.c.loadingStarted,this.handleLoadingStarted],[$e.c.loadingFinished,this.handleLoadingFinished],[$e.c.noDataAvailable,this.handleNoDataAvailable],[$e.c.filtersRestored,this.handleFiltersRestored],[$e.c.moreDataAvailable,this.handleMoreDataAvailable],[$e.c.error,this.handleDatasourceError],[$e.c.destroy,this.handleDatasourceDestroy],[$e.c.cacheFilterConfig,this.cacheFilterConfig],[$e.c.refreshServerSide,this.handleRefreshServerSide],[$e.c.setServerSideDatasource,this.handleSetServerSideDatasource],[$e.c.addGridCssClass,this.handleAddGridCssClass],[$e.c.removeGridCssClass,this.handleRemoveGridCssClass],[$e.c.applyServerSideTransaction,this.handleApplyServerSideTransaction]],t=e?"addEventListener":"removeEventListener";a.forEach(([e,a])=>{this[t](e,a.bind(this))})}handleInitialize(e){const{options:a,keepColDefsOnClearRowData:t}=e.detail;t&&(this.columnState=this.gridApi.getColumnState()),this.gridOptions=Object.assign(Object.assign(Object.assign({},this.agGridOptions),a),t?{columnDefs:this.gridApi.getColumnDefs()}:{}),this.initGrid()}handleDataLoaded(e){const{data:a}=e.detail;this.gridApi&&this.gridApi.setGridOption("rowData",a)}handleDataChanged(e){const{changes:a}=e.detail;if(!this.gridApi)return;const t=this.gridApi.applyTransaction(a);this.flashAddedCells(null==t?void 0:t.add)}flashAddedCells(e){this.enableRowFlashing&&(null==e?void 0:e.length)&&this.gridApi.flashCells({rowNodes:e})}handleSchemaUpdated(e){return(0,r.sH)(this,void 0,void 0,function*(){const{schema:a}=e.detail;if(this.gridApi){const e=yield this.mergeAllColumnDefsAndStates(a,!0);this.gridApi.setGridOption("columnDefs",e)}})}handleDataCleared(e){const{includeSchema:a}=e.detail;this.gridApi&&(a&&this.gridApi.setGridOption("columnDefs",[]),this.gridApi.setGridOption("rowData",[]),this.gridApi.refreshCells({force:!0}))}handleLoadingStarted(){this.gridApi&&this.gridApi.setGridOption("loading",!0)}handleLoadingFinished(){this.gridApi&&(this.gridApi.setGridOption("loading",!1),this.gridApi.hideOverlay())}handleNoDataAvailable(){this.gridApi&&(this.gridApi.setGridOption("loading",!1),this.gridApi.showNoRowsOverlay())}handleFiltersRestored(){this.restoreCachedFilterConfig()}handleMoreDataAvailable(e){var a,t,r,i;const{hasMoreData:s,sourceRef:n}=e.detail;if(!this.gridApi)return;const g=null===(t=(a=this.gridApi).getStatusPanel)||void 0===t?void 0:t.call(a,o.k7.loadMore);g&&(null===(i=(r=g).updateParams)||void 0===i||i.call(r,{moreRows:s,sourceRef:n}))}handleDatasourceError(){this.setAttribute("ds-disconnected","ds-disconnected")}handleDatasourceDestroy(){this.clearLocalGridOptions()}handleRefreshServerSide(e){const{purge:a}=e.detail;this.gridApi&&this.gridApi.refreshServerSide({purge:a})}handleSetServerSideDatasource(e){const{datasource:a}=e.detail;this.gridApi&&this.gridApi.setGridOption("serverSideDatasource",a)}handleAddGridCssClass(e){var a;const{className:t}=e.detail,r=(null===(a=this.gridSlot)||void 0===a?void 0:a.parentElement)||this;r&&r.classList.add(t)}handleRemoveGridCssClass(e){var a;const{className:t}=e.detail,r=(null===(a=this.gridSlot)||void 0===a?void 0:a.parentElement)||this;r&&r.classList.remove(t)}handleApplyServerSideTransaction(e){const{transaction:a,async:t,callback:r}=e.detail;if(!this.gridApi)return;this.gridApi.applyServerSideTransaction(a)}combineAllGridComponents(e){const a={[o.IX.action]:k.eA,[o.IX.actionsMenu]:w.cN,[o.IX.boolean]:G._Y,[o.IX.editable]:L.YM,[o.IX.statusPill]:$.N7,[o.IX.select]:z.gs,[o.IX.selectEditor]:g._Q,[o.IX.numberEditor]:c.Z0,[o.IX.multiselectEditor]:u.pZ,[o.IX.dateEditor]:b.S8,[o.IX.stringEditor]:y.XJ,[o.k7.labelValue]:He.k,[o.k7.loadMore]:Me.s,[o.k7.pagination]:Ue.h,[o.k7.reload]:Xe.W,[o.k7.rowCount]:Ve.i};return Object.assign(Object.assign(Object.assign({},a),e),this.gridComponents)}statePersistanceEnabled(){return!(!this.persistColumnStateKey||0===this.persistColumnStateKey.length)}getSelectedRows(){var e,a,t,r;try{if(!this.initialised||!this.gridApi)return[];const i=null===(e=this.gridOptions)||void 0===e?void 0:e.rowSelection;if("single"===i||"multiple"===i)return this.gridApi.getSelectedRows&&this.gridApi.getSelectedRows().length>0?this.gridApi.getSelectedRows():[];if((null===(a=this.gridApi)||void 0===a?void 0:a.getCellRanges)&&this.gridApi.getCellRanges().length>0)return this.getCellRangeRowData();if(!(null===(t=this.gridOptions)||void 0===t?void 0:t.enableRangeSelection)){const e=null===(r=this.gridApi)||void 0===r?void 0:r.getFocusedCell();if(e){const a=this.gridApi.getDisplayedRowAtIndex(e.rowIndex);if(null==a?void 0:a.data)return[a.data]}}return[]}catch(e){return Ke.v.error("Grid Pro: Error getting selected rows:",e),[]}}getCellRangeRowData(){var e;if(!(null===(e=this.gridApi)||void 0===e?void 0:e.getCellRanges))return[];const a=this.gridApi.getCellRanges();if(0===a.length)return[];const t=[];return a.forEach(e=>{const a=e.startRow.rowIndex,r=e.endRow.rowIndex;for(let e=a;e<=r;e+=1){const a=this.gridApi.getDisplayedRowAtIndex(e);(null==a?void 0:a.data)&&!t.some(e=>e===a.data)&&t.push(a.data)}}),t}hasSelectedRows(){return this.getSelectedRows().length>0}updateLabelValueStatusBar(e){var a,t;if(!this.gridApi)return void Ke.v.warn("Grid Pro: Cannot update label-value status bar - grid API not available");const r=null===(t=(a=this.gridApi).getStatusPanel)||void 0===t?void 0:t.call(a,o.k7.labelValue);r&&"function"==typeof r.updateParams?r.updateParams(e):Ke.v.warn("Grid Pro: Label-value status bar component not found or updateParams method not available")}debouncedColumnAutosize(){this.gridAutosizingEnabled&&(this.debounced&&(clearTimeout(this.debounced),this.debounced=null),this.debounced=setTimeout(()=>{var e;null===(e=this.gridApi)||void 0===e||e.sizeColumnsToFit()},Ne.BW))}removeConfigWidthsToAutosize(e){return e.map(e=>Object.assign(Object.assign({},e),{width:null}))}saveColumnState(){return(0,r.sH)(this,void 0,void 0,function*(){if(this.rehydrationAttempted&&this.statePersistanceEnabled()){let e=this.gridApi.getColumnState();e=this.gridAutosizingEnabled?this.removeConfigWidthsToAutosize(e):e;const a=0===e.filter(e=>{if(e.hide)return!1;const a=this.gridApi.getColumn(e.colId);return Boolean(a.getColDef().headerName)}).length;if(0===e.length||JSON.stringify(e)===JSON.stringify(this.columnState)||a)return;yield this.statePersistence.saveColumnState(this.persistColumnStateKey,e),this.columnState=e}})}getSavedColumnState(){return(0,r.sH)(this,void 0,void 0,function*(){return this.columnState=[],this.statePersistanceEnabled()&&(this.columnState=yield this.statePersistence.getColumnState(this.persistColumnStateKey)),this.columnState})}restoreColumnState(){return(0,r.sH)(this,void 0,void 0,function*(){var e;this.rehydrationAttempted=!0;const a=yield this.getSavedColumnState();a&&a.length>0&&(null===(e=this.gridApi)||void 0===e||e.applyColumnState({state:a,applyOrder:!0}))})}cacheFilterConfig(){var e;this.setFilterModel((null===(e=this.gridApi)||void 0===e?void 0:e.getFilterModel())||void 0)}restoreCachedFilterConfig(){return(0,r.sH)(this,void 0,void 0,function*(){var e,a;const t=yield this.getfilterModel();void 0!==t&&(null===(e=this.gridApi)||void 0===e||e.setFilterModel(t),null===(a=this.gridApi)||void 0===a||a.onFilterChanged())})}get gridOptions(){return this.agGridOptions}get isServerSide(){return this.gridProDatasource instanceof _e.X}get gridParams(){return{globalListener:this.globalEventListener.bind(this)}}get gridProDatasource(){return this.querySelector("grid-pro-genesis-datasource")||this.querySelector("grid-pro-client-side-datasource")||this.querySelector("grid-pro-server-side-datasource")}set gridOptions(e){const a=Pe()(this.saveColumnState.bind(this),400),t=Pe()(this.cacheFilterConfig.bind(this),400),i=()=>{a(),this.debouncedColumnAutosize.bind(this)()},{columnDefs:s,components:n,defaultColDef:g,getRowId:d,onGridReady:l,onFilterChanged:c}=e,h=(0,r.Tt)(e,["columnDefs","components","defaultColDef","getRowId","onGridReady","onFilterChanged"]),p=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.gridOptionsConfig),{defaultColDef:Object.assign({enableCellChangeFlash:this.enableCellFlashing,filter:!0,resizable:!0,sortable:!0},g),components:this.combineAllGridComponents(n),headerHeight:this.headerHeight,rowHeight:this.rowHeight,animateRows:!1,suppressDragLeaveHidesColumns:!0}),this.eventsAndCallbacks),{onGridReady:e=>{var a,t,r;this.gridApi=e.api,this.gridEventsQueue.length&&this.gridEventsQueue.forEach(e=>{this.addGridEventListener(e)}),this.rowData&&this.gridApi.setGridOption("rowData",this.rowData),l&&l(e),(null===(a=this.gridProDatasource)||void 0===a?void 0:a.keepColDefsOnClearRowData)&&(null===(t=this.columnState)||void 0===t?void 0:t.length)>0&&this.gridApi.applyColumnState({state:this.columnState,applyOrder:!0}),this.$emit(We,{event:e,gridId:this.id}),this.$emit(o.mr,{event:e,gridId:this.id}),null===(r=this.gridProDatasource)||void 0===r||r.$emit($e.c.ready,{pagination:this.pagination}),this.restoreColumnState.bind(this)(),this.restoreCachedFilterConfig.bind(this)(),this.debouncedColumnAutosize.bind(this)()},onColumnPinned:i,onColumnResized:i,onColumnMoved:i,onDisplayedColumnsChanged:i,onFilterChanged:e=>{t(),c&&c(e)},onGridSizeChanged:i,onSortChanged:i}),h);this.gridProDatasource?(p.columnDefs=s,p.getRowId=d,this.setupPaginationAndStatusBar(p),this.setLocalGridOptions(p)):this.mergeAllColumnDefsAndStates(s).then(e=>{p.columnDefs=e,p.getRowId=d,this.setupPaginationAndStatusBar(p),this.setLocalGridOptions(p),this.initGrid()})}setLocalGridOptions(e){this.agGridOptions=Object.assign(Object.assign({},this.agGridOptions),e)}clearLocalGridOptions(){this.agGridOptions=void 0}initGrid(){n.DOM.queueUpdate(()=>{this.initialised&&this.gridSlot.firstChild&&this.gridSlot.removeChild(this.gridSlot.firstChild),this.agGrid=(0,xe.Dvw)(this.gridSlot,this.agGridOptions,this.gridParams),this.initialised=!0})}mergeAllColumnDefsAndStates(e){return(0,r.sH)(this,arguments,void 0,function*(e,a=!1){var t;const r=e||[];r.forEach(e=>{if(this.headerCaseType&&e.field&&!e.headerName){const a=De[this.headerCaseType];a?e.headerName=a(e.field):Ke.v.warn(`Invalid header-case-type attribute value: ${this.headerCaseType}. Please use one of the following: camelCase, capitalCase, dotCase, headerCase, noCase, paramCase, pascalCase, pathCase, sentenceCase, snakeCase.`)}});const i=Array.from(this.querySelectorAll(this.columnComponentName)).map(e=>e.definition).map(e=>{var a,t,i;this.enableCellFlashing&&void 0===e.enableCellChangeFlash&&(e.enableCellChangeFlash=!0),"agSetColumnFilter"===e.filter&&(e.filterParams=Object.assign(Object.assign({},e.filterParams),{values:(null===(a=e.filterParams)||void 0===a?void 0:a.values)||(null===(i=null===(t=r.find(a=>a.field===e.field))||void 0===t?void 0:t.filterParams)||void 0===i?void 0:i.values)})),e.editable&&(e.cellRenderer||e.cellRendererSelector||(e.cellRendererSelector=a=>{if(a.data[o.A7]===e.field)return{component:o.IX.editable}}),e.tooltipComponent||e.tooltipValueGetter||(e.tooltipComponent=Ye.y,e.tooltipValueGetter=a=>{const t=a.data[o.h1];if(t&&t.column===e.field)return t.message}),e.cellClassRules||(e.cellClassRules={error:e=>{var a;return(null===(a=e.data[o.h1])||void 0===a?void 0:a.column)===e.colDef.field}}));const s=r.find(a=>e.field===a.field);return Object.assign(Object.assign({},s),e)}),s=i.map(e=>e.field),n=[...i,...this.onlyTemplateColDefs?[]:r.filter(e=>!s.includes(e.field))];if(this.gridProDatasource&&a){const e=yield this.getSavedColumnState();if((null==e?void 0:e.length)>0)return(0,je.yS)(n,e);if((null===(t=this.gridProDatasource.deferredColumnStates)||void 0===t?void 0:t.length)>0)return(0,je.yS)(n,this.gridProDatasource.deferredColumnStates)}return n})}panelExists(e,a){return a.some(a=>a.statusPanel===e)}addRowCountPanel(e,a){if(this.statusBarConfig&&!0===this.statusBarConfig.rows){const t=this.isServerSide||"serverSide"===(null==a?void 0:a.rowModelType),r=this._pagination||!0===(null==a?void 0:a.pagination);if(t&&!r)this.panelExists(o.k7.rowCount,e)||e.push({statusPanel:o.k7.rowCount,align:"left"});else if(!t){const a="agTotalAndFilteredRowCountComponent";this.panelExists(a,e)||e.push({statusPanel:a,align:"left"})}}}addMaxRowsPanel(e){this.statusBarConfig&&!0===this.statusBarConfig.maxRows&&(this.panelExists(o.k7.labelValue,e)||e.push({statusPanel:o.k7.labelValue,statusPanelParams:{label:"Max Rows",value:this.gridProDatasource.maxRows||Re.OD.MAX_ROWS_250,hide:!1},align:"left"}))}addAggregationPanel(e){this.statusBarConfig&&!0===this.statusBarConfig.aggregation&&(this.panelExists("agAggregationComponent",e)||e.push({statusPanel:"agAggregationComponent",align:"right"}))}addDatasourcePanels(e){if(this.gridProDatasource){const a=this.gridProDatasource.getDatasourceStatusBarPanels(this.isServerSide,this.statusBarConfig).filter(a=>!this.panelExists(a.statusPanel,e));e.push(...a)}}addPaginationPanel(e){this._pagination&&(this.panelExists(o.k7.pagination,e)||e.push({statusPanel:o.k7.pagination,align:"right"}))}setupPaginationAndStatusBar(e){var a,t;if(this._pagination&&(e.pagination=!0,e.suppressScrollOnNewData=!0,e.paginationPageSize=this.paginationPageSize),this.withStatusBar&&this.statusBarConfig){const r=[...(null===(a=e.statusBar)||void 0===a?void 0:a.statusPanels)||[]];this.addRowCountPanel(r,e),this.addMaxRowsPanel(r),this.addAggregationPanel(r),this.addDatasourcePanels(r),this._pagination&&(e.suppressPaginationPanel=!0,this.addPaginationPanel(r));const i=((null===(t=e.statusBar)||void 0===t?void 0:t.statusPanels)||[]).filter(e=>!this.panelExists(e.statusPanel,r));r.push(...i),e.statusBar={statusPanels:r}}}globalEventListener(e,a){const t=e.toLowerCase(),r=new Event(t);r.agGridDetails=a,this.dispatchEvent(r);const i="on"+t;"function"==typeof this[i]&&this[i](r)}}(0,r.Cg)([n.observable],Ze.prototype,"gridApi",void 0),(0,r.Cg)([n.observable],Ze.prototype,"gridErrorItems",void 0),(0,r.Cg)([Be.l],Ze.prototype,"statePersistence",void 0),(0,r.Cg)([(0,n.attr)({attribute:"auto-cell-renderer-by-type",mode:"boolean"})],Ze.prototype,"autoCellRendererByType",void 0),(0,r.Cg)([(0,n.attr)({attribute:"only-template-col-defs",mode:"boolean"})],Ze.prototype,"onlyTemplateColDefs",void 0),(0,r.Cg)([(0,n.attr)({mode:"boolean",attribute:"grid-autosizing"})],Ze.prototype,"gridAutosizingEnabled",void 0),(0,r.Cg)([(0,n.attr)({mode:"boolean",attribute:"enable-cell-flashing"})],Ze.prototype,"enableCellFlashing",void 0),(0,r.Cg)([(0,n.attr)({mode:"boolean",attribute:"enable-row-flashing"})],Ze.prototype,"enableRowFlashing",void 0),(0,r.Cg)([(0,n.attr)({attribute:"persist-column-state-key"})],Ze.prototype,"persistColumnStateKey",void 0),(0,r.Cg)([(0,n.attr)({attribute:"persist-filter-model-key"})],Ze.prototype,"persistFilterModelKey",void 0),(0,r.Cg)([(0,n.attr)({attribute:"header-case-type"})],Ze.prototype,"headerCaseType",void 0),(0,r.Cg)([n.observable],Ze.prototype,"rowData",void 0),(0,r.Cg)([n.attr],Ze.prototype,"columnComponentName",void 0),(0,r.Cg)([n.observable],Ze.prototype,"eventsAndCallbacks",void 0),(0,r.Cg)([n.attr],Ze.prototype,"headerHeight",void 0),(0,r.Cg)([n.attr],Ze.prototype,"rowHeight",void 0),(0,r.Cg)([n.observable],Ze.prototype,"classNames",void 0),(0,r.Cg)([n.observable],Ze.prototype,"agGrid",void 0),(0,r.Cg)([n.observable],Ze.prototype,"gridSlot",void 0),(0,r.Cg)([n.observable],Ze.prototype,"themeMode",void 0),(0,r.Cg)([n.observable],Ze.prototype,"gridComponents",void 0),(0,r.Cg)([(0,n.attr)({mode:"boolean"})],Ze.prototype,"pagination",void 0),(0,r.Cg)([(0,n.attr)({attribute:"pagination-page-size"})],Ze.prototype,"paginationPageSize",void 0),(0,r.Cg)([n.observable],Ze.prototype,"statusBarConfig",void 0),(0,r.Cg)([(0,n.attr)({mode:"boolean",attribute:"with-status-bar"})],Ze.prototype,"withStatusBar",void 0),(0,r.Cg)([n.observable],Ze.prototype,"customErrorHandlerTemplate",void 0),(0,r.Cg)([o.lz],Ze.prototype,"gridOptionsConfig",void 0),(0,r.Cg)([n.observable],Ze.prototype,"provider",void 0);class Qe extends Ze{set gridOptions(e){var a,t,r,i,s;e.components=Object.assign({[o.IX.action]:R,[o.IX.actionsMenu]:x,[o.IX.boolean]:P,[o.IX.editable]:O,[o.IX.select]:F,[o.IX.selectEditor]:d,[o.IX.numberEditor]:h,[o.IX.multiselectEditor]:m,[o.IX.dateEditor]:f,[o.IX.stringEditor]:S,[o.IX.statusPill]:N},null!==(a=e.components)&&void 0!==a?a:{}),this.headerHeight=null!==(r=null!==(t=e.headerHeight)&&void 0!==t?t:be())&&void 0!==r?r:32,this.rowHeight=null!==(s=null!==(i=e.rowHeight)&&void 0!==i?i:be())&&void 0!==s?s:32,e.theme=xe.N8R.withParams({backgroundColor:"var(--neutral-layer-card-container)",cellHorizontalPadding:"calc(var(--design-unit) * 2px)",foregroundColor:"var(--neutral-foreground-rest)",headerTextColor:"var(--neutral-foreground-hint)",headerBackgroundColor:"var(--neutral-layer-3)",headerColumnBorder:"1px solid var(--neutral-stroke-rest)",oddRowBackgroundColor:"var(--neutral-layer-1)",rowBorder:"1px solid var(--neutral-stroke-divider-rest)",borderColor:"var(--neutral-stroke-rest)",wrapperBorder:"0",accentColor:"var(--accent-foreground-rest)",fontFamily:"var(--body-font)",sideBarBackgroundColor:"var(--neutral-layer-2)",dataFontSize:"var(--type-ramp-minus-2-font-size)",iconButtonColor:"var(--accent-foreground-rest)",iconButtonHoverColor:"color-mix(in srgb, var(--accent-foreground-rest), var(--ag-foreground-color) 30%)",rowHeight:this.rowHeight}),super.gridOptions=e}}(0,r.Cg)([n.observable],Qe.prototype,"provider",void 0);const Je=Qe.compose(Object.assign({baseName:"grid-pro",template:q,styles:n.css`
760
+ `;var J=t(82128);const q=(0,J.U)("rapid");var ee=t(51174),ae=t(84674),te=t(83912);const re="#cccccc",ie="#879ba6",oe="#1f2126",se="#2e3339",ne="#2b2e34",ge="#000000",de="#181d1f",le="#FFFFFF",ce="#babfc7",he="#2196f3",pe={foregroundSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(re)),headerForegroundSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(ie)),backgroundSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(oe)),borderSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(se)),rowHoverSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(ne))},ue={foregroundSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(ge)),headerForegroundSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(de)),backgroundSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(le)),borderSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(ce)),rowHoverSwatch:s.SwatchRGB.from((0,te.parseColorHexRGB)(he))},{create:me}=ae.DesignToken,ve={backgroundColor:me("rapid-ag-background-color").withDefault(e=>s.baseLayerLuminance.getValueFor(e)===s.StandardLuminance.LightMode?ue.backgroundSwatch:pe.backgroundSwatch),borderColor:me("rapid-ag-border-color").withDefault(e=>s.baseLayerLuminance.getValueFor(e)===s.StandardLuminance.LightMode?ue.borderSwatch:pe.borderSwatch),foregroundColor:me("rapid-ag-foreground-color").withDefault(e=>s.baseLayerLuminance.getValueFor(e)===s.StandardLuminance.LightMode?ue.foregroundSwatch:pe.foregroundSwatch),headerForegroundColor:me("rapid-ag-header-foreground-color").withDefault(e=>s.baseLayerLuminance.getValueFor(e)===s.StandardLuminance.LightMode?ue.headerForegroundSwatch:pe.headerForegroundSwatch),rowHoverColor:me("rapid-ag-row-hover-color").withDefault(e=>s.baseLayerLuminance.getValueFor(e)===s.StandardLuminance.LightMode?ue.rowHoverSwatch:pe.rowHoverSwatch)},be=()=>{const e=(0,ee.designTokensMap)();if(!e.value)return null;const{style:a,space:t}=e.value.design_tokens;return(a.baseHeightMultiplier.$value+a.density.$value)*t.designUnit.$value-8},fe="ag-theme-genesis-rapid-dark",Ce="ag-theme-genesis-rapid-light";class ye extends i.cF{constructor(){super(...arguments),this.theme="light"===localStorage.getItem("luminance")?Ce:fe}connectedCallback(){super.connectedCallback(),s.baseLayerLuminance.subscribe({handleChange:e=>{const a=s.baseLayerLuminance.getValueFor(e.target);this.theme=a===s.StandardLuminance.DarkMode?fe:Ce}},this.provider)}themeChanged(e,a){(e||a===fe)&&super.themeChanged(e,a)}set gridOptions(e){var a,t,r,i,s;e.components=Object.assign({[o.IX.action]:R,[o.IX.actionsMenu]:x,[o.IX.boolean]:P,[o.IX.editable]:O,[o.IX.select]:F,[o.IX.selectEditor]:d,[o.IX.numberEditor]:h,[o.IX.multiselectEditor]:m,[o.IX.dateEditor]:f,[o.IX.stringEditor]:S,[o.IX.statusPill]:N},null!==(a=e.components)&&void 0!==a?a:{});(this.theme===V||this.theme===K||this.theme===W)&&(this.headerHeight=null!==(r=null!==(t=e.headerHeight)&&void 0!==t?t:be())&&void 0!==r?r:32,this.rowHeight=null!==(s=null!==(i=e.rowHeight)&&void 0!==i?i:be())&&void 0!==s?s:32),super.gridOptions=e}}(0,r.Cg)([n.observable],ye.prototype,"provider",void 0);const Se=i.LU,Ee=i.Z$,ke=ye.compose(Object.assign({baseName:"grid-pro",template:q,styles:Q,shadowOptions:Se},Ee));var Re=t(6884),Ae=t(21409),we=t(17190),xe=t(48046),De=t(98682),Ge=t(62051),Pe=t.n(Ge),Te=t(56943),Le=t(64315),Oe=t(63296),_e=t(24638),ze=t(18070),Fe=t(26062),Ie=t(90509),$e=t(79270),Ne=t(32610),Be=t(53397),He=t(52540),Me=t(49104),Ue=t(19060),Xe=t(88863),Ve=t(71964),Ye=t(73203),Ke=t(1510),je=t(23201);Fe.D,Oe.L,_e.X,Te.O,Le.G,xe.syG.registerModules([xe.n76,xe.Q90,xe.x6L,xe.YN8,xe.YzW,xe.Lt,xe.I95,xe.O4V,xe.H18,xe.mfG,xe.Iws,xe.nSw,xe.FUS,xe.Ss0,xe.tkg,xe.ZDV]);const We="gridReady";class Ze extends((0,Ae.S)(ae.FoundationElement)){rowDataChanged(e,a){this.initialised&&this.gridApi.setGridOption("rowData",a)}getfilterModel(){return(0,r.sH)(this,void 0,void 0,function*(){if(!this.persistFilterModelKey)return this._filterConfig;return yield this.statePersistence.getFilterModel(this.persistFilterModelKey)})}setFilterModel(e){return(0,r.sH)(this,void 0,void 0,function*(){this.persistFilterModelKey?yield this.statePersistence.saveFilterModel(this.persistFilterModelKey,e):this._filterConfig=e})}constructor(){super(),this.gridErrorItems=[],this.autoCellRendererByType=!1,this.onlyTemplateColDefs=!1,this.gridAutosizingEnabled=!1,this.enableCellFlashing=!1,this.enableRowFlashing=!1,this.columnComponentName="grid-pro-column",this.themeMode="dark",this.pagination=!1,this.statusBarConfig=o.o2,this.withStatusBar=!1,this.rehydrationAttempted=!1,this.rootEventsListeners=[],this.gridEventsQueue=[],this.registeredGridEvents=new Set,this._filterConfig=void 0;const e=this.hideDatasourceError.bind(this);this.rootEventsListeners.push([Ie.V.dataInit,e],[Ne.yY.datasourceErrorClose,e],[ze.L.error,this.handleBaseDatasourceError.bind(this)],[ze.L.connected,e])}addEventListener(e,a,t){super.addEventListener(e,a,t),this.gridApi?this.addGridEventListener(e):this.gridEventsQueue.includes(e)||this.gridEventsQueue.push(e)}addGridEventListener(e){this.registeredGridEvents.has(e)||(this.registeredGridEvents.add(e),this.gridApi.addEventListener(e,a=>{this.$emit(e,a)}))}handleError(e,a){this.gridErrorItems=[...this.gridErrorItems,{detail:a.detail,type:e}]}handleBaseDatasourceError(e){const a={detail:{message:e.detail.message},type:Ne.Ie.datasource};this.gridErrorItems=[...this.gridErrorItems,{detail:a.detail,type:a.type}]}hideDatasourceError(){this.gridErrorItems=this.gridErrorItems.filter(e=>e.type!==Ne.Ie.datasource),this.removeAttribute("ds-disconnected")}connectedCallback(){super.connectedCallback(),s.baseLayerLuminance.subscribe({handleChange:e=>{const a=s.baseLayerLuminance.getValueFor(e.target);this.themeMode=a===s.StandardLuminance.DarkMode?"dark":"light"}},this.provider),this.gridAutosizingEnabled&&(0,we.j)(this,e=>{e&&this.debouncedColumnAutosize.bind(this)()}),this.rehydrationAttempted=!1,this.shouldRunConnect&&(this.rootEventsListeners.forEach(([e,a])=>{this.addEventListener(e,a)}),this.toggleDatasourceEventListeners(!0),this.paginationPageSize=this.isServerSide?this.gridProDatasource.maxRows:Re.OD.DEFAULT_PAGINATION_PAGE_SIZE)}disconnectedCallback(){super.disconnectedCallback(),this.rehydrationAttempted=!1;const e=this.shouldRunDisconnect;this.rootEventsListeners.forEach(([e,a])=>{this.removeEventListener(e,a)}),this.toggleDatasourceEventListeners(!1),n.DOM.queueUpdate(()=>{var a;e&&(this.initialised=!1,null===(a=this.gridApi)||void 0===a||a.destroy(),this.registeredGridEvents.clear())})}toggleDatasourceEventListeners(e){const a=[[$e.c.initialize,this.handleInitialize],[$e.c.dataLoaded,this.handleDataLoaded],[$e.c.dataChanged,this.handleDataChanged],[$e.c.schemaUpdated,this.handleSchemaUpdated],[$e.c.dataCleared,this.handleDataCleared],[$e.c.loadingStarted,this.handleLoadingStarted],[$e.c.loadingFinished,this.handleLoadingFinished],[$e.c.noDataAvailable,this.handleNoDataAvailable],[$e.c.filtersRestored,this.handleFiltersRestored],[$e.c.moreDataAvailable,this.handleMoreDataAvailable],[$e.c.error,this.handleDatasourceError],[$e.c.destroy,this.handleDatasourceDestroy],[$e.c.cacheFilterConfig,this.cacheFilterConfig],[$e.c.refreshServerSide,this.handleRefreshServerSide],[$e.c.setServerSideDatasource,this.handleSetServerSideDatasource],[$e.c.addGridCssClass,this.handleAddGridCssClass],[$e.c.removeGridCssClass,this.handleRemoveGridCssClass],[$e.c.applyServerSideTransaction,this.handleApplyServerSideTransaction]],t=e?"addEventListener":"removeEventListener";a.forEach(([e,a])=>{this[t](e,a.bind(this))})}handleInitialize(e){const{options:a,keepColDefsOnClearRowData:t}=e.detail;t&&(this.columnState=this.gridApi.getColumnState()),this.gridOptions=Object.assign(Object.assign(Object.assign({},this.agGridOptions),a),t?{columnDefs:this.gridApi.getColumnDefs()}:{}),this.initGrid()}handleDataLoaded(e){const{data:a}=e.detail;this.gridApi&&this.gridApi.setGridOption("rowData",a)}handleDataChanged(e){const{changes:a}=e.detail;if(!this.gridApi)return;const t=this.gridApi.applyTransaction(a);this.flashAddedCells(null==t?void 0:t.add)}flashAddedCells(e){this.enableRowFlashing&&(null==e?void 0:e.length)&&this.gridApi.flashCells({rowNodes:e})}handleSchemaUpdated(e){return(0,r.sH)(this,void 0,void 0,function*(){const{schema:a}=e.detail;if(this.gridApi.isModuleRegistered("MultiFilterModule")||a.forEach(e=>{"agMultiColumnFilter"===e.filter&&(e.filter="agTextColumnFilter")}),this.gridApi){const e=yield this.mergeAllColumnDefsAndStates(a,!0);this.gridApi.setGridOption("columnDefs",e)}})}handleDataCleared(e){const{includeSchema:a}=e.detail;this.gridApi&&(a&&this.gridApi.setGridOption("columnDefs",[]),this.gridApi.setGridOption("rowData",[]),this.gridApi.refreshCells({force:!0}))}handleLoadingStarted(){this.gridApi&&this.gridApi.setGridOption("loading",!0)}handleLoadingFinished(){this.gridApi&&(this.gridApi.setGridOption("loading",!1),this.gridApi.hideOverlay())}handleNoDataAvailable(){this.gridApi&&(this.gridApi.setGridOption("loading",!1),this.gridApi.showNoRowsOverlay())}handleFiltersRestored(){this.restoreCachedFilterConfig()}handleMoreDataAvailable(e){var a,t,r,i;const{hasMoreData:s,sourceRef:n}=e.detail;if(!this.gridApi)return;const g=null===(t=(a=this.gridApi).getStatusPanel)||void 0===t?void 0:t.call(a,o.k7.loadMore);g&&(null===(i=(r=g).updateParams)||void 0===i||i.call(r,{moreRows:s,sourceRef:n}))}handleDatasourceError(){this.setAttribute("ds-disconnected","ds-disconnected")}handleDatasourceDestroy(){this.clearLocalGridOptions()}handleRefreshServerSide(e){const{purge:a}=e.detail;this.gridApi&&this.gridApi.refreshServerSide({purge:a})}handleSetServerSideDatasource(e){const{datasource:a}=e.detail;this.gridApi&&this.gridApi.setGridOption("serverSideDatasource",a)}handleAddGridCssClass(e){var a;const{className:t}=e.detail,r=(null===(a=this.gridSlot)||void 0===a?void 0:a.parentElement)||this;r&&r.classList.add(t)}handleRemoveGridCssClass(e){var a;const{className:t}=e.detail,r=(null===(a=this.gridSlot)||void 0===a?void 0:a.parentElement)||this;r&&r.classList.remove(t)}handleApplyServerSideTransaction(e){const{transaction:a,async:t,callback:r}=e.detail;if(!this.gridApi)return;this.gridApi.applyServerSideTransaction(a)}combineAllGridComponents(e){const a={[o.IX.action]:k.eA,[o.IX.actionsMenu]:w.cN,[o.IX.boolean]:G._Y,[o.IX.editable]:L.YM,[o.IX.statusPill]:$.N7,[o.IX.select]:z.gs,[o.IX.selectEditor]:g._Q,[o.IX.numberEditor]:c.Z0,[o.IX.multiselectEditor]:u.pZ,[o.IX.dateEditor]:b.S8,[o.IX.stringEditor]:y.XJ,[o.k7.labelValue]:He.k,[o.k7.loadMore]:Me.s,[o.k7.pagination]:Ue.h,[o.k7.reload]:Xe.W,[o.k7.rowCount]:Ve.i};return Object.assign(Object.assign(Object.assign({},a),e),this.gridComponents)}statePersistanceEnabled(){return!(!this.persistColumnStateKey||0===this.persistColumnStateKey.length)}getSelectedRows(){var e,a,t,r;try{if(!this.initialised||!this.gridApi)return[];const i=null===(e=this.gridOptions)||void 0===e?void 0:e.rowSelection;if("single"===i||"multiple"===i)return this.gridApi.getSelectedRows&&this.gridApi.getSelectedRows().length>0?this.gridApi.getSelectedRows():[];if((null===(a=this.gridApi)||void 0===a?void 0:a.getCellRanges)&&this.gridApi.getCellRanges().length>0)return this.getCellRangeRowData();if(!(null===(t=this.gridOptions)||void 0===t?void 0:t.enableRangeSelection)){const e=null===(r=this.gridApi)||void 0===r?void 0:r.getFocusedCell();if(e){const a=this.gridApi.getDisplayedRowAtIndex(e.rowIndex);if(null==a?void 0:a.data)return[a.data]}}return[]}catch(e){return Ke.v.error("Grid Pro: Error getting selected rows:",e),[]}}getCellRangeRowData(){var e;if(!(null===(e=this.gridApi)||void 0===e?void 0:e.getCellRanges))return[];const a=this.gridApi.getCellRanges();if(0===a.length)return[];const t=[];return a.forEach(e=>{const a=e.startRow.rowIndex,r=e.endRow.rowIndex;for(let e=a;e<=r;e+=1){const a=this.gridApi.getDisplayedRowAtIndex(e);(null==a?void 0:a.data)&&!t.some(e=>e===a.data)&&t.push(a.data)}}),t}hasSelectedRows(){return this.getSelectedRows().length>0}updateLabelValueStatusBar(e){var a,t;if(!this.gridApi)return void Ke.v.warn("Grid Pro: Cannot update label-value status bar - grid API not available");const r=null===(t=(a=this.gridApi).getStatusPanel)||void 0===t?void 0:t.call(a,o.k7.labelValue);r&&"function"==typeof r.updateParams?r.updateParams(e):Ke.v.warn("Grid Pro: Label-value status bar component not found or updateParams method not available")}debouncedColumnAutosize(){this.gridAutosizingEnabled&&(this.debounced&&(clearTimeout(this.debounced),this.debounced=null),this.debounced=setTimeout(()=>{var e;null===(e=this.gridApi)||void 0===e||e.sizeColumnsToFit()},Ne.BW))}removeConfigWidthsToAutosize(e){return e.map(e=>Object.assign(Object.assign({},e),{width:null}))}saveColumnState(){return(0,r.sH)(this,void 0,void 0,function*(){if(this.rehydrationAttempted&&this.statePersistanceEnabled()){let e=this.gridApi.getColumnState();e=this.gridAutosizingEnabled?this.removeConfigWidthsToAutosize(e):e;const a=0===e.filter(e=>{if(e.hide)return!1;const a=this.gridApi.getColumn(e.colId);return Boolean(a.getColDef().headerName)}).length;if(0===e.length||JSON.stringify(e)===JSON.stringify(this.columnState)||a)return;yield this.statePersistence.saveColumnState(this.persistColumnStateKey,e),this.columnState=e}})}getSavedColumnState(){return(0,r.sH)(this,void 0,void 0,function*(){return this.columnState=[],this.statePersistanceEnabled()&&(this.columnState=yield this.statePersistence.getColumnState(this.persistColumnStateKey)),this.columnState})}restoreColumnState(){return(0,r.sH)(this,void 0,void 0,function*(){var e;this.rehydrationAttempted=!0;const a=yield this.getSavedColumnState();a&&a.length>0&&(null===(e=this.gridApi)||void 0===e||e.applyColumnState({state:a,applyOrder:!0}))})}cacheFilterConfig(){var e;this.setFilterModel((null===(e=this.gridApi)||void 0===e?void 0:e.getFilterModel())||void 0)}restoreCachedFilterConfig(){return(0,r.sH)(this,void 0,void 0,function*(){var e,a;const t=yield this.getfilterModel();void 0!==t&&(null===(e=this.gridApi)||void 0===e||e.setFilterModel(t),null===(a=this.gridApi)||void 0===a||a.onFilterChanged())})}get gridOptions(){return this.agGridOptions}get isServerSide(){return this.gridProDatasource instanceof _e.X}get gridParams(){return{globalListener:this.globalEventListener.bind(this)}}get gridProDatasource(){return this.querySelector("grid-pro-genesis-datasource")||this.querySelector("grid-pro-client-side-datasource")||this.querySelector("grid-pro-server-side-datasource")}set gridOptions(e){const a=Pe()(this.saveColumnState.bind(this),400),t=Pe()(this.cacheFilterConfig.bind(this),400),i=()=>{a(),this.debouncedColumnAutosize.bind(this)()},{columnDefs:s,components:n,defaultColDef:g,getRowId:d,onGridReady:l,onFilterChanged:c}=e,h=(0,r.Tt)(e,["columnDefs","components","defaultColDef","getRowId","onGridReady","onFilterChanged"]),p=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.gridOptionsConfig),{defaultColDef:Object.assign({enableCellChangeFlash:this.enableCellFlashing,filter:!0,resizable:!0,sortable:!0},g),components:this.combineAllGridComponents(n),headerHeight:this.headerHeight,rowHeight:this.rowHeight,animateRows:!1,suppressDragLeaveHidesColumns:!0}),this.eventsAndCallbacks),{onGridReady:e=>{var a,t,r;this.gridApi=e.api,this.gridEventsQueue.length&&this.gridEventsQueue.forEach(e=>{this.addGridEventListener(e)}),this.rowData&&this.gridApi.setGridOption("rowData",this.rowData),l&&l(e),(null===(a=this.gridProDatasource)||void 0===a?void 0:a.keepColDefsOnClearRowData)&&(null===(t=this.columnState)||void 0===t?void 0:t.length)>0&&this.gridApi.applyColumnState({state:this.columnState,applyOrder:!0}),this.$emit(We,{event:e,gridId:this.id}),this.$emit(o.mr,{event:e,gridId:this.id}),null===(r=this.gridProDatasource)||void 0===r||r.$emit($e.c.ready,{pagination:this.pagination}),this.restoreColumnState.bind(this)(),this.restoreCachedFilterConfig.bind(this)(),this.debouncedColumnAutosize.bind(this)()},onColumnPinned:i,onColumnResized:i,onColumnMoved:i,onDisplayedColumnsChanged:i,onFilterChanged:e=>{t(),c&&c(e)},onGridSizeChanged:i,onSortChanged:i}),h);this.gridProDatasource?(p.columnDefs=s,p.getRowId=d,this.setupPaginationAndStatusBar(p),this.setLocalGridOptions(p)):this.mergeAllColumnDefsAndStates(s).then(e=>{p.columnDefs=e,p.getRowId=d,this.setupPaginationAndStatusBar(p),this.setLocalGridOptions(p),this.initGrid()})}setLocalGridOptions(e){this.agGridOptions=Object.assign(Object.assign({},this.agGridOptions),e)}clearLocalGridOptions(){this.agGridOptions=void 0}initGrid(){n.DOM.queueUpdate(()=>{this.initialised&&this.gridSlot.firstChild&&this.gridSlot.removeChild(this.gridSlot.firstChild),this.agGrid=(0,xe.Dvw)(this.gridSlot,this.agGridOptions,this.gridParams),this.initialised=!0})}mergeAllColumnDefsAndStates(e){return(0,r.sH)(this,arguments,void 0,function*(e,a=!1){var t;const r=e||[];r.forEach(e=>{if(this.headerCaseType&&e.field&&!e.headerName){const a=De[this.headerCaseType];a?e.headerName=a(e.field):Ke.v.warn(`Invalid header-case-type attribute value: ${this.headerCaseType}. Please use one of the following: camelCase, capitalCase, dotCase, headerCase, noCase, paramCase, pascalCase, pathCase, sentenceCase, snakeCase.`)}});const i=Array.from(this.querySelectorAll(this.columnComponentName)).map(e=>e.definition).map(e=>{var a,t,i;this.enableCellFlashing&&void 0===e.enableCellChangeFlash&&(e.enableCellChangeFlash=!0),"agSetColumnFilter"===e.filter&&(e.filterParams=Object.assign(Object.assign({},e.filterParams),{values:(null===(a=e.filterParams)||void 0===a?void 0:a.values)||(null===(i=null===(t=r.find(a=>a.field===e.field))||void 0===t?void 0:t.filterParams)||void 0===i?void 0:i.values)})),e.editable&&(e.cellRenderer||e.cellRendererSelector||(e.cellRendererSelector=a=>{if(a.data[o.A7]===e.field)return{component:o.IX.editable}}),e.tooltipComponent||e.tooltipValueGetter||(e.tooltipComponent=Ye.y,e.tooltipValueGetter=a=>{const t=a.data[o.h1];if(t&&t.column===e.field)return t.message}),e.cellClassRules||(e.cellClassRules={error:e=>{var a;return(null===(a=e.data[o.h1])||void 0===a?void 0:a.column)===e.colDef.field}}));const s=r.find(a=>e.field===a.field);return Object.assign(Object.assign({},s),e)}),s=i.map(e=>e.field),n=[...i,...this.onlyTemplateColDefs?[]:r.filter(e=>!s.includes(e.field))];if(this.gridProDatasource&&a){const e=yield this.getSavedColumnState();if((null==e?void 0:e.length)>0)return(0,je.yS)(n,e);if((null===(t=this.gridProDatasource.deferredColumnStates)||void 0===t?void 0:t.length)>0)return(0,je.yS)(n,this.gridProDatasource.deferredColumnStates)}return n})}panelExists(e,a){return a.some(a=>a.statusPanel===e)}addRowCountPanel(e,a){if(this.statusBarConfig&&!0===this.statusBarConfig.rows){const t=this.isServerSide||"serverSide"===(null==a?void 0:a.rowModelType),r=this._pagination||!0===(null==a?void 0:a.pagination);if(t&&!r)this.panelExists(o.k7.rowCount,e)||e.push({statusPanel:o.k7.rowCount,align:"left"});else if(!t){const a="agTotalAndFilteredRowCountComponent";this.panelExists(a,e)||e.push({statusPanel:a,align:"left"})}}}addMaxRowsPanel(e){this.statusBarConfig&&!0===this.statusBarConfig.maxRows&&(this.panelExists(o.k7.labelValue,e)||e.push({statusPanel:o.k7.labelValue,statusPanelParams:{label:"Max Rows",value:this.gridProDatasource.maxRows||Re.OD.MAX_ROWS_250,hide:!1},align:"left"}))}addAggregationPanel(e){this.statusBarConfig&&!0===this.statusBarConfig.aggregation&&(this.panelExists("agAggregationComponent",e)||e.push({statusPanel:"agAggregationComponent",align:"right"}))}addDatasourcePanels(e){if(this.gridProDatasource){const a=this.gridProDatasource.getDatasourceStatusBarPanels(this.isServerSide,this.statusBarConfig).filter(a=>!this.panelExists(a.statusPanel,e));e.push(...a)}}addPaginationPanel(e){this._pagination&&(this.panelExists(o.k7.pagination,e)||e.push({statusPanel:o.k7.pagination,align:"right"}))}setupPaginationAndStatusBar(e){var a,t;if(this._pagination&&(e.pagination=!0,e.suppressScrollOnNewData=!0,e.paginationPageSize=this.paginationPageSize),this.withStatusBar&&this.statusBarConfig){const r=[...(null===(a=e.statusBar)||void 0===a?void 0:a.statusPanels)||[]];this.addRowCountPanel(r,e),this.addMaxRowsPanel(r),this.addAggregationPanel(r),this.addDatasourcePanels(r),this._pagination&&(e.suppressPaginationPanel=!0,this.addPaginationPanel(r));const i=((null===(t=e.statusBar)||void 0===t?void 0:t.statusPanels)||[]).filter(e=>!this.panelExists(e.statusPanel,r));r.push(...i),e.statusBar={statusPanels:r}}}globalEventListener(e,a){const t=e.toLowerCase(),r=new Event(t);r.agGridDetails=a,this.dispatchEvent(r);const i="on"+t;"function"==typeof this[i]&&this[i](r)}}(0,r.Cg)([n.observable],Ze.prototype,"gridApi",void 0),(0,r.Cg)([n.observable],Ze.prototype,"gridErrorItems",void 0),(0,r.Cg)([Be.l],Ze.prototype,"statePersistence",void 0),(0,r.Cg)([(0,n.attr)({attribute:"auto-cell-renderer-by-type",mode:"boolean"})],Ze.prototype,"autoCellRendererByType",void 0),(0,r.Cg)([(0,n.attr)({attribute:"only-template-col-defs",mode:"boolean"})],Ze.prototype,"onlyTemplateColDefs",void 0),(0,r.Cg)([(0,n.attr)({mode:"boolean",attribute:"grid-autosizing"})],Ze.prototype,"gridAutosizingEnabled",void 0),(0,r.Cg)([(0,n.attr)({mode:"boolean",attribute:"enable-cell-flashing"})],Ze.prototype,"enableCellFlashing",void 0),(0,r.Cg)([(0,n.attr)({mode:"boolean",attribute:"enable-row-flashing"})],Ze.prototype,"enableRowFlashing",void 0),(0,r.Cg)([(0,n.attr)({attribute:"persist-column-state-key"})],Ze.prototype,"persistColumnStateKey",void 0),(0,r.Cg)([(0,n.attr)({attribute:"persist-filter-model-key"})],Ze.prototype,"persistFilterModelKey",void 0),(0,r.Cg)([(0,n.attr)({attribute:"header-case-type"})],Ze.prototype,"headerCaseType",void 0),(0,r.Cg)([n.observable],Ze.prototype,"rowData",void 0),(0,r.Cg)([n.attr],Ze.prototype,"columnComponentName",void 0),(0,r.Cg)([n.observable],Ze.prototype,"eventsAndCallbacks",void 0),(0,r.Cg)([n.attr],Ze.prototype,"headerHeight",void 0),(0,r.Cg)([n.attr],Ze.prototype,"rowHeight",void 0),(0,r.Cg)([n.observable],Ze.prototype,"classNames",void 0),(0,r.Cg)([n.observable],Ze.prototype,"agGrid",void 0),(0,r.Cg)([n.observable],Ze.prototype,"gridSlot",void 0),(0,r.Cg)([n.observable],Ze.prototype,"themeMode",void 0),(0,r.Cg)([n.observable],Ze.prototype,"gridComponents",void 0),(0,r.Cg)([(0,n.attr)({mode:"boolean"})],Ze.prototype,"pagination",void 0),(0,r.Cg)([(0,n.attr)({attribute:"pagination-page-size"})],Ze.prototype,"paginationPageSize",void 0),(0,r.Cg)([n.observable],Ze.prototype,"statusBarConfig",void 0),(0,r.Cg)([(0,n.attr)({mode:"boolean",attribute:"with-status-bar"})],Ze.prototype,"withStatusBar",void 0),(0,r.Cg)([n.observable],Ze.prototype,"customErrorHandlerTemplate",void 0),(0,r.Cg)([o.lz],Ze.prototype,"gridOptionsConfig",void 0),(0,r.Cg)([n.observable],Ze.prototype,"provider",void 0);class Qe extends Ze{set gridOptions(e){var a,t,r,i,s;e.components=Object.assign({[o.IX.action]:R,[o.IX.actionsMenu]:x,[o.IX.boolean]:P,[o.IX.editable]:O,[o.IX.select]:F,[o.IX.selectEditor]:d,[o.IX.numberEditor]:h,[o.IX.multiselectEditor]:m,[o.IX.dateEditor]:f,[o.IX.stringEditor]:S,[o.IX.statusPill]:N},null!==(a=e.components)&&void 0!==a?a:{}),this.headerHeight=null!==(r=null!==(t=e.headerHeight)&&void 0!==t?t:be())&&void 0!==r?r:32,this.rowHeight=null!==(s=null!==(i=e.rowHeight)&&void 0!==i?i:be())&&void 0!==s?s:32,e.theme=xe.N8R.withParams({backgroundColor:"var(--neutral-layer-card-container)",cellHorizontalPadding:"calc(var(--design-unit) * 2px)",foregroundColor:"var(--neutral-foreground-rest)",headerTextColor:"var(--neutral-foreground-hint)",headerBackgroundColor:"var(--neutral-layer-3)",headerColumnBorder:"1px solid var(--neutral-stroke-rest)",oddRowBackgroundColor:"var(--neutral-layer-1)",rowBorder:"1px solid var(--neutral-stroke-divider-rest)",borderColor:"var(--neutral-stroke-rest)",wrapperBorder:"0",accentColor:"var(--accent-foreground-rest)",fontFamily:"var(--body-font)",sideBarBackgroundColor:"var(--neutral-layer-2)",dataFontSize:"var(--type-ramp-minus-2-font-size)",iconButtonColor:"var(--accent-foreground-rest)",iconButtonHoverColor:"color-mix(in srgb, var(--accent-foreground-rest), var(--ag-foreground-color) 30%)",rowHeight:this.rowHeight}),super.gridOptions=e}}(0,r.Cg)([n.observable],Qe.prototype,"provider",void 0);const Je=Qe.compose(Object.assign({baseName:"grid-pro",template:q,styles:n.css`
761
761
  :host {
762
762
  width: 100%;
763
763
  height: 100%;
@@ -783,4 +783,4 @@
783
783
  </grid-pro-column>
784
784
  `)}
785
785
  `}var na=t(35610),ga=t(30335),da=t(49568);const la={foundationGridProActionRenderer:k._X,foundationGridProActionsMenuRenderer:w.su,foundationAgBooleanRenderer:G.fg,foundationAgTextRenderer:qe.G4,foundationAgTextFieldRenderer:ia.wG,foundationAgEditableRenderer:L.r8,foundationAgSelectRenderer:z.bE,foundationGridPro:i.RB,foundationSelectEditor:g.RU,foundationNumberEditor:c.CY,foundationDateEditor:b.vr,foundationMultiselectEditor:u.UH,foundationStringEditor:y.cb,foundationStatusPillRenderer:$.a1,StatusPillRenderer:$.N7,register(e,...a){if(e)for(const t in this)"register"!==t&&this[t]().register(e,...a)}};var ca=t(92277);const ha=/^(?:[A-Za-z0-9+/]{4})*?(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,pa=e=>{const a=e.split(":");let t,r;2===a.length?[t,r]=a:r=e;const i=(e=>{if(ha.test(e)){const a=atob(e),t=new Uint8Array(a.length);return[...a].forEach((e,r)=>{t[r]=a.charCodeAt(r)}),t.buffer}return e})(r);if("str"===t){return new TextDecoder("utf-8").decode(i)}return i},ua=e=>{const a=(e=>{if("string"==typeof e)return btoa(e);if(e instanceof ArrayBuffer){const a=new Uint8Array(e).reduce((e,a)=>e+String.fromCharCode(a),"");return btoa(a)}return""})(e);return"string"==typeof e?`str:${a}`:e instanceof ArrayBuffer?`bin:${a}`:""};var ma=t(26347);const va={account:"genesis",namespace:"default",authKey:"kv-default",authEmail:void 0},ba=ae.DI.createInterface();var fa,Ca;!function(e){e.REQ_KEY_VALUE_LIST="REQ_KEY_VALUE_LIST",e.REQ_KEY_VALUE_READ="REQ_KEY_VALUE_READ"}(fa||(fa={})),function(e){e.EVENT_KEY_VALUE_PUT="EVENT_KEY_VALUE_PUT",e.EVENT_KEY_VALUE_DELETE="EVENT_KEY_VALUE_DELETE"}(Ca||(Ca={}));let ya=class{constructor(e,a,t=va){this.connect=e,this.user=a,this.kvStorageConfig=t}delete(e){return(0,r.sH)(this,void 0,void 0,function*(){const a={DETAILS:{KEYS:e}},t=yield this.connect.commitEvent(Ca.EVENT_KEY_VALUE_DELETE,a);return!(!t||"EVENT_ACK"!==t.MESSAGE_TYPE)||{ERROR:t.ERROR,WARNING:t.WARNING}})}get(e){return(0,r.sH)(this,void 0,void 0,function*(){var a;const t={REQUEST:{USER_NAME:null!==(a=this.kvStorageConfig.authEmail)&&void 0!==a?a:this.user.userName,KEY:e}},r=yield this.connect.request(fa.REQ_KEY_VALUE_READ,t);if(r&&r.REPLY&&r.REPLY.length>0){const a=r.REPLY.map(e=>{const a=this.getDecodedValue(e.VALUE);return{kv:{key:e.KEY,value:a}}});return e?a[0]:a}return e?void 0:[]})}getDecodedValue(e){e.startsWith("str:")||e.startsWith("bin:")||(e=`str:${e}`);let a=pa(e);return"string"==typeof a&&a.startsWith("str:")&&(a=pa(a)),"string"==typeof a&&a.startsWith("bin:")&&(a=pa(a)),a}list(){return(0,r.sH)(this,void 0,void 0,function*(){var e;const a={REQUEST:{USER_NAME:null!==(e=this.kvStorageConfig.authEmail)&&void 0!==e?e:this.user.userName}},t=yield this.connect.request(fa.REQ_KEY_VALUE_LIST,a);if(t&&t.REPLY&&t.REPLY.length>0){return t.REPLY.map(e=>e.KEY)}return[]})}put(e){return(0,r.sH)(this,void 0,void 0,function*(){const a={DETAILS:{RECORDS:e.map(e=>({KEY:e.key,VALUE:e.base64?ua(e.value):e.value}))}},t=yield this.connect.commitEvent(Ca.EVENT_KEY_VALUE_PUT,a);return!(!t||"EVENT_ACK"!==t.MESSAGE_TYPE)||{ERROR:t.ERROR,WARNING:t.WARNING}})}};ya=(0,r.Cg)([(0,r.Qj)(0,ma.dm),(0,r.Qj)(1,ca.KJ),(0,r.Qj)(2,(0,ae.optional)(ba))],ya);const Sa=ae.DI.createInterface(e=>e.singleton(ya));var Ea=t(98316);class ka{getColumnState(e){return(0,r.sH)(this,void 0,void 0,function*(){var a;yield this.migrateLocalStorageToKVStorage(e);const t=yield this.kvStorage.get(e),r=t?null===(a=t.kv)||void 0===a?void 0:a.value:void 0;return r?JSON.parse(r):[]})}saveColumnState(e,a){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(a)}])})}deleteColumnState(e){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.delete([e])})}migrateLocalStorageToKVStorage(e){return(0,r.sH)(this,void 0,void 0,function*(){var a;const t=yield this.kvStorage.get(e);if(t&&(null===(a=t.kv)||void 0===a?void 0:a.value))return;const r=this.session.getLocalStorageItem("gridOptions"),i=r?JSON.parse(r)[e]:void 0;i&&(Ke.v.debug(`Columns state migration for key: ${e} from LocalStorage to KV Storage`),this.kvStorage.put([{key:e,value:i}]))})}getFilterModel(e){return(0,r.sH)(this,void 0,void 0,function*(){var a;const t=yield this.kvStorage.get(e),r=t?null===(a=t.kv)||void 0===a?void 0:a.value:void 0;return r?JSON.parse(r):{}})}saveFilterModel(e,a){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(a)}])})}}(0,r.Cg)([Sa],ka.prototype,"kvStorage",void 0),(0,r.Cg)([Ea.N],ka.prototype,"session",void 0);var Ra=t(11749);const Aa=s.SwatchRGB.from((0,te.parseColorHexRGB)("#4c4c4c")),wa=s.SwatchRGB.from((0,te.parseColorHexRGB)("#c01754")),{create:xa}=ae.DesignToken,Da={foregroundColor:xa("fui-ag-foreground-color").withDefault(wa),backgroundColor:xa("fui-ag-background-color").withDefault(Aa)};var Ga=t(68858),Pa=t(49874);const Ta={processCellCallback:e=>["+","=","-","@","\t","\n"].some(a=>String(e.value).startsWith(a))?`'${e.value}`:e.value};var La=t(50103)},41492:function(e){e.exports=function(){"use strict";var e="minute",a=/[+-]\d\d(?::?\d\d)?/g,t=/([+-]|\d\d)/g;return function(r,i,o){var s=i.prototype;o.utc=function(e){return new i({date:e,utc:!0,args:arguments})},s.utc=function(a){var t=o(this.toDate(),{locale:this.$L,utc:!0});return a?t.add(this.utcOffset(),e):t},s.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var n=s.parse;s.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),n.call(this,e)};var g=s.init;s.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else g.call(this)};var d=s.utcOffset;s.utcOffset=function(r,i){var o=this.$utils().u;if(o(r))return this.$u?0:o(this.$offset)?d.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(a);if(!r)return null;var i=(""+r[0]).match(t)||["-",0,0],o=i[0],s=60*+i[1]+ +i[2];return 0===s?0:"+"===o?s:-s}(r),null===r))return this;var s=Math.abs(r)<=16?60*r:r;if(0===s)return this.utc(i);var n=this.clone();if(i)return n.$offset=s,n.$u=!1,n;var g=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(n=this.local().add(s+g,e)).$offset=s,n.$x.$localOffset=g,n};var l=s.format;s.format=function(e){var a=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,a)},s.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var c=s.toDate;s.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var h=s.diff;s.diff=function(e,a,t){if(e&&this.$u===e.$u)return h.call(this,e,a,t);var r=this.local(),i=o(e).local();return h.call(r,i,a,t)}}}()},52556:(e,a,t)=>{"use strict";t.d(a,{W:()=>s});function r(e){return e.toLowerCase()}var i=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],o=/[^A-Z0-9]+/gi;function s(e,a){void 0===a&&(a={});for(var t=a.splitRegexp,s=void 0===t?i:t,g=a.stripRegexp,d=void 0===g?o:g,l=a.transform,c=void 0===l?r:l,h=a.delimiter,p=void 0===h?" ":h,u=n(n(e,s,"$1\0$2"),d,"\0"),m=0,v=u.length;"\0"===u.charAt(m);)m++;for(;"\0"===u.charAt(v-1);)v--;return u.slice(m,v).split("\0").map(c).join(p)}function n(e,a,t){return a instanceof RegExp?e.replace(a,t):a.reduce(function(e,a){return e.replace(a,t)},e)}},66309:(e,a,t)=>{"use strict";t.d(a,{D:()=>n,f:()=>s});var r=t(55823),i=t(52556),o=t(67194);function s(e){return(0,o.R)(e.toLowerCase())}function n(e,a){return void 0===a&&(a={}),(0,i.W)(e,(0,r.Cl)({delimiter:" ",transform:s},a))}},67194:(e,a,t)=>{"use strict";function r(e){return e.charAt(0).toUpperCase()+e.substr(1)}t.d(a,{R:()=>r})},98682:(e,a,t)=>{"use strict";t.r(a),t.d(a,{camelCase:()=>l,camelCaseTransform:()=>g,camelCaseTransformMerge:()=>d,capitalCase:()=>c.D,capitalCaseTransform:()=>c.f,constantCase:()=>p,dotCase:()=>u,headerCase:()=>m,noCase:()=>i.W,paramCase:()=>v,pascalCase:()=>n,pascalCaseTransform:()=>o,pascalCaseTransformMerge:()=>s,pathCase:()=>b,sentenceCase:()=>y,sentenceCaseTransform:()=>C,snakeCase:()=>S});var r=t(55823),i=t(52556);function o(e,a){var t=e.charAt(0),r=e.substr(1).toLowerCase();return a>0&&t>="0"&&t<="9"?"_"+t+r:""+t.toUpperCase()+r}function s(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function n(e,a){return void 0===a&&(a={}),(0,i.W)(e,(0,r.Cl)({delimiter:"",transform:o},a))}function g(e,a){return 0===a?e.toLowerCase():o(e,a)}function d(e,a){return 0===a?e.toLowerCase():s(e)}function l(e,a){return void 0===a&&(a={}),n(e,(0,r.Cl)({transform:g},a))}var c=t(66309);function h(e){return e.toUpperCase()}function p(e,a){return void 0===a&&(a={}),(0,i.W)(e,(0,r.Cl)({delimiter:"_",transform:h},a))}function u(e,a){return void 0===a&&(a={}),(0,i.W)(e,(0,r.Cl)({delimiter:"."},a))}function m(e,a){return void 0===a&&(a={}),(0,c.D)(e,(0,r.Cl)({delimiter:"-"},a))}function v(e,a){return void 0===a&&(a={}),u(e,(0,r.Cl)({delimiter:"-"},a))}function b(e,a){return void 0===a&&(a={}),u(e,(0,r.Cl)({delimiter:"/"},a))}var f=t(67194);function C(e,a){var t=e.toLowerCase();return 0===a?(0,f.R)(t):t}function y(e,a){return void 0===a&&(a={}),(0,i.W)(e,(0,r.Cl)({delimiter:" ",transform:C},a))}function S(e,a){return void 0===a&&(a={}),u(e,(0,r.Cl)({delimiter:"_"},a))}}}]);
786
- //# sourceMappingURL=75.1719bae1929bc324a0d5a6619ad3f0e8.js.map
786
+ //# sourceMappingURL=75.b22c1d8f0a5e1358b9d0c7e2e50d0e61.js.map