@genesislcap/design-system-configurator 15.50.0 → 15.50.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{100.100.d8a47e882fab4690e300.js → 277.277.e288b540d1e49d10a65d.js} +2 -2
- package/dist/277.a04c275664fe25f4a3a45fc9a9564613.js.map +1 -0
- package/dist/470.039ab766f5f6987015ac5ef16ed15f32.js.map +1 -0
- package/dist/{470.470.c742e59a2763d4c8936b.js → 470.470.971d1e011d9b19aeb8a3.js} +55 -55
- package/dist/947.2f75b6c4569cc61b6b2158c23e7e7c1e.js.map +1 -0
- package/dist/{947.947.b4ab82764c6c7aec6d67.js → 947.947.782f7b14cc8f9cef9595.js} +38 -38
- package/dist/966.5c5e6b2015b369f801658cc91153a3e8.js.map +1 -0
- package/dist/{966.966.c2009200a7eb6783653d.js → 966.966.2a5f383c83b3651c55cf.js} +368 -368
- package/dist/{designSystemConfigurator.f34396f016eeb5602ad0071336afe935.js.map → designSystemConfigurator.79becf745897eaaf2d396e557aefda95.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/{main.9163e96e4131b17cad87580b4661fe99.js.map → main.c53dbbe622fddf0cbabee3ceb3ead662.js.map} +1 -1
- package/dist/{main.9eff85b509e4e3242ec2.js → main.e3383572aa2b7053f895.js} +2 -2
- package/dist/remoteEntry.js +2 -2
- package/package.json +11 -11
- package/dist/100.bf63c3f6087a5374ff7e41a03ae914f7.js.map +0 -1
- package/dist/470.57cd512241563c5735da75cc1e6677a8.js.map +0 -1
- package/dist/947.8ab58ff587c80d1eee1e568032c17765.js.map +0 -1
- package/dist/966.95b00070047dd82fc3890c45595aa2cf.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[470],{41492(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(a,r,s){var o=r.prototype;s.utc=function(e){return new r({date:e,utc:!0,args:arguments})},o.utc=function(t){var i=s(this.toDate(),{locale:this.$L,utc:!0});return t?i.add(this.utcOffset(),e):i},o.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var n=o.parse;o.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),n.call(this,e)};var l=o.init;o.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 l.call(this)};var d=o.utcOffset;o.utcOffset=function(a,r){var s=this.$utils().u;if(s(a))return this.$u?0:s(this.$offset)?d.call(this):this.$offset;if("string"==typeof a&&(a=function(e){void 0===e&&(e="");var a=e.match(t);if(!a)return null;var r=(""+a[0]).match(i)||["-",0,0],s=r[0],o=60*+r[1]+ +r[2];return 0===o?0:"+"===s?o:-o}(a),null===a))return this;var o=Math.abs(a)<=16?60*a:a;if(0===o)return this.utc(r);var n=this.clone();if(r)return n.$offset=o,n.$u=!1,n;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(n=this.local().add(o+l,e)).$offset=o,n.$x.$localOffset=l,n};var g=o.format;o.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return g.call(this,t)},o.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var c=o.toDate;o.toDate=function(e){return"s"===e&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var h=o.diff;o.diff=function(e,t,i){if(e&&this.$u===e.$u)return h.call(this,e,t,i);var a=this.local(),r=s(e).local();return h.call(a,r,t,i)}}}()},71493(e,t,i){"use strict";i.r(t),i.d(t,{AG_BOOLEAN_PROPERTIES:()=>ce.ME,AG_NUMBER_PROPERTIES:()=>ce.LB,AG_PROPERTIES:()=>ce.zI,ActionRenderer:()=>w.eA,ActionsMenuRenderer:()=>R.cN,AgGridCSSVars:()=>pe.W3,AgGridTheme:()=>pe.mJ,AgTextFieldRenderer:()=>di.p8,AgTextRenderer:()=>Mt.t,BooleanRenderer:()=>E._Y,COLUMN_PICKER_SORT_DEFAULT:()=>hi.Xf,CellTemplate:()=>li.x,ColumnSelection:()=>B.X,ColumnTemplate:()=>gi.R,DARK_BACKGROUND_HEX:()=>yt,DARK_BORDER_HEX:()=>Ct,DARK_FOREGROUND_HEX:()=>ft,DARK_HEADER_FOREGROUND_HEX:()=>bt,DARK_ROW_HOVER_HEX:()=>St,DEBOUNCED_RESIZE_TIME:()=>ce.BW,DEFAULT_STATUS_BAR_CONFIG:()=>pe.o2,DISPLAY_NONE_CLASS:()=>Wt,DatasourceRowMatchTracker:()=>mi,DateEditor:()=>C.S8,EDITED_COLUMN_FIELD:()=>pe.A7,ERROR_COLUMN_FIELD:()=>pe.h1,EditableRenderer:()=>A.YM,EnumColumnFilter:()=>M,EnumColumnFloatingFilter:()=>N,ErrorTooltip:()=>Ce.y,GRID_PRO_COLUMN_DRAG_BRIDGE_CONTEXT_KEY:()=>z.nJ,GRID_READY_EVENT:()=>pe.mr,GenesisGridDatasourceElement:()=>ee.yu,GridOptionsConfig:()=>pe.lz,GridPro:()=>Ee,GridProBaseDatasource:()=>ee.ML,GridProCaseType:()=>pe.uA,GridProCell:()=>v.O,GridProClientSideDatasource:()=>V.L,GridProColumn:()=>x.G,GridProFilterTypes:()=>a,GridProGenesisDatasource:()=>ge.D,GridProInfiniteDatasource:()=>ne,GridProLegacy:()=>rt.Rz,GridProRendererTypes:()=>pe.IX,GridProServerSideDatasource:()=>U.X,GridProStatusBarTypes:()=>pe.k7,IconRenderer:()=>k.Jt,KVStorageStatePersistence:()=>$i,LIGHT_BACKGROUND_HEX:()=>Et,LIGHT_BORDER_HEX:()=>At,LIGHT_FOREGROUND_HEX:()=>wt,LIGHT_HEADER_FOREGROUND_HEX:()=>Rt,LIGHT_ROW_HOVER_HEX:()=>kt,LabelValueStatusBarComponent:()=>ve.k,LoadMoreStatusBarComponent:()=>fe.s,LocalStorageStatePersistence:()=>Ni.H,MulticolumnDropdown:()=>si,MultiselectEditor:()=>y.pZ,NumberEditor:()=>b.Z0,OperationType:()=>ee.S5,ROW_MATCH_ALERT_CELL_CLASS:()=>vi.mJ,ROW_MATCH_ALERT_CLASS:()=>vi.Xm,RapidAgActionRenderer:()=>Me,RapidAgActionsMenuRenderer:()=>$e,RapidAgSelectRenderer:()=>Ue,RapidAgTextRenderer:()=>_t,RapidBooleanRenderer:()=>Be,RapidColumnSelection:()=>Bt,RapidDateEditor:()=>Ie,RapidEditableRenderer:()=>ze,RapidGridPro:()=>it,RapidGridProLegacy:()=>Gt,RapidIconRenderer:()=>je,RapidMultiselectEditor:()=>Te,RapidNumberEditor:()=>Oe,RapidSelectEditor:()=>ke,RapidStatusPillRenderer:()=>Xe,RapidStringEditor:()=>Ge,ReloadStatusBarComponent:()=>be.W,RowCountStatusBarComponent:()=>ye.i,SelectEditor:()=>f._Q,SelectRenderer:()=>O.gs,StatePersistence:()=>me.l,StatusPillRenderer:()=>D.N7,StringEditor:()=>S.XJ,actionHeightMultiplier:()=>w.Fz,agActionRendererStyles:()=>w.AC,agBooleanRendererStyles:()=>E.CL,agDateEditorStyles:()=>C.kI,agDragGhostShadowDomStyles:()=>he.yK,agEditableRendererStyles:()=>A.Mx,agExternalStockStyles:()=>fi.Kp,agGridAlpineFontFace:()=>fi.KX,agGridBalhamFontFace:()=>fi.c_,agGridCSS:()=>fi.AT,agGridMaterialFontFace:()=>fi.Id,agHeadCSS:()=>fi.g4,agIconRendererStyles:()=>k.X5,agMultiselectEditorStyles:()=>y.$b,agNumberEditorStyles:()=>b.Fv,agSelectEditorStyles:()=>f.Uo,agSelectRendererStyles:()=>O.Ad,agStatusPillRendererStyles:()=>D.x2,agStringEditorStyles:()=>S.P_,agThemeAlpineNofontsCSS:()=>fi.lJ,agThemeBalhamNofontsCSS:()=>fi.HC,agThemeFontFaceMap:()=>fi.KE,agThemeFontsId:()=>pe.b7,agThemeGenesisRapid:()=>dt,agThemeGenesisRapidDark:()=>ct,agThemeGenesisRapidLight:()=>ut,agThemeGenesisRapidTokens:()=>Tt,agThemeMaterialCustomTokens:()=>Vi,agThemeMaterialNofontsCSS:()=>fi.DX,agThemeTokenMapCSS:()=>pe.Kb,agThemeTokenMapClassname:()=>pe.eL,applyVisibleOrder:()=>hi.fL,backgroundSwatch:()=>Bi,baseDatasourceEventNames:()=>le.L,bindAgColumnPickerDrag:()=>ui.W,columnSelectionStyles:()=>H.H,columnSelectionTemplate:()=>Nt.$,convertColDefToColumnState:()=>we.pr,convertColDefsToColumnStates:()=>we.rG,convertDateFilterToCriteria:()=>re.A0,convertFilterModelToCriteria:()=>re.P4,convertNumberFilterToCriteria:()=>re.X_,convertSetFilterToCriteria:()=>re.EC,convertTextFilterToCriteria:()=>re.zP,convertToKebabCase:()=>Se.w,copyAttributesToGridOptions:()=>ce.Qg,createEnumValueLabelFormatter:()=>I,createRowAlert:()=>ki,createRowMatchCellClassRules:()=>vi.Li,createRowMatchClassRules:()=>vi.PO,criteriaDelimiter:()=>ee.NC,criteriaJoin:()=>ee.W_,csvExportParams:()=>Xi,darkColors:()=>Dt,datasourceEventNames:()=>Z.c,dateTimeValueFormatter:()=>ce.XV,dateValueFormatter:()=>ce.sL,defaultAgGridFontFace:()=>fi.qh,defaultGridOptionsConfig:()=>pe.YO,defaultGridProConfig:()=>ce.Z$,defaultRowAlertColorPresets:()=>yi,defaultRowAlertPreferences:()=>wi,defaultRowAlertRatePresets:()=>Ci,defaultRowAlertScopePresets:()=>Si,deriveHeightsFromTokens:()=>Ft,dropdownWidthVar:()=>jt,errorHandlerDialogStyles:()=>de.B,extractErrorMessage:()=>Ui.P,foregroundSwatch:()=>Hi,formatDateExtra:()=>ce.mC,formatEnumFilterModelAsString:()=>L,foundationAgBooleanRenderer:()=>E.fg,foundationAgEditableRenderer:()=>A.r8,foundationAgSelectRenderer:()=>O.bE,foundationAgTextFieldRenderer:()=>di.wG,foundationAgTextRenderer:()=>Mt.G4,foundationColumnSelection:()=>B.E,foundationDateEditor:()=>C.vr,foundationGridComponents:()=>bi,foundationGridPro:()=>Ae,foundationGridProActionRenderer:()=>w._X,foundationGridProActionsMenuRenderer:()=>R.su,foundationGridProLegacy:()=>rt.MB,foundationGridProShadowOptions:()=>ce.LU,foundationGridProStyles:()=>he.XF,foundationIconRenderer:()=>k.qN,foundationMulticolumnDropdown:()=>oi,foundationMultiselectEditor:()=>y.UH,foundationNumberEditor:()=>b.CY,foundationSelectEditor:()=>f.RU,foundationStatusPillRenderer:()=>D.a1,foundationStringEditor:()=>S.cb,getActionsMenuDef:()=>R.Al,getAgBooleanRendererTemplate:()=>E.A9,getAgEditableRendererTemplate:()=>A.iP,getAvailableIndexFields:()=>Ki.P,getAvailableIndexes:()=>Ki.i,getColumnSelectionTemplate:()=>Nt.s,getColumnType:()=>ce.nh,getDateEditorTemplate:()=>C.m6,getEnumFilterParams:()=>ce.O7,getErrorHandlerDialogTemplate:()=>de.P,getGridProTemplate:()=>ue.U,getIconRendererTemplate:()=>k.V$,getMulticolumnDropdownTemplate:()=>ei,getMultiselectEditorTemplate:()=>y.tB,getNumberEditorTemplate:()=>b.r1,getPickerItems:()=>hi.dd,getSelectEditorTemplate:()=>f.iY,getSelectRendererTemplate:()=>O.qj,getStatusPillRendererTemplate:()=>D.T2,getStringEditorTemplate:()=>S.bZ,getTextFieldRendererTemplate:()=>di.tm,getTextRendererTemplate:()=>Mt.d6,gridProColumnDragBridgeModule:()=>z.JE,gridProColumnSelectionHostStyles:()=>H.M,gridProColumns:()=>T.T,gridProErrorNames:()=>ce.Ie,gridProEventNames:()=>ce.yY,gridProGenesisDatasourceEventNames:()=>Q.V,gridProTemplate:()=>ue.a,lightColors:()=>Ot,logger:()=>F.v,matchesRowCriteria:()=>pi.D,mergeAndDedupColDefWithColumnState:()=>we.yS,multicolumnDropdownStyles:()=>Jt,multicolumnDropdownTemplate:()=>ti,normalizeRowAlertPreferences:()=>Ri,optionsClass:()=>Yt,orderColumnsForPicker:()=>hi.l9,partitionPickerItems:()=>hi.do,rapidAgActionRenderer:()=>_e,rapidAgActionsMenuRenderer:()=>Ne,rapidAgBooleanRenderer:()=>He,rapidAgDateEditor:()=>Le,rapidAgEditableRenderer:()=>Ve,rapidAgMultiselectEditor:()=>Fe,rapidAgNumberEditor:()=>xe,rapidAgSelectEditor:()=>De,rapidAgSelectRenderer:()=>Ke,rapidAgStringEditor:()=>Pe,rapidAgTextRenderer:()=>$t,rapidColumnSelection:()=>Ht,rapidDefaultGridProConfig:()=>Je,rapidGridComponents:()=>zt,rapidGridPro:()=>at,rapidGridProLegacy:()=>Pt,rapidGridProShadowOptions:()=>We,rapidGridProStyles:()=>pt,rapidGridProTemplate:()=>Qe,rapidIconRenderer:()=>Ye,rapidMulticolumnDropdown:()=>ni,rapidStatusPillRenderer:()=>qe,reorderVisibleIds:()=>hi.K,resolveColumnDragBridge:()=>z.Gd,resolveColumnDragBridgeDirect:()=>z.Rl,resolveColumnDragBridgeFromApi:()=>z.Sb,resolveColumnPickerSort:()=>hi.TQ,resolveColumnsPickerApi:()=>ci.m,resolveVisibleColumnFields:()=>T.C,rowMatchAlertStyles:()=>he.em,sanitizeColumnState:()=>we.n7,syncColumnDragBridge:()=>z.lz,textFieldRendererStyles:()=>di.zS,textRendererStyles:()=>Mt.JN,themeGenesisRapid:()=>lt,themeGenesisRapidDark:()=>gt,themeGenesisRapidLight:()=>ht,toPickerItem:()=>hi.Hz,wasClickOutsideElement:()=>ai});var a,r=i(55823),s=i(6884),o=i(20633),n=i(21409),l=i(17190),d=i(54634),g=i(33681),c=i(38370),h=i(48046),u=i(88047),p=i(62051),m=i.n(p),v=i(56943),f=i(48075),b=i(48072),y=i(56182),C=i(49255),S=i(43352),w=i(67489),R=i(39604),E=i(60905),A=i(46255),k=i(2048),D=i(19511),O=i(80879),x=i(64315),T=i(14987),F=i(1510);!function(e){e.enumFilter="enumColumnFilter",e.enumFloatingFilter="enumColumnFloatingFilter"}(a||(a={}));function I(e){const t=null==e?void 0:e.valueFormatter,i=t?i=>String(t({value:i,api:null==e?void 0:e.api,colDef:null==e?void 0:e.colDef,column:null==e?void 0:e.column,context:null==e?void 0:e.context})):e=>(0,u.capitalCase)(e);return e=>null===e?"(Blanks)":i(e)}function L(e,t){return(null==e?void 0:e.values)?0===e.values.length?"(None)":`(${e.values.length}) ${e.values.map(t).join(", ")}`:""}const G="gp-enum-filter",P=g.css`
|
|
1
|
+
(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[470],{41492(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(a,r,s){var o=r.prototype;s.utc=function(e){return new r({date:e,utc:!0,args:arguments})},o.utc=function(t){var i=s(this.toDate(),{locale:this.$L,utc:!0});return t?i.add(this.utcOffset(),e):i},o.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var n=o.parse;o.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),n.call(this,e)};var l=o.init;o.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 l.call(this)};var d=o.utcOffset;o.utcOffset=function(a,r){var s=this.$utils().u;if(s(a))return this.$u?0:s(this.$offset)?d.call(this):this.$offset;if("string"==typeof a&&(a=function(e){void 0===e&&(e="");var a=e.match(t);if(!a)return null;var r=(""+a[0]).match(i)||["-",0,0],s=r[0],o=60*+r[1]+ +r[2];return 0===o?0:"+"===s?o:-o}(a),null===a))return this;var o=Math.abs(a)<=16?60*a:a;if(0===o)return this.utc(r);var n=this.clone();if(r)return n.$offset=o,n.$u=!1,n;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(n=this.local().add(o+l,e)).$offset=o,n.$x.$localOffset=l,n};var g=o.format;o.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return g.call(this,t)},o.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var c=o.toDate;o.toDate=function(e){return"s"===e&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var h=o.diff;o.diff=function(e,t,i){if(e&&this.$u===e.$u)return h.call(this,e,t,i);var a=this.local(),r=s(e).local();return h.call(a,r,t,i)}}}()},71493(e,t,i){"use strict";i.r(t),i.d(t,{AG_BOOLEAN_PROPERTIES:()=>he.ME,AG_NUMBER_PROPERTIES:()=>he.LB,AG_PROPERTIES:()=>he.zI,ActionRenderer:()=>R.eA,ActionsMenuRenderer:()=>w.cN,AgGridCSSVars:()=>me.W3,AgGridTheme:()=>me.mJ,AgTextFieldRenderer:()=>gi.p8,AgTextRenderer:()=>_t.t,BooleanRenderer:()=>E._Y,COLUMN_PICKER_SORT_DEFAULT:()=>ui.Xf,CellTemplate:()=>di.x,ColumnSelection:()=>B.X,ColumnTemplate:()=>ci.R,DARK_BACKGROUND_HEX:()=>Ct,DARK_BORDER_HEX:()=>St,DARK_FOREGROUND_HEX:()=>bt,DARK_HEADER_FOREGROUND_HEX:()=>yt,DARK_ROW_HOVER_HEX:()=>Rt,DEBOUNCED_RESIZE_TIME:()=>he.BW,DEFAULT_STATUS_BAR_CONFIG:()=>me.o2,DISPLAY_NONE_CLASS:()=>Jt,DatasourceRowMatchTracker:()=>vi,DateEditor:()=>C.S8,EDITED_COLUMN_FIELD:()=>me.A7,ERROR_COLUMN_FIELD:()=>me.h1,EditableRenderer:()=>A.YM,EnumColumnFilter:()=>M,EnumColumnFloatingFilter:()=>N,ErrorTooltip:()=>Se.y,GRID_PRO_COLUMN_DRAG_BRIDGE_CONTEXT_KEY:()=>z.nJ,GRID_READY_EVENT:()=>me.mr,GenesisGridDatasourceElement:()=>ee.yu,GridOptionsConfig:()=>me.lz,GridPro:()=>Ae,GridProBaseDatasource:()=>ee.ML,GridProCaseType:()=>me.uA,GridProCell:()=>v.O,GridProClientSideDatasource:()=>V.L,GridProColumn:()=>x.G,GridProFilterTypes:()=>a,GridProGenesisDatasource:()=>ce.D,GridProInfiniteDatasource:()=>le,GridProLegacy:()=>st.Rz,GridProRendererTypes:()=>me.IX,GridProServerSideDatasource:()=>U.X,GridProStatusBarTypes:()=>me.k7,IconRenderer:()=>k.Jt,KVStorageStatePersistence:()=>Ni,LIGHT_BACKGROUND_HEX:()=>At,LIGHT_BORDER_HEX:()=>kt,LIGHT_FOREGROUND_HEX:()=>wt,LIGHT_HEADER_FOREGROUND_HEX:()=>Et,LIGHT_ROW_HOVER_HEX:()=>Dt,LabelValueStatusBarComponent:()=>fe.k,LoadMoreStatusBarComponent:()=>be.s,LocalStorageStatePersistence:()=>Bi.H,MulticolumnDropdown:()=>oi,MultiselectEditor:()=>y.pZ,NumberEditor:()=>b.Z0,OperationType:()=>ee.S5,ROW_MATCH_ALERT_CELL_CLASS:()=>fi.mJ,ROW_MATCH_ALERT_CLASS:()=>fi.Xm,RapidAgActionRenderer:()=>_e,RapidAgActionsMenuRenderer:()=>Ne,RapidAgSelectRenderer:()=>Ke,RapidAgTextRenderer:()=>$t,RapidBooleanRenderer:()=>He,RapidColumnSelection:()=>Ht,RapidDateEditor:()=>Le,RapidEditableRenderer:()=>Ve,RapidGridPro:()=>at,RapidGridProLegacy:()=>Pt,RapidIconRenderer:()=>Ye,RapidMultiselectEditor:()=>Fe,RapidNumberEditor:()=>xe,RapidSelectEditor:()=>De,RapidStatusPillRenderer:()=>je,RapidStringEditor:()=>Pe,ReloadStatusBarComponent:()=>ye.W,RowCountStatusBarComponent:()=>Ce.i,SelectEditor:()=>f._Q,SelectRenderer:()=>O.gs,StatePersistence:()=>ve.l,StatusPillRenderer:()=>D.N7,StringEditor:()=>S.XJ,actionHeightMultiplier:()=>R.Fz,agActionRendererStyles:()=>R.AC,agBooleanRendererStyles:()=>E.CL,agDateEditorStyles:()=>C.kI,agDragGhostShadowDomStyles:()=>ue.yK,agEditableRendererStyles:()=>A.Mx,agExternalStockStyles:()=>bi.Kp,agGridAlpineFontFace:()=>bi.KX,agGridBalhamFontFace:()=>bi.c_,agGridCSS:()=>bi.AT,agGridMaterialFontFace:()=>bi.Id,agHeadCSS:()=>bi.g4,agIconRendererStyles:()=>k.X5,agMultiselectEditorStyles:()=>y.$b,agNumberEditorStyles:()=>b.Fv,agSelectEditorStyles:()=>f.Uo,agSelectRendererStyles:()=>O.Ad,agStatusPillRendererStyles:()=>D.x2,agStringEditorStyles:()=>S.P_,agThemeAlpineNofontsCSS:()=>bi.lJ,agThemeBalhamNofontsCSS:()=>bi.HC,agThemeFontFaceMap:()=>bi.KE,agThemeFontsId:()=>me.b7,agThemeGenesisRapid:()=>gt,agThemeGenesisRapidDark:()=>ht,agThemeGenesisRapidLight:()=>pt,agThemeGenesisRapidTokens:()=>Ft,agThemeMaterialCustomTokens:()=>Ui,agThemeMaterialNofontsCSS:()=>bi.DX,agThemeTokenMapCSS:()=>me.Kb,agThemeTokenMapClassname:()=>me.eL,applyVisibleOrder:()=>ui.fL,backgroundSwatch:()=>Hi,baseDatasourceEventNames:()=>de.L,bindAgColumnPickerDrag:()=>pi.W,columnSelectionStyles:()=>H.H,columnSelectionTemplate:()=>Bt.$,convertColDefToColumnState:()=>we.pr,convertColDefsToColumnStates:()=>we.rG,convertDateFilterToCriteria:()=>se.A0,convertFilterModelToCriteria:()=>se.P4,convertNumberFilterToCriteria:()=>se.X_,convertSetFilterToCriteria:()=>se.EC,convertTextFilterToCriteria:()=>se.zP,convertToKebabCase:()=>Re.w,copyAttributesToGridOptions:()=>he.Qg,createEnumValueLabelFormatter:()=>I,createRowAlert:()=>Di,createRowMatchCellClassRules:()=>fi.Li,createRowMatchClassRules:()=>fi.PO,criteriaDelimiter:()=>ee.NC,criteriaJoin:()=>ee.W_,csvExportParams:()=>ji,darkColors:()=>Ot,datasourceEventNames:()=>Z.c,dateTimeValueFormatter:()=>he.XV,dateValueFormatter:()=>he.sL,defaultAgGridFontFace:()=>bi.qh,defaultGridOptionsConfig:()=>me.YO,defaultGridProConfig:()=>he.Z$,defaultRowAlertColorPresets:()=>Ci,defaultRowAlertPreferences:()=>wi,defaultRowAlertRatePresets:()=>Si,defaultRowAlertScopePresets:()=>Ri,deriveHeightsFromTokens:()=>It,dropdownWidthVar:()=>Yt,errorHandlerDialogStyles:()=>ge.B,extractErrorMessage:()=>Ki.P,foregroundSwatch:()=>zi,formatDateExtra:()=>he.mC,formatEnumFilterModelAsString:()=>L,foundationAgBooleanRenderer:()=>E.fg,foundationAgEditableRenderer:()=>A.r8,foundationAgSelectRenderer:()=>O.bE,foundationAgTextFieldRenderer:()=>gi.wG,foundationAgTextRenderer:()=>_t.G4,foundationColumnSelection:()=>B.E,foundationDateEditor:()=>C.vr,foundationGridComponents:()=>yi,foundationGridPro:()=>ke,foundationGridProActionRenderer:()=>R._X,foundationGridProActionsMenuRenderer:()=>w.su,foundationGridProLegacy:()=>st.MB,foundationGridProShadowOptions:()=>he.LU,foundationGridProStyles:()=>ue.XF,foundationIconRenderer:()=>k.qN,foundationMulticolumnDropdown:()=>ni,foundationMultiselectEditor:()=>y.UH,foundationNumberEditor:()=>b.CY,foundationSelectEditor:()=>f.RU,foundationStatusPillRenderer:()=>D.a1,foundationStringEditor:()=>S.cb,getActionsMenuDef:()=>w.Al,getAgBooleanRendererTemplate:()=>E.A9,getAgEditableRendererTemplate:()=>A.iP,getAvailableIndexFields:()=>Xi.P,getAvailableIndexes:()=>Xi.i,getColumnSelectionTemplate:()=>Bt.s,getColumnType:()=>he.nh,getDateEditorTemplate:()=>C.m6,getEnumFilterParams:()=>he.O7,getErrorHandlerDialogTemplate:()=>ge.P,getGridProTemplate:()=>pe.U,getIconRendererTemplate:()=>k.V$,getMulticolumnDropdownTemplate:()=>ti,getMultiselectEditorTemplate:()=>y.tB,getNumberEditorTemplate:()=>b.r1,getPickerItems:()=>ui.dd,getSelectEditorTemplate:()=>f.iY,getSelectRendererTemplate:()=>O.qj,getStatusPillRendererTemplate:()=>D.T2,getStringEditorTemplate:()=>S.bZ,getTextFieldRendererTemplate:()=>gi.tm,getTextRendererTemplate:()=>_t.d6,gridProColumnDragBridgeModule:()=>z.JE,gridProColumnSelectionHostStyles:()=>H.M,gridProColumns:()=>T.T,gridProErrorNames:()=>he.Ie,gridProEventNames:()=>he.yY,gridProGenesisDatasourceEventNames:()=>Q.V,gridProTemplate:()=>pe.a,lightColors:()=>xt,logger:()=>F.v,matchesRowCriteria:()=>mi.D,mergeAndDedupColDefWithColumnState:()=>we.yS,multicolumnDropdownStyles:()=>Qt,multicolumnDropdownTemplate:()=>ii,normalizeRowAlertPreferences:()=>Ei,optionsClass:()=>Wt,orderColumnsForPicker:()=>ui.l9,partitionPickerItems:()=>ui.do,rapidAgActionRenderer:()=>$e,rapidAgActionsMenuRenderer:()=>Be,rapidAgBooleanRenderer:()=>ze,rapidAgDateEditor:()=>Ge,rapidAgEditableRenderer:()=>Ue,rapidAgMultiselectEditor:()=>Ie,rapidAgNumberEditor:()=>Te,rapidAgSelectEditor:()=>Oe,rapidAgSelectRenderer:()=>Xe,rapidAgStringEditor:()=>Me,rapidAgTextRenderer:()=>Nt,rapidColumnSelection:()=>zt,rapidDefaultGridProConfig:()=>Qe,rapidGridComponents:()=>Vt,rapidGridPro:()=>rt,rapidGridProLegacy:()=>Mt,rapidGridProShadowOptions:()=>Je,rapidGridProStyles:()=>mt,rapidGridProTemplate:()=>Ze,rapidIconRenderer:()=>We,rapidMulticolumnDropdown:()=>li,rapidStatusPillRenderer:()=>qe,reorderVisibleIds:()=>ui.K,resolveColumnDragBridge:()=>z.Gd,resolveColumnDragBridgeDirect:()=>z.Rl,resolveColumnDragBridgeFromApi:()=>z.Sb,resolveColumnPickerSort:()=>ui.TQ,resolveColumnsPickerApi:()=>hi.m,resolveVisibleColumnFields:()=>T.C,rowMatchAlertStyles:()=>ue.em,sanitizeColumnState:()=>we.n7,syncColumnDragBridge:()=>z.lz,textFieldRendererStyles:()=>gi.zS,textRendererStyles:()=>_t.JN,themeGenesisRapid:()=>dt,themeGenesisRapidDark:()=>ct,themeGenesisRapidLight:()=>ut,toPickerItem:()=>ui.Hz,wasClickOutsideElement:()=>ri});var a,r=i(55823),s=i(6884),o=i(20633),n=i(21409),l=i(17190),d=i(54634),g=i(33681),c=i(38370),h=i(48046),u=i(88047),p=i(62051),m=i.n(p),v=i(56943),f=i(48075),b=i(48072),y=i(56182),C=i(49255),S=i(43352),R=i(67489),w=i(39604),E=i(60905),A=i(46255),k=i(2048),D=i(19511),O=i(80879),x=i(64315),T=i(14987),F=i(1510);!function(e){e.enumFilter="enumColumnFilter",e.enumFloatingFilter="enumColumnFloatingFilter"}(a||(a={}));function I(e){const t=null==e?void 0:e.valueFormatter,i=t?i=>String(t({value:i,api:null==e?void 0:e.api,colDef:null==e?void 0:e.colDef,column:null==e?void 0:e.column,context:null==e?void 0:e.context})):e=>(0,u.capitalCase)(e);return e=>null===e?"(Blanks)":i(e)}function L(e,t){return(null==e?void 0:e.values)?0===e.values.length?"(None)":`(${e.values.length}) ${e.values.map(t).join(", ")}`:""}const G="gp-enum-filter",P=g.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -99,11 +99,11 @@
|
|
|
99
99
|
opacity: 1;
|
|
100
100
|
background: var(--ag-row-hover-color, rgba(33, 150, 243, 0.1));
|
|
101
101
|
}
|
|
102
|
-
`;class N{init(e){var t,i;this.params=e,this.formatLabel=I(e.filterParams),this.eGui=document.createElement("div"),this.eGui.className=_,this.eRoot=this.eGui.attachShadow({mode:"open"}),$.addStylesTo(this.eRoot),this.eSummary=document.createElement("span"),this.eSummary.className=`${_}__summary`,this.eSummary.setAttribute("role","button"),this.eSummary.tabIndex=0,this.eSummary.addEventListener("click",()=>this.params.showParentFilter()),this.eSummary.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.params.showParentFilter())}),this.eRoot.appendChild(this.eSummary),this.eClear=document.createElement("button"),this.eClear.type="button",this.eClear.className=`${_}__clear`,this.eClear.textContent="✕",this.eClear.setAttribute("aria-label","Clear filter"),this.eClear.title="Clear filter",this.eClear.hidden=!0,this.eClear.addEventListener("click",()=>{this.params.parentFilterInstance(e=>{var t,i;null===(i=(t=e).clear)||void 0===i||i.call(t)})}),this.eRoot.appendChild(this.eClear),this.onParentModelChanged(null!==(i=null===(t=e.currentParentModel)||void 0===t?void 0:t.call(e))&&void 0!==i?i:null)}getGui(){return this.eGui}onParentModelChanged(e){const t=L(e,this.formatLabel)||"All";this.eSummary.textContent=t,this.eSummary.title=t,this.eSummary.classList.toggle(`${_}__summary--inactive`,!e),this.eClear.hidden=!e}destroy(){var e;null===(e=this.eGui)||void 0===e||e.remove()}}var B=i(59469),H=i(34713),z=i(30096),V=i(63296),U=i(81876),K=i(48707),X=i(96730),q=i(57963),j=i(24669),Y=i(49964),W=i(10629),J=i(41392),Q=i(90509),Z=i(79270),ee=i(35610),te=i(21281),ie=i(70985),ae=i(88915),re=i(44561);class se{constructor(e){var t;this.defaultReverse=!1,this.loadGeneration=0,this.detached=!1,this.rowData=new Map,this.pendingBlocks=new Set,this.deliveredRowCount=0,this.streamStarted=!1,this.moreRowsInFlight=!1,this.hasCriteria=!1,this.viewTruncationWarned=!1,this.createSnapshotFunc=e.createSnapshotFunc,this.createDataserverStreamFunc=e.createDataserverStreamFunc,this.getMoreRowsFunc=e.getMoreRowsFunc,this.onRowsInvalidatedFunc=e.onRowsInvalidatedFunc,this.onRowsUpdatedFunc=e.onRowsUpdatedFunc,this.onRowsDeliveredFunc=e.onRowsDeliveredFunc,this.onRowsWithdrawnFunc=e.onRowsWithdrawnFunc,this.onRowCacheResetFunc=e.onRowCacheResetFunc,this.errorHandlerFunc=e.errorHandlerFunc,this.ledger=new ae.J(e.rowId),this.resourceName=e.resourceName,this.resourceParams=Object.assign({},e.resourceParams),this.resourceIndexes=e.resourceIndexes,this.resourceColDefs=e.resourceColDefs,this.maxRows=e.maxRows,this.rowId=e.rowId,this.baseCriteria=e.baseCriteria||"",this.isRequestServer=e.isRequestServer,this.defaultOrderBy=e.defaultOrderBy||void 0,this.defaultReverse=null!==(t=e.defaultReverse)&&void 0!==t&&t,this.onNoDataAvailableFunc=e.onNoDataAvailableFunc,this.onDataAvailableFunc=e.onDataAvailableFunc}buildRequestServerParams(e,t,i){const a=Object.assign({},this.resourceParams);return a.DETAILS=Object.assign({},a.DETAILS),a.DETAILS.MAX_ROWS=this.maxRows,a.DETAILS.OFFSET=e,t?a.DETAILS.CRITERIA_MATCH=t:delete a.DETAILS.CRITERIA_MATCH,a.DETAILS.ORDER_BY=i.orderBy||`${this.rowId} ASC`,a}buildDataserverLogonParams(e,t){const i=Object.assign({},this.resourceParams);return i.MAX_ROWS=this.maxRows,delete i.VIEW_NUMBER,e?i.CRITERIA_MATCH=e:delete i.CRITERIA_MATCH,t.orderBy?(i.ORDER_BY=t.orderBy,i.REVERSE=t.reverse):(delete i.ORDER_BY,delete i.REVERSE),i}getLastRow(e,t,i,a){return"MORE_ROWS"in e&&!1===e.MORE_ROWS?t+i:!a&&"ROWS_COUNT"in e&&"number"==typeof e.ROWS_COUNT?e.ROWS_COUNT:-1}getRows(e){return(0,r.sH)(this,void 0,void 0,function*(){var t,i;if(this.detached)return F.v.debug("Infinite getRows ignored: the datasource was detached by its host"),void e.failCallback();F.v.debug("Infinite getRows called",{startRow:e.startRow,endRow:e.endRow,isRequestServer:this.isRequestServer});try{const i=(0,re.P4)(e.filterModel,this.resourceColDefs),a=[this.baseCriteria,i].filter(Boolean).join(" && "),r=this.resolveSortConfig(e.sortModel);if(this.noteRequestKey(a,r),!this.isRequestServer)return void this.getDataserverRows(e,a,r);const s=this.buildRequestServerParams(e.startRow,a,r);F.v.debug("Infinite datasource request params",s);const o=this.loadGeneration,n=yield this.createSnapshotFunc(s);if(o!==this.loadGeneration)return F.v.debug("Infinite REQUEST_SERVER reply discarded: the block cache was reset"),void e.failCallback();if(!n)return void e.failCallback();const l=n.MESSAGE_TYPE;if(l===te.Go.LOGOFF_ACK||l===te.Go.MSG_NACK){const i=l===te.Go.LOGOFF_ACK?`Connection lost to ${this.resourceName}`:`Request rejected by ${this.resourceName}`;return F.v.error(`Infinite REQUEST_SERVER block failed: ${i}`,n),null===(t=this.errorHandlerFunc)||void 0===t||t.call(this,i,"connection"),void e.failCallback()}if("REPLY"in n&&Array.isArray(n.REPLY)){const t=n.REPLY,i=this.getLastRow(n,e.startRow,t.length,Boolean(a));return e.successCallback(t,i),this.deliverRows(e.startRow,t),void this.notifyDataAvailability(e.startRow,t.length)}e.successCallback([],e.startRow),this.notifyDataAvailability(e.startRow,0)}catch(t){F.v.error("Error in infinite getRows:",t),null===(i=this.errorHandlerFunc)||void 0===i||i.call(this,function(e){var t,i,a;if(e instanceof Error)return e.message;if("string"==typeof e)return e;const r=e;for(const e of[r,null==r?void 0:r.receivedMessage]){const i=null===(t=null==e?void 0:e.ERROR)||void 0===t?void 0:t.map(e=>null==e?void 0:e.TEXT).filter(Boolean);if(null==i?void 0:i.length)return i.join("; ")}if("string"==typeof(null==r?void 0:r.message)&&r.message)return r.message;const s=null!==(i=null==r?void 0:r.MESSAGE_TYPE)&&void 0!==i?i:null===(a=null==r?void 0:r.receivedMessage)||void 0===a?void 0:a.MESSAGE_TYPE;if(s)return s;try{return JSON.stringify(e)}catch(t){return String(e)}}(t),"unknown"),e.failCallback()}})}resolveSortConfig(e){const t=function(e,t,i=!1){if(!e||0===e.length)return{orderBy:null,reverse:!1};const a=e[0],r=a.colId,s="desc"===a.sort;if(i)return{orderBy:`${r} ${s?"DESC":"ASC"}`,reverse:!1};for(const[e,i]of t.entries())if(e&&i.includes(r))return{orderBy:e,reverse:s};return F.v.warn(`Column '${r}' is not part of any named INDEX. Server-side sorting is not available for this column.`),{orderBy:null,reverse:!1}}(e,this.resourceIndexes,this.isRequestServer);return t.orderBy||!this.defaultOrderBy?t:{orderBy:this.defaultOrderBy,reverse:this.defaultReverse}}noteRequestKey(e,t){var i;const a=JSON.stringify(Object.assign({criteria:e},t));void 0!==this.rowCacheKey&&this.rowCacheKey!==a&&(this.loadGeneration+=1,this.ledger.clear(),null===(i=this.onRowCacheResetFunc)||void 0===i||i.call(this)),this.rowCacheKey=a,this.isRequestServer||void 0===this.subscriptionKey||this.subscriptionKey===a||this.teardownDataserverSubscription(),this.subscriptionKey=a}getDataserverRows(e,t,i){if(!this.createDataserverStreamFunc||!this.getMoreRowsFunc)return F.v.error("Infinite DATASERVER paging requires a stream and a getMoreRows function"),void e.failCallback();const a=Number.isFinite(Number(e.startRow))?Number(e.startRow):0,r=Number.isFinite(Number(e.endRow))?Number(e.endRow):a+this.maxRows,s={startRow:a,endRow:r,settled:!1,success:e.successCallback,fail:e.failCallback};if(this.streamStarted&&(this.rowData.size>=r||!1===this.moreRows))this.settleBlock(s,!0);else{if(s.timer=this.createBlockTimer(s),this.pendingBlocks.add(s),!this.dataserverStream){const e=this.buildDataserverLogonParams(t,i);return this.hasCriteria=Boolean(e.CRITERIA_MATCH),this.dataserverStream=this.createDataserverStreamFunc(e),void(this.dataserverStreamSubscription=this.dataserverStream.subscribe(e=>this.handleDataserverMessage(e)))}this.pumpMoreRows()}}pumpMoreRows(){this.moreRowsInFlight||!1===this.moreRows||0===this.pendingBlocks.size||this.dataserverStream&&this.dataserverStreamSubscription&&this.sourceRef&&(this.moreRowsInFlight=!0,this.requestMoreRows())}requestMoreRows(){return(0,r.sH)(this,void 0,void 0,function*(){if(this.dataserverStreamSubscription&&this.sourceRef)try{yield this.getMoreRowsFunc(this.sourceRef)}catch(e){if(this.moreRowsInFlight=!1,(null==e?void 0:e.status)===se.HTTP_NOT_FOUND)return F.v.warn(`Infinite DATASERVER paging is not available on this connection (MORE_ROWS answered 404, expected over HTTP/feature.forceHttp). ${this.resourceName} is truncated to the ${this.rowData.size} row(s) already delivered; use a websocket connection, or a REQUEST_SERVER resource, to page further.`),this.moreRows=!1,this.viewTruncationWarned=!0,void this.settleCoveredBlocks();F.v.error("Infinite DATASERVER MORE_ROWS failed:",e),this.failAllPendingBlocks()}else this.moreRowsInFlight=!1})}handleDataserverMessage(e){var t,i,a,r,s,o;const n=null==e?void 0:e.MESSAGE_TYPE;if(n===te.Go.LOGOFF_ACK||n===te.Go.MSG_NACK)return null===(t=this.errorHandlerFunc)||void 0===t||t.call(this,n===te.Go.LOGOFF_ACK?`Connection lost to ${this.resourceName}`:`Authentication failed for ${this.resourceName}`,"connection"),void this.teardownDataserverSubscription();this.sourceRef=null!==(i=null==e?void 0:e.SOURCE_REF)&&void 0!==i?i:this.sourceRef;const l=(null==e?void 0:e.ROW)?(0,ie.R)(e,this.rowId):void 0;if((null!==(r=null===(a=null==l?void 0:l.updates)||void 0===a?void 0:a.length)&&void 0!==r?r:0)>0||(null!==(o=null===(s=null==l?void 0:l.deletes)||void 0===s?void 0:s.length)&&void 0!==o?o:0)>0)return this.streamStarted=!0,void this.notifyLiveChange(l);const d=this.moreRowsInFlight||this.pendingBlocks.size>0||!this.streamStarted;if(this.moreRowsInFlight=!1,void 0!==(null==e?void 0:e.MORE_ROWS)&&(this.moreRows=e.MORE_ROWS),l){if(void 0!==e.ROWS_COUNT&&void 0===this.serverRowsCount&&(this.serverRowsCount=e.ROWS_COUNT),!d)return this.streamStarted=!0,void this.notifyLiveChange(l);this.accumulate(l),this.refreshPendingDeadlines()}this.streamStarted=!0,this.settleCoveredBlocks(),this.pumpMoreRows()}notifyLiveChange(e){var t,i,a,r,s,o,n,l,d,g,c,h,u,p;const m=(null!==(i=null===(t=e.inserts)||void 0===t?void 0:t.length)&&void 0!==i?i:0)>0||(null!==(r=null===(a=e.deletes)||void 0===a?void 0:a.length)&&void 0!==r?r:0)>0,v=(null!==(o=null===(s=e.updates)||void 0===s?void 0:s.length)&&void 0!==o?o:0)>0;if(m)return F.v.debug("Infinite DATASERVER live change invalidates the cache",{inserts:null!==(l=null===(n=e.inserts)||void 0===n?void 0:n.length)&&void 0!==l?l:0,deletes:null!==(g=null===(d=e.deletes)||void 0===d?void 0:d.length)&&void 0!==g?g:0}),this.reset(),void(null===(c=this.onRowsInvalidatedFunc)||void 0===c||c.call(this,e));v&&(this.accumulate(e),F.v.debug("Infinite DATASERVER live update patched into the cache",{updates:null!==(u=null===(h=e.updates)||void 0===h?void 0:h.length)&&void 0!==u?u:0}),null===(p=this.onRowsUpdatedFunc)||void 0===p||p.call(this,e))}refreshPendingDeadlines(){for(const e of this.pendingBlocks)clearTimeout(e.timer),e.timer=this.createBlockTimer(e)}createBlockTimer(e){return setTimeout(()=>{F.v.warn(`Infinite DATASERVER block ${e.startRow}-${e.endRow} for ${this.resourceName} timed out waiting for rows; resolving with ${this.rowData.size} accumulated row(s).`),this.settleBlock(e,!0)},se.BLOCK_RESOLVE_TIMEOUT_MS)}accumulate(e){var t,i,a;const r=new Map(this.rowData);null===(t=e.inserts)||void 0===t||t.forEach(e=>{const t=null==e?void 0:e[this.rowId];void 0!==t&&r.set(t,e)}),null===(i=e.updates)||void 0===i||i.forEach(e=>{const t=null==e?void 0:e[this.rowId];if(void 0===t)return;const i=r.get(t);r.set(t,i?Object.assign(Object.assign({},i),e):e)}),null===(a=e.deletes)||void 0===a||a.forEach(e=>{const t=null==e?void 0:e[this.rowId];if(void 0===t)return;const i=this.cacheIndexOf(r,t);-1===i||this.deliveredRowCount>0&&i<this.deliveredRowCount||r.delete(t)}),this.rowData=r}cacheIndexOf(e,t){let i=0;for(const a of e.keys()){if(a===t)return i;i+=1}return-1}settleCoveredBlocks(){for(const e of[...this.pendingBlocks])(this.rowData.size>=e.endRow||!1===this.moreRows)&&this.settleBlock(e,!0)}settleBlock(e,t){var i;if(e.settled)return;if(e.settled=!0,this.pendingBlocks.delete(e),clearTimeout(e.timer),!t)return void e.fail();const a=[...this.rowData.values()].slice(e.startRow,e.endRow);this.deliveredRowCount=Math.max(this.deliveredRowCount,e.startRow+a.length);const r=!1===this.moreRows?this.rowData.size:this.hasCriteria?-1:null!==(i=this.serverRowsCount)&&void 0!==i?i:-1;this.warnIfViewTruncated(),F.v.debug("Infinite DATASERVER block settled",{startRow:e.startRow,endRow:e.endRow,rows:a.length,cached:this.rowData.size,lastRow:r}),e.success(a,r),this.deliverRows(e.startRow,a),this.notifyDataAvailability(e.startRow,a.length)}notifyDataAvailability(e,t){var i,a;0!==e||this.detached||(0===t?null===(i=this.onNoDataAvailableFunc)||void 0===i||i.call(this):null===(a=this.onDataAvailableFunc)||void 0===a||a.call(this))}deliverRows(e,t){var i,a;if(this.detached)return;const{withdrawnRowIds:r}=this.ledger.record(e,t);t.length>0&&(null===(i=this.onRowsDeliveredFunc)||void 0===i||i.call(this,t)),r.length>0&&(null===(a=this.onRowsWithdrawnFunc)||void 0===a||a.call(this,r))}warnIfViewTruncated(){var e,t;this.viewTruncationWarned||!1!==this.moreRows||this.hasCriteria||void 0===this.serverRowsCount||this.rowData.size>=this.serverRowsCount||(this.viewTruncationWarned=!0,F.v.warn(`${this.resourceName} stopped at ${this.rowData.size} of ${this.serverRowsCount} rows: the DATASERVER view is capped by MAX_VIEW (${null!==(t=null===(e=this.resourceParams)||void 0===e?void 0:e.MAX_VIEW)&&void 0!==t?t:"server default"}). Raise max-view past the row count to reach the rest.`))}failAllPendingBlocks(){for(const e of[...this.pendingBlocks])this.settleBlock(e,!1)}reset(){this.teardownDataserverSubscription()}teardownDataserverSubscription(){var e;this.failAllPendingBlocks(),null===(e=this.dataserverStreamSubscription)||void 0===e||e.unsubscribe(),this.dataserverStreamSubscription=void 0,this.dataserverStream=void 0,this.subscriptionKey=void 0,this.sourceRef=void 0,this.rowData=new Map,this.deliveredRowCount=0,this.streamStarted=!1,this.serverRowsCount=void 0,this.hasCriteria=!1,this.viewTruncationWarned=!1,this.moreRows=void 0,this.moreRowsInFlight=!1}destroy(){this.teardownDataserverSubscription(),this.ledger.clear(),F.v.debug("GenesisInfiniteDatasource destroyed")}detach(){this.detached=!0,this.loadGeneration+=1,this.rowCacheKey=void 0,this.destroy(),F.v.debug("GenesisInfiniteDatasource detached by its host")}}se.BLOCK_RESOLVE_TIMEOUT_MS=1e4,se.HTTP_NOT_FOUND=404;var oe=i(62922);let ne=class extends((0,n.S)(ee.ML)){constructor(){super(...arguments),this.request={},this.onDatasourceReady=e=>(0,r.sH)(this,void 0,void 0,function*(){if(!(yield this.initializeDatasource(this.datasourceOptions(),!0,!1)))return F.v.debug(`Genesis Datasource init failed for ${this.resourceName}`),this.clearRowData(),void this.recordDisconnected();if(!this.isInfiniteSupportedForResource())return void this.clearRowData();this.$emit(Q.V.dataInit),this.setDisconnected(!1),this.indexes=this.getResourceIndexes(this.datasource.availableIndexes,this.datasource.availableSortableFields);const e=(0,K.X)(this.datasource.originalFieldDef),t=yield this.getAgColumnDefs(e);this.$emit(Z.c.schemaUpdated,{schema:t,metadata:e}),this.infiniteDatasource=new se({createSnapshotFunc:this.createSnapshot.bind(this),createDataserverStreamFunc:this.createDataserverStream.bind(this),getMoreRowsFunc:e=>this.connect.getMoreRows(e,0),onRowsDeliveredFunc:this.reportDeliveredRows.bind(this),onRowsWithdrawnFunc:this.reportWithdrawnRows.bind(this),onRowCacheResetFunc:()=>this.clearRowData(!1),onRowsInvalidatedFunc:this.handleLiveRowsInvalidated.bind(this),onRowsUpdatedFunc:this.handleLiveRowsUpdated.bind(this),onNoDataAvailableFunc:()=>this.$emit(Z.c.noDataAvailable),onDataAvailableFunc:()=>this.$emit(Z.c.loadingFinished),errorHandlerFunc:this.handleErrors.bind(this),resourceName:this.resourceName,resourceParams:this.isRequestServer?this.datasource.requestOnlyParams:this.datasource.dataserverOnlyParams,resourceIndexes:this.indexes,resourceColDefs:this.datasource.originalFieldDef,maxRows:+this.maxRows,rowId:this.rowId,baseCriteria:this.buildCriteria(),isRequestServer:this.isRequestServer,defaultOrderBy:this.orderBy,defaultReverse:this.reverse}),this.$emit(Z.c.setInfiniteDatasource,{datasource:this.infiniteDatasource}),this.setupCommitTriggeredRefresh(),this.$emit(Z.c.addGridCssClass,{className:"grid-pro-infinite"}),this.$emit(Z.c.filtersRestored)})}resourceNameChanged(e,t){e&&e!==t&&g.DOM.queueUpdate(()=>(0,r.sH)(this,void 0,void 0,function*(){yield this.restart()}))}criteriaChanged(e,t){const i=e!==(0,X.Q)(t,";");this.infiniteDatasource&&i&&g.DOM.queueUpdate(()=>(0,r.sH)(this,void 0,void 0,function*(){yield this.reloadResourceData()}))}connectedCallback(){super.connectedCallback();const e=this.shouldRunConnect;g.DOM.queueUpdate(()=>{e&&(this.init(),this.subscribeToConnection(),this.subscribeToFilterChanges())})}disconnectedCallback(){super.disconnectedCallback();const e=this.shouldRunDisconnect;g.DOM.queueUpdate(()=>(0,r.sH)(this,void 0,void 0,function*(){e&&(yield this.destroy(),this.unsubscribeFromConnection(),this.unsubscribeFromFilterChanges())}))}subscribeToFilterChanges(){this.unsubscribeFromFilterChanges(),this.filterSub=this.update.pipe((0,W.i)(1),(0,J.B)(600)).subscribe(()=>{this.infiniteDatasource&&this.reloadResourceData()})}unsubscribeFromFilterChanges(){var e;null===(e=this.filterSub)||void 0===e||e.unsubscribe(),this.filterSub=void 0}deepClone(){const e=super.deepClone();return e.deferredGridOptions=structuredClone(this.deferredGridOptions),e.deferredColumnStates=structuredClone(this.deferredColumnStates),e}reloadResourceData(){return(0,r.sH)(this,void 0,void 0,function*(){var e,t;null===(t=null===(e=this.infiniteDatasource)||void 0===e?void 0:e.detach)||void 0===t||t.call(e),this.infiniteDatasource=void 0,this.datasource.destroy(),this.$emit(Z.c.cacheFilterConfig),this.clearRowData(!1),this.setDisconnected(!1),this.$emit(Z.c.refreshInfiniteCache,{purge:!0}),yield this.init()})}init(){return(0,r.sH)(this,void 0,void 0,function*(){const e=Object.assign({getRowId:e=>e.data?String(e.data[this.rowId]):null,cacheBlockSize:this.maxRows,defaultColDef:{filter:!0,resizable:!0,sortable:!1,unSortIcon:!0},rowBuffer:0,rowModelType:"infinite",suppressMultiSort:!0,cacheOverflowSize:2,maxConcurrentDatasourceRequests:1,infiniteInitialRowCount:1,maxBlocksInCache:10},this.deferredGridOptions);this.$emit(Z.c.initialize,{options:e,keepColDefsOnClearRowData:this.keepColDefsOnClearRowData}),this.clearReadyListener(),this.addEventListener(Z.c.ready,this.onDatasourceReady,{once:!0}),this.resourceName||this.handleErrors("Application not connected or invalid resource name, datasource will not work.","unknown")})}clearReadyListener(){this.removeEventListener(Z.c.ready,this.onDatasourceReady)}isInfiniteSupportedForResource(){return!(this.isRequestServer&&!this.datasource.criteriaOnlyRequest)||(this.handleErrors(`Infinite row model is not supported for the REQUEST_SERVER resource '${this.resourceName}' because it does not support criteria-only requests. Set 'criteriaOnlyRequest = true' on the request reply definition, or use a client-side datasource for this resource.`,"resource-type"),!1)}handleLiveRowsInvalidated(e){this.reportLiveChange(e),this.$emit(Z.c.refreshInfiniteCache,{purge:!0})}handleLiveRowsUpdated(e){this.reportLiveChange(e),this.$emit(Z.c.refreshInfiniteCache,{purge:!1})}reportLiveChange(e){const t=this.resetTransaction();this.handleStreamUpdates(e.updates),this.handleStreamDeletes(e.deletes),this.emitTransaction(t)}destroy(){return(0,r.sH)(this,void 0,void 0,function*(){var e,t;this.clearReadyListener(),this.teardownCommitTriggeredRefresh(),this.$emit(Z.c.removeGridCssClass,{className:"grid-pro-infinite"}),this.datasource.destroy(),this.clearRowData(),this.infiniteDatasource&&(null===(t=(e=this.infiniteDatasource).detach)||void 0===t||t.call(e),this.infiniteDatasource=void 0),this.$emit(Z.c.setInfiniteDatasource,{datasource:null})})}restart(){return(0,r.sH)(this,void 0,void 0,function*(){yield this.destroy(),yield this.init()})}clearRowData(e=!0){this.rowData=new Map,this.resetTransaction(),this.$emit(Z.c.dataCleared,{includeSchema:e})}setupCommitTriggeredRefresh(){var e;this.teardownCommitTriggeredRefresh(),!this.isSnapshot&&this.isRequestServer&&(null===(e=this.pollTriggerEvents)||void 0===e?void 0:e.length)&&(this.commitResponseUnsubscribe=this.connectEvents.addCommitResponseListener(e=>{var t;const{eventName:i,response:a}=e.detail;this.pollTriggerEvents.includes(i)&&(null===(t=a.MESSAGE_TYPE)||void 0===t?void 0:t.endsWith("_ACK"))&&(F.v.debug(`Commit ACK for ${i}, re-reading the loaded blocks.`),this.$emit(Z.c.refreshInfiniteCache,{purge:!1}))}))}teardownCommitTriggeredRefresh(){var e;null===(e=this.commitResponseUnsubscribe)||void 0===e||e.call(this),this.commitResponseUnsubscribe=void 0}createSnapshot(){return(0,r.sH)(this,arguments,void 0,function*(e=null){return yield this.datasource.snapshot(e)})}createDataserverStream(e=null){return this.connect.stream(this.resourceName,()=>{},e=>{var t;F.v.error("Infinite DATASERVER paged stream error:",e),this.handleErrors((null===(t=null==e?void 0:e.receivedMessage)||void 0===t?void 0:t.ERROR)||(null==e?void 0:e.message),"stream")},e)}getAgColumnDefs(e){return(0,r.sH)(this,void 0,void 0,function*(){const t=this.generateColumnDefsFromMetadata(e,oe.O,oe.c),i=new Set;return this.indexes.forEach((e,t)=>{t&&e.forEach(e=>i.add(e))}),t.forEach(e=>{e.sortable=this.isRequestServer||i.has(e.field),this.datasource.criteriaOnlyRequest&&(e.filter=this.datasource.availableCriteriaFields.includes(e.field)?e.filter:null)}),t})}loadMore(){F.v.warn("loadMore() is not needed for Infinite Row Model - scrolling triggers data loading automatically")}};(0,r.Cg)([q.dm],ne.prototype,"connect",void 0),(0,r.Cg)([j.a4],ne.prototype,"connectEvents",void 0),(0,r.Cg)([Y.yW],ne.prototype,"datasource",void 0),(0,r.Cg)([g.observable],ne.prototype,"request",void 0),ne=(0,r.Cg)([(0,g.customElement)({name:"grid-pro-infinite-datasource"})],ne);var le=i(18070),de=i(30335),ge=i(26062),ce=i(32610),he=i(98884),ue=i(82128),pe=i(55365),me=i(53397),ve=i(52540),fe=i(49104),be=i(88863),ye=i(71964),Ce=i(73203),Se=i(50103),we=i(23201);(0,o.N)(ge.D,V.L,U.X,ne,v.O,x.G,B.X),h.syG.registerModules([h.n76,h.Q90,h.x6L,h.YN8,h.YzW,h.Lt,h.I95,h.O4V,h.H18,h.lvV,h.mfG,h.Iws,h.nSw,h.FUS,h.Ss0,h.tkg,h.ZDV,h.ZyC,h.XG7,h.VZy,h.$I9,h.dGu,h.AJG,h.c5B,h.BG,h.KIB,h.Sko,h.ZuP,h.Vc,z.JE]);const Re="gridReady";class Ee extends((0,n.S)(c.FoundationElement)){getColumnDragBridge(){return this.columnDragBridge}rowDataChanged(e,t){this.initialised&&this.gridApi&&this.gridApi.setGridOption("rowData",t)}gridSlotChanged(){this.gridSlot&&!this.initialised&&this.agGridOptions&&this.initGrid()}enableColumnSelectionChanged(){this.syncColumnSelectionHostLayout()}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.disposed=!1,this.debouncedSaveColumnState=m()(this.saveColumnState.bind(this),400),this.debouncedSaveFilterModel=m()(this.cacheFilterConfig.bind(this),400),this.debouncedNotifyDatasourceVisibleColumns=m()(this.notifyDatasourceVisibleColumns.bind(this),400),this.autoCellRendererByType=!1,this.onlyTemplateColDefs=!1,this.gridAutosizingEnabled=!1,this.enableCellFlashing=!1,this.enableRowFlashing=!1,this.columnDragBridge={},this.columnComponentName="grid-pro-column",this.themeMode="dark",this.statusBarConfig=pe.o2,this.withStatusBar=!1,this.enableColumnSelection=!1,this.applyingDatasourceGridOptions=!1,this.rehydrationAttempted=!1,this.rootEventsListeners=[],this.datasourceEventHandlers=[],this.gridEventsQueue=[],this.registeredGridEvents=new Set,this.gridEventListeners=new Map,this.boundGlobalEventListener=this.globalEventListener.bind(this),this._filterConfig=void 0,this.handleLuminanceChange=e=>{const t=d.baseLayerLuminance.getValueFor(e.target);this.themeMode=t===d.StandardLuminance.DarkMode?"dark":"light"},this.luminanceObserver={handleChange:e=>this.handleLuminanceChange(e)},this.agAttributes={},this.agPropertiesMap=ce.zI.reduce((e,t)=>(e[t.toLowerCase()]=t,e[(0,Se.w)(t)]=t,e),{});const e=this.hideDatasourceError.bind(this);this.rootEventsListeners.push([Q.V.dataInit,e],[ce.yY.datasourceErrorClose,e],[le.L.error,this.handleBaseDatasourceError.bind(this)],[le.L.connected,e]),this.datasourceEventHandlers=[[Z.c.initialize,this.handleInitialize.bind(this)],[Z.c.dataLoaded,this.handleDataLoaded.bind(this)],[Z.c.dataChanged,this.handleDataChanged.bind(this)],[Z.c.schemaUpdated,this.handleSchemaUpdated.bind(this)],[Z.c.dataCleared,this.handleDataCleared.bind(this)],[Z.c.loadingStarted,this.handleLoadingStarted.bind(this)],[Z.c.loadingFinished,this.handleLoadingFinished.bind(this)],[Z.c.noDataAvailable,this.handleNoDataAvailable.bind(this)],[Z.c.filtersRestored,this.handleFiltersRestored.bind(this)],[Z.c.moreDataAvailable,this.handleMoreDataAvailable.bind(this)],[Z.c.error,this.handleDatasourceError.bind(this)],[Z.c.destroy,this.handleDatasourceDestroy.bind(this)],[Z.c.cacheFilterConfig,this.cacheFilterConfig.bind(this)],[Z.c.refreshServerSide,this.handleRefreshServerSide.bind(this)],[Z.c.setServerSideDatasource,this.handleSetServerSideDatasource.bind(this)],[Z.c.addGridCssClass,this.handleAddGridCssClass.bind(this)],[Z.c.removeGridCssClass,this.handleRemoveGridCssClass.bind(this)],[Z.c.applyServerSideTransaction,this.handleApplyServerSideTransaction.bind(this)],[Z.c.setInfiniteDatasource,this.handleSetInfiniteDatasource.bind(this)],[Z.c.refreshInfiniteCache,this.handleRefreshInfiniteCache.bind(this)]]}addEventListener(e,t,i){super.addEventListener(e,t,i),this.gridApi?this.addGridEventListener(e):this.gridEventsQueue.includes(e)||this.gridEventsQueue.push(e)}addGridEventListener(e){if(this.registeredGridEvents.has(e))return;this.registeredGridEvents.add(e);const t=t=>{this.$emit(e,t)};this.gridEventListeners.set(e,t),this.gridApi.addEventListener(e,t)}handleError(e,t){this.gridErrorItems=[...this.gridErrorItems,{detail:t.detail,type:e}]}handleBaseDatasourceError(e){const t={detail:{message:e.detail.message},type:ce.Ie.datasource};this.gridErrorItems=[...this.gridErrorItems,{detail:t.detail,type:t.type}]}hideDatasourceError(){this.gridErrorItems=this.gridErrorItems.filter(e=>e.type!==ce.Ie.datasource),this.removeAttribute("ds-disconnected")}connectedCallback(){var e;super.connectedCallback(),this.syncColumnSelectionHostLayout(),this.disposed=!1;const t=null!==(e=this.provider)&&void 0!==e?e:this;this.luminanceSubscription=d.baseLayerLuminance.subscribe(this.luminanceObserver,t),this.gridAutosizingEnabled&&(this.visibilityObserverCleanup=(0,l.j)(this,e=>{e&&this.debouncedColumnAutosize()})),this.rehydrationAttempted=!1,this.shouldRunConnect&&(this.rootEventsListeners.forEach(([e,t])=>{this.addEventListener(e,t)}),ce.zI.forEach(e=>{const t=function(e,t){let i=Object.getPrototypeOf(e);for(;i&&i!==HTMLElement.prototype;){const e=Object.getOwnPropertyDescriptor(i,t);if(e)return e;i=Object.getPrototypeOf(i)}}(this,e);Object.defineProperty(this,e,{get:null==t?void 0:t.get,set:i=>{var a,r;const s=null===(a=null==t?void 0:t.get)||void 0===a?void 0:a.call(this);null===(r=null==t?void 0:t.set)||void 0===r||r.call(this,i),this.agAttributeChangedCallback((0,Se.w)(e),s,i)},enumerable:!0,configurable:!0})}),this.toggleDatasourceEventListeners(!0))}disconnectedCallback(){var e;this.disposed=!0,this.debouncedSaveColumnState.cancel(),this.debouncedSaveFilterModel.cancel();const t=null!==(e=this.provider)&&void 0!==e?e:this;d.baseLayerLuminance.unsubscribe(this.luminanceObserver,t),this.luminanceSubscription&&(this.luminanceSubscription.unsubscribe(),this.luminanceSubscription=void 0),this.visibilityObserverCleanup&&(this.visibilityObserverCleanup(),this.visibilityObserverCleanup=void 0),super.disconnectedCallback(),this.rehydrationAttempted=!1;const i=this.shouldRunDisconnect;this.rootEventsListeners.forEach(([e,t])=>{this.removeEventListener(e,t)}),i?this.performDisconnectCleanup():queueMicrotask(()=>{this.isConnected||this.performDisconnectCleanup()})}syncColumnSelectionHostLayout(){this.classList.toggle("has-column-selection",this.enableColumnSelection)}performDisconnectCleanup(){this.debounced&&(clearTimeout(this.debounced),this.debounced=null),this.initialised=!1,this.resetGridOptionsState(),this.destroyGridInstance(),this.toggleDatasourceEventListeners(!1),this.debouncedSaveColumnState.cancel(),this.debouncedSaveFilterModel.cancel(),this.registeredGridEvents.clear(),this.gridEventsQueue=[]}destroyGridInstance(){this.gridApi&&this.gridEventListeners.forEach((e,t)=>{this.gridApi.removeEventListener(t,e)}),this.gridEventListeners.clear(),this.gridApi?this.gridApi.destroy():this.agGrid&&this.agGrid.destroy(),this.gridSlot&&this.gridSlot.replaceChildren(),this.gridApi=void 0,this.agGrid=void 0}toggleDatasourceEventListeners(e){const t=e?"addEventListener":"removeEventListener";this.datasourceEventHandlers.forEach(([e,i])=>{super[t](e,i)})}handleInitialize(e){const{options:t,keepColDefsOnClearRowData:i}=e.detail;i&&(this.columnState=this.gridApi.getColumnState()),this.applyingDatasourceGridOptions=!0;try{this.gridOptions=Object.assign(Object.assign(Object.assign({},this.userProvidedGridOptions),t),i?{columnDefs:this.gridApi.getColumnDefs()}:{}),this.initGrid()}finally{this.applyingDatasourceGridOptions=!1}}handleDataLoaded(e){const{data:t}=e.detail;this.gridApi&&this.gridApi.setGridOption("rowData",t)}handleDataChanged(e){const{changes:t}=e.detail;if(!this.gridApi||!this.isClientSideRowModel)return;const i=this.gridApi.applyTransaction(t);this.flashAddedCells(null==i?void 0:i.add)}get isClientSideRowModel(){var e,t,i;return"clientSide"===(null!==(i=null===(t=null===(e=this.gridApi)||void 0===e?void 0:e.getGridOption)||void 0===t?void 0:t.call(e,"rowModelType"))&&void 0!==i?i:"clientSide")}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*(){this.gridApi?yield this.processSchemaUpdate(e.detail):this.pendingSchemaUpdate=e.detail})}processSchemaUpdate(e){return(0,r.sH)(this,arguments,void 0,function*({schema:e}){const t=this.gridApi.getColumnDefs();if(t&&t.length>0)return;this.applyCommunityFilterFallbacks(e);const i=yield this.mergeAllColumnDefsAndStates(e,!0);this.gridApi.setGridOption("columnDefs",i),this.restoreCachedFilterConfig()})}applyCommunityFilterFallbacks(e){const t=this.gridApi.isModuleRegistered("SetFilterModule"),i=this.gridApi.isModuleRegistered("MultiFilterModule");e.forEach(e=>{var r,s,o,n,l;if("agSetColumnFilter"===e.filter&&!t)return F.v.debug(`SetFilterModule is not registered; column '${e.field}' falls back to the enum filter`),e.filter=a.enumFilter,void(null!==(r=e.floatingFilterComponent)&&void 0!==r||(e.floatingFilterComponent=a.enumFloatingFilter));if("agMultiColumnFilter"!==e.filter)return;const d=null===(o=null===(s=e.filterParams)||void 0===s?void 0:s.filters)||void 0===o?void 0:o.find(e=>"agSetColumnFilter"===e.filter);i?!t&&d&&(F.v.debug(`SetFilterModule is not registered; the set sub-filter of column '${e.field}' falls back to the enum filter`),d.filter=a.enumFilter):(null===(n=null==d?void 0:d.filterParams)||void 0===n?void 0:n.values)?(F.v.debug(`MultiFilterModule is not registered; enum column '${e.field}' falls back to the enum filter`),e.filter=a.enumFilter,e.filterParams=Object.assign({},d.filterParams),null!==(l=e.floatingFilterComponent)&&void 0!==l||(e.floatingFilterComponent=a.enumFloatingFilter)):(F.v.warn("MultiFilterModule is not registered, falling back to text filter"),e.filter="agTextColumnFilter")})}handleDataCleared(e){const{includeSchema:t}=e.detail;this.gridApi&&(t&&this.gridApi.setGridOption("columnDefs",[]),this.isClientSideRowModel&&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 t,i,a,r;const{hasMoreData:s,sourceRef:o}=e.detail;if(!this.gridApi)return;const n=null===(i=(t=this.gridApi).getStatusPanel)||void 0===i?void 0:i.call(t,pe.k7.loadMore);n&&(null===(r=(a=n).updateParams)||void 0===r||r.call(a,{moreRows:s,sourceRef:o}))}handleDatasourceError(){this.setAttribute("ds-disconnected","ds-disconnected")}handleDatasourceDestroy(){this.clearLocalGridOptions()}handleRefreshServerSide(e){const{purge:t}=e.detail;this.gridApi&&this.gridApi.refreshServerSide({purge:t})}handleSetServerSideDatasource(e){const{datasource:t}=e.detail;this.gridApi&&this.gridApi.setGridOption("serverSideDatasource",t)}handleAddGridCssClass(e){var t;const{className:i}=e.detail,a=(null===(t=this.gridSlot)||void 0===t?void 0:t.parentElement)||this;a&&a.classList.add(i)}handleRemoveGridCssClass(e){var t;const{className:i}=e.detail,a=(null===(t=this.gridSlot)||void 0===t?void 0:t.parentElement)||this;a&&a.classList.remove(i)}handleApplyServerSideTransaction(e){var t,i;const{transaction:a,async:r,callback:s}=e.detail;if(this.gridApi)if(r)this.gridApi.applyServerSideTransactionAsync(a,e=>{var t,i;this.flashAddedCells([...null!==(t=null==e?void 0:e.add)&&void 0!==t?t:[],...null!==(i=null==e?void 0:e.update)&&void 0!==i?i:[]]),null==s||s(e)});else{const e=this.gridApi.applyServerSideTransaction(a);this.flashAddedCells([...null!==(t=null==e?void 0:e.add)&&void 0!==t?t:[],...null!==(i=null==e?void 0:e.update)&&void 0!==i?i:[]]),s&&s(e)}}handleSetInfiniteDatasource(e){const{datasource:t}=e.detail;this.gridApi&&this.gridApi.setGridOption("datasource",t)}handleRefreshInfiniteCache(e){var t;this.gridApi&&((null===(t=e.detail)||void 0===t?void 0:t.purge)?this.gridApi.purgeInfiniteCache():this.gridApi.refreshInfiniteCache())}combineAllGridComponents(e){const t={[pe.IX.action]:w.eA,[pe.IX.actionsMenu]:R.cN,[pe.IX.boolean]:E._Y,[pe.IX.editable]:A.YM,[pe.IX.icon]:k.Jt,[pe.IX.statusPill]:D.N7,[pe.IX.select]:O.gs,[pe.IX.selectEditor]:f._Q,[pe.IX.numberEditor]:b.Z0,[pe.IX.multiselectEditor]:y.pZ,[pe.IX.dateEditor]:C.S8,[pe.IX.stringEditor]:S.XJ,[a.enumFilter]:M,[a.enumFloatingFilter]:N,[pe.k7.labelValue]:ve.k,[pe.k7.loadMore]:fe.s,[pe.k7.reload]:be.W,[pe.k7.rowCount]:ye.i};return Object.assign(Object.assign(Object.assign({},t),e),this.gridComponents)}statePersistanceEnabled(){return!(!this.persistColumnStateKey||0===this.persistColumnStateKey.length)}getSelectedRows(){var e,t,i,a;try{if(!this.initialised||!this.gridApi)return[];const r=null===(e=this.gridOptions)||void 0===e?void 0:e.rowSelection;if("single"===r||"multiple"===r)return this.gridApi.getSelectedRows&&this.gridApi.getSelectedRows().length>0?this.gridApi.getSelectedRows():[];if((null===(t=this.gridApi)||void 0===t?void 0:t.getCellRanges)&&this.gridApi.getCellRanges().length>0)return this.getCellRangeRowData();if(!(null===(i=this.gridOptions)||void 0===i?void 0:i.enableRangeSelection)){const e=null===(a=this.gridApi)||void 0===a?void 0:a.getFocusedCell();if(e){const t=this.gridApi.getDisplayedRowAtIndex(e.rowIndex);if(null==t?void 0:t.data)return[t.data]}}return[]}catch(e){return F.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 t=this.gridApi.getCellRanges();if(0===t.length)return[];const i=[];return t.forEach(e=>{const t=e.startRow.rowIndex,a=e.endRow.rowIndex;for(let e=t;e<=a;e+=1){const t=this.gridApi.getDisplayedRowAtIndex(e);(null==t?void 0:t.data)&&!i.some(e=>e===t.data)&&i.push(t.data)}}),i}hasSelectedRows(){return this.getSelectedRows().length>0}updateLabelValueStatusBar(e){var t,i;if(!this.gridApi)return void F.v.warn("Grid Pro: Cannot update label-value status bar - grid API not available");const a=null===(i=(t=this.gridApi).getStatusPanel)||void 0===i?void 0:i.call(t,pe.k7.labelValue);a&&"function"==typeof a.updateParams?a.updateParams(e):F.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()},ce.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=(0,we.n7)(e),e=this.gridAutosizingEnabled?this.removeConfigWidthsToAutosize(e):e;const t=0===e.filter(e=>{if(e.hide)return!1;const t=this.gridApi.getColumn(e.colId);return Boolean(t.getColDef().headerName)}).length;if(0===e.length||JSON.stringify(e)===JSON.stringify(this.columnState)||t)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 t=yield this.getSavedColumnState(),i=(0,we.n7)(t);i&&i.length>0&&(null===(e=this.gridApi)||void 0===e||e.applyColumnState({state:i,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,t;const i=yield this.getfilterModel();void 0!==i&&(null===(e=this.gridApi)||void 0===e||e.setFilterModel(i),null===(t=this.gridApi)||void 0===t||t.onFilterChanged())})}get gridOptions(){return this.agGridOptions}get isServerSide(){return this.gridProDatasource instanceof U.X}get gridParams(){return{globalListener:this.boundGlobalEventListener,modules:[z.JE,h.Vc,h.ZuP]}}get gridProDatasource(){return this.querySelector("grid-pro-genesis-datasource")||this.querySelector("grid-pro-client-side-datasource")||this.querySelector("grid-pro-server-side-datasource")||this.querySelector("grid-pro-infinite-datasource")}get isInfiniteRowModel(){return this.gridProDatasource instanceof ne}notifyDatasourceVisibleColumns(){var e,t,i,a;const r=this.gridProDatasource;if(!r)return;const s=(0,T.C)(null===(t=null===(e=this.gridApi)||void 0===e?void 0:e.getAllDisplayedColumns)||void 0===t?void 0:t.call(e),null===(a=null===(i=this.gridApi)||void 0===i?void 0:i.getColumnDefs)||void 0===a?void 0:a.call(i));s.length&&r.setVisibleColumns(s)}set gridOptions(e){!this.applyingDatasourceGridOptions&&e&&(this.userProvidedGridOptions=Object.assign({},e));const t=()=>{!this.disposed&&this.isConnected&&(this.debouncedSaveColumnState(),this.debouncedColumnAutosize())},i=()=>{!this.disposed&&this.isConnected&&this.debouncedNotifyDatasourceVisibleColumns()};Array.from(this.attributes).forEach(e=>{const t=this.agPropertiesMap[e.name];t&&(this.agAttributes[t]=e.value)});const{columnDefs:a,components:s,defaultColDef:o,getRowId:n,onGridReady:l,onFilterChanged:d,onFirstDataRendered:g}=e,c=(0,r.Tt)(e,["columnDefs","components","defaultColDef","getRowId","onGridReady","onFilterChanged","onFirstDataRendered"]),h=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.gridOptionsConfig),{defaultColDef:Object.assign({enableCellChangeFlash:this.enableCellFlashing,filter:!0,resizable:!0,sortable:!0},o),components:this.combineAllGridComponents(s),headerHeight:this.headerHeight,rowHeight:this.rowHeight,animateRows:!1,suppressDragLeaveHidesColumns:!0}),this.eventsAndCallbacks),{onGridReady:e=>(0,r.sH)(this,void 0,void 0,function*(){var t,i,a;if(this.gridApi=e.api,this.gridEventsQueue.length&&this.gridEventsQueue.forEach(e=>{this.addGridEventListener(e)}),this.pendingSchemaUpdate){const e=this.pendingSchemaUpdate;this.pendingSchemaUpdate=void 0;try{yield this.processSchemaUpdate(e)}catch(e){F.v.error("Grid Pro: failed to apply the pending schema update on grid ready:",e)}}this.rowData&&this.gridApi.setGridOption("rowData",this.rowData),l&&l(e),(null===(t=this.gridProDatasource)||void 0===t?void 0:t.keepColDefsOnClearRowData)&&(null===(i=this.columnState)||void 0===i?void 0:i.length)>0&&this.gridApi.applyColumnState({state:this.columnState,applyOrder:!0}),this.$emit(Re,{event:e,gridId:this.id}),this.$emit(pe.mr,{event:e,gridId:this.id}),this.notifyDatasourceVisibleColumns(),null===(a=this.gridProDatasource)||void 0===a||a.$emit(Z.c.ready),this.restoreColumnState(),this.restoreCachedFilterConfig(),this.debouncedColumnAutosize()}),onFirstDataRendered:e=>{this.notifyDatasourceVisibleColumns(),g&&g(e)},onColumnPinned:t,onColumnResized:t,onColumnMoved:t,onColumnVisible:()=>{t(),i()},onDisplayedColumnsChanged:()=>{t(),i()},onFilterChanged:e=>{!this.disposed&&this.isConnected&&(this.debouncedSaveFilterModel(),d&&d(e))},onGridSizeChanged:t,onSortChanged:t}),c);this.gridProDatasource?(h.columnDefs=a,h.getRowId=n,this.setupStatusBar(h),this.setLocalGridOptions(h)):this.mergeAllColumnDefsAndStates(a).then(e=>{!this.disposed&&this.isConnected&&(h.columnDefs=e,h.getRowId=n,this.setupStatusBar(h),this.setLocalGridOptions(h),this.initGrid())})}setLocalGridOptions(e){this.agGridOptions=Object.assign(Object.assign({},this.agGridOptions),(0,ce.Qg)(e,this.agAttributes)),this.agGridOptions.context=Object.assign(Object.assign({},this.agGridOptions.context),{[z.nJ]:this.columnDragBridge}),null==this.agGridOptions.allowDragFromColumnsToolPanel&&(this.agGridOptions.allowDragFromColumnsToolPanel=!0)}clearLocalGridOptions(){this.agGridOptions=void 0}resetGridOptionsState(){this.userProvidedGridOptions=void 0,this.agGridOptions=void 0}initGrid(){g.DOM.queueUpdate(()=>{!this.disposed&&this.isConnected&&this.gridSlot&&(this.initialised&&(this.destroyGridInstance(),this.gridSlot.firstChild&&this.gridSlot.removeChild(this.gridSlot.firstChild)),this.agGrid=(0,h.Dvw)(this.gridSlot,this.agGridOptions,this.gridParams),this.initialised=!0)})}mergeAllColumnDefsAndStates(e){return(0,r.sH)(this,arguments,void 0,function*(e,t=!1){var i;const r=e||[];r.forEach(e=>{if(this.headerCaseType&&e.field&&!e.headerName){const t=u[this.headerCaseType];t?e.headerName=t(e.field):F.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 s=Array.from(this.querySelectorAll(this.columnComponentName)).map(e=>e.definition).map(e=>{var t,i,s,o,n,l;if(this.enableCellFlashing&&void 0===e.enableCellChangeFlash&&(e.enableCellChangeFlash=!0),"agSetColumnFilter"===e.filter||e.filter===a.enumFilter){if(!(null!=e.filterParams&&"values"in e.filterParams)){const a=null===(t=r.find(t=>t.field===e.field))||void 0===t?void 0:t.filterParams,l=null!==(i=null==a?void 0:a.values)&&void 0!==i?i:null===(n=null===(o=null===(s=null==a?void 0:a.filters)||void 0===s?void 0:s.find(e=>"agSetColumnFilter"===e.filter))||void 0===o?void 0:o.filterParams)||void 0===n?void 0:n.values;l&&(e.filterParams=Object.assign(Object.assign({},e.filterParams),{values:l}))}e.filter===a.enumFilter&&(null!==(l=e.floatingFilterComponent)&&void 0!==l||(e.floatingFilterComponent=a.enumFloatingFilter))}e.editable&&(e.cellRenderer||e.cellRendererSelector||(e.cellRendererSelector=t=>{if(t.data[pe.A7]===e.field)return{component:pe.IX.editable}}),e.tooltipComponent||e.tooltipValueGetter||(e.tooltipComponent=Ce.y,e.tooltipValueGetter=t=>{const i=t.data[pe.h1];if(i&&i.column===e.field)return i.message}),e.cellClassRules||(e.cellClassRules={error:e=>{var t;return(null===(t=e.data[pe.h1])||void 0===t?void 0:t.column)===e.colDef.field}}));const d=r.find(t=>e.field===t.field);return Object.assign(Object.assign({},d),e)}),o=s.map(e=>e.field),n=[...s,...this.onlyTemplateColDefs?[]:r.filter(e=>!o.includes(e.field))];if(this.gridProDatasource&&t){const e=yield this.getSavedColumnState();if((null==e?void 0:e.length)>0)return(0,we.yS)(n,e);if((null===(i=this.gridProDatasource.deferredColumnStates)||void 0===i?void 0:i.length)>0)return(0,we.yS)(n,this.gridProDatasource.deferredColumnStates)}return n})}panelExists(e,t){return t.some(t=>t.statusPanel===e)}addRowCountPanel(e,t){if(this.statusBarConfig&&!0===this.statusBarConfig.rows){const i=this.isServerSide||this.isInfiniteRowModel||"infinite"===(null==t?void 0:t.rowModelType)||"serverSide"===(null==t?void 0:t.rowModelType);if(i)this.panelExists(pe.k7.rowCount,e)||e.push({statusPanel:pe.k7.rowCount,align:"left"});else if(!i){const t="agTotalAndFilteredRowCountComponent";this.panelExists(t,e)||e.push({statusPanel:t,align:"left"})}}}addMaxRowsPanel(e){this.statusBarConfig&&!0===this.statusBarConfig.maxRows&&(this.panelExists(pe.k7.labelValue,e)||e.push({statusPanel:pe.k7.labelValue,statusPanelParams:{label:"Max Rows",value:this.gridProDatasource.maxRows||s.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 t=this.gridProDatasource.getDatasourceStatusBarPanels(this.isServerSide||this.isInfiniteRowModel,this.statusBarConfig).filter(t=>!this.panelExists(t.statusPanel,e));e.push(...t)}}setupStatusBar(e){var t,i;if(this.withStatusBar&&this.statusBarConfig){const a=[...(null===(t=e.statusBar)||void 0===t?void 0:t.statusPanels)||[]];this.addRowCountPanel(a,e),this.addMaxRowsPanel(a),this.addAggregationPanel(a),this.addDatasourcePanels(a);const r=((null===(i=e.statusBar)||void 0===i?void 0:i.statusPanels)||[]).filter(e=>!this.panelExists(e.statusPanel,a));a.push(...r),e.statusBar={statusPanels:a}}}get observedAttributes(){const e=ce.zI.map(e=>e.toLowerCase()),t=ce.zI.map(e=>(0,Se.w)(e));return e.concat(t)}agAttributeChangedCallback(e,t,i){var a;if(t===i)return;const r=this.agPropertiesMap[e];r&&(this.agAttributes[r]=i,this.initialised&&(null===(a=this.gridApi)||void 0===a||a.setGridOption(r,i)))}globalEventListener(e,t){const i=e.toLowerCase(),a=new Event(i);a.agGridDetails=t,this.dispatchEvent(a);const r="on"+i;"function"==typeof this[r]&&this[r](a)}}(0,r.Cg)([g.observable],Ee.prototype,"gridApi",void 0),(0,r.Cg)([g.observable],Ee.prototype,"gridErrorItems",void 0),(0,r.Cg)([me.l],Ee.prototype,"statePersistence",void 0),(0,r.Cg)([(0,g.attr)({attribute:"auto-cell-renderer-by-type",mode:"boolean"})],Ee.prototype,"autoCellRendererByType",void 0),(0,r.Cg)([(0,g.attr)({attribute:"only-template-col-defs",mode:"boolean"})],Ee.prototype,"onlyTemplateColDefs",void 0),(0,r.Cg)([(0,g.attr)({mode:"boolean",attribute:"grid-autosizing"})],Ee.prototype,"gridAutosizingEnabled",void 0),(0,r.Cg)([(0,g.attr)({mode:"boolean",attribute:"enable-cell-flashing"})],Ee.prototype,"enableCellFlashing",void 0),(0,r.Cg)([(0,g.attr)({mode:"boolean",attribute:"enable-row-flashing"})],Ee.prototype,"enableRowFlashing",void 0),(0,r.Cg)([(0,g.attr)({attribute:"persist-column-state-key"})],Ee.prototype,"persistColumnStateKey",void 0),(0,r.Cg)([(0,g.attr)({attribute:"persist-filter-model-key"})],Ee.prototype,"persistFilterModelKey",void 0),(0,r.Cg)([(0,g.attr)({attribute:"header-case-type"})],Ee.prototype,"headerCaseType",void 0),(0,r.Cg)([g.observable],Ee.prototype,"rowData",void 0),(0,r.Cg)([g.attr],Ee.prototype,"columnComponentName",void 0),(0,r.Cg)([g.observable],Ee.prototype,"eventsAndCallbacks",void 0),(0,r.Cg)([g.attr],Ee.prototype,"headerHeight",void 0),(0,r.Cg)([g.attr],Ee.prototype,"rowHeight",void 0),(0,r.Cg)([g.observable],Ee.prototype,"classNames",void 0),(0,r.Cg)([g.observable],Ee.prototype,"agGrid",void 0),(0,r.Cg)([g.observable],Ee.prototype,"gridSlot",void 0),(0,r.Cg)([g.observable],Ee.prototype,"themeMode",void 0),(0,r.Cg)([g.observable],Ee.prototype,"gridComponents",void 0),(0,r.Cg)([g.observable],Ee.prototype,"statusBarConfig",void 0),(0,r.Cg)([(0,g.attr)({mode:"boolean",attribute:"with-status-bar"})],Ee.prototype,"withStatusBar",void 0),(0,r.Cg)([(0,g.attr)({mode:"boolean",attribute:"enable-column-selection"})],Ee.prototype,"enableColumnSelection",void 0),(0,r.Cg)([g.observable],Ee.prototype,"customErrorHandlerTemplate",void 0),(0,r.Cg)([pe.lz],Ee.prototype,"gridOptionsConfig",void 0),(0,r.Cg)([g.observable],Ee.prototype,"provider",void 0);const Ae=Ee.compose(Object.assign({baseName:"grid-pro",template:ue.a,styles:g.css`
|
|
103
|
-
${
|
|
104
|
-
${
|
|
102
|
+
`;class N{init(e){var t,i;this.params=e,this.formatLabel=I(e.filterParams),this.eGui=document.createElement("div"),this.eGui.className=_,this.eRoot=this.eGui.attachShadow({mode:"open"}),$.addStylesTo(this.eRoot),this.eSummary=document.createElement("span"),this.eSummary.className=`${_}__summary`,this.eSummary.setAttribute("role","button"),this.eSummary.tabIndex=0,this.eSummary.addEventListener("click",()=>this.params.showParentFilter()),this.eSummary.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.params.showParentFilter())}),this.eRoot.appendChild(this.eSummary),this.eClear=document.createElement("button"),this.eClear.type="button",this.eClear.className=`${_}__clear`,this.eClear.textContent="✕",this.eClear.setAttribute("aria-label","Clear filter"),this.eClear.title="Clear filter",this.eClear.hidden=!0,this.eClear.addEventListener("click",()=>{this.params.parentFilterInstance(e=>{var t,i;null===(i=(t=e).clear)||void 0===i||i.call(t)})}),this.eRoot.appendChild(this.eClear),this.onParentModelChanged(null!==(i=null===(t=e.currentParentModel)||void 0===t?void 0:t.call(e))&&void 0!==i?i:null)}getGui(){return this.eGui}onParentModelChanged(e){const t=L(e,this.formatLabel)||"All";this.eSummary.textContent=t,this.eSummary.title=t,this.eSummary.classList.toggle(`${_}__summary--inactive`,!e),this.eClear.hidden=!e}destroy(){var e;null===(e=this.eGui)||void 0===e||e.remove()}}var B=i(59469),H=i(34713),z=i(30096),V=i(63296),U=i(81876),K=i(48707),X=i(96730),j=i(57963),q=i(24669),Y=i(49964),W=i(10629),J=i(41392),Q=i(90509),Z=i(79270),ee=i(35610),te=i(21281),ie=i(70002),ae=i(70985),re=i(88915),se=i(44561);class oe{constructor(e){var t;this.defaultReverse=!1,this.loadGeneration=0,this.detached=!1,this.rowData=new Map,this.pendingBlocks=new Set,this.streamStarted=!1,this.moreRowsInFlight=!1,this.hasCriteria=!1,this.createSnapshotFunc=e.createSnapshotFunc,this.createDataserverStreamFunc=e.createDataserverStreamFunc,this.getMoreRowsFunc=e.getMoreRowsFunc,this.onRowsInvalidatedFunc=e.onRowsInvalidatedFunc,this.onRowsUpdatedFunc=e.onRowsUpdatedFunc,this.onRowsDeliveredFunc=e.onRowsDeliveredFunc,this.onRowsWithdrawnFunc=e.onRowsWithdrawnFunc,this.onRowCacheResetFunc=e.onRowCacheResetFunc,this.errorHandlerFunc=e.errorHandlerFunc,this.ledger=new re.J(e.rowId),this.resourceName=e.resourceName,this.resourceParams=Object.assign({},e.resourceParams),this.resourceIndexes=e.resourceIndexes,this.resourceColDefs=e.resourceColDefs,this.maxRows=e.maxRows,this.rowId=e.rowId,this.baseCriteria=e.baseCriteria||"",this.isRequestServer=e.isRequestServer,this.defaultOrderBy=e.defaultOrderBy||void 0,this.defaultReverse=null!==(t=e.defaultReverse)&&void 0!==t&&t,this.onNoDataAvailableFunc=e.onNoDataAvailableFunc,this.onDataAvailableFunc=e.onDataAvailableFunc}buildRequestServerParams(e,t,i){const a=Object.assign({},this.resourceParams);return a.DETAILS=Object.assign({},a.DETAILS),a.DETAILS.MAX_ROWS=this.maxRows,a.DETAILS.OFFSET=e,t?a.DETAILS.CRITERIA_MATCH=t:delete a.DETAILS.CRITERIA_MATCH,a.DETAILS.ORDER_BY=i.orderBy||`${this.rowId} ASC`,a}buildDataserverLogonParams(e,t){const i=Object.assign({},this.resourceParams);return i.MAX_ROWS=this.maxRows,delete i.VIEW_NUMBER,e?i.CRITERIA_MATCH=e:delete i.CRITERIA_MATCH,t.orderBy?(i.ORDER_BY=t.orderBy,i.REVERSE=t.reverse):(delete i.ORDER_BY,delete i.REVERSE),i}getLastRow(e,t,i,a){return"MORE_ROWS"in e&&!1===e.MORE_ROWS?t+i:!a&&"ROWS_COUNT"in e&&"number"==typeof e.ROWS_COUNT?e.ROWS_COUNT:-1}getRows(e){return(0,r.sH)(this,void 0,void 0,function*(){var t,i;if(this.detached)return F.v.debug("Infinite getRows ignored: the datasource was detached by its host"),void e.failCallback();F.v.debug("Infinite getRows called",{startRow:e.startRow,endRow:e.endRow,isRequestServer:this.isRequestServer});try{const i=(0,se.P4)(e.filterModel,this.resourceColDefs),a=[this.baseCriteria,i].filter(Boolean).join(" && "),r=this.resolveSortConfig(e.sortModel);if(this.noteRequestKey(a,r),!this.isRequestServer)return void this.getDataserverRows(e,a,r);const s=this.buildRequestServerParams(e.startRow,a,r);F.v.debug("Infinite datasource request params",s);const o=this.loadGeneration,n=yield this.createSnapshotFunc(s);if(o!==this.loadGeneration)return F.v.debug("Infinite REQUEST_SERVER reply discarded: the block cache was reset"),void e.failCallback();if(!n)return void e.failCallback();const l=n.MESSAGE_TYPE;if(l===te.Go.LOGOFF_ACK||l===te.Go.MSG_NACK){const i=l===te.Go.LOGOFF_ACK?`Connection lost to ${this.resourceName}`:`Request rejected by ${this.resourceName}`;return F.v.error(`Infinite REQUEST_SERVER block failed: ${i}`,n),null===(t=this.errorHandlerFunc)||void 0===t||t.call(this,i,"connection"),void e.failCallback()}if("REPLY"in n&&Array.isArray(n.REPLY)){const t=n.REPLY,i=this.getLastRow(n,e.startRow,t.length,Boolean(a));return e.successCallback(t,i),this.deliverRows(e.startRow,t),void this.notifyDataAvailability(e.startRow,t.length)}e.successCallback([],e.startRow),this.notifyDataAvailability(e.startRow,0)}catch(t){F.v.error("Error in infinite getRows:",t),null===(i=this.errorHandlerFunc)||void 0===i||i.call(this,function(e){var t,i,a;if(e instanceof Error)return e.message;if("string"==typeof e)return e;const r=e;for(const e of[r,null==r?void 0:r.receivedMessage]){const i=null===(t=null==e?void 0:e.ERROR)||void 0===t?void 0:t.map(e=>null==e?void 0:e.TEXT).filter(Boolean);if(null==i?void 0:i.length)return i.join("; ")}if("string"==typeof(null==r?void 0:r.message)&&r.message)return r.message;const s=null!==(i=null==r?void 0:r.MESSAGE_TYPE)&&void 0!==i?i:null===(a=null==r?void 0:r.receivedMessage)||void 0===a?void 0:a.MESSAGE_TYPE;if(s)return s;try{return JSON.stringify(e)}catch(t){return String(e)}}(t),"unknown"),e.failCallback()}})}resolveSortConfig(e){const t=function(e,t,i=!1){if(!e||0===e.length)return{orderBy:null,reverse:!1};const a=e[0],r=a.colId,s="desc"===a.sort;if(i)return{orderBy:`${r} ${s?"DESC":"ASC"}`,reverse:!1};for(const[e,i]of t.entries())if(e&&i.includes(r))return{orderBy:e,reverse:s};return F.v.warn(`Column '${r}' is not part of any named INDEX. Server-side sorting is not available for this column.`),{orderBy:null,reverse:!1}}(e,this.resourceIndexes,this.isRequestServer);return t.orderBy||!this.defaultOrderBy?t:{orderBy:this.defaultOrderBy,reverse:this.defaultReverse}}noteRequestKey(e,t){var i;const a=JSON.stringify(Object.assign({criteria:e},t));void 0!==this.rowCacheKey&&this.rowCacheKey!==a&&(this.loadGeneration+=1,this.ledger.clear(),null===(i=this.onRowCacheResetFunc)||void 0===i||i.call(this)),this.rowCacheKey=a,this.isRequestServer||void 0===this.subscriptionKey||this.subscriptionKey===a||this.teardownDataserverSubscription(),this.subscriptionKey=a}getDataserverRows(e,t,i){if(!this.createDataserverStreamFunc||!this.getMoreRowsFunc)return F.v.error("Infinite DATASERVER paging requires a stream and a getMoreRows function"),void e.failCallback();const a=Number.isFinite(Number(e.startRow))?Number(e.startRow):0,r=Number.isFinite(Number(e.endRow))?Number(e.endRow):a+this.maxRows,s={startRow:a,endRow:r,settled:!1,success:e.successCallback,fail:e.failCallback};if(this.streamStarted&&(this.rowData.size>=r||this.streamEnded))this.settleBlock(s,!0);else{if(s.timer=this.createBlockTimer(s),this.pendingBlocks.add(s),!this.dataserverStream){const e=this.buildDataserverLogonParams(t,i);return this.hasCriteria=Boolean(e.CRITERIA_MATCH),this.dataserverStream=this.createDataserverStreamFunc(e),void(this.dataserverStreamSubscription=this.dataserverStream.subscribe(e=>this.handleDataserverMessage(e)))}this.pumpMoreRows()}}pumpMoreRows(){this.moreRowsInFlight||this.streamEnded||0===this.pendingBlocks.size||this.dataserverStream&&this.dataserverStreamSubscription&&this.sourceRef&&(this.moreRowsInFlight=!0,this.requestMoreRows())}requestMoreRows(){return(0,r.sH)(this,void 0,void 0,function*(){if(this.dataserverStreamSubscription&&this.sourceRef)try{yield this.getMoreRowsFunc(this.sourceRef)}catch(e){if(this.moreRowsInFlight=!1,(null==e?void 0:e.status)===oe.HTTP_NOT_FOUND)return F.v.warn(`Infinite DATASERVER paging is not available on this connection (MORE_ROWS answered 404, expected over HTTP/feature.forceHttp). ${this.resourceName} is truncated to the ${this.rowData.size} row(s) already delivered; use a websocket connection, or a REQUEST_SERVER resource, to page further.`),this.moreRows=!1,void this.settleCoveredBlocks();F.v.error("Infinite DATASERVER MORE_ROWS failed:",e),this.failAllPendingBlocks()}else this.moreRowsInFlight=!1})}handleDataserverMessage(e){var t,i,a,r,s,o,n;const l=null==e?void 0:e.MESSAGE_TYPE;if(l===te.Go.LOGOFF_ACK||l===te.Go.MSG_NACK)return null===(t=this.errorHandlerFunc)||void 0===t||t.call(this,l===te.Go.LOGOFF_ACK?`Connection lost to ${this.resourceName}`:`Authentication failed for ${this.resourceName}`,"connection"),void this.teardownDataserverSubscription();this.sourceRef=null!==(i=null==e?void 0:e.SOURCE_REF)&&void 0!==i?i:this.sourceRef;const d=(null==e?void 0:e.ROW)?(0,ae.R)(e,this.rowId):void 0;if((null!==(r=null===(a=null==d?void 0:d.updates)||void 0===a?void 0:a.length)&&void 0!==r?r:0)>0||(null!==(o=null===(s=null==d?void 0:d.deletes)||void 0===s?void 0:s.length)&&void 0!==o?o:0)>0)return this.streamStarted=!0,void this.notifyLiveChange(d);const g=this.moreRowsInFlight,c=g||this.pendingBlocks.size>0||!this.streamStarted;if(this.moreRowsInFlight=!1,void 0!==(null==e?void 0:e.MORE_ROWS)&&(this.moreRows=e.MORE_ROWS),d){if(void 0!==e.ROWS_COUNT&&void 0===this.serverRowsCount&&(this.serverRowsCount=e.ROWS_COUNT),!c)return this.streamStarted=!0,void this.notifyLiveChange(d);this.accumulate(d),this.refreshPendingDeadlines()}this.streamEnded||this.notePagingStatus(g&&!(null===(n=null==d?void 0:d.inserts)||void 0===n?void 0:n.length)&&!0===(null==e?void 0:e.MORE_ROWS)),this.streamStarted=!0,this.settleCoveredBlocks(),this.pumpMoreRows()}notePagingStatus(e){var t;const i=null===(t=this.resourceParams)||void 0===t?void 0:t.MAX_VIEW,a=(0,ie.SG)({moreRows:this.moreRows,emptyReply:e,rowsHeld:this.rowData.size,maxView:i});if("view-full"!==a&&"stalled"!==a)return;this.pagingStopped=a;const r=(0,ie.TA)({status:a,resourceName:this.resourceName,rowsHeld:this.rowData.size,maxView:i,emptyReply:e,totalRows:this.hasCriteria?void 0:this.serverRowsCount,attribute:"max-view"});r&&F.v.warn(r)}get streamEnded(){return!1===this.moreRows||void 0!==this.pagingStopped}notifyLiveChange(e){var t,i,a,r,s,o,n,l,d,g,c,h,u,p;const m=(null!==(i=null===(t=e.inserts)||void 0===t?void 0:t.length)&&void 0!==i?i:0)>0||(null!==(r=null===(a=e.deletes)||void 0===a?void 0:a.length)&&void 0!==r?r:0)>0,v=(null!==(o=null===(s=e.updates)||void 0===s?void 0:s.length)&&void 0!==o?o:0)>0;if(m)return F.v.debug("Infinite DATASERVER live change invalidates the cache",{inserts:null!==(l=null===(n=e.inserts)||void 0===n?void 0:n.length)&&void 0!==l?l:0,deletes:null!==(g=null===(d=e.deletes)||void 0===d?void 0:d.length)&&void 0!==g?g:0}),this.reset(),void(null===(c=this.onRowsInvalidatedFunc)||void 0===c||c.call(this,e));v&&(this.accumulate(e),F.v.debug("Infinite DATASERVER live update patched into the cache",{updates:null!==(u=null===(h=e.updates)||void 0===h?void 0:h.length)&&void 0!==u?u:0}),null===(p=this.onRowsUpdatedFunc)||void 0===p||p.call(this,e))}refreshPendingDeadlines(){for(const e of this.pendingBlocks)clearTimeout(e.timer),e.timer=this.createBlockTimer(e)}createBlockTimer(e){return setTimeout(()=>{F.v.warn(`Infinite DATASERVER block ${e.startRow}-${e.endRow} for ${this.resourceName} timed out waiting for rows; resolving with ${this.rowData.size} accumulated row(s).`),this.settleBlock(e,!0)},oe.BLOCK_RESOLVE_TIMEOUT_MS)}accumulate(e){var t,i;const a=new Map(this.rowData);null===(t=e.inserts)||void 0===t||t.forEach(e=>{const t=null==e?void 0:e[this.rowId];void 0!==t&&a.set(t,e)});const r=(0,ae.K)(a,this.rowId);null===(i=e.updates)||void 0===i||i.forEach(e=>{const t=r(e);if(void 0===t)return;const i=a.get(t);a.set(t,i?Object.assign(Object.assign(Object.assign({},i),e),{[this.rowId]:t}):e)}),this.rowData=a}settleCoveredBlocks(){for(const e of[...this.pendingBlocks])(this.rowData.size>=e.endRow||this.streamEnded)&&this.settleBlock(e,!0)}settleBlock(e,t){var i;if(e.settled)return;if(e.settled=!0,this.pendingBlocks.delete(e),clearTimeout(e.timer),!t)return void e.fail();const a=[...this.rowData.values()].slice(e.startRow,e.endRow),r=this.streamEnded?this.rowData.size:this.hasCriteria||void 0===this.serverRowsCount?-1:Math.min(this.serverRowsCount,(0,ie.kG)(null===(i=this.resourceParams)||void 0===i?void 0:i.MAX_VIEW));F.v.debug("Infinite DATASERVER block settled",{startRow:e.startRow,endRow:e.endRow,rows:a.length,cached:this.rowData.size,lastRow:r}),e.success(a,r),this.deliverRows(e.startRow,a),this.notifyDataAvailability(e.startRow,a.length)}notifyDataAvailability(e,t){var i,a;0!==e||this.detached||(0===t?null===(i=this.onNoDataAvailableFunc)||void 0===i||i.call(this):null===(a=this.onDataAvailableFunc)||void 0===a||a.call(this))}deliverRows(e,t){var i,a;if(this.detached)return;const{withdrawnRowIds:r}=this.ledger.record(e,t);t.length>0&&(null===(i=this.onRowsDeliveredFunc)||void 0===i||i.call(this,t)),r.length>0&&(null===(a=this.onRowsWithdrawnFunc)||void 0===a||a.call(this,r))}failAllPendingBlocks(){for(const e of[...this.pendingBlocks])this.settleBlock(e,!1)}reset(){this.teardownDataserverSubscription()}teardownDataserverSubscription(){var e;this.failAllPendingBlocks(),null===(e=this.dataserverStreamSubscription)||void 0===e||e.unsubscribe(),this.dataserverStreamSubscription=void 0,this.dataserverStream=void 0,this.subscriptionKey=void 0,this.sourceRef=void 0,this.rowData=new Map,this.streamStarted=!1,this.serverRowsCount=void 0,this.hasCriteria=!1,this.moreRows=void 0,this.pagingStopped=void 0,this.moreRowsInFlight=!1}destroy(){this.teardownDataserverSubscription(),this.ledger.clear(),F.v.debug("GenesisInfiniteDatasource destroyed")}detach(){this.detached=!0,this.loadGeneration+=1,this.rowCacheKey=void 0,this.destroy(),F.v.debug("GenesisInfiniteDatasource detached by its host")}}oe.BLOCK_RESOLVE_TIMEOUT_MS=1e4,oe.HTTP_NOT_FOUND=404;var ne=i(62922);let le=class extends((0,n.S)(ee.ML)){constructor(){super(...arguments),this.request={},this.onDatasourceReady=e=>(0,r.sH)(this,void 0,void 0,function*(){if(!(yield this.initializeDatasource(this.datasourceOptions(),!0,!1)))return F.v.debug(`Genesis Datasource init failed for ${this.resourceName}`),this.clearRowData(),void this.recordDisconnected();if(!this.isInfiniteSupportedForResource())return void this.clearRowData();this.$emit(Q.V.dataInit),this.setDisconnected(!1),this.indexes=this.getResourceIndexes(this.datasource.availableIndexes,this.datasource.availableSortableFields);const e=(0,K.X)(this.datasource.originalFieldDef),t=yield this.getAgColumnDefs(e);this.$emit(Z.c.schemaUpdated,{schema:t,metadata:e}),this.infiniteDatasource=new oe({createSnapshotFunc:this.createSnapshot.bind(this),createDataserverStreamFunc:this.createDataserverStream.bind(this),getMoreRowsFunc:e=>this.connect.getMoreRows(e,0),onRowsDeliveredFunc:this.reportDeliveredRows.bind(this),onRowsWithdrawnFunc:this.reportWithdrawnRows.bind(this),onRowCacheResetFunc:()=>this.clearRowData(!1),onRowsInvalidatedFunc:this.handleLiveRowsInvalidated.bind(this),onRowsUpdatedFunc:this.handleLiveRowsUpdated.bind(this),onNoDataAvailableFunc:()=>this.$emit(Z.c.noDataAvailable),onDataAvailableFunc:()=>this.$emit(Z.c.loadingFinished),errorHandlerFunc:this.handleErrors.bind(this),resourceName:this.resourceName,resourceParams:this.isRequestServer?this.datasource.requestOnlyParams:this.datasource.dataserverOnlyParams,resourceIndexes:this.indexes,resourceColDefs:this.datasource.originalFieldDef,maxRows:+this.maxRows,rowId:this.rowId,baseCriteria:this.buildCriteria(),isRequestServer:this.isRequestServer,defaultOrderBy:this.orderBy,defaultReverse:this.reverse}),this.$emit(Z.c.setInfiniteDatasource,{datasource:this.infiniteDatasource}),this.setupCommitTriggeredRefresh(),this.$emit(Z.c.addGridCssClass,{className:"grid-pro-infinite"}),this.$emit(Z.c.filtersRestored)})}resourceNameChanged(e,t){e&&e!==t&&g.DOM.queueUpdate(()=>(0,r.sH)(this,void 0,void 0,function*(){yield this.restart()}))}criteriaChanged(e,t){const i=e!==(0,X.Q)(t,";");this.infiniteDatasource&&i&&g.DOM.queueUpdate(()=>(0,r.sH)(this,void 0,void 0,function*(){yield this.reloadResourceData()}))}connectedCallback(){super.connectedCallback();const e=this.shouldRunConnect;g.DOM.queueUpdate(()=>{e&&(this.init(),this.subscribeToConnection(),this.subscribeToFilterChanges())})}disconnectedCallback(){super.disconnectedCallback();const e=this.shouldRunDisconnect;g.DOM.queueUpdate(()=>(0,r.sH)(this,void 0,void 0,function*(){e&&(yield this.destroy(),this.unsubscribeFromConnection(),this.unsubscribeFromFilterChanges())}))}subscribeToFilterChanges(){this.unsubscribeFromFilterChanges(),this.filterSub=this.update.pipe((0,W.i)(1),(0,J.B)(600)).subscribe(()=>{this.infiniteDatasource&&this.reloadResourceData()})}unsubscribeFromFilterChanges(){var e;null===(e=this.filterSub)||void 0===e||e.unsubscribe(),this.filterSub=void 0}deepClone(){const e=super.deepClone();return e.deferredGridOptions=structuredClone(this.deferredGridOptions),e.deferredColumnStates=structuredClone(this.deferredColumnStates),e}reloadResourceData(){return(0,r.sH)(this,void 0,void 0,function*(){var e,t;null===(t=null===(e=this.infiniteDatasource)||void 0===e?void 0:e.detach)||void 0===t||t.call(e),this.infiniteDatasource=void 0,this.datasource.destroy(),this.$emit(Z.c.cacheFilterConfig),this.clearRowData(!1),this.setDisconnected(!1),this.$emit(Z.c.refreshInfiniteCache,{purge:!0}),yield this.init()})}init(){return(0,r.sH)(this,void 0,void 0,function*(){const e=Object.assign({getRowId:e=>e.data?String(e.data[this.rowId]):null,cacheBlockSize:this.maxRows,defaultColDef:{filter:!0,resizable:!0,sortable:!1,unSortIcon:!0},rowBuffer:0,rowModelType:"infinite",suppressMultiSort:!0,cacheOverflowSize:2,maxConcurrentDatasourceRequests:1,infiniteInitialRowCount:1,maxBlocksInCache:10},this.deferredGridOptions);this.$emit(Z.c.initialize,{options:e,keepColDefsOnClearRowData:this.keepColDefsOnClearRowData}),this.clearReadyListener(),this.addEventListener(Z.c.ready,this.onDatasourceReady,{once:!0}),this.resourceName||this.handleErrors("Application not connected or invalid resource name, datasource will not work.","unknown")})}clearReadyListener(){this.removeEventListener(Z.c.ready,this.onDatasourceReady)}isInfiniteSupportedForResource(){return!(this.isRequestServer&&!this.datasource.criteriaOnlyRequest)||(this.handleErrors(`Infinite row model is not supported for the REQUEST_SERVER resource '${this.resourceName}' because it does not support criteria-only requests. Set 'criteriaOnlyRequest = true' on the request reply definition, or use a client-side datasource for this resource.`,"resource-type"),!1)}handleLiveRowsInvalidated(e){this.reportLiveChange(e),this.$emit(Z.c.refreshInfiniteCache,{purge:!0})}handleLiveRowsUpdated(e){this.reportLiveChange(e),this.$emit(Z.c.refreshInfiniteCache,{purge:!1})}reportLiveChange(e){const t=this.resetTransaction();this.handleStreamUpdates(e.updates),this.handleStreamDeletes(e.deletes),this.emitTransaction(t)}destroy(){return(0,r.sH)(this,void 0,void 0,function*(){var e,t;this.clearReadyListener(),this.teardownCommitTriggeredRefresh(),this.$emit(Z.c.removeGridCssClass,{className:"grid-pro-infinite"}),this.datasource.destroy(),this.clearRowData(),this.infiniteDatasource&&(null===(t=(e=this.infiniteDatasource).detach)||void 0===t||t.call(e),this.infiniteDatasource=void 0),this.$emit(Z.c.setInfiniteDatasource,{datasource:null})})}restart(){return(0,r.sH)(this,void 0,void 0,function*(){yield this.destroy(),yield this.init()})}clearRowData(e=!0){this.rowData=new Map,this.resetTransaction(),this.$emit(Z.c.dataCleared,{includeSchema:e})}setupCommitTriggeredRefresh(){var e;this.teardownCommitTriggeredRefresh(),!this.isSnapshot&&this.isRequestServer&&(null===(e=this.pollTriggerEvents)||void 0===e?void 0:e.length)&&(this.commitResponseUnsubscribe=this.connectEvents.addCommitResponseListener(e=>{var t;const{eventName:i,response:a}=e.detail;this.pollTriggerEvents.includes(i)&&(null===(t=a.MESSAGE_TYPE)||void 0===t?void 0:t.endsWith("_ACK"))&&(F.v.debug(`Commit ACK for ${i}, re-reading the loaded blocks.`),this.$emit(Z.c.refreshInfiniteCache,{purge:!1}))}))}teardownCommitTriggeredRefresh(){var e;null===(e=this.commitResponseUnsubscribe)||void 0===e||e.call(this),this.commitResponseUnsubscribe=void 0}createSnapshot(){return(0,r.sH)(this,arguments,void 0,function*(e=null){return yield this.datasource.snapshot(e)})}createDataserverStream(e=null){return this.connect.stream(this.resourceName,()=>{},e=>{var t;F.v.error("Infinite DATASERVER paged stream error:",e),this.handleErrors((null===(t=null==e?void 0:e.receivedMessage)||void 0===t?void 0:t.ERROR)||(null==e?void 0:e.message),"stream")},e)}getAgColumnDefs(e){return(0,r.sH)(this,void 0,void 0,function*(){const t=this.generateColumnDefsFromMetadata(e,ne.O,ne.c),i=new Set;return this.indexes.forEach((e,t)=>{t&&e.forEach(e=>i.add(e))}),t.forEach(e=>{e.sortable=this.isRequestServer||i.has(e.field),this.datasource.criteriaOnlyRequest&&(e.filter=this.datasource.availableCriteriaFields.includes(e.field)?e.filter:null)}),t})}loadMore(){F.v.warn("loadMore() is not needed for Infinite Row Model - scrolling triggers data loading automatically")}};(0,r.Cg)([j.dm],le.prototype,"connect",void 0),(0,r.Cg)([q.a4],le.prototype,"connectEvents",void 0),(0,r.Cg)([Y.yW],le.prototype,"datasource",void 0),(0,r.Cg)([g.observable],le.prototype,"request",void 0),le=(0,r.Cg)([(0,g.customElement)({name:"grid-pro-infinite-datasource"})],le);var de=i(18070),ge=i(30335),ce=i(26062),he=i(32610),ue=i(98884),pe=i(82128),me=i(55365),ve=i(53397),fe=i(52540),be=i(49104),ye=i(88863),Ce=i(71964),Se=i(73203),Re=i(50103),we=i(23201);(0,o.N)(ce.D,V.L,U.X,le,v.O,x.G,B.X),h.syG.registerModules([h.n76,h.Q90,h.x6L,h.YN8,h.YzW,h.Lt,h.I95,h.O4V,h.H18,h.lvV,h.mfG,h.Iws,h.nSw,h.FUS,h.Ss0,h.tkg,h.ZDV,h.ZyC,h.XG7,h.VZy,h.$I9,h.dGu,h.AJG,h.c5B,h.BG,h.KIB,h.Sko,h.ZuP,h.Vc,z.JE]);const Ee="gridReady";class Ae extends((0,n.S)(c.FoundationElement)){getColumnDragBridge(){return this.columnDragBridge}rowDataChanged(e,t){this.initialised&&this.gridApi&&this.gridApi.setGridOption("rowData",t)}gridSlotChanged(){this.gridSlot&&!this.initialised&&this.agGridOptions&&this.initGrid()}enableColumnSelectionChanged(){this.syncColumnSelectionHostLayout()}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.disposed=!1,this.debouncedSaveColumnState=m()(this.saveColumnState.bind(this),400),this.debouncedSaveFilterModel=m()(this.cacheFilterConfig.bind(this),400),this.debouncedNotifyDatasourceVisibleColumns=m()(this.notifyDatasourceVisibleColumns.bind(this),400),this.autoCellRendererByType=!1,this.onlyTemplateColDefs=!1,this.gridAutosizingEnabled=!1,this.enableCellFlashing=!1,this.enableRowFlashing=!1,this.columnDragBridge={},this.columnComponentName="grid-pro-column",this.themeMode="dark",this.statusBarConfig=me.o2,this.withStatusBar=!1,this.enableColumnSelection=!1,this.applyingDatasourceGridOptions=!1,this.rehydrationAttempted=!1,this.rootEventsListeners=[],this.datasourceEventHandlers=[],this.gridEventsQueue=[],this.registeredGridEvents=new Set,this.gridEventListeners=new Map,this.boundGlobalEventListener=this.globalEventListener.bind(this),this._filterConfig=void 0,this.handleLuminanceChange=e=>{const t=d.baseLayerLuminance.getValueFor(e.target);this.themeMode=t===d.StandardLuminance.DarkMode?"dark":"light"},this.luminanceObserver={handleChange:e=>this.handleLuminanceChange(e)},this.agAttributes={},this.agPropertiesMap=he.zI.reduce((e,t)=>(e[t.toLowerCase()]=t,e[(0,Re.w)(t)]=t,e),{});const e=this.hideDatasourceError.bind(this);this.rootEventsListeners.push([Q.V.dataInit,e],[he.yY.datasourceErrorClose,e],[de.L.error,this.handleBaseDatasourceError.bind(this)],[de.L.connected,e]),this.datasourceEventHandlers=[[Z.c.initialize,this.handleInitialize.bind(this)],[Z.c.dataLoaded,this.handleDataLoaded.bind(this)],[Z.c.dataChanged,this.handleDataChanged.bind(this)],[Z.c.schemaUpdated,this.handleSchemaUpdated.bind(this)],[Z.c.dataCleared,this.handleDataCleared.bind(this)],[Z.c.loadingStarted,this.handleLoadingStarted.bind(this)],[Z.c.loadingFinished,this.handleLoadingFinished.bind(this)],[Z.c.noDataAvailable,this.handleNoDataAvailable.bind(this)],[Z.c.filtersRestored,this.handleFiltersRestored.bind(this)],[Z.c.moreDataAvailable,this.handleMoreDataAvailable.bind(this)],[Z.c.error,this.handleDatasourceError.bind(this)],[Z.c.destroy,this.handleDatasourceDestroy.bind(this)],[Z.c.cacheFilterConfig,this.cacheFilterConfig.bind(this)],[Z.c.refreshServerSide,this.handleRefreshServerSide.bind(this)],[Z.c.setServerSideDatasource,this.handleSetServerSideDatasource.bind(this)],[Z.c.addGridCssClass,this.handleAddGridCssClass.bind(this)],[Z.c.removeGridCssClass,this.handleRemoveGridCssClass.bind(this)],[Z.c.applyServerSideTransaction,this.handleApplyServerSideTransaction.bind(this)],[Z.c.setInfiniteDatasource,this.handleSetInfiniteDatasource.bind(this)],[Z.c.refreshInfiniteCache,this.handleRefreshInfiniteCache.bind(this)]]}addEventListener(e,t,i){super.addEventListener(e,t,i),this.gridApi?this.addGridEventListener(e):this.gridEventsQueue.includes(e)||this.gridEventsQueue.push(e)}addGridEventListener(e){if(this.registeredGridEvents.has(e))return;this.registeredGridEvents.add(e);const t=t=>{this.$emit(e,t)};this.gridEventListeners.set(e,t),this.gridApi.addEventListener(e,t)}handleError(e,t){this.gridErrorItems=[...this.gridErrorItems,{detail:t.detail,type:e}]}handleBaseDatasourceError(e){const t={detail:{message:e.detail.message},type:he.Ie.datasource};this.gridErrorItems=[...this.gridErrorItems,{detail:t.detail,type:t.type}]}hideDatasourceError(){this.gridErrorItems=this.gridErrorItems.filter(e=>e.type!==he.Ie.datasource),this.removeAttribute("ds-disconnected")}connectedCallback(){var e;super.connectedCallback(),this.syncColumnSelectionHostLayout(),this.disposed=!1;const t=null!==(e=this.provider)&&void 0!==e?e:this;this.luminanceSubscription=d.baseLayerLuminance.subscribe(this.luminanceObserver,t),this.gridAutosizingEnabled&&(this.visibilityObserverCleanup=(0,l.j)(this,e=>{e&&this.debouncedColumnAutosize()})),this.rehydrationAttempted=!1,this.shouldRunConnect&&(this.rootEventsListeners.forEach(([e,t])=>{this.addEventListener(e,t)}),he.zI.forEach(e=>{const t=function(e,t){let i=Object.getPrototypeOf(e);for(;i&&i!==HTMLElement.prototype;){const e=Object.getOwnPropertyDescriptor(i,t);if(e)return e;i=Object.getPrototypeOf(i)}}(this,e);Object.defineProperty(this,e,{get:null==t?void 0:t.get,set:i=>{var a,r;const s=null===(a=null==t?void 0:t.get)||void 0===a?void 0:a.call(this);null===(r=null==t?void 0:t.set)||void 0===r||r.call(this,i),this.agAttributeChangedCallback((0,Re.w)(e),s,i)},enumerable:!0,configurable:!0})}),this.toggleDatasourceEventListeners(!0))}disconnectedCallback(){var e;this.disposed=!0,this.debouncedSaveColumnState.cancel(),this.debouncedSaveFilterModel.cancel();const t=null!==(e=this.provider)&&void 0!==e?e:this;d.baseLayerLuminance.unsubscribe(this.luminanceObserver,t),this.luminanceSubscription&&(this.luminanceSubscription.unsubscribe(),this.luminanceSubscription=void 0),this.visibilityObserverCleanup&&(this.visibilityObserverCleanup(),this.visibilityObserverCleanup=void 0),super.disconnectedCallback(),this.rehydrationAttempted=!1;const i=this.shouldRunDisconnect;this.rootEventsListeners.forEach(([e,t])=>{this.removeEventListener(e,t)}),i?this.performDisconnectCleanup():queueMicrotask(()=>{this.isConnected||this.performDisconnectCleanup()})}syncColumnSelectionHostLayout(){this.classList.toggle("has-column-selection",this.enableColumnSelection)}performDisconnectCleanup(){this.debounced&&(clearTimeout(this.debounced),this.debounced=null),this.initialised=!1,this.resetGridOptionsState(),this.destroyGridInstance(),this.toggleDatasourceEventListeners(!1),this.debouncedSaveColumnState.cancel(),this.debouncedSaveFilterModel.cancel(),this.registeredGridEvents.clear(),this.gridEventsQueue=[]}destroyGridInstance(){this.gridApi&&this.gridEventListeners.forEach((e,t)=>{this.gridApi.removeEventListener(t,e)}),this.gridEventListeners.clear(),this.gridApi?this.gridApi.destroy():this.agGrid&&this.agGrid.destroy(),this.gridSlot&&this.gridSlot.replaceChildren(),this.gridApi=void 0,this.agGrid=void 0}toggleDatasourceEventListeners(e){const t=e?"addEventListener":"removeEventListener";this.datasourceEventHandlers.forEach(([e,i])=>{super[t](e,i)})}handleInitialize(e){const{options:t,keepColDefsOnClearRowData:i}=e.detail;i&&(this.columnState=this.gridApi.getColumnState()),this.applyingDatasourceGridOptions=!0;try{this.gridOptions=Object.assign(Object.assign(Object.assign({},this.userProvidedGridOptions),t),i?{columnDefs:this.gridApi.getColumnDefs()}:{}),this.initGrid()}finally{this.applyingDatasourceGridOptions=!1}}handleDataLoaded(e){const{data:t}=e.detail;this.gridApi&&this.gridApi.setGridOption("rowData",t)}handleDataChanged(e){const{changes:t}=e.detail;if(!this.gridApi||!this.isClientSideRowModel)return;const i=this.gridApi.applyTransaction(t);this.flashAddedCells(null==i?void 0:i.add)}get isClientSideRowModel(){var e,t,i;return"clientSide"===(null!==(i=null===(t=null===(e=this.gridApi)||void 0===e?void 0:e.getGridOption)||void 0===t?void 0:t.call(e,"rowModelType"))&&void 0!==i?i:"clientSide")}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*(){this.gridApi?yield this.processSchemaUpdate(e.detail):this.pendingSchemaUpdate=e.detail})}processSchemaUpdate(e){return(0,r.sH)(this,arguments,void 0,function*({schema:e}){const t=this.gridApi.getColumnDefs();if(t&&t.length>0)return;this.applyCommunityFilterFallbacks(e);const i=yield this.mergeAllColumnDefsAndStates(e,!0);this.gridApi.setGridOption("columnDefs",i),this.restoreCachedFilterConfig()})}applyCommunityFilterFallbacks(e){const t=this.gridApi.isModuleRegistered("SetFilterModule"),i=this.gridApi.isModuleRegistered("MultiFilterModule");e.forEach(e=>{var r,s,o,n,l;if("agSetColumnFilter"===e.filter&&!t)return F.v.debug(`SetFilterModule is not registered; column '${e.field}' falls back to the enum filter`),e.filter=a.enumFilter,void(null!==(r=e.floatingFilterComponent)&&void 0!==r||(e.floatingFilterComponent=a.enumFloatingFilter));if("agMultiColumnFilter"!==e.filter)return;const d=null===(o=null===(s=e.filterParams)||void 0===s?void 0:s.filters)||void 0===o?void 0:o.find(e=>"agSetColumnFilter"===e.filter);i?!t&&d&&(F.v.debug(`SetFilterModule is not registered; the set sub-filter of column '${e.field}' falls back to the enum filter`),d.filter=a.enumFilter):(null===(n=null==d?void 0:d.filterParams)||void 0===n?void 0:n.values)?(F.v.debug(`MultiFilterModule is not registered; enum column '${e.field}' falls back to the enum filter`),e.filter=a.enumFilter,e.filterParams=Object.assign({},d.filterParams),null!==(l=e.floatingFilterComponent)&&void 0!==l||(e.floatingFilterComponent=a.enumFloatingFilter)):(F.v.warn("MultiFilterModule is not registered, falling back to text filter"),e.filter="agTextColumnFilter")})}handleDataCleared(e){const{includeSchema:t}=e.detail;this.gridApi&&(t&&this.gridApi.setGridOption("columnDefs",[]),this.isClientSideRowModel&&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 t,i,a,r;const{hasMoreData:s,sourceRef:o}=e.detail;if(!this.gridApi)return;const n=null===(i=(t=this.gridApi).getStatusPanel)||void 0===i?void 0:i.call(t,me.k7.loadMore);n&&(null===(r=(a=n).updateParams)||void 0===r||r.call(a,{moreRows:s,sourceRef:o}))}handleDatasourceError(){this.setAttribute("ds-disconnected","ds-disconnected")}handleDatasourceDestroy(){this.clearLocalGridOptions()}handleRefreshServerSide(e){const{purge:t}=e.detail;this.gridApi&&this.gridApi.refreshServerSide({purge:t})}handleSetServerSideDatasource(e){const{datasource:t}=e.detail;this.gridApi&&this.gridApi.setGridOption("serverSideDatasource",t)}handleAddGridCssClass(e){var t;const{className:i}=e.detail,a=(null===(t=this.gridSlot)||void 0===t?void 0:t.parentElement)||this;a&&a.classList.add(i)}handleRemoveGridCssClass(e){var t;const{className:i}=e.detail,a=(null===(t=this.gridSlot)||void 0===t?void 0:t.parentElement)||this;a&&a.classList.remove(i)}handleApplyServerSideTransaction(e){var t,i;const{transaction:a,async:r,callback:s}=e.detail;if(this.gridApi)if(r)this.gridApi.applyServerSideTransactionAsync(a,e=>{var t,i;this.flashAddedCells([...null!==(t=null==e?void 0:e.add)&&void 0!==t?t:[],...null!==(i=null==e?void 0:e.update)&&void 0!==i?i:[]]),null==s||s(e)});else{const e=this.gridApi.applyServerSideTransaction(a);this.flashAddedCells([...null!==(t=null==e?void 0:e.add)&&void 0!==t?t:[],...null!==(i=null==e?void 0:e.update)&&void 0!==i?i:[]]),s&&s(e)}}handleSetInfiniteDatasource(e){const{datasource:t}=e.detail;this.gridApi&&this.gridApi.setGridOption("datasource",t)}handleRefreshInfiniteCache(e){var t;this.gridApi&&((null===(t=e.detail)||void 0===t?void 0:t.purge)?this.gridApi.purgeInfiniteCache():this.gridApi.refreshInfiniteCache())}combineAllGridComponents(e){const t={[me.IX.action]:R.eA,[me.IX.actionsMenu]:w.cN,[me.IX.boolean]:E._Y,[me.IX.editable]:A.YM,[me.IX.icon]:k.Jt,[me.IX.statusPill]:D.N7,[me.IX.select]:O.gs,[me.IX.selectEditor]:f._Q,[me.IX.numberEditor]:b.Z0,[me.IX.multiselectEditor]:y.pZ,[me.IX.dateEditor]:C.S8,[me.IX.stringEditor]:S.XJ,[a.enumFilter]:M,[a.enumFloatingFilter]:N,[me.k7.labelValue]:fe.k,[me.k7.loadMore]:be.s,[me.k7.reload]:ye.W,[me.k7.rowCount]:Ce.i};return Object.assign(Object.assign(Object.assign({},t),e),this.gridComponents)}statePersistanceEnabled(){return!(!this.persistColumnStateKey||0===this.persistColumnStateKey.length)}getSelectedRows(){var e,t,i,a;try{if(!this.initialised||!this.gridApi)return[];const r=null===(e=this.gridOptions)||void 0===e?void 0:e.rowSelection;if("single"===r||"multiple"===r)return this.gridApi.getSelectedRows&&this.gridApi.getSelectedRows().length>0?this.gridApi.getSelectedRows():[];if((null===(t=this.gridApi)||void 0===t?void 0:t.getCellRanges)&&this.gridApi.getCellRanges().length>0)return this.getCellRangeRowData();if(!(null===(i=this.gridOptions)||void 0===i?void 0:i.enableRangeSelection)){const e=null===(a=this.gridApi)||void 0===a?void 0:a.getFocusedCell();if(e){const t=this.gridApi.getDisplayedRowAtIndex(e.rowIndex);if(null==t?void 0:t.data)return[t.data]}}return[]}catch(e){return F.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 t=this.gridApi.getCellRanges();if(0===t.length)return[];const i=[];return t.forEach(e=>{const t=e.startRow.rowIndex,a=e.endRow.rowIndex;for(let e=t;e<=a;e+=1){const t=this.gridApi.getDisplayedRowAtIndex(e);(null==t?void 0:t.data)&&!i.some(e=>e===t.data)&&i.push(t.data)}}),i}hasSelectedRows(){return this.getSelectedRows().length>0}updateLabelValueStatusBar(e){var t,i;if(!this.gridApi)return void F.v.warn("Grid Pro: Cannot update label-value status bar - grid API not available");const a=null===(i=(t=this.gridApi).getStatusPanel)||void 0===i?void 0:i.call(t,me.k7.labelValue);a&&"function"==typeof a.updateParams?a.updateParams(e):F.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()},he.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=(0,we.n7)(e),e=this.gridAutosizingEnabled?this.removeConfigWidthsToAutosize(e):e;const t=0===e.filter(e=>{if(e.hide)return!1;const t=this.gridApi.getColumn(e.colId);return Boolean(t.getColDef().headerName)}).length;if(0===e.length||JSON.stringify(e)===JSON.stringify(this.columnState)||t)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 t=yield this.getSavedColumnState(),i=(0,we.n7)(t);i&&i.length>0&&(null===(e=this.gridApi)||void 0===e||e.applyColumnState({state:i,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,t;const i=yield this.getfilterModel();void 0!==i&&(null===(e=this.gridApi)||void 0===e||e.setFilterModel(i),null===(t=this.gridApi)||void 0===t||t.onFilterChanged())})}get gridOptions(){return this.agGridOptions}get isServerSide(){return this.gridProDatasource instanceof U.X}get gridParams(){return{globalListener:this.boundGlobalEventListener,modules:[z.JE,h.Vc,h.ZuP]}}get gridProDatasource(){return this.querySelector("grid-pro-genesis-datasource")||this.querySelector("grid-pro-client-side-datasource")||this.querySelector("grid-pro-server-side-datasource")||this.querySelector("grid-pro-infinite-datasource")}get isInfiniteRowModel(){return this.gridProDatasource instanceof le}notifyDatasourceVisibleColumns(){var e,t,i,a;const r=this.gridProDatasource;if(!r)return;const s=(0,T.C)(null===(t=null===(e=this.gridApi)||void 0===e?void 0:e.getAllDisplayedColumns)||void 0===t?void 0:t.call(e),null===(a=null===(i=this.gridApi)||void 0===i?void 0:i.getColumnDefs)||void 0===a?void 0:a.call(i));s.length&&r.setVisibleColumns(s)}set gridOptions(e){!this.applyingDatasourceGridOptions&&e&&(this.userProvidedGridOptions=Object.assign({},e));const t=()=>{!this.disposed&&this.isConnected&&(this.debouncedSaveColumnState(),this.debouncedColumnAutosize())},i=()=>{!this.disposed&&this.isConnected&&this.debouncedNotifyDatasourceVisibleColumns()};Array.from(this.attributes).forEach(e=>{const t=this.agPropertiesMap[e.name];t&&(this.agAttributes[t]=e.value)});const{columnDefs:a,components:s,defaultColDef:o,getRowId:n,onGridReady:l,onFilterChanged:d,onFirstDataRendered:g}=e,c=(0,r.Tt)(e,["columnDefs","components","defaultColDef","getRowId","onGridReady","onFilterChanged","onFirstDataRendered"]),h=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.gridOptionsConfig),{defaultColDef:Object.assign({enableCellChangeFlash:this.enableCellFlashing,filter:!0,resizable:!0,sortable:!0},o),components:this.combineAllGridComponents(s),headerHeight:this.headerHeight,rowHeight:this.rowHeight,animateRows:!1,suppressDragLeaveHidesColumns:!0}),this.eventsAndCallbacks),{onGridReady:e=>(0,r.sH)(this,void 0,void 0,function*(){var t,i,a;if(this.gridApi=e.api,this.gridEventsQueue.length&&this.gridEventsQueue.forEach(e=>{this.addGridEventListener(e)}),this.pendingSchemaUpdate){const e=this.pendingSchemaUpdate;this.pendingSchemaUpdate=void 0;try{yield this.processSchemaUpdate(e)}catch(e){F.v.error("Grid Pro: failed to apply the pending schema update on grid ready:",e)}}this.rowData&&this.gridApi.setGridOption("rowData",this.rowData),l&&l(e),(null===(t=this.gridProDatasource)||void 0===t?void 0:t.keepColDefsOnClearRowData)&&(null===(i=this.columnState)||void 0===i?void 0:i.length)>0&&this.gridApi.applyColumnState({state:this.columnState,applyOrder:!0}),this.$emit(Ee,{event:e,gridId:this.id}),this.$emit(me.mr,{event:e,gridId:this.id}),this.notifyDatasourceVisibleColumns(),null===(a=this.gridProDatasource)||void 0===a||a.$emit(Z.c.ready),this.restoreColumnState(),this.restoreCachedFilterConfig(),this.debouncedColumnAutosize()}),onFirstDataRendered:e=>{this.notifyDatasourceVisibleColumns(),g&&g(e)},onColumnPinned:t,onColumnResized:t,onColumnMoved:t,onColumnVisible:()=>{t(),i()},onDisplayedColumnsChanged:()=>{t(),i()},onFilterChanged:e=>{!this.disposed&&this.isConnected&&(this.debouncedSaveFilterModel(),d&&d(e))},onGridSizeChanged:t,onSortChanged:t}),c);this.gridProDatasource?(h.columnDefs=a,h.getRowId=n,this.setupStatusBar(h),this.setLocalGridOptions(h)):this.mergeAllColumnDefsAndStates(a).then(e=>{!this.disposed&&this.isConnected&&(h.columnDefs=e,h.getRowId=n,this.setupStatusBar(h),this.setLocalGridOptions(h),this.initGrid())})}setLocalGridOptions(e){this.agGridOptions=Object.assign(Object.assign({},this.agGridOptions),(0,he.Qg)(e,this.agAttributes)),this.agGridOptions.context=Object.assign(Object.assign({},this.agGridOptions.context),{[z.nJ]:this.columnDragBridge}),null==this.agGridOptions.allowDragFromColumnsToolPanel&&(this.agGridOptions.allowDragFromColumnsToolPanel=!0)}clearLocalGridOptions(){this.agGridOptions=void 0}resetGridOptionsState(){this.userProvidedGridOptions=void 0,this.agGridOptions=void 0}initGrid(){g.DOM.queueUpdate(()=>{!this.disposed&&this.isConnected&&this.gridSlot&&(this.initialised&&(this.destroyGridInstance(),this.gridSlot.firstChild&&this.gridSlot.removeChild(this.gridSlot.firstChild)),this.agGrid=(0,h.Dvw)(this.gridSlot,this.agGridOptions,this.gridParams),this.initialised=!0)})}mergeAllColumnDefsAndStates(e){return(0,r.sH)(this,arguments,void 0,function*(e,t=!1){var i;const r=e||[];r.forEach(e=>{if(this.headerCaseType&&e.field&&!e.headerName){const t=u[this.headerCaseType];t?e.headerName=t(e.field):F.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 s=Array.from(this.querySelectorAll(this.columnComponentName)).map(e=>e.definition).map(e=>{var t,i,s,o,n,l;if(this.enableCellFlashing&&void 0===e.enableCellChangeFlash&&(e.enableCellChangeFlash=!0),"agSetColumnFilter"===e.filter||e.filter===a.enumFilter){if(!(null!=e.filterParams&&"values"in e.filterParams)){const a=null===(t=r.find(t=>t.field===e.field))||void 0===t?void 0:t.filterParams,l=null!==(i=null==a?void 0:a.values)&&void 0!==i?i:null===(n=null===(o=null===(s=null==a?void 0:a.filters)||void 0===s?void 0:s.find(e=>"agSetColumnFilter"===e.filter))||void 0===o?void 0:o.filterParams)||void 0===n?void 0:n.values;l&&(e.filterParams=Object.assign(Object.assign({},e.filterParams),{values:l}))}e.filter===a.enumFilter&&(null!==(l=e.floatingFilterComponent)&&void 0!==l||(e.floatingFilterComponent=a.enumFloatingFilter))}e.editable&&(e.cellRenderer||e.cellRendererSelector||(e.cellRendererSelector=t=>{if(t.data[me.A7]===e.field)return{component:me.IX.editable}}),e.tooltipComponent||e.tooltipValueGetter||(e.tooltipComponent=Se.y,e.tooltipValueGetter=t=>{const i=t.data[me.h1];if(i&&i.column===e.field)return i.message}),e.cellClassRules||(e.cellClassRules={error:e=>{var t;return(null===(t=e.data[me.h1])||void 0===t?void 0:t.column)===e.colDef.field}}));const d=r.find(t=>e.field===t.field);return Object.assign(Object.assign({},d),e)}),o=s.map(e=>e.field),n=[...s,...this.onlyTemplateColDefs?[]:r.filter(e=>!o.includes(e.field))];if(this.gridProDatasource&&t){const e=yield this.getSavedColumnState();if((null==e?void 0:e.length)>0)return(0,we.yS)(n,e);if((null===(i=this.gridProDatasource.deferredColumnStates)||void 0===i?void 0:i.length)>0)return(0,we.yS)(n,this.gridProDatasource.deferredColumnStates)}return n})}panelExists(e,t){return t.some(t=>t.statusPanel===e)}addRowCountPanel(e,t){if(this.statusBarConfig&&!0===this.statusBarConfig.rows){const i=this.isServerSide||this.isInfiniteRowModel||"infinite"===(null==t?void 0:t.rowModelType)||"serverSide"===(null==t?void 0:t.rowModelType);if(i)this.panelExists(me.k7.rowCount,e)||e.push({statusPanel:me.k7.rowCount,align:"left"});else if(!i){const t="agTotalAndFilteredRowCountComponent";this.panelExists(t,e)||e.push({statusPanel:t,align:"left"})}}}addMaxRowsPanel(e){this.statusBarConfig&&!0===this.statusBarConfig.maxRows&&(this.panelExists(me.k7.labelValue,e)||e.push({statusPanel:me.k7.labelValue,statusPanelParams:{label:"Max Rows",value:this.gridProDatasource.maxRows||s.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 t=this.gridProDatasource.getDatasourceStatusBarPanels(this.isServerSide||this.isInfiniteRowModel,this.statusBarConfig).filter(t=>!this.panelExists(t.statusPanel,e));e.push(...t)}}setupStatusBar(e){var t,i;if(this.withStatusBar&&this.statusBarConfig){const a=[...(null===(t=e.statusBar)||void 0===t?void 0:t.statusPanels)||[]];this.addRowCountPanel(a,e),this.addMaxRowsPanel(a),this.addAggregationPanel(a),this.addDatasourcePanels(a);const r=((null===(i=e.statusBar)||void 0===i?void 0:i.statusPanels)||[]).filter(e=>!this.panelExists(e.statusPanel,a));a.push(...r),e.statusBar={statusPanels:a}}}get observedAttributes(){const e=he.zI.map(e=>e.toLowerCase()),t=he.zI.map(e=>(0,Re.w)(e));return e.concat(t)}agAttributeChangedCallback(e,t,i){var a;if(t===i)return;const r=this.agPropertiesMap[e];r&&(this.agAttributes[r]=i,this.initialised&&(null===(a=this.gridApi)||void 0===a||a.setGridOption(r,i)))}globalEventListener(e,t){const i=e.toLowerCase(),a=new Event(i);a.agGridDetails=t,this.dispatchEvent(a);const r="on"+i;"function"==typeof this[r]&&this[r](a)}}(0,r.Cg)([g.observable],Ae.prototype,"gridApi",void 0),(0,r.Cg)([g.observable],Ae.prototype,"gridErrorItems",void 0),(0,r.Cg)([ve.l],Ae.prototype,"statePersistence",void 0),(0,r.Cg)([(0,g.attr)({attribute:"auto-cell-renderer-by-type",mode:"boolean"})],Ae.prototype,"autoCellRendererByType",void 0),(0,r.Cg)([(0,g.attr)({attribute:"only-template-col-defs",mode:"boolean"})],Ae.prototype,"onlyTemplateColDefs",void 0),(0,r.Cg)([(0,g.attr)({mode:"boolean",attribute:"grid-autosizing"})],Ae.prototype,"gridAutosizingEnabled",void 0),(0,r.Cg)([(0,g.attr)({mode:"boolean",attribute:"enable-cell-flashing"})],Ae.prototype,"enableCellFlashing",void 0),(0,r.Cg)([(0,g.attr)({mode:"boolean",attribute:"enable-row-flashing"})],Ae.prototype,"enableRowFlashing",void 0),(0,r.Cg)([(0,g.attr)({attribute:"persist-column-state-key"})],Ae.prototype,"persistColumnStateKey",void 0),(0,r.Cg)([(0,g.attr)({attribute:"persist-filter-model-key"})],Ae.prototype,"persistFilterModelKey",void 0),(0,r.Cg)([(0,g.attr)({attribute:"header-case-type"})],Ae.prototype,"headerCaseType",void 0),(0,r.Cg)([g.observable],Ae.prototype,"rowData",void 0),(0,r.Cg)([g.attr],Ae.prototype,"columnComponentName",void 0),(0,r.Cg)([g.observable],Ae.prototype,"eventsAndCallbacks",void 0),(0,r.Cg)([g.attr],Ae.prototype,"headerHeight",void 0),(0,r.Cg)([g.attr],Ae.prototype,"rowHeight",void 0),(0,r.Cg)([g.observable],Ae.prototype,"classNames",void 0),(0,r.Cg)([g.observable],Ae.prototype,"agGrid",void 0),(0,r.Cg)([g.observable],Ae.prototype,"gridSlot",void 0),(0,r.Cg)([g.observable],Ae.prototype,"themeMode",void 0),(0,r.Cg)([g.observable],Ae.prototype,"gridComponents",void 0),(0,r.Cg)([g.observable],Ae.prototype,"statusBarConfig",void 0),(0,r.Cg)([(0,g.attr)({mode:"boolean",attribute:"with-status-bar"})],Ae.prototype,"withStatusBar",void 0),(0,r.Cg)([(0,g.attr)({mode:"boolean",attribute:"enable-column-selection"})],Ae.prototype,"enableColumnSelection",void 0),(0,r.Cg)([g.observable],Ae.prototype,"customErrorHandlerTemplate",void 0),(0,r.Cg)([me.lz],Ae.prototype,"gridOptionsConfig",void 0),(0,r.Cg)([g.observable],Ae.prototype,"provider",void 0);const ke=Ae.compose(Object.assign({baseName:"grid-pro",template:pe.a,styles:g.css`
|
|
103
|
+
${ge.B}
|
|
104
|
+
${ue.yK}
|
|
105
105
|
${H.M}
|
|
106
|
-
${
|
|
106
|
+
${ue.em}
|
|
107
107
|
|
|
108
108
|
:host {
|
|
109
109
|
--datasource-error-background-color: var(--neutral-layer-4);
|
|
@@ -130,8 +130,8 @@
|
|
|
130
130
|
.ag-status-bar {
|
|
131
131
|
height: var(--ag-status-bar-height);
|
|
132
132
|
}
|
|
133
|
-
`,shadowOptions:
|
|
134
|
-
${
|
|
133
|
+
`,shadowOptions:he.LU},he.Z$));class De extends f._Q{}const Oe=De.compose({baseName:"select-editor",styles:f.Uo,template:(0,f.iY)("rapid")});class xe extends b.Z0{}const Te=xe.compose({baseName:"number-editor",styles:b.Fv,template:(0,b.r1)("rapid")});class Fe extends y.pZ{}const Ie=Fe.compose({baseName:"multiselect-editor",styles:y.$b,template:(0,y.tB)("rapid")});class Le extends C.S8{}const Ge=Le.compose({baseName:"date-editor",styles:C.kI,template:(0,C.m6)("rapid")});class Pe extends S.XJ{}const Me=Pe.compose({baseName:"string-editor",styles:S.P_,template:(0,S.bZ)("rapid")});class _e extends R.eA{paramsChanged(e,t){(null==t?void 0:t.node.rowHeight)&&this.style.setProperty("--params-row-node-height",`${t.node.rowHeight}px`,"")}}const $e=_e.compose({baseName:"grid-pro-action-renderer",styles:g.css`
|
|
134
|
+
${R.AC}
|
|
135
135
|
.button-padding {
|
|
136
136
|
justify-content: center;
|
|
137
137
|
margin: calc(var(--design-unit) * 1px);
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
`:null===(i=e.params)||void 0===i?void 0:i.actionName}}
|
|
162
162
|
</rapid-button>
|
|
163
163
|
</div>
|
|
164
|
-
`});class
|
|
164
|
+
`});class Ne extends w.cN{paramsChanged(e,t){(null==t?void 0:t.node.rowHeight)&&this.style.setProperty("--params-row-node-height",`${t.node.rowHeight}px`,"")}}const Be=Ne.compose({baseName:"grid-pro-actions-menu-renderer",styles:g.css`
|
|
165
165
|
::part(actions-opener) {
|
|
166
166
|
height: calc(var(--params-row-node-height, 32px) - 6px);
|
|
167
167
|
width: calc(var(--params-row-node-height, 32px) - 6px);
|
|
@@ -177,11 +177,11 @@
|
|
|
177
177
|
name="${e=>{var t;return null===(t=e.params)||void 0===t?void 0:t.headerName}}"
|
|
178
178
|
:definition=${e=>e.params}
|
|
179
179
|
></rapid-actions-menu>
|
|
180
|
-
`});class
|
|
181
|
-
${
|
|
182
|
-
${
|
|
180
|
+
`});class He extends E._Y{}const ze=He.compose({baseName:"boolean-renderer",styles:E.CL,template:(0,E.A9)("rapid")});class Ve extends A.YM{}const Ue=Ve.compose({baseName:"editable-renderer",styles:A.Mx,template:(0,A.iP)("rapid")});class Ke extends O.gs{}const Xe=Ke.compose({baseName:"select-renderer",styles:O.Ad,template:(0,O.qj)("rapid")});class je extends D.N7{}const qe=je.compose({baseName:"status-pill-renderer",template:(0,D.T2)("rapid"),styles:D.x2});class Ye extends k.Jt{}const We=Ye.compose({baseName:"icon-renderer",styles:k.X5,template:(0,k.V$)("rapid")}),Je=he.LU,Qe=he.Z$,Ze=(0,pe.U)("rapid"),et={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%)"},tt=["rowheight","row-height"];function it(e){const t=Number(e);return Number.isFinite(t)&&t>0?t:void 0}class at extends Ae{getCachedTheme(e){const t=null!=e?e:"default";let i=at.cachedThemes.get(t);return i||(i=h.N8R.withParams("default"===t?et:Object.assign(Object.assign({},et),{rowHeight:`${t}px`})),at.cachedThemes.set(t,i)),i}resolveRowHeight(e){for(const e of tt){const t=it(this.getAttribute(e));if(t)return t}return it(e.rowHeight)}agAttributeChangedCallback(e,t,i){var a;super.agAttributeChangedCallback(e,t,i),"rowHeight"===this.agPropertiesMap[e]&&t!==i&&(null===(a=this.gridApi)||void 0===a||a.setGridOption("theme",this.getCachedTheme(it(i))))}set gridOptions(e){const t=Object.assign({},e);t.components=Object.assign({[me.IX.action]:_e,[me.IX.actionsMenu]:Ne,[me.IX.boolean]:He,[me.IX.editable]:Ve,[me.IX.select]:Ke,[me.IX.selectEditor]:De,[me.IX.numberEditor]:xe,[me.IX.multiselectEditor]:Fe,[me.IX.dateEditor]:Le,[me.IX.stringEditor]:Pe,[me.IX.statusPill]:je,[me.IX.icon]:Ye},t.components),t.theme=this.getCachedTheme(this.resolveRowHeight(t)),super.gridOptions=t}}at.cachedThemes=new Map,(0,r.Cg)([g.observable],at.prototype,"provider",void 0);const rt=at.compose(Object.assign({baseName:"grid-pro",template:Ze,styles:g.css`
|
|
181
|
+
${ge.B}
|
|
182
|
+
${ue.yK}
|
|
183
183
|
${H.M}
|
|
184
|
-
${
|
|
184
|
+
${ue.em}
|
|
185
185
|
|
|
186
186
|
:host {
|
|
187
187
|
--datasource-error-background-color: var(--neutral-layer-4);
|
|
@@ -241,7 +241,7 @@
|
|
|
241
241
|
.grid-pro-infinite .ag-header-cell-sortable:hover .ag-sort-none-icon {
|
|
242
242
|
opacity: 1;
|
|
243
243
|
}
|
|
244
|
-
`,shadowOptions:
|
|
244
|
+
`,shadowOptions:Je},Qe));var st=i(11264),ot=i(60591),nt=i(93188);const lt=g.css`
|
|
245
245
|
.ag-theme-genesis-rapid,
|
|
246
246
|
.ag-theme-genesis-rapid-dark,
|
|
247
247
|
.ag-theme-genesis-rapid-light {
|
|
@@ -870,90 +870,90 @@
|
|
|
870
870
|
.ag-theme-genesis-rapid-light .ag-root-wrapper {
|
|
871
871
|
border: 0 !important;
|
|
872
872
|
}
|
|
873
|
-
`,
|
|
874
|
-
${
|
|
873
|
+
`,dt="ag-theme-genesis-rapid",gt=g.css`
|
|
874
|
+
${lt}
|
|
875
875
|
|
|
876
|
-
.${
|
|
877
|
-
${(0,
|
|
876
|
+
.${dt} {
|
|
877
|
+
${(0,nt.mixinRobotoFont)()}
|
|
878
878
|
font-family: var(--body-font);
|
|
879
879
|
}
|
|
880
880
|
|
|
881
|
-
.${
|
|
881
|
+
.${dt} .ag-header {
|
|
882
882
|
border-bottom-color: var(--neutral-stroke-rest);
|
|
883
883
|
font-weight: bold;
|
|
884
884
|
font-size: var(--type-ramp-base-font-size);
|
|
885
885
|
}
|
|
886
886
|
|
|
887
|
-
.${
|
|
887
|
+
.${dt} .ag-root-wrapper {
|
|
888
888
|
border-radius: calc(var(--ag-border-radius) * 1px);
|
|
889
889
|
border: 1px solid var(--rapid-ag-border-color);
|
|
890
890
|
}
|
|
891
891
|
|
|
892
|
-
.${
|
|
892
|
+
.${dt} .ag-cell {
|
|
893
893
|
font-size: var(--type-ramp-minus-1-font-size);
|
|
894
894
|
}
|
|
895
|
-
`,
|
|
896
|
-
${
|
|
895
|
+
`,ct="ag-theme-genesis-rapid-dark",ht=g.css`
|
|
896
|
+
${lt}
|
|
897
897
|
|
|
898
|
-
.${
|
|
899
|
-
${(0,
|
|
898
|
+
.${ct} {
|
|
899
|
+
${(0,nt.mixinRobotoFont)()}
|
|
900
900
|
font-family: var(--body-font);
|
|
901
901
|
}
|
|
902
902
|
|
|
903
|
-
.${
|
|
903
|
+
.${ct} .ag-header {
|
|
904
904
|
border-bottom-color: var(--neutral-stroke-rest);
|
|
905
905
|
font-weight: bold;
|
|
906
906
|
font-size: var(--type-ramp-base-font-size);
|
|
907
907
|
}
|
|
908
908
|
|
|
909
|
-
.${
|
|
909
|
+
.${ct} .ag-cell {
|
|
910
910
|
font-size: var(--type-ramp-minus-1-font-size);
|
|
911
911
|
}
|
|
912
912
|
|
|
913
|
-
.${
|
|
913
|
+
.${ct} .ag-root-wrapper {
|
|
914
914
|
border-radius: calc(var(--ag-border-radius) * 1px);
|
|
915
915
|
border: 1px solid var(--rapid-ag-border-color);
|
|
916
916
|
}
|
|
917
917
|
|
|
918
|
-
.${
|
|
918
|
+
.${ct} {
|
|
919
919
|
color-scheme: dark;
|
|
920
920
|
}
|
|
921
|
-
`,
|
|
922
|
-
${
|
|
921
|
+
`,ut="ag-theme-genesis-rapid-light",pt=g.css`
|
|
922
|
+
${lt}
|
|
923
923
|
|
|
924
|
-
.${
|
|
925
|
-
${(0,
|
|
924
|
+
.${ut} {
|
|
925
|
+
${(0,nt.mixinRobotoFont)()}
|
|
926
926
|
font-family: var(--body-font);
|
|
927
927
|
}
|
|
928
928
|
|
|
929
|
-
.${
|
|
929
|
+
.${ut} .ag-header {
|
|
930
930
|
border-bottom-color: var(--neutral-stroke-rest);
|
|
931
931
|
font-weight: bold;
|
|
932
932
|
font-size: var(--type-ramp-base-font-size);
|
|
933
933
|
}
|
|
934
934
|
|
|
935
|
-
.${
|
|
935
|
+
.${ut} .ag-cell {
|
|
936
936
|
font-size: var(--type-ramp-minus-1-font-size);
|
|
937
937
|
}
|
|
938
938
|
|
|
939
|
-
.${
|
|
939
|
+
.${ut} .ag-root-wrapper {
|
|
940
940
|
border-radius: calc(var(--ag-border-radius) * 1px);
|
|
941
941
|
border: 1px solid var(--rapid-ag-border-color);
|
|
942
942
|
}
|
|
943
943
|
|
|
944
|
-
.${
|
|
944
|
+
.${ut} {
|
|
945
945
|
color-scheme: light;
|
|
946
946
|
}
|
|
947
|
-
`,
|
|
947
|
+
`,mt=g.css`
|
|
948
948
|
/* All the AG themes */
|
|
949
|
-
${
|
|
950
|
-
${
|
|
949
|
+
${ue.XF}
|
|
950
|
+
${ot.g}
|
|
951
951
|
|
|
952
952
|
/* 100% custom, CSS based, our own name: ag-theme-genesis-rapid */
|
|
953
|
-
${
|
|
954
|
-
${
|
|
955
|
-
${
|
|
956
|
-
`;var
|
|
953
|
+
${gt}
|
|
954
|
+
${ht}
|
|
955
|
+
${pt}
|
|
956
|
+
`;var vt=i(20166),ft=i(83912);const bt="#cccccc",yt="#879ba6",Ct="#1f2126",St="#2e3339",Rt="#2b2e34",wt="#000000",Et="#181d1f",At="#FFFFFF",kt="#babfc7",Dt="#2196f3",Ot={foregroundSwatch:d.SwatchRGB.from((0,ft.parseColorHexRGB)(bt)),headerForegroundSwatch:d.SwatchRGB.from((0,ft.parseColorHexRGB)(yt)),backgroundSwatch:d.SwatchRGB.from((0,ft.parseColorHexRGB)(Ct)),borderSwatch:d.SwatchRGB.from((0,ft.parseColorHexRGB)(St)),rowHoverSwatch:d.SwatchRGB.from((0,ft.parseColorHexRGB)(Rt))},xt={foregroundSwatch:d.SwatchRGB.from((0,ft.parseColorHexRGB)(wt)),headerForegroundSwatch:d.SwatchRGB.from((0,ft.parseColorHexRGB)(Et)),backgroundSwatch:d.SwatchRGB.from((0,ft.parseColorHexRGB)(At)),borderSwatch:d.SwatchRGB.from((0,ft.parseColorHexRGB)(kt)),rowHoverSwatch:d.SwatchRGB.from((0,ft.parseColorHexRGB)(Dt))},{create:Tt}=c.DesignToken,Ft={backgroundColor:Tt("rapid-ag-background-color").withDefault(e=>d.baseLayerLuminance.getValueFor(e)===d.StandardLuminance.LightMode?xt.backgroundSwatch:Ot.backgroundSwatch),borderColor:Tt("rapid-ag-border-color").withDefault(e=>d.baseLayerLuminance.getValueFor(e)===d.StandardLuminance.LightMode?xt.borderSwatch:Ot.borderSwatch),foregroundColor:Tt("rapid-ag-foreground-color").withDefault(e=>d.baseLayerLuminance.getValueFor(e)===d.StandardLuminance.LightMode?xt.foregroundSwatch:Ot.foregroundSwatch),headerForegroundColor:Tt("rapid-ag-header-foreground-color").withDefault(e=>d.baseLayerLuminance.getValueFor(e)===d.StandardLuminance.LightMode?xt.headerForegroundSwatch:Ot.headerForegroundSwatch),rowHoverColor:Tt("rapid-ag-row-hover-color").withDefault(e=>d.baseLayerLuminance.getValueFor(e)===d.StandardLuminance.LightMode?xt.rowHoverSwatch:Ot.rowHoverSwatch)},It=()=>{const e=(0,vt.designTokensMap)();if(!e.value)return null;const{style:t,space:i}=e.value.design_tokens;return(t.baseHeightMultiplier.$value+t.density.$value)*i.designUnit.$value-8},Lt="ag-theme-genesis-rapid-dark",Gt="ag-theme-genesis-rapid-light";class Pt extends st.Rz{constructor(){super(...arguments),this.luminanceObserver={handleChange:e=>this.handleLuminanceChange(e)},this.handleLuminanceChange=e=>{const t=d.baseLayerLuminance.getValueFor(e.target);this.theme=t===d.StandardLuminance.DarkMode?Lt:Gt},this.theme="light"===localStorage.getItem("luminance")?Gt:Lt}connectedCallback(){var e;super.connectedCallback();const t=null!==(e=this.provider)&&void 0!==e?e:this;this.luminanceSubscription=d.baseLayerLuminance.subscribe(this.luminanceObserver,t)}disconnectedCallback(){var e;const t=null!==(e=this.provider)&&void 0!==e?e:this;d.baseLayerLuminance.unsubscribe(this.luminanceObserver,t),this.luminanceSubscription&&(this.luminanceSubscription.unsubscribe(),this.luminanceSubscription=void 0),super.disconnectedCallback()}themeChanged(e,t){(e||t===Lt)&&super.themeChanged(e,t)}set gridOptions(e){var t,i,a,r;const s=Object.assign({},e);s.components=Object.assign({[me.IX.action]:_e,[me.IX.actionsMenu]:Ne,[me.IX.boolean]:He,[me.IX.editable]:Ve,[me.IX.icon]:Ye,[me.IX.select]:Ke,[me.IX.selectEditor]:De,[me.IX.numberEditor]:xe,[me.IX.multiselectEditor]:Fe,[me.IX.dateEditor]:Le,[me.IX.stringEditor]:Pe,[me.IX.statusPill]:je},s.components);(this.theme===dt||this.theme===ct||this.theme===ut)&&(this.headerHeight=null!==(i=null!==(t=s.headerHeight)&&void 0!==t?t:It())&&void 0!==i?i:32,this.rowHeight=null!==(r=null!==(a=s.rowHeight)&&void 0!==a?a:It())&&void 0!==r?r:32),super.gridOptions=s}}(0,r.Cg)([g.observable],Pt.prototype,"provider",void 0);const Mt=Pt.compose(Object.assign({baseName:"grid-pro",template:Ze,styles:mt,shadowOptions:Je},Qe));var _t=i(96598);class $t extends _t.t{}const Nt=$t.compose({baseName:"grid-text-renderer",styles:_t.JN,template:(0,_t.d6)("rapid")});var Bt=i(11489);class Ht extends B.X{}const zt=Ht.compose({baseName:"column-selection",template:(0,Bt.s)("rapid"),styles:H.H}),Vt={rapidIconRenderer:We,rapidAgEditableRenderer:Ue,rapidAgActionRenderer:$e,rapidAgActionsMenuRenderer:Be,rapidAgBooleanRenderer:ze,rapidAgTextRenderer:Nt,rapidAgSelectRenderer:Xe,rapidAgDateEditor:Ge,rapidAgMultiselectEditor:Ie,rapidAgSelectEditor:Oe,rapidAgNumberEditor:Te,rapidAgStringEditor:Me,rapidStatusPillRenderer:qe,rapidGridPro:rt,rapidColumnSelection:zt,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}};var Ut=i(58749),Kt=i(95553),Xt=i(14609),jt=i(86636);const qt={fromView(e){if(null==e?void 0:e.trim())return e.includes(",")?e.split(",").map(e=>e.trim()):e.trim()},toView:e=>"string"==typeof e?e:Array.isArray(e)?e.join(","):""},Yt="--dropdown-width",Wt="options",Jt="dnone",Qt=g.css`
|
|
957
957
|
label {
|
|
958
958
|
color: var(--neutral-foreground-hint, rgb(135 155 166));
|
|
959
959
|
font-style: normal;
|
|
@@ -964,7 +964,7 @@
|
|
|
964
964
|
line-height: var(--type-ramp-base-line-height);
|
|
965
965
|
}
|
|
966
966
|
|
|
967
|
-
.${
|
|
967
|
+
.${Jt} {
|
|
968
968
|
display: none !important;
|
|
969
969
|
}
|
|
970
970
|
|
|
@@ -972,7 +972,7 @@
|
|
|
972
972
|
position: relative;
|
|
973
973
|
width: inherit;
|
|
974
974
|
min-width: 250px;
|
|
975
|
-
${
|
|
975
|
+
${Yt}: 350px;
|
|
976
976
|
}
|
|
977
977
|
|
|
978
978
|
.control {
|
|
@@ -1055,9 +1055,9 @@
|
|
|
1055
1055
|
opacity: var(--disabled-opacity);
|
|
1056
1056
|
}
|
|
1057
1057
|
|
|
1058
|
-
.${
|
|
1058
|
+
.${Wt} {
|
|
1059
1059
|
min-width: 100%;
|
|
1060
|
-
width: var(${
|
|
1060
|
+
width: var(${Yt});
|
|
1061
1061
|
display: flex;
|
|
1062
1062
|
flex-direction: column;
|
|
1063
1063
|
position: absolute;
|
|
@@ -1089,11 +1089,11 @@
|
|
|
1089
1089
|
.visible {
|
|
1090
1090
|
visibility: visible;
|
|
1091
1091
|
}
|
|
1092
|
-
`;var
|
|
1092
|
+
`;var Zt=i(40729),ei=i(31679);const ti=(e="foundation")=>g.html`
|
|
1093
1093
|
<label
|
|
1094
1094
|
part="label"
|
|
1095
1095
|
for="control"
|
|
1096
|
-
class="label ${e=>{var t,i;return null!==(i=(0,
|
|
1096
|
+
class="label ${e=>{var t,i;return null!==(i=(0,ei.x)([Jt,!(null!==(t=e.hasSlottedContent)&&void 0!==t&&t)]))&&void 0!==i?i:""}}"
|
|
1097
1097
|
>
|
|
1098
1098
|
<slot
|
|
1099
1099
|
${(0,g.slotted)({property:"defaultSlottedNodes"})}
|
|
@@ -1104,12 +1104,12 @@
|
|
|
1104
1104
|
<${e}-icon
|
|
1105
1105
|
id="arrow-icon"
|
|
1106
1106
|
name="chevron-down"
|
|
1107
|
-
class="${e=>(0,
|
|
1107
|
+
class="${e=>(0,ei.x)(["flipped",e.open],["disabled-icon",e.disabled])}"
|
|
1108
1108
|
@click=${e=>!e.disabled&&e.toggle()}
|
|
1109
1109
|
></${e}-icon>
|
|
1110
1110
|
<${e}-icon
|
|
1111
1111
|
name="xmark"
|
|
1112
|
-
class="cross-icon ${e=>(0,
|
|
1112
|
+
class="cross-icon ${e=>(0,ei.x)(["visible",!!e.value],["disabled-icon",e.disabled])}"
|
|
1113
1113
|
@click=${e=>!e.disabled&&(e.value=void 0)}
|
|
1114
1114
|
></${e}-icon>
|
|
1115
1115
|
<input
|
|
@@ -1124,13 +1124,13 @@
|
|
|
1124
1124
|
</div>
|
|
1125
1125
|
<div
|
|
1126
1126
|
${(0,g.ref)("optionsElement")}
|
|
1127
|
-
class="${e=>{var t,i,a,r;return(0,
|
|
1127
|
+
class="${e=>{var t,i,a,r;return(0,ei.x)(Wt,["visible",e.open],["dropdown-above",null!==(i=null===(t=e.dropdownPlacement)||void 0===t?void 0:t.startsWith("top"))&&void 0!==i&&i],["dropdown-left",null!==(r=null===(a=e.dropdownPlacement)||void 0===a?void 0:a.endsWith("left"))&&void 0!==r&&r])}}"
|
|
1128
1128
|
>
|
|
1129
1129
|
<${e}-text-field
|
|
1130
1130
|
id="filter-search"
|
|
1131
1131
|
part="filter-search"
|
|
1132
1132
|
placeholder="Search..."
|
|
1133
|
-
:value=${(0,
|
|
1133
|
+
:value=${(0,Zt.O)(e=>e.filterSearch,"string","input")}
|
|
1134
1134
|
?hidden=${e=>!e.hasSearchKey}
|
|
1135
1135
|
@change=${(e,t)=>e.changeHandler(t.event)}
|
|
1136
1136
|
></${e}-text-field>
|
|
@@ -1142,5 +1142,5 @@
|
|
|
1142
1142
|
</div>
|
|
1143
1143
|
</div>
|
|
1144
1144
|
</div>
|
|
1145
|
-
`,ti=ei(),ii={menuTabs:["filterMenuTab","generalMenuTab","columnsMenuTab"]},ai=(e,t)=>!e.composedPath().includes(t);function ri(e,t,i,a){return(0,r.sH)(this,void 0,void 0,function*(){var r;try{const s=function(e,t){const i=(new Vt.K).withField(e).withValue(null!=t?t:"").withSerialiser(Ut.n.EQ).withGroup("default").build();return i.serialiser(i)}(i,a),o=yield e.request(t,{DETAILS:{CRITERIA_MATCH:s}});return 1===(null===(r=o.REPLY)||void 0===r?void 0:r.length)?o.REPLY[0]:void 0}catch(e){return void console.error(`Failed to retrieve object from the ${t} resource: ${e instanceof Error?e.message:String(e)}`)}})}class si extends((0,n.S)(c.FoundationElement)){constructor(){super(...arguments),this.requestSupportsAdvancedSearch=!1,this.defaultSlottedNodes=[],this.getAndSetRowsDebounce=m()(()=>this.getAndSetRows(),300),this.handleClickOutside=e=>{ai(e,this)&&(this.open=!1)}}get connect(){var e;return null!==(e=this.connectOverride)&&void 0!==e?e:this._connectDI}set connect(e){this.connectOverride=e}get value(){return g.Observable.track(this,"value"),this._value}set value(e){e!==this._value&&(e?ri(this.connect,this.resourceName,this.valueKey,e).then(t=>{this.value===e&&(this.selectedRow=t)}):this.selectedRow=void 0,this.emitValue(e))}get displayValue(){return this.selectedRow&&this.labelKey&&this.selectedRow[this.labelKey]||this.value||""}get hasSearchKey(){return!!this.searchKey&&this.searchKey.length>0}get hasSlottedContent(){return!(!this.defaultSlottedNodes||0===this.defaultSlottedNodes.length)&&this.defaultSlottedNodes.some(e=>{var t;return e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&(null===(t=e.textContent)||void 0===t?void 0:t.trim().length)>0})}connectedCallback(){var e;super.connectedCallback(),(null===(e=this.optionsElement)||void 0===e?void 0:e.style)&&this.dropdownWidthChanged(),this.open=!1,this.filterSearch="",this.grid&&(this.grid.gridOptions={defaultColDef:ii,onRowClicked:e=>{this.selectedRow=e.data,this.emitValue(e.data[this.valueKey]),this.toggle()}})}setGridRowData(e){var t;const i=null===(t=this.grid)||void 0===t?void 0:t.gridApi;i&&("function"==typeof i.updateGridOptions?i.updateGridOptions({rowData:e}):i.setRowData(e))}setGridColumnDefs(e){var t;const i=null===(t=this.grid)||void 0===t?void 0:t.gridApi;i&&("function"==typeof i.updateGridOptions?i.updateGridOptions({columnDefs:e}):i.setColumnDefs(e))}emitValue(e){this._value=e,this.$emit("change",e),this.$emit("input",e),g.Observable.notify(this,"value")}toggle(){this.open=!this.open}getAndSetRows(){return(0,r.sH)(this,void 0,void 0,function*(){var e,t;if(!(null===(e=this.grid)||void 0===e?void 0:e.gridApi))return;const i=this.lastRequest={},a=this.request?{REQUEST:Object.assign({},this.request)}:{},r=Array.isArray(this.searchKey)&&1===this.searchKey.length?this.searchKey[0]:this.searchKey;let s;if(r&&this.filterSearch)if(this.requestSupportsAdvancedSearch){const e=(Array.isArray(r)?r:[r]).map(e=>{var t;return(new Vt.K).withField(e).withValue(null!==(t=this.filterSearch)&&void 0!==t?t:"").withSerialiser(Ut.n.containsIgnoreCase).withGroup("default").build()}),t=new Kt.b;t.Or(e,{join:Xt.r.Or()}),s=t.build()}else{if(Array.isArray(r))throw Error("MulticolumnDropdown: Unable to search multiple keys via request; if the request is a GPAL ReqRep, set requestSupportsAdvancedSearch to true");a.REQUEST=Object.assign(Object.assign({},a.REQUEST),{[r]:`*${this.filterSearch}*`})}const o=null===(t=this.baseCriteria)||void 0===t?void 0:t.trim();o&&s?s=`(${s}) && (${o})`:o&&(s=o),s&&(a.DETAILS={CRITERIA_MATCH:s});try{const e=yield this.connect.request(this.resourceName,a);if(i!==this.lastRequest)return;const t=(null==e?void 0:e.REPLY)||[];this.setGridRowData(t),t.length>0?this.grid.gridApi.hideOverlay():this.grid.gridApi.showNoRowsOverlay()}catch(e){console.error(`Failed to retrieve rows from the ${this.resourceName} resource: ${e instanceof Error?e.message:String(e)}`)}})}filterSearchChanged(){var e,t;this.open&&(null===(t=null===(e=this.grid)||void 0===e?void 0:e.gridApi)||void 0===t||t.showLoadingOverlay(),this.getAndSetRowsDebounce())}requestChanged(){var e,t;this.open&&(null===(t=null===(e=this.grid)||void 0===e?void 0:e.gridApi)||void 0===t||t.showLoadingOverlay(),this.getAndSetRows())}columnDefinitionsChanged(){this.setGridColumnDefs(this.columnDefinitions)}openChanged(){var e,t;this.open?(document.addEventListener("mousedown",this.handleClickOutside),(null===(e=this.grid)||void 0===e?void 0:e.gridApi)&&(this.grid.gridApi.showLoadingOverlay(),this.getAndSetRows())):(document.removeEventListener("mousedown",this.handleClickOutside),this.filterSearch="",(null===(t=this.grid)||void 0===t?void 0:t.gridApi)&&this.setGridRowData([]))}dropdownWidthChanged(){var e,t;null===(t=null===(e=this.optionsElement)||void 0===e?void 0:e.style)||void 0===t||t.setProperty(jt,this.dropdownWidth>0?`${this.dropdownWidth}px`:"inherit")}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback();const e=this.shouldRunDisconnect;g.DOM.queueUpdate(()=>{var t;e&&((null===(t=this.grid)||void 0===t?void 0:t.gridApi)&&this.setGridRowData([]),this.selectedRow=void 0,this._value=void 0)})}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}}(0,r.Cg)([q.dm],si.prototype,"_connectDI",void 0),(0,r.Cg)([(0,g.attr)({mode:"boolean"})],si.prototype,"disabled",void 0),(0,r.Cg)([(0,g.attr)({attribute:"resource-name"})],si.prototype,"resourceName",void 0),(0,r.Cg)([(0,g.attr)({attribute:"search-key",converter:qt})],si.prototype,"searchKey",void 0),(0,r.Cg)([(0,g.attr)({attribute:"advanced-search-req",mode:"boolean"})],si.prototype,"requestSupportsAdvancedSearch",void 0),(0,r.Cg)([(0,g.attr)({attribute:"value-key"})],si.prototype,"valueKey",void 0),(0,r.Cg)([(0,g.attr)({attribute:"label-key"})],si.prototype,"labelKey",void 0),(0,r.Cg)([(0,g.attr)({attribute:"dropdown-placement"})],si.prototype,"dropdownPlacement",void 0),(0,r.Cg)([g.attr],si.prototype,"dropdownWidth",void 0),(0,r.Cg)([g.observable],si.prototype,"request",void 0),(0,r.Cg)([g.observable],si.prototype,"columnDefinitions",void 0),(0,r.Cg)([g.observable],si.prototype,"baseCriteria",void 0),(0,r.Cg)([g.observable],si.prototype,"defaultSlottedNodes",void 0),(0,r.Cg)([g.observable],si.prototype,"filterSearch",void 0),(0,r.Cg)([g.observable],si.prototype,"open",void 0),(0,r.Cg)([g.observable],si.prototype,"selectedRow",void 0),(0,r.Cg)([g.volatile],si.prototype,"displayValue",null),(0,r.Cg)([g.volatile],si.prototype,"hasSearchKey",null),(0,r.Cg)([g.volatile],si.prototype,"hasSlottedContent",null);const oi=si.compose({baseName:"multicolumn-dropdown",template:ti,styles:Jt}),ni=si.compose({baseName:"multicolumn-dropdown",template:ei("rapid"),styles:Jt});var li=i(3299),di=i(70349),gi=i(91327),ci=i(19910),hi=i(26270),ui=i(22749),pi=i(22133);class mi{constructor(e,t){this.criteria=e,this.onActiveChanged=t,this.matchedRowIds=new Set,this.lastReportedActive=!1}get active(){return this.matchedRowIds.size>0}get matchCount(){return this.matchedRowIds.size}reset(){this.matchedRowIds.clear(),this.report()}handleDataChanged(e){var t;const{add:i=[],update:a=[],remove:r=[]}=null!==(t=null==e?void 0:e.changes)&&void 0!==t?t:{};for(const e of r)this.syncRow(e,!0);for(const e of i)this.syncRow(e,!1);for(const e of a)this.syncRow(e,!1);this.report()}handleDataCleared(){this.reset()}observe(e){const t=e=>{this.handleDataChanged(e.detail)},i=()=>{this.handleDataCleared()};return e.addEventListener(Z.c.dataChanged,t),e.addEventListener(Z.c.dataCleared,i),()=>{e.removeEventListener(Z.c.dataChanged,t),e.removeEventListener(Z.c.dataCleared,i)}}syncRow(e,t){var i;if(!e)return;const a=String(null!==(i=e[this.criteria.rowIdField])&&void 0!==i?i:"");a&&(!t&&(0,pi.D)(this.criteria,e)?this.matchedRowIds.add(a):this.matchedRowIds.delete(a))}report(){const e=this.active;e!==this.lastReportedActive&&(this.lastReportedActive=e,this.onActiveChanged(e))}}var vi=i(49260),fi=i(49568);const bi={foundationIconRenderer:k.qN,foundationGridProActionRenderer:w._X,foundationGridProActionsMenuRenderer:R.su,foundationAgBooleanRenderer:E.fg,foundationAgTextRenderer:Mt.G4,foundationAgTextFieldRenderer:di.wG,foundationAgEditableRenderer:A.r8,foundationAgSelectRenderer:O.bE,foundationSelectEditor:f.RU,foundationNumberEditor:b.CY,foundationDateEditor:C.vr,foundationMultiselectEditor:y.UH,foundationStringEditor:S.cb,foundationMulticolumnDropdown:oi,foundationStatusPillRenderer:D.a1,StatusPillRenderer:D.N7,foundationGridPro:Ae,foundationColumnSelection:B.E,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}},yi=[{id:"error",label:"Error",value:"var(--error-fill-rest, #c62828)"},{id:"warning",label:"Warning",value:"var(--warning-fill-rest, #ef6c00)"},{id:"success",label:"Success",value:"var(--success-fill-rest, #2e7d32)"},{id:"accent",label:"Accent",value:"var(--accent-fill-rest, #1565c0)"},{id:"neutral",label:"Neutral",value:"var(--neutral-fill-rest, #546e7a)"}],Ci=[{id:"slow",label:"Slow",value:1400},{id:"normal",label:"Normal",value:1e3},{id:"fast",label:"Fast",value:500}],Si=[{id:"row",label:"Whole row",value:"row"},{id:"cell",label:"Alert field cell",value:"cell"}],wi={color:yi[0].value,durationMs:Ci[1].value,scope:"row"};function Ri(e){return{color:"string"==typeof(null==e?void 0:e.color)&&e.color.trim().length>0?e.color:wi.color,durationMs:"number"==typeof(null==e?void 0:e.durationMs)&&Number.isFinite(e.durationMs)&&e.durationMs>0?e.durationMs:wi.durationMs,scope:"row"===(null==e?void 0:e.scope)||"cell"===(null==e?void 0:e.scope)?e.scope:wi.scope}}const Ei=new Map;function Ai(e){const{persistPreferencesKey:t,target:i,mirrorColorTo:a=[]}=e,r=t?function(e){if(e.statePersistence)return e.statePersistence;try{return c.DI.getOrCreateDOMContainer().get(me.l)}catch(e){return void F.v.debug("Row alert preferences will not persist; no StatePersistence available",e)}}(e):void 0,s=new Set;let o=Ri(Object.assign(Object.assign({},wi),e.preferences));function n(){const e=null!=i?i:"undefined"==typeof document?void 0:document.documentElement;if(e){e.style.setProperty("--row-alert-color",o.color),e.style.setProperty("--alert-flash-duration",`${o.durationMs}ms`);for(const t of a)e.style.setProperty(t,o.color)}}function l(e,i){o=e,n();for(const e of s)e(o);i&&t&&(null==r?void 0:r.saveRowAlertPreferences)&&r.saveRowAlertPreferences(t,o).catch(e=>{F.v.warn("Could not save row alert preferences",e)})}return n(),t&&(null==r?void 0:r.getRowAlertPreferences)&&r.getRowAlertPreferences(t).then(e=>{l(Ri(Object.assign(Object.assign({},o),e)),!1)}).catch(e=>{F.v.warn("Could not load row alert preferences",e)}),{get preferences(){return o},change(e){l(Ri(Object.assign(Object.assign({},o),e)),!0)},subscribe:e=>(s.add(e),()=>{s.delete(e)})}}function ki(e,t={}){var i,a,r,s,o;const{colorPresets:n=yi,ratePresets:l=Ci,menuLabel:d="Alert flash"}=t,g=function(e){const{persistPreferencesKey:t}=e;if(!t)return Ai(e);let i=Ei.get(t);return i||(i=Ai(e),Ei.set(t,i)),i}(t),c=(0,vi.PO)(e)[vi.Xm],h=(0,vi.Li)(Object.assign(Object.assign({},e),{flashField:null!==(a=null!==(i=e.flashField)&&void 0!==i?i:e.stateField)&&void 0!==a?a:null===(o=null===(s=null===(r=e.anyOf)||void 0===r?void 0:r[0])||void 0===s?void 0:s[0])||void 0===o?void 0:o.field}))[vi.mJ];function u(e,t,i,a){return e.map(e=>({name:e.label,checked:e.value===t,action:()=>{g.change(i(e.value)),a()}}))}const p={rowClassRules:{[vi.Xm]:e=>"row"===g.preferences.scope&&c(e)},defaultColDef:{cellClassRules:{[vi.mJ]:e=>"cell"===g.preferences.scope&&h(e)}},get preferences(){return g.preferences},createMenuItem(e){const t=()=>{var t;return null===(t=null==e?void 0:e.redrawRows)||void 0===t?void 0:t.call(e)};return{name:d,subMenu:[{name:"Flash target",subMenu:u(Si,g.preferences.scope,e=>({scope:e}),t)},{name:"Color",subMenu:u(n,g.preferences.color,e=>({color:e}),()=>{})},{name:"Flash rate",subMenu:u(l,g.preferences.durationMs,e=>({durationMs:e}),()=>{})},{name:"Reset to defaults",action:()=>{p.reset(),t()}}]}},getContextMenuItems(e){var t;return[...null!==(t=e.defaultItems)&&void 0!==t?t:[],"separator",p.createMenuItem(e.api)]},setPreferences(e){g.change(e)},reset(){g.change(wi)},subscribe:e=>g.subscribe(e)};return p}var Di=i(92277);const Oi=/^(?:[A-Za-z0-9+/]{4})*?(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,xi=e=>{const t=e.split(":");let i,a;2===t.length?[i,a]=t:a=e;const r=(e=>{if(Oi.test(e)){const t=atob(e),i=new Uint8Array(t.length);return[...t].forEach((e,a)=>{i[a]=t.charCodeAt(a)}),i.buffer}return e})(a);if("str"===i){return new TextDecoder("utf-8").decode(r)}return r},Ti=e=>{const t=(e=>{if("string"==typeof e)return btoa(e);if(e instanceof ArrayBuffer){const t=new Uint8Array(e).reduce((e,t)=>e+String.fromCharCode(t),"");return btoa(t)}return""})(e);return"string"==typeof e?`str:${t}`:e instanceof ArrayBuffer?`bin:${t}`:""},Fi={account:"genesis",namespace:"default",authKey:"kv-default",authEmail:void 0},Ii=c.DI.createInterface();var Li,Gi;!function(e){e.REQ_KEY_VALUE_LIST="REQ_KEY_VALUE_LIST",e.REQ_KEY_VALUE_READ="REQ_KEY_VALUE_READ"}(Li||(Li={})),function(e){e.EVENT_KEY_VALUE_PUT="EVENT_KEY_VALUE_PUT",e.EVENT_KEY_VALUE_DELETE="EVENT_KEY_VALUE_DELETE"}(Gi||(Gi={}));let Pi=class{constructor(e,t,i=Fi){this.connect=e,this.user=t,this.kvStorageConfig=i}delete(e){return(0,r.sH)(this,void 0,void 0,function*(){const t={DETAILS:{KEYS:e}},i=yield this.connect.commitEvent(Gi.EVENT_KEY_VALUE_DELETE,t);return!(!i||"EVENT_ACK"!==i.MESSAGE_TYPE)||{ERROR:i.ERROR,WARNING:i.WARNING}})}get(e){return(0,r.sH)(this,void 0,void 0,function*(){var t;const i={REQUEST:{USER_NAME:null!==(t=this.kvStorageConfig.authEmail)&&void 0!==t?t:this.user.userName,KEY:e}},a=yield this.connect.request(Li.REQ_KEY_VALUE_READ,i);if(a&&a.REPLY&&a.REPLY.length>0){const t=a.REPLY.map(e=>{const t=this.getDecodedValue(e.VALUE);return{kv:{key:e.KEY,value:t}}});return e?t[0]:t}return e?void 0:[]})}getDecodedValue(e){e.startsWith("str:")||e.startsWith("bin:")||(e=`str:${e}`);let t=xi(e);return"string"==typeof t&&t.startsWith("str:")&&(t=xi(t)),"string"==typeof t&&t.startsWith("bin:")&&(t=xi(t)),t}list(){return(0,r.sH)(this,void 0,void 0,function*(){var e;const t={REQUEST:{USER_NAME:null!==(e=this.kvStorageConfig.authEmail)&&void 0!==e?e:this.user.userName}},i=yield this.connect.request(Li.REQ_KEY_VALUE_LIST,t);if(i&&i.REPLY&&i.REPLY.length>0){return i.REPLY.map(e=>e.KEY)}return[]})}put(e){return(0,r.sH)(this,void 0,void 0,function*(){const t={DETAILS:{RECORDS:e.map(e=>({KEY:e.key,VALUE:e.base64?Ti(e.value):e.value}))}},i=yield this.connect.commitEvent(Gi.EVENT_KEY_VALUE_PUT,t);return!(!i||"EVENT_ACK"!==i.MESSAGE_TYPE)||{ERROR:i.ERROR,WARNING:i.WARNING}})}};Pi=(0,r.Cg)([(0,r.Qj)(0,q.dm),(0,r.Qj)(1,Di.KJ),(0,r.Qj)(2,(0,c.optional)(Ii))],Pi);const Mi=c.DI.createInterface(e=>e.singleton(Pi));var _i=i(98316);class $i{getColumnState(e){return(0,r.sH)(this,void 0,void 0,function*(){var t;yield this.migrateLocalStorageToKVStorage(e);const i=yield this.kvStorage.get(e),a=i?null===(t=i.kv)||void 0===t?void 0:t.value:void 0;return a?JSON.parse(a):[]})}saveColumnState(e,t){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(t)}])})}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 t;const i=yield this.kvStorage.get(e);if(i&&(null===(t=i.kv)||void 0===t?void 0:t.value))return;const a=this.session.getLocalStorageItem("gridOptions"),r=a?JSON.parse(a)[e]:void 0;r&&(F.v.debug(`Columns state migration for key: ${e} from LocalStorage to KV Storage`),this.kvStorage.put([{key:e,value:r}]))})}getFilterModel(e){return(0,r.sH)(this,void 0,void 0,function*(){var t;const i=yield this.kvStorage.get(e),a=i?null===(t=i.kv)||void 0===t?void 0:t.value:void 0;return a?JSON.parse(a):{}})}saveFilterModel(e,t){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(t)}])})}getRowAlertPreferences(e){return(0,r.sH)(this,void 0,void 0,function*(){var t;const i=yield this.kvStorage.get(e),a=i?null===(t=i.kv)||void 0===t?void 0:t.value:void 0;return a?JSON.parse(a):{}})}saveRowAlertPreferences(e,t){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(t)}])})}}(0,r.Cg)([Mi],$i.prototype,"kvStorage",void 0),(0,r.Cg)([_i.N],$i.prototype,"session",void 0);var Ni=i(11749);const Bi=d.SwatchRGB.from((0,vt.parseColorHexRGB)("#4c4c4c")),Hi=d.SwatchRGB.from((0,vt.parseColorHexRGB)("#c01754")),{create:zi}=c.DesignToken,Vi={foregroundColor:zi("fui-ag-foreground-color").withDefault(Hi),backgroundColor:zi("fui-ag-background-color").withDefault(Bi)};var Ui=i(68858),Ki=i(49874);const Xi={processCellCallback:e=>["+","=","-","@","\t","\n"].some(t=>String(e.value).startsWith(t))?`'${e.value}`:e.value}}}]);
|
|
1146
|
-
//# sourceMappingURL=470.
|
|
1145
|
+
`,ii=ti(),ai={menuTabs:["filterMenuTab","generalMenuTab","columnsMenuTab"]},ri=(e,t)=>!e.composedPath().includes(t);function si(e,t,i,a){return(0,r.sH)(this,void 0,void 0,function*(){var r;try{const s=function(e,t){const i=(new Ut.K).withField(e).withValue(null!=t?t:"").withSerialiser(Kt.n.EQ).withGroup("default").build();return i.serialiser(i)}(i,a),o=yield e.request(t,{DETAILS:{CRITERIA_MATCH:s}});return 1===(null===(r=o.REPLY)||void 0===r?void 0:r.length)?o.REPLY[0]:void 0}catch(e){return void console.error(`Failed to retrieve object from the ${t} resource: ${e instanceof Error?e.message:String(e)}`)}})}class oi extends((0,n.S)(c.FoundationElement)){constructor(){super(...arguments),this.requestSupportsAdvancedSearch=!1,this.defaultSlottedNodes=[],this.getAndSetRowsDebounce=m()(()=>this.getAndSetRows(),300),this.handleClickOutside=e=>{ri(e,this)&&(this.open=!1)}}get connect(){var e;return null!==(e=this.connectOverride)&&void 0!==e?e:this._connectDI}set connect(e){this.connectOverride=e}get value(){return g.Observable.track(this,"value"),this._value}set value(e){e!==this._value&&(e?si(this.connect,this.resourceName,this.valueKey,e).then(t=>{this.value===e&&(this.selectedRow=t)}):this.selectedRow=void 0,this.emitValue(e))}get displayValue(){return this.selectedRow&&this.labelKey&&this.selectedRow[this.labelKey]||this.value||""}get hasSearchKey(){return!!this.searchKey&&this.searchKey.length>0}get hasSlottedContent(){return!(!this.defaultSlottedNodes||0===this.defaultSlottedNodes.length)&&this.defaultSlottedNodes.some(e=>{var t;return e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&(null===(t=e.textContent)||void 0===t?void 0:t.trim().length)>0})}connectedCallback(){var e;super.connectedCallback(),(null===(e=this.optionsElement)||void 0===e?void 0:e.style)&&this.dropdownWidthChanged(),this.open=!1,this.filterSearch="",this.grid&&(this.grid.gridOptions={defaultColDef:ai,onRowClicked:e=>{this.selectedRow=e.data,this.emitValue(e.data[this.valueKey]),this.toggle()}})}setGridRowData(e){var t;const i=null===(t=this.grid)||void 0===t?void 0:t.gridApi;i&&("function"==typeof i.updateGridOptions?i.updateGridOptions({rowData:e}):i.setRowData(e))}setGridColumnDefs(e){var t;const i=null===(t=this.grid)||void 0===t?void 0:t.gridApi;i&&("function"==typeof i.updateGridOptions?i.updateGridOptions({columnDefs:e}):i.setColumnDefs(e))}emitValue(e){this._value=e,this.$emit("change",e),this.$emit("input",e),g.Observable.notify(this,"value")}toggle(){this.open=!this.open}getAndSetRows(){return(0,r.sH)(this,void 0,void 0,function*(){var e,t;if(!(null===(e=this.grid)||void 0===e?void 0:e.gridApi))return;const i=this.lastRequest={},a=this.request?{REQUEST:Object.assign({},this.request)}:{},r=Array.isArray(this.searchKey)&&1===this.searchKey.length?this.searchKey[0]:this.searchKey;let s;if(r&&this.filterSearch)if(this.requestSupportsAdvancedSearch){const e=(Array.isArray(r)?r:[r]).map(e=>{var t;return(new Ut.K).withField(e).withValue(null!==(t=this.filterSearch)&&void 0!==t?t:"").withSerialiser(Kt.n.containsIgnoreCase).withGroup("default").build()}),t=new Xt.b;t.Or(e,{join:jt.r.Or()}),s=t.build()}else{if(Array.isArray(r))throw Error("MulticolumnDropdown: Unable to search multiple keys via request; if the request is a GPAL ReqRep, set requestSupportsAdvancedSearch to true");a.REQUEST=Object.assign(Object.assign({},a.REQUEST),{[r]:`*${this.filterSearch}*`})}const o=null===(t=this.baseCriteria)||void 0===t?void 0:t.trim();o&&s?s=`(${s}) && (${o})`:o&&(s=o),s&&(a.DETAILS={CRITERIA_MATCH:s});try{const e=yield this.connect.request(this.resourceName,a);if(i!==this.lastRequest)return;const t=(null==e?void 0:e.REPLY)||[];this.setGridRowData(t),t.length>0?this.grid.gridApi.hideOverlay():this.grid.gridApi.showNoRowsOverlay()}catch(e){console.error(`Failed to retrieve rows from the ${this.resourceName} resource: ${e instanceof Error?e.message:String(e)}`)}})}filterSearchChanged(){var e,t;this.open&&(null===(t=null===(e=this.grid)||void 0===e?void 0:e.gridApi)||void 0===t||t.showLoadingOverlay(),this.getAndSetRowsDebounce())}requestChanged(){var e,t;this.open&&(null===(t=null===(e=this.grid)||void 0===e?void 0:e.gridApi)||void 0===t||t.showLoadingOverlay(),this.getAndSetRows())}columnDefinitionsChanged(){this.setGridColumnDefs(this.columnDefinitions)}openChanged(){var e,t;this.open?(document.addEventListener("mousedown",this.handleClickOutside),(null===(e=this.grid)||void 0===e?void 0:e.gridApi)&&(this.grid.gridApi.showLoadingOverlay(),this.getAndSetRows())):(document.removeEventListener("mousedown",this.handleClickOutside),this.filterSearch="",(null===(t=this.grid)||void 0===t?void 0:t.gridApi)&&this.setGridRowData([]))}dropdownWidthChanged(){var e,t;null===(t=null===(e=this.optionsElement)||void 0===e?void 0:e.style)||void 0===t||t.setProperty(Yt,this.dropdownWidth>0?`${this.dropdownWidth}px`:"inherit")}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback();const e=this.shouldRunDisconnect;g.DOM.queueUpdate(()=>{var t;e&&((null===(t=this.grid)||void 0===t?void 0:t.gridApi)&&this.setGridRowData([]),this.selectedRow=void 0,this._value=void 0)})}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}}(0,r.Cg)([j.dm],oi.prototype,"_connectDI",void 0),(0,r.Cg)([(0,g.attr)({mode:"boolean"})],oi.prototype,"disabled",void 0),(0,r.Cg)([(0,g.attr)({attribute:"resource-name"})],oi.prototype,"resourceName",void 0),(0,r.Cg)([(0,g.attr)({attribute:"search-key",converter:qt})],oi.prototype,"searchKey",void 0),(0,r.Cg)([(0,g.attr)({attribute:"advanced-search-req",mode:"boolean"})],oi.prototype,"requestSupportsAdvancedSearch",void 0),(0,r.Cg)([(0,g.attr)({attribute:"value-key"})],oi.prototype,"valueKey",void 0),(0,r.Cg)([(0,g.attr)({attribute:"label-key"})],oi.prototype,"labelKey",void 0),(0,r.Cg)([(0,g.attr)({attribute:"dropdown-placement"})],oi.prototype,"dropdownPlacement",void 0),(0,r.Cg)([g.attr],oi.prototype,"dropdownWidth",void 0),(0,r.Cg)([g.observable],oi.prototype,"request",void 0),(0,r.Cg)([g.observable],oi.prototype,"columnDefinitions",void 0),(0,r.Cg)([g.observable],oi.prototype,"baseCriteria",void 0),(0,r.Cg)([g.observable],oi.prototype,"defaultSlottedNodes",void 0),(0,r.Cg)([g.observable],oi.prototype,"filterSearch",void 0),(0,r.Cg)([g.observable],oi.prototype,"open",void 0),(0,r.Cg)([g.observable],oi.prototype,"selectedRow",void 0),(0,r.Cg)([g.volatile],oi.prototype,"displayValue",null),(0,r.Cg)([g.volatile],oi.prototype,"hasSearchKey",null),(0,r.Cg)([g.volatile],oi.prototype,"hasSlottedContent",null);const ni=oi.compose({baseName:"multicolumn-dropdown",template:ii,styles:Qt}),li=oi.compose({baseName:"multicolumn-dropdown",template:ti("rapid"),styles:Qt});var di=i(3299),gi=i(70349),ci=i(91327),hi=i(19910),ui=i(26270),pi=i(22749),mi=i(22133);class vi{constructor(e,t){this.criteria=e,this.onActiveChanged=t,this.matchedRowIds=new Set,this.lastReportedActive=!1}get active(){return this.matchedRowIds.size>0}get matchCount(){return this.matchedRowIds.size}reset(){this.matchedRowIds.clear(),this.report()}handleDataChanged(e){var t;const{add:i=[],update:a=[],remove:r=[]}=null!==(t=null==e?void 0:e.changes)&&void 0!==t?t:{};for(const e of r)this.syncRow(e,!0);for(const e of i)this.syncRow(e,!1);for(const e of a)this.syncRow(e,!1);this.report()}handleDataCleared(){this.reset()}observe(e){const t=e=>{this.handleDataChanged(e.detail)},i=()=>{this.handleDataCleared()};return e.addEventListener(Z.c.dataChanged,t),e.addEventListener(Z.c.dataCleared,i),()=>{e.removeEventListener(Z.c.dataChanged,t),e.removeEventListener(Z.c.dataCleared,i)}}syncRow(e,t){var i;if(!e)return;const a=String(null!==(i=e[this.criteria.rowIdField])&&void 0!==i?i:"");a&&(!t&&(0,mi.D)(this.criteria,e)?this.matchedRowIds.add(a):this.matchedRowIds.delete(a))}report(){const e=this.active;e!==this.lastReportedActive&&(this.lastReportedActive=e,this.onActiveChanged(e))}}var fi=i(49260),bi=i(49568);const yi={foundationIconRenderer:k.qN,foundationGridProActionRenderer:R._X,foundationGridProActionsMenuRenderer:w.su,foundationAgBooleanRenderer:E.fg,foundationAgTextRenderer:_t.G4,foundationAgTextFieldRenderer:gi.wG,foundationAgEditableRenderer:A.r8,foundationAgSelectRenderer:O.bE,foundationSelectEditor:f.RU,foundationNumberEditor:b.CY,foundationDateEditor:C.vr,foundationMultiselectEditor:y.UH,foundationStringEditor:S.cb,foundationMulticolumnDropdown:ni,foundationStatusPillRenderer:D.a1,StatusPillRenderer:D.N7,foundationGridPro:ke,foundationColumnSelection:B.E,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}},Ci=[{id:"error",label:"Error",value:"var(--error-fill-rest, #c62828)"},{id:"warning",label:"Warning",value:"var(--warning-fill-rest, #ef6c00)"},{id:"success",label:"Success",value:"var(--success-fill-rest, #2e7d32)"},{id:"accent",label:"Accent",value:"var(--accent-fill-rest, #1565c0)"},{id:"neutral",label:"Neutral",value:"var(--neutral-fill-rest, #546e7a)"}],Si=[{id:"slow",label:"Slow",value:1400},{id:"normal",label:"Normal",value:1e3},{id:"fast",label:"Fast",value:500}],Ri=[{id:"row",label:"Whole row",value:"row"},{id:"cell",label:"Alert field cell",value:"cell"}],wi={color:Ci[0].value,durationMs:Si[1].value,scope:"row"};function Ei(e){return{color:"string"==typeof(null==e?void 0:e.color)&&e.color.trim().length>0?e.color:wi.color,durationMs:"number"==typeof(null==e?void 0:e.durationMs)&&Number.isFinite(e.durationMs)&&e.durationMs>0?e.durationMs:wi.durationMs,scope:"row"===(null==e?void 0:e.scope)||"cell"===(null==e?void 0:e.scope)?e.scope:wi.scope}}const Ai=new Map;function ki(e){const{persistPreferencesKey:t,target:i,mirrorColorTo:a=[]}=e,r=t?function(e){if(e.statePersistence)return e.statePersistence;try{return c.DI.getOrCreateDOMContainer().get(ve.l)}catch(e){return void F.v.debug("Row alert preferences will not persist; no StatePersistence available",e)}}(e):void 0,s=new Set;let o=Ei(Object.assign(Object.assign({},wi),e.preferences));function n(){const e=null!=i?i:"undefined"==typeof document?void 0:document.documentElement;if(e){e.style.setProperty("--row-alert-color",o.color),e.style.setProperty("--alert-flash-duration",`${o.durationMs}ms`);for(const t of a)e.style.setProperty(t,o.color)}}function l(e,i){o=e,n();for(const e of s)e(o);i&&t&&(null==r?void 0:r.saveRowAlertPreferences)&&r.saveRowAlertPreferences(t,o).catch(e=>{F.v.warn("Could not save row alert preferences",e)})}return n(),t&&(null==r?void 0:r.getRowAlertPreferences)&&r.getRowAlertPreferences(t).then(e=>{l(Ei(Object.assign(Object.assign({},o),e)),!1)}).catch(e=>{F.v.warn("Could not load row alert preferences",e)}),{get preferences(){return o},change(e){l(Ei(Object.assign(Object.assign({},o),e)),!0)},subscribe:e=>(s.add(e),()=>{s.delete(e)})}}function Di(e,t={}){var i,a,r,s,o;const{colorPresets:n=Ci,ratePresets:l=Si,menuLabel:d="Alert flash"}=t,g=function(e){const{persistPreferencesKey:t}=e;if(!t)return ki(e);let i=Ai.get(t);return i||(i=ki(e),Ai.set(t,i)),i}(t),c=(0,fi.PO)(e)[fi.Xm],h=(0,fi.Li)(Object.assign(Object.assign({},e),{flashField:null!==(a=null!==(i=e.flashField)&&void 0!==i?i:e.stateField)&&void 0!==a?a:null===(o=null===(s=null===(r=e.anyOf)||void 0===r?void 0:r[0])||void 0===s?void 0:s[0])||void 0===o?void 0:o.field}))[fi.mJ];function u(e,t,i,a){return e.map(e=>({name:e.label,checked:e.value===t,action:()=>{g.change(i(e.value)),a()}}))}const p={rowClassRules:{[fi.Xm]:e=>"row"===g.preferences.scope&&c(e)},defaultColDef:{cellClassRules:{[fi.mJ]:e=>"cell"===g.preferences.scope&&h(e)}},get preferences(){return g.preferences},createMenuItem(e){const t=()=>{var t;return null===(t=null==e?void 0:e.redrawRows)||void 0===t?void 0:t.call(e)};return{name:d,subMenu:[{name:"Flash target",subMenu:u(Ri,g.preferences.scope,e=>({scope:e}),t)},{name:"Color",subMenu:u(n,g.preferences.color,e=>({color:e}),()=>{})},{name:"Flash rate",subMenu:u(l,g.preferences.durationMs,e=>({durationMs:e}),()=>{})},{name:"Reset to defaults",action:()=>{p.reset(),t()}}]}},getContextMenuItems(e){var t;return[...null!==(t=e.defaultItems)&&void 0!==t?t:[],"separator",p.createMenuItem(e.api)]},setPreferences(e){g.change(e)},reset(){g.change(wi)},subscribe:e=>g.subscribe(e)};return p}var Oi=i(92277);const xi=/^(?:[A-Za-z0-9+/]{4})*?(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,Ti=e=>{const t=e.split(":");let i,a;2===t.length?[i,a]=t:a=e;const r=(e=>{if(xi.test(e)){const t=atob(e),i=new Uint8Array(t.length);return[...t].forEach((e,a)=>{i[a]=t.charCodeAt(a)}),i.buffer}return e})(a);if("str"===i){return new TextDecoder("utf-8").decode(r)}return r},Fi=e=>{const t=(e=>{if("string"==typeof e)return btoa(e);if(e instanceof ArrayBuffer){const t=new Uint8Array(e).reduce((e,t)=>e+String.fromCharCode(t),"");return btoa(t)}return""})(e);return"string"==typeof e?`str:${t}`:e instanceof ArrayBuffer?`bin:${t}`:""},Ii={account:"genesis",namespace:"default",authKey:"kv-default",authEmail:void 0},Li=c.DI.createInterface();var Gi,Pi;!function(e){e.REQ_KEY_VALUE_LIST="REQ_KEY_VALUE_LIST",e.REQ_KEY_VALUE_READ="REQ_KEY_VALUE_READ"}(Gi||(Gi={})),function(e){e.EVENT_KEY_VALUE_PUT="EVENT_KEY_VALUE_PUT",e.EVENT_KEY_VALUE_DELETE="EVENT_KEY_VALUE_DELETE"}(Pi||(Pi={}));let Mi=class{constructor(e,t,i=Ii){this.connect=e,this.user=t,this.kvStorageConfig=i}delete(e){return(0,r.sH)(this,void 0,void 0,function*(){const t={DETAILS:{KEYS:e}},i=yield this.connect.commitEvent(Pi.EVENT_KEY_VALUE_DELETE,t);return!(!i||"EVENT_ACK"!==i.MESSAGE_TYPE)||{ERROR:i.ERROR,WARNING:i.WARNING}})}get(e){return(0,r.sH)(this,void 0,void 0,function*(){var t;const i={REQUEST:{USER_NAME:null!==(t=this.kvStorageConfig.authEmail)&&void 0!==t?t:this.user.userName,KEY:e}},a=yield this.connect.request(Gi.REQ_KEY_VALUE_READ,i);if(a&&a.REPLY&&a.REPLY.length>0){const t=a.REPLY.map(e=>{const t=this.getDecodedValue(e.VALUE);return{kv:{key:e.KEY,value:t}}});return e?t[0]:t}return e?void 0:[]})}getDecodedValue(e){e.startsWith("str:")||e.startsWith("bin:")||(e=`str:${e}`);let t=Ti(e);return"string"==typeof t&&t.startsWith("str:")&&(t=Ti(t)),"string"==typeof t&&t.startsWith("bin:")&&(t=Ti(t)),t}list(){return(0,r.sH)(this,void 0,void 0,function*(){var e;const t={REQUEST:{USER_NAME:null!==(e=this.kvStorageConfig.authEmail)&&void 0!==e?e:this.user.userName}},i=yield this.connect.request(Gi.REQ_KEY_VALUE_LIST,t);if(i&&i.REPLY&&i.REPLY.length>0){return i.REPLY.map(e=>e.KEY)}return[]})}put(e){return(0,r.sH)(this,void 0,void 0,function*(){const t={DETAILS:{RECORDS:e.map(e=>({KEY:e.key,VALUE:e.base64?Fi(e.value):e.value}))}},i=yield this.connect.commitEvent(Pi.EVENT_KEY_VALUE_PUT,t);return!(!i||"EVENT_ACK"!==i.MESSAGE_TYPE)||{ERROR:i.ERROR,WARNING:i.WARNING}})}};Mi=(0,r.Cg)([(0,r.Qj)(0,j.dm),(0,r.Qj)(1,Oi.KJ),(0,r.Qj)(2,(0,c.optional)(Li))],Mi);const _i=c.DI.createInterface(e=>e.singleton(Mi));var $i=i(98316);class Ni{getColumnState(e){return(0,r.sH)(this,void 0,void 0,function*(){var t;yield this.migrateLocalStorageToKVStorage(e);const i=yield this.kvStorage.get(e),a=i?null===(t=i.kv)||void 0===t?void 0:t.value:void 0;return a?JSON.parse(a):[]})}saveColumnState(e,t){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(t)}])})}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 t;const i=yield this.kvStorage.get(e);if(i&&(null===(t=i.kv)||void 0===t?void 0:t.value))return;const a=this.session.getLocalStorageItem("gridOptions"),r=a?JSON.parse(a)[e]:void 0;r&&(F.v.debug(`Columns state migration for key: ${e} from LocalStorage to KV Storage`),this.kvStorage.put([{key:e,value:r}]))})}getFilterModel(e){return(0,r.sH)(this,void 0,void 0,function*(){var t;const i=yield this.kvStorage.get(e),a=i?null===(t=i.kv)||void 0===t?void 0:t.value:void 0;return a?JSON.parse(a):{}})}saveFilterModel(e,t){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(t)}])})}getRowAlertPreferences(e){return(0,r.sH)(this,void 0,void 0,function*(){var t;const i=yield this.kvStorage.get(e),a=i?null===(t=i.kv)||void 0===t?void 0:t.value:void 0;return a?JSON.parse(a):{}})}saveRowAlertPreferences(e,t){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(t)}])})}}(0,r.Cg)([_i],Ni.prototype,"kvStorage",void 0),(0,r.Cg)([$i.N],Ni.prototype,"session",void 0);var Bi=i(11749);const Hi=d.SwatchRGB.from((0,ft.parseColorHexRGB)("#4c4c4c")),zi=d.SwatchRGB.from((0,ft.parseColorHexRGB)("#c01754")),{create:Vi}=c.DesignToken,Ui={foregroundColor:Vi("fui-ag-foreground-color").withDefault(zi),backgroundColor:Vi("fui-ag-background-color").withDefault(Hi)};var Ki=i(68858),Xi=i(49874);const ji={processCellCallback:e=>["+","=","-","@","\t","\n"].some(t=>String(e.value).startsWith(t))?`'${e.value}`:e.value}}}]);
|
|
1146
|
+
//# sourceMappingURL=470.039ab766f5f6987015ac5ef16ed15f32.js.map
|