@genesislcap/design-system-configurator 15.76.1-alpha-aff9783af4.0 → 15.77.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{109.109.a21cfda056ab3d342dfd.js → 109.109.a4939967ee05d4074da3.js} +48 -48
- package/dist/109.f9eed5fb8279bfed15f27af3c33b4d97.js.map +1 -0
- package/dist/{designSystemConfigurator.b8840bd03db12e4db168e814df99a099.js.map → designSystemConfigurator.17e0db501dca13feed93fbf4c8d95f91.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/{main.1627b9bc5a8586cfe9005410b17bdd80.js.map → main.5dffe1831ea04e12598c7aa41b1aad9b.js.map} +1 -1
- package/dist/{main.35b810b1f28fa94b5a41.js → main.d3b7abd2a0563dcb1307.js} +2 -2
- package/dist/remoteEntry.js +2 -2
- package/package.json +11 -11
- package/dist/109.ee0abc7c2fd3fab6bf4bab3294ac9cd3.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[109],{41492(e){e.exports=function(){"use strict";var e="minute",a=/[+-]\d\d(?::?\d\d)?/g,t=/([+-]|\d\d)/g;return function(r,i,o){var n=i.prototype;o.utc=function(e){return new i({date:e,utc:!0,args:arguments})},n.utc=function(a){var t=o(this.toDate(),{locale:this.$L,utc:!0});return a?t.add(this.utcOffset(),e):t},n.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var l=n.parse;n.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),l.call(this,e)};var s=n.init;n.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 s.call(this)};var g=n.utcOffset;n.utcOffset=function(r,i){var o=this.$utils().u;if(o(r))return this.$u?0:o(this.$offset)?g.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(a);if(!r)return null;var i=(""+r[0]).match(t)||["-",0,0],o=i[0],n=60*+i[1]+ +i[2];return 0===n?0:"+"===o?n:-n}(r),null===r))return this;var n=Math.abs(r)<=16?60*r:r;if(0===n)return this.utc(i);var l=this.clone();if(i)return l.$offset=n,l.$u=!1,l;var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(l=this.local().add(n+s,e)).$offset=n,l.$x.$localOffset=s,l};var d=n.format;n.format=function(e){var a=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,a)},n.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},n.isUTC=function(){return!!this.$u},n.toISOString=function(){return this.toDate().toISOString()},n.toString=function(){return this.toDate().toUTCString()};var c=n.toDate;n.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var u=n.diff;n.diff=function(e,a,t){if(e&&this.$u===e.$u)return u.call(this,e,a,t);var r=this.local(),i=o(e).local();return u.call(r,i,a,t)}}}()},70002(e,a,t){"use strict";t.d(a,{SG:()=>o,TA:()=>n,kG:()=>i});var r=t(6884);function i(e){const a=null==e?NaN:Number(e);return Number.isFinite(a)?0===a?1/0:a:r.OD.MAX_VIEW_1000}function o(e){return!1===e.moreRows?"end":e.rowsHeld>=i(e.maxView)?e.movingView?"more":"view-full":e.emptyReply?"stalled":"more"}function n(e){const a=i(e.maxView),t=null!=(r=e.maxView)&&Number.isFinite(Number(r))?`${a}`:`${a}, the server default`;var r;const o=e.totalRows;if("stalled"===e.status)return`${e.resourceName} stopped at ${e.rowsHeld} rows: the server answered MORE_ROWS with an empty page while still reporting more rows, with room left in the view (MAX_VIEW ${t}). This is not the MAX_VIEW cap; check the data server log for "Problem building client message".`;if(!e.emptyReply&&void 0!==o&&o<=e.rowsHeld)return;const n=void 0!==o&&o>e.rowsHeld,l=n?` of ${o}`:"",s=e.emptyReply||n?" and the server holds more rows past it":", so any rows past it are not loaded";return`${e.resourceName} stopped at ${e.rowsHeld}${l} rows: the DATASERVER view is full at MAX_VIEW (${t})${s}. Raise ${e.attribute} past the row count to reach the rest.`}},40370(e,a,t){"use strict";t.d(a,{C:()=>l});var r=t(55823),i=t(33681),o=t(17465),n=t(39087);const l=e=>{class a extends e{constructor(){super(),this.hasOwnProperty("onDatasourceStatusChanged")||(this.onDatasourceStatusChanged=e=>{var a;const t=void 0!==this.data;this.resourceName||t||o.v.warn("Target classes must have a resourceName or data property to use the DatasourceEventHandler mixin.");const r=e.detail;if(r.name===this.resourceName){const e=null!==(a=this.datasourceStatus)&&void 0!==a?a:{isInitialized:!1,hasMetadata:!1};(e.isInitialized!==r.isInitialized||r.metadataRequired&&e.hasMetadata!==r.hasMetadata)&&(this.datasourceStatus=r)}})}datasourceStatusChanged(e,a){o.v.debug("Target classes should override the datasourceStatusChanged method of the DatasourceEventHandler mixin to respond to changes in the target datasource.")}connectedCallback(){super.connectedCallback(),document.addEventListener(n.w,this.onDatasourceStatusChanged,{passive:!0,capture:!0})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(n.w,this.onDatasourceStatusChanged,{capture:!0})}}return(0,r.Cg)([i.observable],a.prototype,"datasourceStatus",void 0),a}},96730(e,a,t){"use strict";function r(e,a=";"){return e?e.split(a).map(e=>e.trim()).sort((e,a)=>e.localeCompare(a)).join(a):e}t.d(a,{Q:()=>r})},68109(e,a,t){"use strict";t.r(a),t.d(a,{AG_BOOLEAN_PROPERTIES:()=>ja,AG_NUMBER_PROPERTIES:()=>Ba,AG_PROPERTIES:()=>Ga,ActionRenderer:()=>H,ActionsMenuRenderer:()=>q.cN,AgGridCSSVars:()=>m.W3,AgGridTheme:()=>m.mJ,AgTextFieldRenderer:()=>Ji,AgTextRenderer:()=>to,BooleanRenderer:()=>Q,COLUMN_PICKER_SORT_DEFAULT:()=>Ie,CellTemplate:()=>h,ColumnSelection:()=>Ze,ColumnTemplate:()=>be,DARK_BACKGROUND_HEX:()=>Li,DARK_BORDER_HEX:()=>Ni,DARK_FOREGROUND_HEX:()=>Ti,DARK_HEADER_FOREGROUND_HEX:()=>Ii,DARK_ROW_HOVER_HEX:()=>Fi,DEBOUNCED_RESIZE_TIME:()=>Na,DEFAULT_STATUS_BAR_CONFIG:()=>m.o2,DISPLAY_NONE_CLASS:()=>Co,DatasourceRowMatchTracker:()=>Oo,DateEditor:()=>I,EDITED_COLUMN_FIELD:()=>m.A7,ERROR_COLUMN_FIELD:()=>m.h1,EditableRenderer:()=>J,EnumColumnFilter:()=>De,EnumColumnFloatingFilter:()=>Oe,ErrorTooltip:()=>Ar,GRID_PRO_COLUMN_DRAG_BRIDGE_CONTEXT_KEY:()=>Ye,GRID_READY_EVENT:()=>m.mr,GenesisGridDatasourceElement:()=>Xa,GridOptionsConfig:()=>m.lz,GridPro:()=>Fr,GridProBaseDatasource:()=>Za,GridProCaseType:()=>m.uA,GridProCell:()=>v,GridProClientSideDatasource:()=>it,GridProColumn:()=>we,GridProFilterTypes:()=>Se,GridProGenesisDatasource:()=>rt,GridProInfiniteDatasource:()=>Tt,GridProLegacy:()=>yi,GridProRendererTypes:()=>m.IX,GridProServerSideDatasource:()=>Et,GridProStatusBar:()=>kr,GridProStatusBarTypes:()=>m.k7,IconRenderer:()=>le,KVStorageStatePersistence:()=>Xo,LIGHT_BACKGROUND_HEX:()=>Bi,LIGHT_BORDER_HEX:()=>ji,LIGHT_FOREGROUND_HEX:()=>Pi,LIGHT_HEADER_FOREGROUND_HEX:()=>Gi,LIGHT_ROW_HOVER_HEX:()=>Ui,LabelValueStatusBarComponent:()=>ur,LoadMoreStatusBarComponent:()=>vr,LocalStorageStatePersistence:()=>dr,MulticolumnDropdown:()=>Do,MultiselectEditor:()=>k,NumberEditor:()=>C,OperationType:()=>Ja,ROW_MATCH_ALERT_CELL_CLASS:()=>Vt,ROW_MATCH_ALERT_CLASS:()=>$t,RapidAgActionRenderer:()=>Qr,RapidAgActionsMenuRenderer:()=>_r,RapidAgSelectRenderer:()=>ti,RapidAgTextRenderer:()=>no,RapidBooleanRenderer:()=>Jr,RapidColumnSelection:()=>so,RapidDateEditor:()=>Vr,RapidEditableRenderer:()=>ei,RapidGridPro:()=>hi,RapidGridProLegacy:()=>Ki,RapidGridProStatusBar:()=>uo,RapidIconRenderer:()=>ni,RapidMultiselectEditor:()=>Hr,RapidNumberEditor:()=>jr,RapidSelectEditor:()=>Gr,RapidStatusPillRenderer:()=>ii,RapidStringEditor:()=>Wr,ReloadStatusBarComponent:()=>mr,RowCountStatusBarComponent:()=>fr,SelectEditor:()=>f,SelectRenderer:()=>he,StatePersistence:()=>cr,StatusPillRenderer:()=>ce,StringEditor:()=>P,actionHeightMultiplier:()=>V,agActionRendererStyles:()=>Y,agBooleanRendererStyles:()=>K,agDateEditorStyles:()=>L,agDragGhostShadowDomStyles:()=>ir,agEditableRendererStyles:()=>Z,agExternalStockStyles:()=>rr,agGridAlpineFontFace:()=>Jt,agGridBalhamFontFace:()=>Zt,agGridCSS:()=>qt,agGridMaterialFontFace:()=>er,agHeadCSS:()=>Qt,agIconRendererStyles:()=>re,agMultiselectEditorStyles:()=>R,agNumberEditorStyles:()=>x,agSelectEditorStyles:()=>b,agSelectRendererStyles:()=>ve,agStatusPillRendererStyles:()=>ge,agStringEditorStyles:()=>G,agThemeAlpineNofontsCSS:()=>Kt,agThemeBalhamNofontsCSS:()=>_t,agThemeFontFaceMap:()=>ar,agThemeFontsId:()=>m.b7,agThemeGenesisRapid:()=>ki,agThemeGenesisRapidDark:()=>Ai,agThemeGenesisRapidLight:()=>Ei,agThemeGenesisRapidTokens:()=>Yi,agThemeMaterialCustomTokens:()=>an,agThemeMaterialNofontsCSS:()=>Xt,agThemeTokenMapCSS:()=>m.Kb,agThemeTokenMapClassname:()=>m.eL,applyVisibleOrder:()=>je,backgroundSwatch:()=>Jo,baseDatasourceEventNames:()=>Qa,bindAgColumnPickerDrag:()=>Te,columnSelectionStyles:()=>Ue,columnSelectionTemplate:()=>Ve,convertColDefToColumnState:()=>Er,convertColDefsToColumnStates:()=>Tr,convertDateFilterToCriteria:()=>yt,convertFilterModelToCriteria:()=>St,convertNumberFilterToCriteria:()=>wt,convertSetFilterToCriteria:()=>bt,convertTextFilterToCriteria:()=>ft,convertToKebabCase:()=>Dr.w,copyAttributesToGridOptions:()=>Ya,createEnumValueLabelFormatter:()=>ze,createRowAlert:()=>jo,createRowMatchCellClassRules:()=>Wt,createRowMatchClassRules:()=>Yt,criteriaDelimiter:()=>Ka,criteriaJoin:()=>_a,csvExportParams:()=>tn,darkColors:()=>Hi,datasourceEventNames:()=>Da,dateTimeValueFormatter:()=>Ia,dateValueFormatter:()=>Ta,defaultAgGridFontFace:()=>tr,defaultGridContextMenuItems:()=>oa,defaultGridOptionsConfig:()=>m.YO,defaultGridProConfig:()=>qa,defaultRowAlertColorPresets:()=>Io,defaultRowAlertPreferences:()=>Fo,defaultRowAlertRatePresets:()=>Lo,defaultRowAlertScopePresets:()=>No,deriveHeightsFromTokens:()=>Wi,dropdownWidthVar:()=>wo,errorHandlerDialogStyles:()=>Lt,extractErrorMessage:()=>It,foregroundSwatch:()=>Zo,formatDateExtra:()=>La,formatEnumFilterModelAsString:()=>ke,foundationAgBooleanRenderer:()=>X,foundationAgEditableRenderer:()=>ae,foundationAgSelectRenderer:()=>fe,foundationAgTextFieldRenderer:()=>ao,foundationAgTextRenderer:()=>oo,foundationColumnSelection:()=>ea,foundationDateEditor:()=>F,foundationGridComponents:()=>To,foundationGridPro:()=>Pr,foundationGridProActionRenderer:()=>W,foundationGridProActionsMenuRenderer:()=>q.su,foundationGridProLegacy:()=>Ci,foundationGridProShadowOptions:()=>Wa,foundationGridProStatusBar:()=>Rr,foundationGridProStyles:()=>nr,foundationIconRenderer:()=>se,foundationMulticolumnDropdown:()=>Eo,foundationMultiselectEditor:()=>D,foundationNumberEditor:()=>z,foundationSelectEditor:()=>y,foundationStatusPillRenderer:()=>ue,foundationStringEditor:()=>j,getActionsMenuDef:()=>q.Al,getAgBooleanRendererTemplate:()=>_,getAgEditableRendererTemplate:()=>ee,getAvailableIndexFields:()=>ct,getAvailableIndexes:()=>dt,getColumnSelectionTemplate:()=>$e,getColumnType:()=>Oa,getDateEditorTemplate:()=>N,getEnumFilterParams:()=>Ma,getErrorHandlerDialogTemplate:()=>Nt,getGridProTemplate:()=>lr,getIconRendererTemplate:()=>ne,getMulticolumnDropdownTemplate:()=>So,getMultiselectEditorTemplate:()=>A,getNumberEditorTemplate:()=>S,getPickerItems:()=>Fe,getSelectEditorTemplate:()=>w,getSelectRendererTemplate:()=>me,getStatusBarTemplate:()=>xr,getStatusPillRendererTemplate:()=>de,getStringEditorTemplate:()=>B,getTextFieldRendererTemplate:()=>eo,getTextRendererTemplate:()=>io,getVerticalDropdownMenuDef:()=>q.QY,gridProColumnDragBridgeModule:()=>qe,gridProColumnSelectionHostStyles:()=>He,gridProColumns:()=>xe,gridProErrorNames:()=>Pa,gridProEventNames:()=>Fa,gridProGenesisDatasourceEventNames:()=>tt,gridProTemplate:()=>sr,lightColors:()=>$i,logger:()=>U,matchesRowCriteria:()=>Ht,mergeAndDedupColDefWithColumnState:()=>Ir,multicolumnDropdownStyles:()=>xo,multicolumnDropdownTemplate:()=>zo,normalizeRowAlertPreferences:()=>Po,optionsClass:()=>yo,orderColumnsForPicker:()=>Pe,partitionPickerItems:()=>Ge,rapidAgActionRenderer:()=>Kr,rapidAgActionsMenuRenderer:()=>Xr,rapidAgBooleanRenderer:()=>Zr,rapidAgDateEditor:()=>Yr,rapidAgEditableRenderer:()=>ai,rapidAgMultiselectEditor:()=>$r,rapidAgNumberEditor:()=>Ur,rapidAgSelectEditor:()=>Br,rapidAgSelectRenderer:()=>ri,rapidAgStringEditor:()=>qr,rapidAgTextRenderer:()=>lo,rapidColumnSelection:()=>go,rapidDefaultGridProConfig:()=>gi,rapidGridComponents:()=>ho,rapidGridPro:()=>vi,rapidGridProLegacy:()=>_i,rapidGridProShadowOptions:()=>si,rapidGridProStatusBar:()=>po,rapidGridProStyles:()=>Mi,rapidGridProTemplate:()=>di,rapidIconRenderer:()=>li,rapidMulticolumnDropdown:()=>Mo,rapidStatusBarStyles:()=>co,rapidStatusPillRenderer:()=>oi,reorderVisibleIds:()=>Be,resolveAgStatusBarPanels:()=>wr,resolveColumnDragBridge:()=>Qe,resolveColumnDragBridgeDirect:()=>Ke,resolveColumnDragBridgeFromApi:()=>_e,resolveColumnPickerSort:()=>Le,resolveColumnsPickerApi:()=>Xe,resolveStatusBarPanels:()=>br,resolveVisibleColumnFields:()=>Ce,rowMatchAlertStyles:()=>or,sanitizeColumnState:()=>Or,statusBarStyles:()=>Cr,statusBarTemplate:()=>Sr,syncColumnDragBridge:()=>We,textFieldRendererStyles:()=>Zi,textRendererStyles:()=>ro,themeGenesisRapid:()=>zi,themeGenesisRapidDark:()=>Ri,themeGenesisRapidLight:()=>Di,toPickerItem:()=>Ne,wasClickOutsideElement:()=>Ro});var r=t(55823),i=t(20633),o=t(21409),n=t(17190),l=t(54634),s=t(33681),g=t(38370),d=t(48046),c=t(88047),u=t(62051),p=t.n(u);const h=s.html`
|
|
1
|
+
(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[109],{41492(e){e.exports=function(){"use strict";var e="minute",a=/[+-]\d\d(?::?\d\d)?/g,t=/([+-]|\d\d)/g;return function(r,i,o){var n=i.prototype;o.utc=function(e){return new i({date:e,utc:!0,args:arguments})},n.utc=function(a){var t=o(this.toDate(),{locale:this.$L,utc:!0});return a?t.add(this.utcOffset(),e):t},n.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var l=n.parse;n.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),l.call(this,e)};var s=n.init;n.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 s.call(this)};var g=n.utcOffset;n.utcOffset=function(r,i){var o=this.$utils().u;if(o(r))return this.$u?0:o(this.$offset)?g.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(a);if(!r)return null;var i=(""+r[0]).match(t)||["-",0,0],o=i[0],n=60*+i[1]+ +i[2];return 0===n?0:"+"===o?n:-n}(r),null===r))return this;var n=Math.abs(r)<=16?60*r:r;if(0===n)return this.utc(i);var l=this.clone();if(i)return l.$offset=n,l.$u=!1,l;var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(l=this.local().add(n+s,e)).$offset=n,l.$x.$localOffset=s,l};var d=n.format;n.format=function(e){var a=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,a)},n.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},n.isUTC=function(){return!!this.$u},n.toISOString=function(){return this.toDate().toISOString()},n.toString=function(){return this.toDate().toUTCString()};var c=n.toDate;n.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var u=n.diff;n.diff=function(e,a,t){if(e&&this.$u===e.$u)return u.call(this,e,a,t);var r=this.local(),i=o(e).local();return u.call(r,i,a,t)}}}()},70002(e,a,t){"use strict";t.d(a,{SG:()=>o,TA:()=>n,kG:()=>i});var r=t(6884);function i(e){const a=null==e?NaN:Number(e);return Number.isFinite(a)?0===a?1/0:a:r.OD.MAX_VIEW_1000}function o(e){return!1===e.moreRows?"end":e.rowsHeld>=i(e.maxView)?e.movingView?"more":"view-full":e.emptyReply?"stalled":"more"}function n(e){const a=i(e.maxView),t=null!=(r=e.maxView)&&Number.isFinite(Number(r))?`${a}`:`${a}, the server default`;var r;const o=e.totalRows;if("stalled"===e.status)return`${e.resourceName} stopped at ${e.rowsHeld} rows: the server answered MORE_ROWS with an empty page while still reporting more rows, with room left in the view (MAX_VIEW ${t}). This is not the MAX_VIEW cap; check the data server log for "Problem building client message".`;if(!e.emptyReply&&void 0!==o&&o<=e.rowsHeld)return;const n=void 0!==o&&o>e.rowsHeld,l=n?` of ${o}`:"",s=e.emptyReply||n?" and the server holds more rows past it":", so any rows past it are not loaded";return`${e.resourceName} stopped at ${e.rowsHeld}${l} rows: the DATASERVER view is full at MAX_VIEW (${t})${s}. Raise ${e.attribute} past the row count to reach the rest.`}},40370(e,a,t){"use strict";t.d(a,{C:()=>l});var r=t(55823),i=t(33681),o=t(17465),n=t(39087);const l=e=>{class a extends e{constructor(){super(),this.hasOwnProperty("onDatasourceStatusChanged")||(this.onDatasourceStatusChanged=e=>{var a;const t=void 0!==this.data;this.resourceName||t||o.v.warn("Target classes must have a resourceName or data property to use the DatasourceEventHandler mixin.");const r=e.detail;if(r.name===this.resourceName){const e=null!==(a=this.datasourceStatus)&&void 0!==a?a:{isInitialized:!1,hasMetadata:!1};(e.isInitialized!==r.isInitialized||r.metadataRequired&&e.hasMetadata!==r.hasMetadata)&&(this.datasourceStatus=r)}})}datasourceStatusChanged(e,a){o.v.debug("Target classes should override the datasourceStatusChanged method of the DatasourceEventHandler mixin to respond to changes in the target datasource.")}connectedCallback(){super.connectedCallback(),document.addEventListener(n.w,this.onDatasourceStatusChanged,{passive:!0,capture:!0})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(n.w,this.onDatasourceStatusChanged,{capture:!0})}}return(0,r.Cg)([i.observable],a.prototype,"datasourceStatus",void 0),a}},96730(e,a,t){"use strict";function r(e,a=";"){return e?e.split(a).map(e=>e.trim()).sort((e,a)=>e.localeCompare(a)).join(a):e}t.d(a,{Q:()=>r})},68109(e,a,t){"use strict";t.r(a),t.d(a,{AG_BOOLEAN_PROPERTIES:()=>ja,AG_NUMBER_PROPERTIES:()=>Ba,AG_PROPERTIES:()=>Ga,ActionRenderer:()=>H,ActionsMenuRenderer:()=>q.cN,AgGridCSSVars:()=>m.W3,AgGridTheme:()=>m.mJ,AgTextFieldRenderer:()=>Xi,AgTextRenderer:()=>ao,BooleanRenderer:()=>Q,COLUMN_PICKER_SORT_DEFAULT:()=>Ie,CellTemplate:()=>h,ColumnSelection:()=>Ze,ColumnTemplate:()=>be,DARK_BACKGROUND_HEX:()=>Ii,DARK_BORDER_HEX:()=>Li,DARK_FOREGROUND_HEX:()=>Oi,DARK_HEADER_FOREGROUND_HEX:()=>Ti,DARK_ROW_HOVER_HEX:()=>Ni,DEBOUNCED_RESIZE_TIME:()=>Na,DEFAULT_STATUS_BAR_CONFIG:()=>m.o2,DISPLAY_NONE_CLASS:()=>yo,DatasourceRowMatchTracker:()=>Mo,DateEditor:()=>I,EDITED_COLUMN_FIELD:()=>m.A7,ERROR_COLUMN_FIELD:()=>m.h1,EditableRenderer:()=>J,EnumColumnFilter:()=>De,EnumColumnFloatingFilter:()=>Oe,ErrorTooltip:()=>Ar,GRID_PRO_COLUMN_DRAG_BRIDGE_CONTEXT_KEY:()=>Ye,GRID_READY_EVENT:()=>m.mr,GenesisGridDatasourceElement:()=>Xa,GridOptionsConfig:()=>m.lz,GridPro:()=>Nr,GridProBaseDatasource:()=>Za,GridProCaseType:()=>m.uA,GridProCell:()=>v,GridProClientSideDatasource:()=>it,GridProColumn:()=>we,GridProFilterTypes:()=>Se,GridProGenesisDatasource:()=>rt,GridProInfiniteDatasource:()=>Tt,GridProLegacy:()=>wi,GridProRendererTypes:()=>m.IX,GridProServerSideDatasource:()=>Et,GridProStatusBar:()=>kr,GridProStatusBarTypes:()=>m.k7,IconRenderer:()=>le,KVStorageStatePersistence:()=>_o,LIGHT_BACKGROUND_HEX:()=>Gi,LIGHT_BORDER_HEX:()=>Bi,LIGHT_FOREGROUND_HEX:()=>Fi,LIGHT_HEADER_FOREGROUND_HEX:()=>Pi,LIGHT_ROW_HOVER_HEX:()=>ji,LabelValueStatusBarComponent:()=>ur,LoadMoreStatusBarComponent:()=>vr,LocalStorageStatePersistence:()=>dr,MulticolumnDropdown:()=>Ao,MultiselectEditor:()=>k,NumberEditor:()=>C,OperationType:()=>Ja,ROW_MATCH_ALERT_CELL_CLASS:()=>Vt,ROW_MATCH_ALERT_CLASS:()=>$t,RapidAgActionRenderer:()=>qr,RapidAgActionsMenuRenderer:()=>Kr,RapidAgSelectRenderer:()=>ai,RapidAgTextRenderer:()=>oo,RapidBooleanRenderer:()=>Xr,RapidColumnSelection:()=>lo,RapidDateEditor:()=>$r,RapidEditableRenderer:()=>Zr,RapidGridPro:()=>pi,RapidGridProLegacy:()=>Qi,RapidGridProStatusBar:()=>co,RapidIconRenderer:()=>oi,RapidMultiselectEditor:()=>Ur,RapidNumberEditor:()=>Br,RapidSelectEditor:()=>Pr,RapidStatusPillRenderer:()=>ri,RapidStringEditor:()=>Yr,ReloadStatusBarComponent:()=>mr,RowCountStatusBarComponent:()=>fr,SelectEditor:()=>f,SelectRenderer:()=>he,StatePersistence:()=>cr,StatusPillRenderer:()=>ce,StringEditor:()=>P,actionHeightMultiplier:()=>V,agActionRendererStyles:()=>Y,agBooleanRendererStyles:()=>K,agDateEditorStyles:()=>L,agDragGhostShadowDomStyles:()=>ir,agEditableRendererStyles:()=>Z,agExternalStockStyles:()=>rr,agGridAlpineFontFace:()=>Jt,agGridBalhamFontFace:()=>Zt,agGridCSS:()=>qt,agGridMaterialFontFace:()=>er,agHeadCSS:()=>Qt,agIconRendererStyles:()=>re,agMultiselectEditorStyles:()=>R,agNumberEditorStyles:()=>x,agSelectEditorStyles:()=>b,agSelectRendererStyles:()=>ve,agStatusPillRendererStyles:()=>ge,agStringEditorStyles:()=>G,agThemeAlpineNofontsCSS:()=>Kt,agThemeBalhamNofontsCSS:()=>_t,agThemeFontFaceMap:()=>ar,agThemeFontsId:()=>m.b7,agThemeGenesisRapid:()=>zi,agThemeGenesisRapidDark:()=>Ri,agThemeGenesisRapidLight:()=>Di,agThemeGenesisRapidTokens:()=>Vi,agThemeMaterialCustomTokens:()=>en,agThemeMaterialNofontsCSS:()=>Xt,agThemeTokenMapCSS:()=>m.Kb,agThemeTokenMapClassname:()=>m.eL,applyVisibleOrder:()=>je,backgroundSwatch:()=>Xo,baseDatasourceEventNames:()=>Qa,bindAgColumnPickerDrag:()=>Te,columnSelectionStyles:()=>Ue,columnSelectionTemplate:()=>Ve,convertColDefToColumnState:()=>Er,convertColDefsToColumnStates:()=>Tr,convertDateFilterToCriteria:()=>yt,convertFilterModelToCriteria:()=>St,convertNumberFilterToCriteria:()=>wt,convertSetFilterToCriteria:()=>bt,convertTextFilterToCriteria:()=>ft,convertToKebabCase:()=>Dr.w,copyAttributesToGridOptions:()=>Ya,createEnumValueLabelFormatter:()=>ze,createRowAlert:()=>Bo,createRowMatchCellClassRules:()=>Wt,createRowMatchClassRules:()=>Yt,criteriaDelimiter:()=>Ka,criteriaJoin:()=>_a,csvExportParams:()=>an,darkColors:()=>Ui,datasourceEventNames:()=>Da,dateTimeValueFormatter:()=>Ia,dateValueFormatter:()=>Ta,defaultAgGridFontFace:()=>tr,defaultGridContextMenuItems:()=>oa,defaultGridOptionsConfig:()=>m.YO,defaultGridProConfig:()=>qa,defaultRowAlertColorPresets:()=>To,defaultRowAlertPreferences:()=>No,defaultRowAlertRatePresets:()=>Io,defaultRowAlertScopePresets:()=>Lo,deriveHeightsFromTokens:()=>Yi,dropdownWidthVar:()=>bo,errorHandlerDialogStyles:()=>Lt,extractErrorMessage:()=>It,foregroundSwatch:()=>Jo,formatDateExtra:()=>La,formatEnumFilterModelAsString:()=>ke,foundationAgBooleanRenderer:()=>X,foundationAgEditableRenderer:()=>ae,foundationAgSelectRenderer:()=>fe,foundationAgTextFieldRenderer:()=>eo,foundationAgTextRenderer:()=>io,foundationColumnSelection:()=>ea,foundationDateEditor:()=>F,foundationGridComponents:()=>Oo,foundationGridPro:()=>Fr,foundationGridProActionRenderer:()=>W,foundationGridProActionsMenuRenderer:()=>q.su,foundationGridProLegacy:()=>yi,foundationGridProShadowOptions:()=>Wa,foundationGridProStatusBar:()=>Rr,foundationGridProStyles:()=>nr,foundationIconRenderer:()=>se,foundationMulticolumnDropdown:()=>Do,foundationMultiselectEditor:()=>D,foundationNumberEditor:()=>z,foundationSelectEditor:()=>y,foundationStatusPillRenderer:()=>ue,foundationStringEditor:()=>j,getActionsMenuDef:()=>q.Al,getAgBooleanRendererTemplate:()=>_,getAgEditableRendererTemplate:()=>ee,getAvailableIndexFields:()=>ct,getAvailableIndexes:()=>dt,getColumnSelectionTemplate:()=>$e,getColumnType:()=>Oa,getDateEditorTemplate:()=>N,getEnumFilterParams:()=>Ma,getErrorHandlerDialogTemplate:()=>Nt,getGridProTemplate:()=>lr,getIconRendererTemplate:()=>ne,getMulticolumnDropdownTemplate:()=>xo,getMultiselectEditorTemplate:()=>A,getNumberEditorTemplate:()=>S,getPickerItems:()=>Fe,getSelectEditorTemplate:()=>w,getSelectRendererTemplate:()=>me,getStatusBarTemplate:()=>xr,getStatusPillRendererTemplate:()=>de,getStringEditorTemplate:()=>B,getTextFieldRendererTemplate:()=>Zi,getTextRendererTemplate:()=>ro,getVerticalDropdownMenuDef:()=>q.QY,gridProColumnDragBridgeModule:()=>qe,gridProColumnSelectionHostStyles:()=>He,gridProColumns:()=>xe,gridProErrorNames:()=>Pa,gridProEventNames:()=>Fa,gridProGenesisDatasourceEventNames:()=>tt,gridProTemplate:()=>sr,lightColors:()=>Hi,logger:()=>U,matchesRowCriteria:()=>Ht,mergeAndDedupColDefWithColumnState:()=>Ir,multicolumnDropdownStyles:()=>Co,multicolumnDropdownTemplate:()=>So,normalizeRowAlertPreferences:()=>Fo,optionsClass:()=>wo,orderColumnsForPicker:()=>Pe,partitionPickerItems:()=>Ge,rapidAgActionRenderer:()=>Qr,rapidAgActionsMenuRenderer:()=>_r,rapidAgBooleanRenderer:()=>Jr,rapidAgDateEditor:()=>Vr,rapidAgEditableRenderer:()=>ei,rapidAgMultiselectEditor:()=>Hr,rapidAgNumberEditor:()=>jr,rapidAgSelectEditor:()=>Gr,rapidAgSelectRenderer:()=>ti,rapidAgStringEditor:()=>Wr,rapidAgTextRenderer:()=>no,rapidColumnSelection:()=>so,rapidDefaultGridProConfig:()=>si,rapidGridComponents:()=>po,rapidGridPro:()=>hi,rapidGridProLegacy:()=>Ki,rapidGridProShadowOptions:()=>li,rapidGridProStatusBar:()=>uo,rapidGridProStyles:()=>Ei,rapidGridProTemplate:()=>gi,rapidIconRenderer:()=>ni,rapidMulticolumnDropdown:()=>Eo,rapidStatusBarStyles:()=>go,rapidStatusPillRenderer:()=>ii,reorderVisibleIds:()=>Be,resolveAgStatusBarPanels:()=>wr,resolveColumnDragBridge:()=>Qe,resolveColumnDragBridgeDirect:()=>Ke,resolveColumnDragBridgeFromApi:()=>_e,resolveColumnPickerSort:()=>Le,resolveColumnsPickerApi:()=>Xe,resolveStatusBarPanels:()=>br,resolveVisibleColumnFields:()=>Ce,rowMatchAlertStyles:()=>or,sanitizeColumnState:()=>Or,statusBarStyles:()=>Cr,statusBarTemplate:()=>Sr,syncColumnDragBridge:()=>We,textFieldRendererStyles:()=>Ji,textRendererStyles:()=>to,themeGenesisRapid:()=>Si,themeGenesisRapidDark:()=>ki,themeGenesisRapidLight:()=>Ai,toPickerItem:()=>Ne,wasClickOutsideElement:()=>ko});var r=t(55823),i=t(20633),o=t(21409),n=t(17190),l=t(54634),s=t(33681),g=t(38370),d=t(48046),c=t(88047),u=t(62051),p=t.n(u);const h=s.html`
|
|
2
2
|
<template>
|
|
3
3
|
<slot ${(0,s.slotted)("slottedRenderer")} @slotchange="${e=>e.slottedAgRendererChanged()}"></slot>
|
|
4
4
|
</template>
|
|
@@ -9449,7 +9449,7 @@
|
|
|
9449
9449
|
<div class="ag-status-bar-left" part="status-bar-left" ${(0,s.ref)("leftEl")}></div>
|
|
9450
9450
|
<div class="ag-status-bar-right" part="status-bar-right" ${(0,s.ref)("rightEl")}></div>
|
|
9451
9451
|
</div>
|
|
9452
|
-
`,Sr=xr(),zr={[m.k7.labelValue]:ur,[m.k7.loadMore]:vr,[m.k7.reload]:mr,[m.k7.rowCount]:fr};class kr extends((0,o.S)(g.FoundationElement)){constructor(){super(...arguments),this.gridHost=null,this.gridApi=null,this.statusBarConfig=null,this.panels=new Map,this.warnedPanelTypes=new Set}gridHostChanged(){this.syncPanels()}gridApiChanged(){this.syncPanels()}statusBarConfigChanged(){this.syncPanels()}leftElChanged(){this.syncPanels()}rightElChanged(){this.syncPanels()}syncPanels(){var e;if(!this.leftEl||!this.rightEl)return;this.releasePanels();const a=this.gridHost,t=this.resolveApi();if(!(null==a?void 0:a.withStatusBar)||!t)return;const r=br({withStatusBar:a.withStatusBar,statusBarConfig:null!==(e=this.statusBarConfig)&&void 0!==e?e:a.statusBarConfig,isServerSide:a.isServerSide,isInfiniteRowModel:a.isInfiniteRowModel,gridProDatasource:a.gridProDatasource});for(const e of r)this.mountPanel(e,t)}getStatusPanel(e){return this.panels.get(e)}releasePanels(){var e,a,t,r,i;for(const r of this.panels.values())null===(e=r.destroy)||void 0===e||e.call(r),null===(t=null===(a=r.getGui)||void 0===a?void 0:a.call(r))||void 0===t||t.remove();this.panels.clear(),null===(r=this.leftEl)||void 0===r||r.replaceChildren(),null===(i=this.rightEl)||void 0===i||i.replaceChildren()}connectedCallback(){super.connectedCallback(),this.panels.size||this.syncPanels()}disconnectedCallback(){super.disconnectedCallback(),this.shouldRunDisconnect?this.releasePanels():queueMicrotask(()=>{this.isConnected||this.releasePanels()})}resolveApi(){var e,a,t;return null!==(t=null!==(e=this.gridApi)&&void 0!==e?e:null===(a=this.gridHost)||void 0===a?void 0:a.gridApi)&&void 0!==t?t:null}mountPanel(e,a){var t,r;const i=zr[e.statusPanel];if(!i)return void(this.warnedPanelTypes.has(e.statusPanel)||(this.warnedPanelTypes.add(e.statusPanel),U.warn(`Grid Pro status bar: no panel for type '${e.statusPanel}', skipping it`)));const o=new i,n=Object.assign(Object.assign({api:a,context:{}},e.statusPanelParams),null===(r=null===(t=this.gridHost)||void 0===t?void 0:t.getStatusPanelState)||void 0===r?void 0:r.call(t,e.statusPanel));o.init(n);const l=o.getGui();("right"===e.align?this.rightEl:this.leftEl).appendChild(l),this.panels.set(e.statusPanel,o)}}(0,r.Cg)([s.observable],kr.prototype,"gridHost",void 0),(0,r.Cg)([s.observable],kr.prototype,"gridApi",void 0),(0,r.Cg)([s.observable],kr.prototype,"statusBarConfig",void 0),(0,r.Cg)([s.observable],kr.prototype,"leftEl",void 0),(0,r.Cg)([s.observable],kr.prototype,"rightEl",void 0);const Rr=kr.compose({baseName:"grid-pro-status-bar",template:xr(),styles:Cr});class Ar{init(e){const a=this.eGui=document.createElement("div"),t=e.value;a.classList.add("custom-tooltip"),a.style["background-color"]="#f14376",a.style.border="1px inside",a.style["border-color"]="#2e3339",a.style["border-radius"]="4px",a.style.padding="5px",a.style["box-shadow"]="0px 4px 10px 0px rgba(0, 0, 0, 0.25);",a.innerHTML=`<span style='color: #000000; font-size: 10px'>${t}</span>`}getGui(){return this.eGui}}var Dr=t(50103);function Er(e){return{colId:e.field||e.colId||"",hide:e.hide||!1,width:e.width||null,pinned:e.pinned||null,sort:e.sort||null,sortIndex:e.sortIndex||null,aggFunc:e.aggFunc||null,rowGroup:e.rowGroup||!1,rowGroupIndex:e.rowGroupIndex||null,pivot:e.pivot||!1,pivotIndex:e.pivotIndex||null,flex:e.flex||null}}const Mr=Object.keys(Er({}));function Or(e){return Array.isArray(e)?e.map(e=>{const a={},t=a;for(const a of Mr){const r=e[a];void 0!==r&&(t[a]=r)}return a}):[]}function Tr(e){return e.map(Er)}function Ir(e,a){const t=Or(a),r={},i=[],o="field",n="colId",l=e=>Array.isArray(e.children),s=e=>{var a;return null!==(a=e[o])&&void 0!==a?a:e[n]},g=new Map;t.forEach(e=>{null!=e[n]&&g.set(e[n],e)});const d=e=>{if(l(e))return Object.assign(Object.assign({},e),{children:e.children.map(d)});const a=s(e),t=null!=a?g.get(a):void 0;return t?Object.assign(Object.assign({},e),t):Object.assign({},e)};return t.forEach(a=>{const t=a[n];if(null==t)return;const g=e.find(e=>!l(e)&&(e[o]===t||null!=e[n]&&e[n]===t));if(g){const e=s(g),t=Object.assign(Object.assign({},g),a);null!=e&&(r[e]=t),i.push(t)}}),e.forEach(e=>{if(l(e))return void i.push(d(e));const a=s(e);if(null==a||!r.hasOwnProperty(a)){const t=Object.assign({},e);null!=a&&(r[a]=t),i.push(t)}}),i}(0,i.N)(rt,it,Et,Tt,v,we,Ze,kr),d.syG.registerModules([d.n76,d.Q90,d.x6L,d.YN8,d.YzW,d.Lt,d.I95,d.O4V,d.H18,d.lvV,d.mfG,d.Iws,d.nSw,d.FUS,d.Ss0,d.tkg,d.ZDV,d.ZyC,d.XG7,d.VZy,d.$I9,d.dGu,d.AJG,d.c5B,d.BG,d.KIB,d.Sko,d.ZuP,d.Vc,qe]);const Lr="gridReady";const Nr=["tooltip","tooltipField","tooltipValueGetter","tooltipComponent","tooltipComponentSelector"];class Fr extends((0,o.S)(g.FoundationElement)){getColumnDragBridge(){return this.columnDragBridge}rowDataChanged(e,a){this.initialised&&this.gridApi&&this.gridApi.setGridOption("rowData",a)}gridSlotChanged(){this.gridSlot&&!this.initialised&&this.agGridOptions&&this.initGrid()}withStatusBarChanged(){this.applyStatusBarMode()}get usesAgStatusBar(){return"ag"===this.statusBarMode}get usesCommunityStatusBar(){return"community"===this.statusBarMode}get statusBar(){const e=this.statusBarRef;if(e)return e instanceof kr?e:void(this.warnedUnregisteredStatusBar||(this.warnedUnregisteredStatusBar=!0,U.warn(`Grid Pro: <${e.localName}> is not registered, so the status bar is not shown. Register the design system status bar element (e.g. rapidGridProStatusBar) with the grid.`)))}contextMenuItemsChanged(){this.syncContextMenuSuppression()}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=p()(this.saveColumnState.bind(this),400),this.debouncedSaveFilterModel=p()(this.cacheFilterConfig.bind(this),400),this.debouncedNotifyDatasourceVisibleColumns=p()(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=m.o2,this.withStatusBar=!1,this.statusBarMode="pending",this.statusPanelState={},this.warnedUnregisteredStatusBar=!1,this.warnedGridOptionsStatusBar=!1,this.gridCreatedWithMenuSuppressed=!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.boundContextMenuListener=(e,a)=>{"cellContextMenu"===e&&this.showContextMenu(a)},this._filterConfig=void 0,this.handleLuminanceChange=e=>{const a=l.baseLayerLuminance.getValueFor(e.target);this.themeMode=a===l.StandardLuminance.DarkMode?"dark":"light"},this.luminanceObserver={handleChange:e=>this.handleLuminanceChange(e)},this.agAttributes={},this.agPropertiesMap=Ga.reduce((e,a)=>(e[a.toLowerCase()]=a,e[(0,Dr.w)(a)]=a,e),{});const e=this.hideDatasourceError.bind(this);this.rootEventsListeners.push([tt.dataInit,e],[Fa.datasourceErrorClose,e],[Qa.error,this.handleBaseDatasourceError.bind(this)],[Qa.connected,e]),this.datasourceEventHandlers=[[Da.initialize,this.handleInitialize.bind(this)],[Da.dataLoaded,this.handleDataLoaded.bind(this)],[Da.dataChanged,this.handleDataChanged.bind(this)],[Da.schemaUpdated,this.handleSchemaUpdated.bind(this)],[Da.dataCleared,this.handleDataCleared.bind(this)],[Da.loadingStarted,this.handleLoadingStarted.bind(this)],[Da.loadingFinished,this.handleLoadingFinished.bind(this)],[Da.noDataAvailable,this.handleNoDataAvailable.bind(this)],[Da.filtersRestored,this.handleFiltersRestored.bind(this)],[Da.moreDataAvailable,this.handleMoreDataAvailable.bind(this)],[Da.error,this.handleDatasourceError.bind(this)],[Da.destroy,this.handleDatasourceDestroy.bind(this)],[Da.cacheFilterConfig,this.cacheFilterConfig.bind(this)],[Da.refreshServerSide,this.handleRefreshServerSide.bind(this)],[Da.setServerSideDatasource,this.handleSetServerSideDatasource.bind(this)],[Da.addGridCssClass,this.handleAddGridCssClass.bind(this)],[Da.removeGridCssClass,this.handleRemoveGridCssClass.bind(this)],[Da.applyServerSideTransaction,this.handleApplyServerSideTransaction.bind(this)],[Da.setInfiniteDatasource,this.handleSetInfiniteDatasource.bind(this)],[Da.refreshInfiniteCache,this.handleRefreshInfiniteCache.bind(this)]]}addEventListener(e,a,t){super.addEventListener(e,a,t),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 a=a=>{this.$emit(e,a)};this.gridEventListeners.set(e,a),this.gridApi.addEventListener(e,a)}handleError(e,a){this.gridErrorItems=[...this.gridErrorItems,{detail:a.detail,type:e}]}handleBaseDatasourceError(e){const a={detail:{message:e.detail.message},type:Pa.datasource};this.gridErrorItems=[...this.gridErrorItems,{detail:a.detail,type:a.type}]}hideDatasourceError(){this.gridErrorItems=this.gridErrorItems.filter(e=>e.type!==Pa.datasource),this.removeAttribute("ds-disconnected")}connectedCallback(){var e;super.connectedCallback(),this.syncColumnSelectionHostLayout(),this.syncStatusBarHostLayout(),this.disposed=!1;const a=null!==(e=this.provider)&&void 0!==e?e:this;this.luminanceSubscription=l.baseLayerLuminance.subscribe(this.luminanceObserver,a),this.gridAutosizingEnabled&&(this.visibilityObserverCleanup=(0,n.j)(this,e=>{e&&this.debouncedColumnAutosize()})),this.rehydrationAttempted=!1,this.shouldRunConnect&&(this.rootEventsListeners.forEach(([e,a])=>{this.addEventListener(e,a)}),Ga.forEach(e=>{const a=function(e,a){let t=Object.getPrototypeOf(e);for(;t&&t!==HTMLElement.prototype;){const e=Object.getOwnPropertyDescriptor(t,a);if(e)return e;t=Object.getPrototypeOf(t)}}(this,e);Object.defineProperty(this,e,{get:null==a?void 0:a.get,set:t=>{var r,i;const o=null===(r=null==a?void 0:a.get)||void 0===r?void 0:r.call(this);null===(i=null==a?void 0:a.set)||void 0===i||i.call(this,t),this.agAttributeChangedCallback((0,Dr.w)(e),o,t)},enumerable:!0,configurable:!0})}),this.toggleDatasourceEventListeners(!0))}disconnectedCallback(){var e,a;null===(e=this.closeContextMenu)||void 0===e||e.call(this),this.closeContextMenu=void 0,this.disposed=!0,this.debouncedSaveColumnState.cancel(),this.debouncedSaveFilterModel.cancel();const t=null!==(a=this.provider)&&void 0!==a?a:this;l.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 r=this.shouldRunDisconnect;this.rootEventsListeners.forEach(([e,a])=>{this.removeEventListener(e,a)}),r?this.performDisconnectCleanup():queueMicrotask(()=>{this.isConnected||this.performDisconnectCleanup()})}syncColumnSelectionHostLayout(){this.classList.toggle("has-column-selection",this.enableColumnSelection)}syncStatusBarHostLayout(){this.classList.toggle("has-status-bar",!!this.withStatusBar&&this.usesCommunityStatusBar)}applyStatusBarMode(){var e,a,t;const r=this.gridApi;r&&!(null===(e=r.isDestroyed)||void 0===e?void 0:e.call(r))&&(this.statusBarMode=(null===(a=r.isModuleRegistered)||void 0===a?void 0:a.call(r,"StatusBarModule"))?"ag":"community",this.usesAgStatusBar?r.setGridOption("statusBar",this.buildAgStatusBar(null===(t=r.getGridOption)||void 0===t?void 0:t.call(r,"rowModelType"))):this.withStatusBar&&this.userStatusBar&&!this.warnedGridOptionsStatusBar&&(this.warnedGridOptionsStatusBar=!0,U.warn("Grid Pro: gridOptions.statusBar is ignored because the AG Grid Enterprise StatusBarModule is not registered. Use statusBarConfig instead."))),this.syncStatusBarHostLayout()}buildAgStatusBar(e){var a,t;if(!this.withStatusBar)return this.userStatusBar;const r=null!==(t=null===(a=this.userStatusBar)||void 0===a?void 0:a.statusPanels)&&void 0!==t?t:[],i=wr({withStatusBar:this.withStatusBar,statusBarConfig:this.statusBarConfig,isServerSide:this.isServerSide||"serverSide"===e,isInfiniteRowModel:this.isInfiniteRowModel||"infinite"===e,gridProDatasource:this.gridProDatasource},r);return Object.assign(Object.assign({},this.userStatusBar),{statusPanels:i})}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(){var e;this.gridApi&&this.gridEventListeners.forEach((e,a)=>{this.gridApi.removeEventListener(a,e)}),this.gridEventListeners.clear(),null===(e=this.statusBar)||void 0===e||e.releasePanels(),delete this.statusPanelState[m.k7.loadMore],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 a=e?"addEventListener":"removeEventListener";this.datasourceEventHandlers.forEach(([e,t])=>{super[a](e,t)})}handleInitialize(e){const{options:a,keepColDefsOnClearRowData:t}=e.detail;t&&(this.columnState=this.gridApi.getColumnState()),this.applyingDatasourceGridOptions=!0;try{this.gridOptions=Object.assign(Object.assign(Object.assign({},this.userProvidedGridOptions),a),t?{columnDefs:this.gridApi.getColumnDefs()}:{}),this.initGrid()}finally{this.applyingDatasourceGridOptions=!1}}handleDataLoaded(e){const{data:a}=e.detail;this.gridApi&&this.gridApi.setGridOption("rowData",a)}handleDataChanged(e){const{changes:a}=e.detail;if(!this.gridApi||!this.isClientSideRowModel)return;const t=this.gridApi.applyTransaction(a);this.flashAddedCells(null==t?void 0:t.add)}get isClientSideRowModel(){var e,a,t;return"clientSide"===(null!==(t=null===(a=null===(e=this.gridApi)||void 0===e?void 0:e.getGridOption)||void 0===a?void 0:a.call(e,"rowModelType"))&&void 0!==t?t:"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}){this.applyCommunityFilterFallbacks(e);const a=this.gridApi.getColumnDefs();if(a&&a.length>0)return void this.enrichPresetColumnDefs(e);const t=yield this.mergeAllColumnDefsAndStates(e,!0);this.gridApi.setGridOption("columnDefs",t),this.restoreCachedFilterConfig()})}enrichPresetColumnDefs(e){const a=this.gridApi.getGridOption("columnDefs");if(!(null==a?void 0:a.length))return;const t=Gt(a,e,{fillUnsetFilters:!this.isClientSideRowModel});if(t===a)return;const r=this.gridApi.getColumnState(),i=JSON.stringify(this.gridApi.getFilterModel());this.gridApi.setGridOption("columnDefs",t),this.gridApi.applyColumnState({state:r,applyOrder:!0}),JSON.stringify(this.gridApi.getFilterModel())!==i&&this.restoreCachedFilterConfig()}applyCommunityFilterFallbacks(e){const a=this.gridApi.isModuleRegistered("SetFilterModule"),t=this.gridApi.isModuleRegistered("MultiFilterModule");e.forEach(e=>{var r,i,o,n,l;if("agSetColumnFilter"===e.filter&&!a)return U.debug(`SetFilterModule is not registered; column '${e.field}' falls back to the enum filter`),e.filter=Se.enumFilter,void(null!==(r=e.floatingFilterComponent)&&void 0!==r||(e.floatingFilterComponent=Se.enumFloatingFilter));if("agMultiColumnFilter"!==e.filter)return;const s=null===(o=null===(i=e.filterParams)||void 0===i?void 0:i.filters)||void 0===o?void 0:o.find(e=>"agSetColumnFilter"===e.filter);t?!a&&s&&(U.debug(`SetFilterModule is not registered; the set sub-filter of column '${e.field}' falls back to the enum filter`),s.filter=Se.enumFilter):(null===(n=null==s?void 0:s.filterParams)||void 0===n?void 0:n.values)?(U.debug(`MultiFilterModule is not registered; enum column '${e.field}' falls back to the enum filter`),e.filter=Se.enumFilter,e.filterParams=Object.assign({},s.filterParams),null!==(l=e.floatingFilterComponent)&&void 0!==l||(e.floatingFilterComponent=Se.enumFloatingFilter)):(U.warn("MultiFilterModule is not registered, falling back to text filter"),e.filter="agTextColumnFilter")})}handleDataCleared(e){const{includeSchema:a}=e.detail;this.gridApi&&(a&&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){const{hasMoreData:a,sourceRef:t}=e.detail;this.updateStatusPanel(m.k7.loadMore,{moreRows:a,sourceRef:t})}updateStatusPanel(e,a){var t;this.usesAgStatusBar||(this.statusPanelState[e]=Object.assign(Object.assign({},this.statusPanelState[e]),a));const r=this.getStatusPanel(e);return null===(t=null==r?void 0:r.updateParams)||void 0===t||t.call(r,a),r}getStatusPanelState(e){return this.statusPanelState[e]}handleDatasourceError(){this.setAttribute("ds-disconnected","ds-disconnected")}handleDatasourceDestroy(){this.clearLocalGridOptions()}handleRefreshServerSide(e){const{purge:a}=e.detail;this.gridApi&&this.gridApi.refreshServerSide({purge:a})}handleSetServerSideDatasource(e){const{datasource:a}=e.detail;this.gridApi&&this.gridApi.setGridOption("serverSideDatasource",a)}handleAddGridCssClass(e){var a;const{className:t}=e.detail,r=(null===(a=this.gridSlot)||void 0===a?void 0:a.parentElement)||this;r&&r.classList.add(t)}handleRemoveGridCssClass(e){var a;const{className:t}=e.detail,r=(null===(a=this.gridSlot)||void 0===a?void 0:a.parentElement)||this;r&&r.classList.remove(t)}handleApplyServerSideTransaction(e){var a,t;const{transaction:r,async:i,callback:o}=e.detail;if(this.gridApi)if(i)this.gridApi.applyServerSideTransactionAsync(r,e=>{var a,t;this.flashAddedCells([...null!==(a=null==e?void 0:e.add)&&void 0!==a?a:[],...null!==(t=null==e?void 0:e.update)&&void 0!==t?t:[]]),null==o||o(e)});else{const e=this.gridApi.applyServerSideTransaction(r);this.flashAddedCells([...null!==(a=null==e?void 0:e.add)&&void 0!==a?a:[],...null!==(t=null==e?void 0:e.update)&&void 0!==t?t:[]]),o&&o(e)}}handleSetInfiniteDatasource(e){const{datasource:a}=e.detail;this.gridApi&&this.gridApi.setGridOption("datasource",a)}handleRefreshInfiniteCache(e){var a;this.gridApi&&((null===(a=e.detail)||void 0===a?void 0:a.purge)?this.gridApi.purgeInfiniteCache():this.gridApi.refreshInfiniteCache())}combineAllGridComponents(e){const a={[m.IX.action]:H,[m.IX.actionsMenu]:q.cN,[m.IX.boolean]:Q,[m.IX.editable]:J,[m.IX.icon]:le,[m.IX.statusPill]:ce,[m.IX.select]:he,[m.IX.selectEditor]:f,[m.IX.numberEditor]:C,[m.IX.multiselectEditor]:k,[m.IX.dateEditor]:I,[m.IX.stringEditor]:P,[Se.enumFilter]:De,[Se.enumFloatingFilter]:Oe,[m.k7.labelValue]:ur,[m.k7.loadMore]:vr,[m.k7.reload]:mr,[m.k7.rowCount]:fr};return Object.assign(Object.assign(Object.assign({},a),e),this.gridComponents)}statePersistanceEnabled(){return!(!this.persistColumnStateKey||0===this.persistColumnStateKey.length)}getSelectedRows(){var e,a,t,r,i,o;try{if(!this.initialised||!this.gridApi)return[];if("single"===(o=null===(e=this.gridOptions)||void 0===e?void 0:e.rowSelection)||"multiple"===o||"object"==typeof o&&("singleRow"===(null==o?void 0:o.mode)||"multiRow"===(null==o?void 0:o.mode)))return this.gridApi.getSelectedRows&&this.gridApi.getSelectedRows().length>0?this.gridApi.getSelectedRows():[];if((null===(a=this.gridApi)||void 0===a?void 0:a.getCellRanges)&&this.gridApi.getCellRanges().length>0)return this.getCellRangeRowData();if(!(null===(t=this.gridOptions)||void 0===t?void 0:t.cellSelection)&&!(null===(r=this.gridOptions)||void 0===r?void 0:r.enableRangeSelection)){const e=null===(i=this.gridApi)||void 0===i?void 0:i.getFocusedCell();if(e){const a=this.gridApi.getDisplayedRowAtIndex(e.rowIndex);if(null==a?void 0:a.data)return[a.data]}}return[]}catch(e){return U.error("Grid Pro: Error getting selected rows:",e),[]}}getCellRangeRowData(){var e;if(!(null===(e=this.gridApi)||void 0===e?void 0:e.getCellRanges))return[];const a=this.gridApi.getCellRanges();if(0===a.length)return[];const t=[];return a.forEach(e=>{const a=e.startRow.rowIndex,r=e.endRow.rowIndex;for(let e=a;e<=r;e+=1){const a=this.gridApi.getDisplayedRowAtIndex(e);(null==a?void 0:a.data)&&!t.some(e=>e===a.data)&&t.push(a.data)}}),t}hasSelectedRows(){return this.getSelectedRows().length>0}getStatusPanel(e){var a,t,r;return this.usesAgStatusBar?null===(t=null===(a=this.gridApi)||void 0===a?void 0:a.getStatusPanel)||void 0===t?void 0:t.call(a,e):null===(r=this.statusBar)||void 0===r?void 0:r.getStatusPanel(e)}updateLabelValueStatusBar(e){if(!this.gridApi)return void U.warn("Grid Pro: Cannot update label-value status bar - grid API not available");const a=this.updateStatusPanel(m.k7.labelValue,Object.assign({},e));a&&"function"==typeof a.updateParams||U.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()},Na))}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=Or(e),e=this.gridAutosizingEnabled?this.removeConfigWidthsToAutosize(e):e;const a=0===e.filter(e=>{if(e.hide)return!1;const a=this.gridApi.getColumn(e.colId);return Boolean(a.getColDef().headerName)}).length;if(0===e.length||JSON.stringify(e)===JSON.stringify(this.columnState)||a)return;yield this.statePersistence.saveColumnState(this.persistColumnStateKey,e),this.columnState=e}})}getSavedColumnState(){return(0,r.sH)(this,void 0,void 0,function*(){return this.columnState=[],this.statePersistanceEnabled()&&(this.columnState=yield this.statePersistence.getColumnState(this.persistColumnStateKey)),this.columnState})}restoreColumnState(){return(0,r.sH)(this,void 0,void 0,function*(){var e;this.rehydrationAttempted=!0;const a=Or(yield this.getSavedColumnState());a&&a.length>0&&(null===(e=this.gridApi)||void 0===e||e.applyColumnState({state:a,applyOrder:!0}))})}cacheFilterConfig(){var e;this.setFilterModel((null===(e=this.gridApi)||void 0===e?void 0:e.getFilterModel())||void 0)}restoreCachedFilterConfig(){return(0,r.sH)(this,void 0,void 0,function*(){var e,a;const t=yield this.getfilterModel();void 0!==t&&(null===(e=this.gridApi)||void 0===e||e.setFilterModel(t),null===(a=this.gridApi)||void 0===a||a.onFilterChanged())})}get gridOptions(){return this.agGridOptions}get isServerSide(){return this.gridProDatasource instanceof Et}get gridParams(){return{globalListener:this.boundGlobalEventListener,globalSyncListener:this.boundContextMenuListener,modules:[qe,d.Vc,d.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 Tt}notifyDatasourceVisibleColumns(){var e,a,t,r;const i=this.gridProDatasource;if(!i)return;const o=Ce(null===(a=null===(e=this.gridApi)||void 0===e?void 0:e.getAllDisplayedColumns)||void 0===a?void 0:a.call(e),null===(r=null===(t=this.gridApi)||void 0===t?void 0:t.getColumnDefs)||void 0===r?void 0:r.call(t));o.length&&i.setVisibleColumns(o)}set gridOptions(e){!this.applyingDatasourceGridOptions&&e&&(this.userProvidedGridOptions=Object.assign({},e));const a=()=>{!this.disposed&&this.isConnected&&(this.debouncedSaveColumnState(),this.debouncedColumnAutosize())},t=()=>{!this.disposed&&this.isConnected&&this.debouncedNotifyDatasourceVisibleColumns()};Array.from(this.attributes).forEach(e=>{const a=this.agPropertiesMap[e.name];a&&(this.agAttributes[a]=e.value)});const{columnDefs:i,components:o,defaultColDef:n,getRowId:l,onGridReady:s,onFilterChanged:g,onFirstDataRendered:d,statusBar:c}=e,u=(0,r.Tt)(e,["columnDefs","components","defaultColDef","getRowId","onGridReady","onFilterChanged","onFirstDataRendered","statusBar"]);this.userStatusBar=c;const p=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.gridOptionsConfig),{defaultColDef:Object.assign({enableCellChangeFlash:this.enableCellFlashing,filter:!0,resizable:!0,sortable:!0},n),components:this.combineAllGridComponents(o),headerHeight:this.headerHeight,rowHeight:this.rowHeight,animateRows:!1,suppressDragLeaveHidesColumns:!0}),this.eventsAndCallbacks),{onGridReady:e=>(0,r.sH)(this,void 0,void 0,function*(){var a,t,r;if(this.gridApi=e.api,!!this.contextMenuItems!==this.gridCreatedWithMenuSuppressed&&this.syncContextMenuSuppression(),this.applyStatusBarMode(),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){U.error("Grid Pro: failed to apply the pending schema update on grid ready:",e)}}this.rowData&&this.gridApi.setGridOption("rowData",this.rowData),s&&s(e),(null===(a=this.gridProDatasource)||void 0===a?void 0:a.keepColDefsOnClearRowData)&&(null===(t=this.columnState)||void 0===t?void 0:t.length)>0&&this.gridApi.applyColumnState({state:this.columnState,applyOrder:!0}),this.$emit(Lr,{event:e,gridId:this.id}),this.$emit(m.mr,{event:e,gridId:this.id}),this.notifyDatasourceVisibleColumns(),null===(r=this.gridProDatasource)||void 0===r||r.$emit(Da.ready),this.restoreColumnState(),this.restoreCachedFilterConfig(),this.debouncedColumnAutosize()}),onFirstDataRendered:e=>{this.notifyDatasourceVisibleColumns(),d&&d(e)},onColumnPinned:a,onColumnResized:a,onColumnMoved:a,onColumnVisible:()=>{a(),t()},onDisplayedColumnsChanged:()=>{a(),t()},onFilterChanged:e=>{!this.disposed&&this.isConnected&&(this.debouncedSaveFilterModel(),g&&g(e))},onGridSizeChanged:a,onSortChanged:a}),u),c&&!this.withStatusBar?{statusBar:c}:{});this.gridProDatasource?(p.columnDefs=i,p.getRowId=l,this.setupStatusBar(p),this.setLocalGridOptions(p)):this.mergeAllColumnDefsAndStates(i).then(e=>{!this.disposed&&this.isConnected&&(p.columnDefs=e,p.getRowId=l,this.setupStatusBar(p),this.setLocalGridOptions(p),this.initGrid())})}setLocalGridOptions(e){this.agGridOptions=Object.assign(Object.assign({},this.agGridOptions),Ya(e,this.agAttributes)),this.agGridOptions.context=Object.assign(Object.assign({},this.agGridOptions.context),{[Ye]: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(){s.DOM.queueUpdate(()=>{!this.disposed&&this.isConnected&&this.gridSlot&&(this.initialised&&(this.destroyGridInstance(),this.gridSlot.firstChild&&this.gridSlot.removeChild(this.gridSlot.firstChild)),this.gridCreatedWithMenuSuppressed=!!this.contextMenuItems,this.agGrid=(0,d.Dvw)(this.gridSlot,this.gridCreatedWithMenuSuppressed?Object.assign(Object.assign({},this.agGridOptions),{suppressContextMenu:!0}):this.agGridOptions,this.gridParams),this.initialised=!0)})}mergeAllColumnDefsAndStates(e){return(0,r.sH)(this,arguments,void 0,function*(e,a=!1){var t;const r=e||[];r.forEach(e=>{if(this.headerCaseType&&e.field&&!e.headerName){const a=c[this.headerCaseType];a?e.headerName=a(e.field):U.warn(`Invalid header-case-type attribute value: ${this.headerCaseType}. Please use one of the following: camelCase, capitalCase, dotCase, headerCase, noCase, paramCase, pascalCase, pathCase, sentenceCase, snakeCase.`)}});const i=Array.from(this.querySelectorAll(this.columnComponentName)).map(e=>e.definition).map(e=>{var a,t;if(this.enableCellFlashing&&void 0===e.enableCellChangeFlash&&(e.enableCellChangeFlash=!0),Ft(e.filter)){if(!(null!=e.filterParams&&"values"in e.filterParams)){const a=Pt(r.find(a=>a.field===e.field));a&&(e.filterParams=Object.assign(Object.assign({},e.filterParams),{values:a}))}e.filter===Se.enumFilter&&(null!==(a=e.floatingFilterComponent)&&void 0!==a||(e.floatingFilterComponent=Se.enumFloatingFilter))}if(e.editable){e.cellRenderer||e.cellRendererSelector||(e.cellRendererSelector=a=>{var t;if((null===(t=a.data)||void 0===t?void 0:t[m.A7])===e.field)return{component:m.IX.editable}});const a=e;t=a,Nr.some(e=>null!=t[e])||(a.tooltipComponent=Ar,a.tooltip=a=>{var t;const r=null===(t=a.data)||void 0===t?void 0:t[m.h1];if(r&&r.column===e.field)return r.message}),e.cellClassRules||(e.cellClassRules={error:e=>{var a,t;return(null===(t=null===(a=e.data)||void 0===a?void 0:a[m.h1])||void 0===t?void 0:t.column)===e.colDef.field}})}const i=r.find(a=>e.field===a.field);return Object.assign(Object.assign({},i),e)}),o=i.map(e=>e.field),n=[...i,...this.onlyTemplateColDefs?[]:r.filter(e=>!o.includes(e.field))];if(this.gridProDatasource&&a){const e=yield this.getSavedColumnState();if((null==e?void 0:e.length)>0)return Ir(n,e);if((null===(t=this.gridProDatasource.deferredColumnStates)||void 0===t?void 0:t.length)>0)return Ir(n,this.gridProDatasource.deferredColumnStates)}return n})}setupStatusBar(e){var a;this.usesAgStatusBar&&this.withStatusBar?e.statusBar=this.buildAgStatusBar(e.rowModelType):null===(a=this.statusBar)||void 0===a||a.syncPanels()}get observedAttributes(){const e=Ga.map(e=>e.toLowerCase()),a=Ga.map(e=>(0,Dr.w)(e));return e.concat(a)}agAttributeChangedCallback(e,a,t){var r;if(a===t)return;const i=this.agPropertiesMap[e];i&&(this.agAttributes[i]=t,this.initialised&&(null===(r=this.gridApi)||void 0===r||r.setGridOption(i,t),"suppressContextMenu"===i&&this.contextMenuItems&&this.syncContextMenuSuppression()))}syncContextMenuSuppression(){var e,a,t,r;const i=null!==(t=null!==(e=this.agAttributes.suppressContextMenu)&&void 0!==e?e:null===(a=this.agGridOptions)||void 0===a?void 0:a.suppressContextMenu)&&void 0!==t&&t;null===(r=this.gridApi)||void 0===r||r.setGridOption("suppressContextMenu",!!this.contextMenuItems||i)}showContextMenu(e){var a,t,r,i,o;const n=null===(a=this.contextMenuItems)||void 0===a?void 0:a.call(this,e);if(!(null==n?void 0:n.length))return;const l=e.event instanceof MouseEvent?e.event:null,s=null==l?void 0:l.composedPath()[0],g=s instanceof Element?s:null;let d=null!==(t=null==l?void 0:l.clientX)&&void 0!==t?t:0,c=null!==(r=null==l?void 0:l.clientY)&&void 0!==r?r:0;const u=null==g?void 0:g.closest(".ag-cell");if(0===d&&0===c&&u){const e=u.getBoundingClientRect();d=e.left,c=e.bottom}null===(i=this.closeContextMenu)||void 0===i||i.call(this);const[p="foundation"]=this.tagName.toLowerCase().split("-");this.closeContextMenu=la({prefix:p,x:d,y:c,items:n,container:null!==(o=this.shadowRoot)&&void 0!==o?o:void 0,themeSource:g}),this.closeContextMenu&&(null==l?void 0:l.cancelable)&&l.preventDefault()}globalEventListener(e,a){const t=e.toLowerCase(),r=new Event(t);r.agGridDetails=a,this.dispatchEvent(r);const i="on"+t;"function"==typeof this[i]&&this[i](r)}}(0,r.Cg)([s.observable],Fr.prototype,"gridApi",void 0),(0,r.Cg)([s.observable],Fr.prototype,"gridErrorItems",void 0),(0,r.Cg)([cr],Fr.prototype,"statePersistence",void 0),(0,r.Cg)([(0,s.attr)({attribute:"auto-cell-renderer-by-type",mode:"boolean"})],Fr.prototype,"autoCellRendererByType",void 0),(0,r.Cg)([(0,s.attr)({attribute:"only-template-col-defs",mode:"boolean"})],Fr.prototype,"onlyTemplateColDefs",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"grid-autosizing"})],Fr.prototype,"gridAutosizingEnabled",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"enable-cell-flashing"})],Fr.prototype,"enableCellFlashing",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"enable-row-flashing"})],Fr.prototype,"enableRowFlashing",void 0),(0,r.Cg)([(0,s.attr)({attribute:"persist-column-state-key"})],Fr.prototype,"persistColumnStateKey",void 0),(0,r.Cg)([(0,s.attr)({attribute:"persist-filter-model-key"})],Fr.prototype,"persistFilterModelKey",void 0),(0,r.Cg)([(0,s.attr)({attribute:"header-case-type"})],Fr.prototype,"headerCaseType",void 0),(0,r.Cg)([s.observable],Fr.prototype,"rowData",void 0),(0,r.Cg)([s.attr],Fr.prototype,"columnComponentName",void 0),(0,r.Cg)([s.observable],Fr.prototype,"eventsAndCallbacks",void 0),(0,r.Cg)([s.attr],Fr.prototype,"headerHeight",void 0),(0,r.Cg)([s.attr],Fr.prototype,"rowHeight",void 0),(0,r.Cg)([s.observable],Fr.prototype,"classNames",void 0),(0,r.Cg)([s.observable],Fr.prototype,"agGrid",void 0),(0,r.Cg)([s.observable],Fr.prototype,"gridSlot",void 0),(0,r.Cg)([s.observable],Fr.prototype,"themeMode",void 0),(0,r.Cg)([s.observable],Fr.prototype,"gridComponents",void 0),(0,r.Cg)([s.observable],Fr.prototype,"statusBarConfig",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"with-status-bar"})],Fr.prototype,"withStatusBar",void 0),(0,r.Cg)([s.observable],Fr.prototype,"statusBarMode",void 0),(0,r.Cg)([s.observable],Fr.prototype,"contextMenuItems",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"enable-column-selection"})],Fr.prototype,"enableColumnSelection",void 0),(0,r.Cg)([s.observable],Fr.prototype,"customErrorHandlerTemplate",void 0),(0,r.Cg)([m.lz],Fr.prototype,"gridOptionsConfig",void 0),(0,r.Cg)([s.observable],Fr.prototype,"provider",void 0);const Pr=Fr.compose(Object.assign({baseName:"grid-pro",template:sr,styles:s.css`
|
|
9452
|
+
`,Sr=xr(),zr={[m.k7.labelValue]:ur,[m.k7.loadMore]:vr,[m.k7.reload]:mr,[m.k7.rowCount]:fr};class kr extends((0,o.S)(g.FoundationElement)){constructor(){super(...arguments),this.gridHost=null,this.gridApi=null,this.statusBarConfig=null,this.panels=new Map,this.warnedPanelTypes=new Set}gridHostChanged(){this.syncPanels()}gridApiChanged(){this.syncPanels()}statusBarConfigChanged(){this.syncPanels()}leftElChanged(){this.syncPanels()}rightElChanged(){this.syncPanels()}syncPanels(){var e;if(!this.leftEl||!this.rightEl)return;this.releasePanels();const a=this.gridHost,t=this.resolveApi();if(!(null==a?void 0:a.withStatusBar)||!t)return;const r=br({withStatusBar:a.withStatusBar,statusBarConfig:null!==(e=this.statusBarConfig)&&void 0!==e?e:a.statusBarConfig,isServerSide:a.isServerSide,isInfiniteRowModel:a.isInfiniteRowModel,gridProDatasource:a.gridProDatasource});for(const e of r)this.mountPanel(e,t)}getStatusPanel(e){return this.panels.get(e)}releasePanels(){var e,a,t,r,i;for(const r of this.panels.values())null===(e=r.destroy)||void 0===e||e.call(r),null===(t=null===(a=r.getGui)||void 0===a?void 0:a.call(r))||void 0===t||t.remove();this.panels.clear(),null===(r=this.leftEl)||void 0===r||r.replaceChildren(),null===(i=this.rightEl)||void 0===i||i.replaceChildren()}connectedCallback(){super.connectedCallback(),this.panels.size||this.syncPanels()}disconnectedCallback(){super.disconnectedCallback(),this.shouldRunDisconnect?this.releasePanels():queueMicrotask(()=>{this.isConnected||this.releasePanels()})}resolveApi(){var e,a,t;return null!==(t=null!==(e=this.gridApi)&&void 0!==e?e:null===(a=this.gridHost)||void 0===a?void 0:a.gridApi)&&void 0!==t?t:null}mountPanel(e,a){var t,r;const i=zr[e.statusPanel];if(!i)return void(this.warnedPanelTypes.has(e.statusPanel)||(this.warnedPanelTypes.add(e.statusPanel),U.warn(`Grid Pro status bar: no panel for type '${e.statusPanel}', skipping it`)));const o=new i,n=Object.assign(Object.assign({api:a,context:{}},e.statusPanelParams),null===(r=null===(t=this.gridHost)||void 0===t?void 0:t.getStatusPanelState)||void 0===r?void 0:r.call(t,e.statusPanel));o.init(n);const l=o.getGui();("right"===e.align?this.rightEl:this.leftEl).appendChild(l),this.panels.set(e.statusPanel,o)}}(0,r.Cg)([s.observable],kr.prototype,"gridHost",void 0),(0,r.Cg)([s.observable],kr.prototype,"gridApi",void 0),(0,r.Cg)([s.observable],kr.prototype,"statusBarConfig",void 0),(0,r.Cg)([s.observable],kr.prototype,"leftEl",void 0),(0,r.Cg)([s.observable],kr.prototype,"rightEl",void 0);const Rr=kr.compose({baseName:"grid-pro-status-bar",template:xr(),styles:Cr});class Ar{init(e){const a=this.eGui=document.createElement("div"),t=e.value;a.classList.add("custom-tooltip"),a.style["background-color"]="#f14376",a.style.border="1px inside",a.style["border-color"]="#2e3339",a.style["border-radius"]="4px",a.style.padding="5px",a.style["box-shadow"]="0px 4px 10px 0px rgba(0, 0, 0, 0.25);",a.innerHTML=`<span style='color: #000000; font-size: 10px'>${t}</span>`}getGui(){return this.eGui}}var Dr=t(50103);function Er(e){return{colId:e.field||e.colId||"",hide:e.hide||!1,width:e.width||null,pinned:e.pinned||null,sort:e.sort||null,sortIndex:e.sortIndex||null,aggFunc:e.aggFunc||null,rowGroup:e.rowGroup||!1,rowGroupIndex:e.rowGroupIndex||null,pivot:e.pivot||!1,pivotIndex:e.pivotIndex||null,flex:e.flex||null}}const Mr=Object.keys(Er({}));function Or(e){return Array.isArray(e)?e.map(e=>{const a={},t=a;for(const a of Mr){const r=e[a];void 0!==r&&(t[a]=r)}return a}):[]}function Tr(e){return e.map(Er)}function Ir(e,a){const t=Or(a),r={},i=[],o="field",n="colId",l=e=>Array.isArray(e.children),s=e=>{var a;return null!==(a=e[o])&&void 0!==a?a:e[n]},g=new Map;t.forEach(e=>{null!=e[n]&&g.set(e[n],e)});const d=e=>{if(l(e))return Object.assign(Object.assign({},e),{children:e.children.map(d)});const a=s(e),t=null!=a?g.get(a):void 0;return t?Object.assign(Object.assign({},e),t):Object.assign({},e)};return t.forEach(a=>{const t=a[n];if(null==t)return;const g=e.find(e=>!l(e)&&(e[o]===t||null!=e[n]&&e[n]===t));if(g){const e=s(g),t=Object.assign(Object.assign({},g),a);null!=e&&(r[e]=t),i.push(t)}}),e.forEach(e=>{if(l(e))return void i.push(d(e));const a=s(e);if(null==a||!r.hasOwnProperty(a)){const t=Object.assign({},e);null!=a&&(r[a]=t),i.push(t)}}),i}(0,i.N)(rt,it,Et,Tt,v,we,Ze,kr),d.syG.registerModules([d.n76,d.Q90,d.x6L,d.YN8,d.YzW,d.Lt,d.I95,d.O4V,d.H18,d.lvV,d.mfG,d.Iws,d.nSw,d.FUS,d.Ss0,d.tkg,d.ZDV,d.ZyC,d.XG7,d.VZy,d.$I9,d.dGu,d.AJG,d.c5B,d.BG,d.KIB,d.Sko,d.ZuP,d.Vc,qe]);const Lr="gridReady";class Nr extends((0,o.S)(g.FoundationElement)){getColumnDragBridge(){return this.columnDragBridge}rowDataChanged(e,a){this.initialised&&this.gridApi&&this.gridApi.setGridOption("rowData",a)}gridSlotChanged(){this.gridSlot&&!this.initialised&&this.agGridOptions&&this.initGrid()}withStatusBarChanged(){this.applyStatusBarMode()}get usesAgStatusBar(){return"ag"===this.statusBarMode}get usesCommunityStatusBar(){return"community"===this.statusBarMode}get statusBar(){const e=this.statusBarRef;if(e)return e instanceof kr?e:void(this.warnedUnregisteredStatusBar||(this.warnedUnregisteredStatusBar=!0,U.warn(`Grid Pro: <${e.localName}> is not registered, so the status bar is not shown. Register the design system status bar element (e.g. rapidGridProStatusBar) with the grid.`)))}contextMenuItemsChanged(){this.syncContextMenuSuppression()}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=p()(this.saveColumnState.bind(this),400),this.debouncedSaveFilterModel=p()(this.cacheFilterConfig.bind(this),400),this.debouncedNotifyDatasourceVisibleColumns=p()(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=m.o2,this.withStatusBar=!1,this.statusBarMode="pending",this.statusPanelState={},this.warnedUnregisteredStatusBar=!1,this.warnedGridOptionsStatusBar=!1,this.gridCreatedWithMenuSuppressed=!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.boundContextMenuListener=(e,a)=>{"cellContextMenu"===e&&this.showContextMenu(a)},this._filterConfig=void 0,this.handleLuminanceChange=e=>{const a=l.baseLayerLuminance.getValueFor(e.target);this.themeMode=a===l.StandardLuminance.DarkMode?"dark":"light"},this.luminanceObserver={handleChange:e=>this.handleLuminanceChange(e)},this.agAttributes={},this.agPropertiesMap=Ga.reduce((e,a)=>(e[a.toLowerCase()]=a,e[(0,Dr.w)(a)]=a,e),{});const e=this.hideDatasourceError.bind(this);this.rootEventsListeners.push([tt.dataInit,e],[Fa.datasourceErrorClose,e],[Qa.error,this.handleBaseDatasourceError.bind(this)],[Qa.connected,e]),this.datasourceEventHandlers=[[Da.initialize,this.handleInitialize.bind(this)],[Da.dataLoaded,this.handleDataLoaded.bind(this)],[Da.dataChanged,this.handleDataChanged.bind(this)],[Da.schemaUpdated,this.handleSchemaUpdated.bind(this)],[Da.dataCleared,this.handleDataCleared.bind(this)],[Da.loadingStarted,this.handleLoadingStarted.bind(this)],[Da.loadingFinished,this.handleLoadingFinished.bind(this)],[Da.noDataAvailable,this.handleNoDataAvailable.bind(this)],[Da.filtersRestored,this.handleFiltersRestored.bind(this)],[Da.moreDataAvailable,this.handleMoreDataAvailable.bind(this)],[Da.error,this.handleDatasourceError.bind(this)],[Da.destroy,this.handleDatasourceDestroy.bind(this)],[Da.cacheFilterConfig,this.cacheFilterConfig.bind(this)],[Da.refreshServerSide,this.handleRefreshServerSide.bind(this)],[Da.setServerSideDatasource,this.handleSetServerSideDatasource.bind(this)],[Da.addGridCssClass,this.handleAddGridCssClass.bind(this)],[Da.removeGridCssClass,this.handleRemoveGridCssClass.bind(this)],[Da.applyServerSideTransaction,this.handleApplyServerSideTransaction.bind(this)],[Da.setInfiniteDatasource,this.handleSetInfiniteDatasource.bind(this)],[Da.refreshInfiniteCache,this.handleRefreshInfiniteCache.bind(this)]]}addEventListener(e,a,t){super.addEventListener(e,a,t),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 a=a=>{this.$emit(e,a)};this.gridEventListeners.set(e,a),this.gridApi.addEventListener(e,a)}handleError(e,a){this.gridErrorItems=[...this.gridErrorItems,{detail:a.detail,type:e}]}handleBaseDatasourceError(e){const a={detail:{message:e.detail.message},type:Pa.datasource};this.gridErrorItems=[...this.gridErrorItems,{detail:a.detail,type:a.type}]}hideDatasourceError(){this.gridErrorItems=this.gridErrorItems.filter(e=>e.type!==Pa.datasource),this.removeAttribute("ds-disconnected")}connectedCallback(){var e;super.connectedCallback(),this.syncColumnSelectionHostLayout(),this.syncStatusBarHostLayout(),this.disposed=!1;const a=null!==(e=this.provider)&&void 0!==e?e:this;this.luminanceSubscription=l.baseLayerLuminance.subscribe(this.luminanceObserver,a),this.gridAutosizingEnabled&&(this.visibilityObserverCleanup=(0,n.j)(this,e=>{e&&this.debouncedColumnAutosize()})),this.rehydrationAttempted=!1,this.shouldRunConnect&&(this.rootEventsListeners.forEach(([e,a])=>{this.addEventListener(e,a)}),Ga.forEach(e=>{const a=function(e,a){let t=Object.getPrototypeOf(e);for(;t&&t!==HTMLElement.prototype;){const e=Object.getOwnPropertyDescriptor(t,a);if(e)return e;t=Object.getPrototypeOf(t)}}(this,e);Object.defineProperty(this,e,{get:null==a?void 0:a.get,set:t=>{var r,i;const o=null===(r=null==a?void 0:a.get)||void 0===r?void 0:r.call(this);null===(i=null==a?void 0:a.set)||void 0===i||i.call(this,t),this.agAttributeChangedCallback((0,Dr.w)(e),o,t)},enumerable:!0,configurable:!0})}),this.toggleDatasourceEventListeners(!0))}disconnectedCallback(){var e,a;null===(e=this.closeContextMenu)||void 0===e||e.call(this),this.closeContextMenu=void 0,this.disposed=!0,this.debouncedSaveColumnState.cancel(),this.debouncedSaveFilterModel.cancel();const t=null!==(a=this.provider)&&void 0!==a?a:this;l.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 r=this.shouldRunDisconnect;this.rootEventsListeners.forEach(([e,a])=>{this.removeEventListener(e,a)}),r?this.performDisconnectCleanup():queueMicrotask(()=>{this.isConnected||this.performDisconnectCleanup()})}syncColumnSelectionHostLayout(){this.classList.toggle("has-column-selection",this.enableColumnSelection)}syncStatusBarHostLayout(){this.classList.toggle("has-status-bar",!!this.withStatusBar&&this.usesCommunityStatusBar)}applyStatusBarMode(){var e,a,t;const r=this.gridApi;r&&!(null===(e=r.isDestroyed)||void 0===e?void 0:e.call(r))&&(this.statusBarMode=(null===(a=r.isModuleRegistered)||void 0===a?void 0:a.call(r,"StatusBarModule"))?"ag":"community",this.usesAgStatusBar?r.setGridOption("statusBar",this.buildAgStatusBar(null===(t=r.getGridOption)||void 0===t?void 0:t.call(r,"rowModelType"))):this.withStatusBar&&this.userStatusBar&&!this.warnedGridOptionsStatusBar&&(this.warnedGridOptionsStatusBar=!0,U.warn("Grid Pro: gridOptions.statusBar is ignored because the AG Grid Enterprise StatusBarModule is not registered. Use statusBarConfig instead."))),this.syncStatusBarHostLayout()}buildAgStatusBar(e){var a,t;if(!this.withStatusBar)return this.userStatusBar;const r=null!==(t=null===(a=this.userStatusBar)||void 0===a?void 0:a.statusPanels)&&void 0!==t?t:[],i=wr({withStatusBar:this.withStatusBar,statusBarConfig:this.statusBarConfig,isServerSide:this.isServerSide||"serverSide"===e,isInfiniteRowModel:this.isInfiniteRowModel||"infinite"===e,gridProDatasource:this.gridProDatasource},r);return Object.assign(Object.assign({},this.userStatusBar),{statusPanels:i})}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(){var e;this.gridApi&&this.gridEventListeners.forEach((e,a)=>{this.gridApi.removeEventListener(a,e)}),this.gridEventListeners.clear(),null===(e=this.statusBar)||void 0===e||e.releasePanels(),delete this.statusPanelState[m.k7.loadMore],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 a=e?"addEventListener":"removeEventListener";this.datasourceEventHandlers.forEach(([e,t])=>{super[a](e,t)})}handleInitialize(e){const{options:a,keepColDefsOnClearRowData:t}=e.detail;t&&(this.columnState=this.gridApi.getColumnState()),this.applyingDatasourceGridOptions=!0;try{this.gridOptions=Object.assign(Object.assign(Object.assign({},this.userProvidedGridOptions),a),t?{columnDefs:this.gridApi.getColumnDefs()}:{}),this.initGrid()}finally{this.applyingDatasourceGridOptions=!1}}handleDataLoaded(e){const{data:a}=e.detail;this.gridApi&&this.gridApi.setGridOption("rowData",a)}handleDataChanged(e){const{changes:a}=e.detail;if(!this.gridApi||!this.isClientSideRowModel)return;const t=this.gridApi.applyTransaction(a);this.flashAddedCells(null==t?void 0:t.add)}get isClientSideRowModel(){var e,a,t;return"clientSide"===(null!==(t=null===(a=null===(e=this.gridApi)||void 0===e?void 0:e.getGridOption)||void 0===a?void 0:a.call(e,"rowModelType"))&&void 0!==t?t:"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}){this.applyCommunityFilterFallbacks(e);const a=this.gridApi.getColumnDefs();if(a&&a.length>0)return void this.enrichPresetColumnDefs(e);const t=yield this.mergeAllColumnDefsAndStates(e,!0);this.gridApi.setGridOption("columnDefs",t),this.restoreCachedFilterConfig()})}enrichPresetColumnDefs(e){const a=this.gridApi.getGridOption("columnDefs");if(!(null==a?void 0:a.length))return;const t=Gt(a,e,{fillUnsetFilters:!this.isClientSideRowModel});if(t===a)return;const r=this.gridApi.getColumnState(),i=JSON.stringify(this.gridApi.getFilterModel());this.gridApi.setGridOption("columnDefs",t),this.gridApi.applyColumnState({state:r,applyOrder:!0}),JSON.stringify(this.gridApi.getFilterModel())!==i&&this.restoreCachedFilterConfig()}applyCommunityFilterFallbacks(e){const a=this.gridApi.isModuleRegistered("SetFilterModule"),t=this.gridApi.isModuleRegistered("MultiFilterModule");e.forEach(e=>{var r,i,o,n,l;if("agSetColumnFilter"===e.filter&&!a)return U.debug(`SetFilterModule is not registered; column '${e.field}' falls back to the enum filter`),e.filter=Se.enumFilter,void(null!==(r=e.floatingFilterComponent)&&void 0!==r||(e.floatingFilterComponent=Se.enumFloatingFilter));if("agMultiColumnFilter"!==e.filter)return;const s=null===(o=null===(i=e.filterParams)||void 0===i?void 0:i.filters)||void 0===o?void 0:o.find(e=>"agSetColumnFilter"===e.filter);t?!a&&s&&(U.debug(`SetFilterModule is not registered; the set sub-filter of column '${e.field}' falls back to the enum filter`),s.filter=Se.enumFilter):(null===(n=null==s?void 0:s.filterParams)||void 0===n?void 0:n.values)?(U.debug(`MultiFilterModule is not registered; enum column '${e.field}' falls back to the enum filter`),e.filter=Se.enumFilter,e.filterParams=Object.assign({},s.filterParams),null!==(l=e.floatingFilterComponent)&&void 0!==l||(e.floatingFilterComponent=Se.enumFloatingFilter)):(U.warn("MultiFilterModule is not registered, falling back to text filter"),e.filter="agTextColumnFilter")})}handleDataCleared(e){const{includeSchema:a}=e.detail;this.gridApi&&(a&&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){const{hasMoreData:a,sourceRef:t}=e.detail;this.updateStatusPanel(m.k7.loadMore,{moreRows:a,sourceRef:t})}updateStatusPanel(e,a){var t;this.usesAgStatusBar||(this.statusPanelState[e]=Object.assign(Object.assign({},this.statusPanelState[e]),a));const r=this.getStatusPanel(e);return null===(t=null==r?void 0:r.updateParams)||void 0===t||t.call(r,a),r}getStatusPanelState(e){return this.statusPanelState[e]}handleDatasourceError(){this.setAttribute("ds-disconnected","ds-disconnected")}handleDatasourceDestroy(){this.clearLocalGridOptions()}handleRefreshServerSide(e){const{purge:a}=e.detail;this.gridApi&&this.gridApi.refreshServerSide({purge:a})}handleSetServerSideDatasource(e){const{datasource:a}=e.detail;this.gridApi&&this.gridApi.setGridOption("serverSideDatasource",a)}handleAddGridCssClass(e){var a;const{className:t}=e.detail,r=(null===(a=this.gridSlot)||void 0===a?void 0:a.parentElement)||this;r&&r.classList.add(t)}handleRemoveGridCssClass(e){var a;const{className:t}=e.detail,r=(null===(a=this.gridSlot)||void 0===a?void 0:a.parentElement)||this;r&&r.classList.remove(t)}handleApplyServerSideTransaction(e){var a,t;const{transaction:r,async:i,callback:o}=e.detail;if(this.gridApi)if(i)this.gridApi.applyServerSideTransactionAsync(r,e=>{var a,t;this.flashAddedCells([...null!==(a=null==e?void 0:e.add)&&void 0!==a?a:[],...null!==(t=null==e?void 0:e.update)&&void 0!==t?t:[]]),null==o||o(e)});else{const e=this.gridApi.applyServerSideTransaction(r);this.flashAddedCells([...null!==(a=null==e?void 0:e.add)&&void 0!==a?a:[],...null!==(t=null==e?void 0:e.update)&&void 0!==t?t:[]]),o&&o(e)}}handleSetInfiniteDatasource(e){const{datasource:a}=e.detail;this.gridApi&&this.gridApi.setGridOption("datasource",a)}handleRefreshInfiniteCache(e){var a;this.gridApi&&((null===(a=e.detail)||void 0===a?void 0:a.purge)?this.gridApi.purgeInfiniteCache():this.gridApi.refreshInfiniteCache())}combineAllGridComponents(e){const a={[m.IX.action]:H,[m.IX.actionsMenu]:q.cN,[m.IX.boolean]:Q,[m.IX.editable]:J,[m.IX.icon]:le,[m.IX.statusPill]:ce,[m.IX.select]:he,[m.IX.selectEditor]:f,[m.IX.numberEditor]:C,[m.IX.multiselectEditor]:k,[m.IX.dateEditor]:I,[m.IX.stringEditor]:P,[Se.enumFilter]:De,[Se.enumFloatingFilter]:Oe,[m.k7.labelValue]:ur,[m.k7.loadMore]:vr,[m.k7.reload]:mr,[m.k7.rowCount]:fr};return Object.assign(Object.assign(Object.assign({},a),e),this.gridComponents)}statePersistanceEnabled(){return!(!this.persistColumnStateKey||0===this.persistColumnStateKey.length)}getSelectedRows(){var e,a,t,r;try{if(!this.initialised||!this.gridApi)return[];const i=null===(e=this.gridOptions)||void 0===e?void 0:e.rowSelection;if("single"===i||"multiple"===i)return this.gridApi.getSelectedRows&&this.gridApi.getSelectedRows().length>0?this.gridApi.getSelectedRows():[];if((null===(a=this.gridApi)||void 0===a?void 0:a.getCellRanges)&&this.gridApi.getCellRanges().length>0)return this.getCellRangeRowData();if(!(null===(t=this.gridOptions)||void 0===t?void 0:t.enableRangeSelection)){const e=null===(r=this.gridApi)||void 0===r?void 0:r.getFocusedCell();if(e){const a=this.gridApi.getDisplayedRowAtIndex(e.rowIndex);if(null==a?void 0:a.data)return[a.data]}}return[]}catch(e){return U.error("Grid Pro: Error getting selected rows:",e),[]}}getCellRangeRowData(){var e;if(!(null===(e=this.gridApi)||void 0===e?void 0:e.getCellRanges))return[];const a=this.gridApi.getCellRanges();if(0===a.length)return[];const t=[];return a.forEach(e=>{const a=e.startRow.rowIndex,r=e.endRow.rowIndex;for(let e=a;e<=r;e+=1){const a=this.gridApi.getDisplayedRowAtIndex(e);(null==a?void 0:a.data)&&!t.some(e=>e===a.data)&&t.push(a.data)}}),t}hasSelectedRows(){return this.getSelectedRows().length>0}getStatusPanel(e){var a,t,r;return this.usesAgStatusBar?null===(t=null===(a=this.gridApi)||void 0===a?void 0:a.getStatusPanel)||void 0===t?void 0:t.call(a,e):null===(r=this.statusBar)||void 0===r?void 0:r.getStatusPanel(e)}updateLabelValueStatusBar(e){if(!this.gridApi)return void U.warn("Grid Pro: Cannot update label-value status bar - grid API not available");const a=this.updateStatusPanel(m.k7.labelValue,Object.assign({},e));a&&"function"==typeof a.updateParams||U.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()},Na))}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=Or(e),e=this.gridAutosizingEnabled?this.removeConfigWidthsToAutosize(e):e;const a=0===e.filter(e=>{if(e.hide)return!1;const a=this.gridApi.getColumn(e.colId);return Boolean(a.getColDef().headerName)}).length;if(0===e.length||JSON.stringify(e)===JSON.stringify(this.columnState)||a)return;yield this.statePersistence.saveColumnState(this.persistColumnStateKey,e),this.columnState=e}})}getSavedColumnState(){return(0,r.sH)(this,void 0,void 0,function*(){return this.columnState=[],this.statePersistanceEnabled()&&(this.columnState=yield this.statePersistence.getColumnState(this.persistColumnStateKey)),this.columnState})}restoreColumnState(){return(0,r.sH)(this,void 0,void 0,function*(){var e;this.rehydrationAttempted=!0;const a=Or(yield this.getSavedColumnState());a&&a.length>0&&(null===(e=this.gridApi)||void 0===e||e.applyColumnState({state:a,applyOrder:!0}))})}cacheFilterConfig(){var e;this.setFilterModel((null===(e=this.gridApi)||void 0===e?void 0:e.getFilterModel())||void 0)}restoreCachedFilterConfig(){return(0,r.sH)(this,void 0,void 0,function*(){var e,a;const t=yield this.getfilterModel();void 0!==t&&(null===(e=this.gridApi)||void 0===e||e.setFilterModel(t),null===(a=this.gridApi)||void 0===a||a.onFilterChanged())})}get gridOptions(){return this.agGridOptions}get isServerSide(){return this.gridProDatasource instanceof Et}get gridParams(){return{globalListener:this.boundGlobalEventListener,globalSyncListener:this.boundContextMenuListener,modules:[qe,d.Vc,d.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 Tt}notifyDatasourceVisibleColumns(){var e,a,t,r;const i=this.gridProDatasource;if(!i)return;const o=Ce(null===(a=null===(e=this.gridApi)||void 0===e?void 0:e.getAllDisplayedColumns)||void 0===a?void 0:a.call(e),null===(r=null===(t=this.gridApi)||void 0===t?void 0:t.getColumnDefs)||void 0===r?void 0:r.call(t));o.length&&i.setVisibleColumns(o)}set gridOptions(e){!this.applyingDatasourceGridOptions&&e&&(this.userProvidedGridOptions=Object.assign({},e));const a=()=>{!this.disposed&&this.isConnected&&(this.debouncedSaveColumnState(),this.debouncedColumnAutosize())},t=()=>{!this.disposed&&this.isConnected&&this.debouncedNotifyDatasourceVisibleColumns()};Array.from(this.attributes).forEach(e=>{const a=this.agPropertiesMap[e.name];a&&(this.agAttributes[a]=e.value)});const{columnDefs:i,components:o,defaultColDef:n,getRowId:l,onGridReady:s,onFilterChanged:g,onFirstDataRendered:d,statusBar:c}=e,u=(0,r.Tt)(e,["columnDefs","components","defaultColDef","getRowId","onGridReady","onFilterChanged","onFirstDataRendered","statusBar"]);this.userStatusBar=c;const p=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.gridOptionsConfig),{defaultColDef:Object.assign({enableCellChangeFlash:this.enableCellFlashing,filter:!0,resizable:!0,sortable:!0},n),components:this.combineAllGridComponents(o),headerHeight:this.headerHeight,rowHeight:this.rowHeight,animateRows:!1,suppressDragLeaveHidesColumns:!0}),this.eventsAndCallbacks),{onGridReady:e=>(0,r.sH)(this,void 0,void 0,function*(){var a,t,r;if(this.gridApi=e.api,!!this.contextMenuItems!==this.gridCreatedWithMenuSuppressed&&this.syncContextMenuSuppression(),this.applyStatusBarMode(),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){U.error("Grid Pro: failed to apply the pending schema update on grid ready:",e)}}this.rowData&&this.gridApi.setGridOption("rowData",this.rowData),s&&s(e),(null===(a=this.gridProDatasource)||void 0===a?void 0:a.keepColDefsOnClearRowData)&&(null===(t=this.columnState)||void 0===t?void 0:t.length)>0&&this.gridApi.applyColumnState({state:this.columnState,applyOrder:!0}),this.$emit(Lr,{event:e,gridId:this.id}),this.$emit(m.mr,{event:e,gridId:this.id}),this.notifyDatasourceVisibleColumns(),null===(r=this.gridProDatasource)||void 0===r||r.$emit(Da.ready),this.restoreColumnState(),this.restoreCachedFilterConfig(),this.debouncedColumnAutosize()}),onFirstDataRendered:e=>{this.notifyDatasourceVisibleColumns(),d&&d(e)},onColumnPinned:a,onColumnResized:a,onColumnMoved:a,onColumnVisible:()=>{a(),t()},onDisplayedColumnsChanged:()=>{a(),t()},onFilterChanged:e=>{!this.disposed&&this.isConnected&&(this.debouncedSaveFilterModel(),g&&g(e))},onGridSizeChanged:a,onSortChanged:a}),u),c&&!this.withStatusBar?{statusBar:c}:{});this.gridProDatasource?(p.columnDefs=i,p.getRowId=l,this.setupStatusBar(p),this.setLocalGridOptions(p)):this.mergeAllColumnDefsAndStates(i).then(e=>{!this.disposed&&this.isConnected&&(p.columnDefs=e,p.getRowId=l,this.setupStatusBar(p),this.setLocalGridOptions(p),this.initGrid())})}setLocalGridOptions(e){this.agGridOptions=Object.assign(Object.assign({},this.agGridOptions),Ya(e,this.agAttributes)),this.agGridOptions.context=Object.assign(Object.assign({},this.agGridOptions.context),{[Ye]: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(){s.DOM.queueUpdate(()=>{!this.disposed&&this.isConnected&&this.gridSlot&&(this.initialised&&(this.destroyGridInstance(),this.gridSlot.firstChild&&this.gridSlot.removeChild(this.gridSlot.firstChild)),this.gridCreatedWithMenuSuppressed=!!this.contextMenuItems,this.agGrid=(0,d.Dvw)(this.gridSlot,this.gridCreatedWithMenuSuppressed?Object.assign(Object.assign({},this.agGridOptions),{suppressContextMenu:!0}):this.agGridOptions,this.gridParams),this.initialised=!0)})}mergeAllColumnDefsAndStates(e){return(0,r.sH)(this,arguments,void 0,function*(e,a=!1){var t;const r=e||[];r.forEach(e=>{if(this.headerCaseType&&e.field&&!e.headerName){const a=c[this.headerCaseType];a?e.headerName=a(e.field):U.warn(`Invalid header-case-type attribute value: ${this.headerCaseType}. Please use one of the following: camelCase, capitalCase, dotCase, headerCase, noCase, paramCase, pascalCase, pathCase, sentenceCase, snakeCase.`)}});const i=Array.from(this.querySelectorAll(this.columnComponentName)).map(e=>e.definition).map(e=>{var a;if(this.enableCellFlashing&&void 0===e.enableCellChangeFlash&&(e.enableCellChangeFlash=!0),Ft(e.filter)){if(!(null!=e.filterParams&&"values"in e.filterParams)){const a=Pt(r.find(a=>a.field===e.field));a&&(e.filterParams=Object.assign(Object.assign({},e.filterParams),{values:a}))}e.filter===Se.enumFilter&&(null!==(a=e.floatingFilterComponent)&&void 0!==a||(e.floatingFilterComponent=Se.enumFloatingFilter))}e.editable&&(e.cellRenderer||e.cellRendererSelector||(e.cellRendererSelector=a=>{if(a.data[m.A7]===e.field)return{component:m.IX.editable}}),e.tooltipComponent||e.tooltipValueGetter||(e.tooltipComponent=Ar,e.tooltipValueGetter=a=>{const t=a.data[m.h1];if(t&&t.column===e.field)return t.message}),e.cellClassRules||(e.cellClassRules={error:e=>{var a;return(null===(a=e.data[m.h1])||void 0===a?void 0:a.column)===e.colDef.field}}));const t=r.find(a=>e.field===a.field);return Object.assign(Object.assign({},t),e)}),o=i.map(e=>e.field),n=[...i,...this.onlyTemplateColDefs?[]:r.filter(e=>!o.includes(e.field))];if(this.gridProDatasource&&a){const e=yield this.getSavedColumnState();if((null==e?void 0:e.length)>0)return Ir(n,e);if((null===(t=this.gridProDatasource.deferredColumnStates)||void 0===t?void 0:t.length)>0)return Ir(n,this.gridProDatasource.deferredColumnStates)}return n})}setupStatusBar(e){var a;this.usesAgStatusBar&&this.withStatusBar?e.statusBar=this.buildAgStatusBar(e.rowModelType):null===(a=this.statusBar)||void 0===a||a.syncPanels()}get observedAttributes(){const e=Ga.map(e=>e.toLowerCase()),a=Ga.map(e=>(0,Dr.w)(e));return e.concat(a)}agAttributeChangedCallback(e,a,t){var r;if(a===t)return;const i=this.agPropertiesMap[e];i&&(this.agAttributes[i]=t,this.initialised&&(null===(r=this.gridApi)||void 0===r||r.setGridOption(i,t),"suppressContextMenu"===i&&this.contextMenuItems&&this.syncContextMenuSuppression()))}syncContextMenuSuppression(){var e,a,t,r;const i=null!==(t=null!==(e=this.agAttributes.suppressContextMenu)&&void 0!==e?e:null===(a=this.agGridOptions)||void 0===a?void 0:a.suppressContextMenu)&&void 0!==t&&t;null===(r=this.gridApi)||void 0===r||r.setGridOption("suppressContextMenu",!!this.contextMenuItems||i)}showContextMenu(e){var a,t,r,i,o;const n=null===(a=this.contextMenuItems)||void 0===a?void 0:a.call(this,e);if(!(null==n?void 0:n.length))return;const l=e.event instanceof MouseEvent?e.event:null,s=null==l?void 0:l.composedPath()[0],g=s instanceof Element?s:null;let d=null!==(t=null==l?void 0:l.clientX)&&void 0!==t?t:0,c=null!==(r=null==l?void 0:l.clientY)&&void 0!==r?r:0;const u=null==g?void 0:g.closest(".ag-cell");if(0===d&&0===c&&u){const e=u.getBoundingClientRect();d=e.left,c=e.bottom}null===(i=this.closeContextMenu)||void 0===i||i.call(this);const[p="foundation"]=this.tagName.toLowerCase().split("-");this.closeContextMenu=la({prefix:p,x:d,y:c,items:n,container:null!==(o=this.shadowRoot)&&void 0!==o?o:void 0,themeSource:g}),this.closeContextMenu&&(null==l?void 0:l.cancelable)&&l.preventDefault()}globalEventListener(e,a){const t=e.toLowerCase(),r=new Event(t);r.agGridDetails=a,this.dispatchEvent(r);const i="on"+t;"function"==typeof this[i]&&this[i](r)}}(0,r.Cg)([s.observable],Nr.prototype,"gridApi",void 0),(0,r.Cg)([s.observable],Nr.prototype,"gridErrorItems",void 0),(0,r.Cg)([cr],Nr.prototype,"statePersistence",void 0),(0,r.Cg)([(0,s.attr)({attribute:"auto-cell-renderer-by-type",mode:"boolean"})],Nr.prototype,"autoCellRendererByType",void 0),(0,r.Cg)([(0,s.attr)({attribute:"only-template-col-defs",mode:"boolean"})],Nr.prototype,"onlyTemplateColDefs",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"grid-autosizing"})],Nr.prototype,"gridAutosizingEnabled",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"enable-cell-flashing"})],Nr.prototype,"enableCellFlashing",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"enable-row-flashing"})],Nr.prototype,"enableRowFlashing",void 0),(0,r.Cg)([(0,s.attr)({attribute:"persist-column-state-key"})],Nr.prototype,"persistColumnStateKey",void 0),(0,r.Cg)([(0,s.attr)({attribute:"persist-filter-model-key"})],Nr.prototype,"persistFilterModelKey",void 0),(0,r.Cg)([(0,s.attr)({attribute:"header-case-type"})],Nr.prototype,"headerCaseType",void 0),(0,r.Cg)([s.observable],Nr.prototype,"rowData",void 0),(0,r.Cg)([s.attr],Nr.prototype,"columnComponentName",void 0),(0,r.Cg)([s.observable],Nr.prototype,"eventsAndCallbacks",void 0),(0,r.Cg)([s.attr],Nr.prototype,"headerHeight",void 0),(0,r.Cg)([s.attr],Nr.prototype,"rowHeight",void 0),(0,r.Cg)([s.observable],Nr.prototype,"classNames",void 0),(0,r.Cg)([s.observable],Nr.prototype,"agGrid",void 0),(0,r.Cg)([s.observable],Nr.prototype,"gridSlot",void 0),(0,r.Cg)([s.observable],Nr.prototype,"themeMode",void 0),(0,r.Cg)([s.observable],Nr.prototype,"gridComponents",void 0),(0,r.Cg)([s.observable],Nr.prototype,"statusBarConfig",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"with-status-bar"})],Nr.prototype,"withStatusBar",void 0),(0,r.Cg)([s.observable],Nr.prototype,"statusBarMode",void 0),(0,r.Cg)([s.observable],Nr.prototype,"contextMenuItems",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"enable-column-selection"})],Nr.prototype,"enableColumnSelection",void 0),(0,r.Cg)([s.observable],Nr.prototype,"customErrorHandlerTemplate",void 0),(0,r.Cg)([m.lz],Nr.prototype,"gridOptionsConfig",void 0),(0,r.Cg)([s.observable],Nr.prototype,"provider",void 0);const Fr=Nr.compose(Object.assign({baseName:"grid-pro",template:sr,styles:s.css`
|
|
9453
9453
|
${Lt}
|
|
9454
9454
|
${ir}
|
|
9455
9455
|
${He}
|
|
@@ -9480,7 +9480,7 @@
|
|
|
9480
9480
|
.ag-status-bar {
|
|
9481
9481
|
height: var(--ag-status-bar-height);
|
|
9482
9482
|
}
|
|
9483
|
-
`,shadowOptions:Wa},qa));class
|
|
9483
|
+
`,shadowOptions:Wa},qa));class Pr extends f{}const Gr=Pr.compose({baseName:"select-editor",styles:b,template:w("rapid")});class Br extends C{}const jr=Br.compose({baseName:"number-editor",styles:x,template:S("rapid")});class Ur extends k{}const Hr=Ur.compose({baseName:"multiselect-editor",styles:R,template:A("rapid")});class $r extends I{}const Vr=$r.compose({baseName:"date-editor",styles:L,template:N("rapid")});class Yr extends P{}const Wr=Yr.compose({baseName:"string-editor",styles:G,template:B("rapid")});class qr extends H{paramsChanged(e,a){(null==a?void 0:a.node.rowHeight)&&this.style.setProperty("--params-row-node-height",`${a.node.rowHeight}px`,"")}}const Qr=qr.compose({baseName:"grid-pro-action-renderer",styles:s.css`
|
|
9484
9484
|
${Y}
|
|
9485
9485
|
.button-padding {
|
|
9486
9486
|
justify-content: center;
|
|
@@ -9511,7 +9511,7 @@
|
|
|
9511
9511
|
`:null===(t=e.params)||void 0===t?void 0:t.actionName}}
|
|
9512
9512
|
</rapid-button>
|
|
9513
9513
|
</div>
|
|
9514
|
-
`});class
|
|
9514
|
+
`});class Kr extends q.cN{paramsChanged(e,a){(null==a?void 0:a.node.rowHeight)&&this.style.setProperty("--params-row-node-height",`${a.node.rowHeight}px`,"")}}const _r=Kr.compose({baseName:"grid-pro-actions-menu-renderer",styles:s.css`
|
|
9515
9515
|
::part(actions-opener) {
|
|
9516
9516
|
height: calc(var(--params-row-node-height, 32px) - 6px);
|
|
9517
9517
|
width: calc(var(--params-row-node-height, 32px) - 6px);
|
|
@@ -9527,7 +9527,7 @@
|
|
|
9527
9527
|
name="${e=>{var a;return null===(a=e.params)||void 0===a?void 0:a.headerName}}"
|
|
9528
9528
|
:definition=${e=>e.params}
|
|
9529
9529
|
></rapid-actions-menu>
|
|
9530
|
-
`});class
|
|
9530
|
+
`});class Xr extends Q{}const Jr=Xr.compose({baseName:"boolean-renderer",styles:K,template:_("rapid")});class Zr extends J{}const ei=Zr.compose({baseName:"editable-renderer",styles:Z,template:ee("rapid")});class ai extends he{}const ti=ai.compose({baseName:"select-renderer",styles:ve,template:me("rapid")});class ri extends ce{}const ii=ri.compose({baseName:"status-pill-renderer",template:de("rapid"),styles:ge});class oi extends le{}const ni=oi.compose({baseName:"icon-renderer",styles:re,template:ne("rapid")}),li=Wa,si=qa,gi=lr("rapid"),di={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%)"},ci=["rowheight","row-height"];function ui(e){const a=Number(e);return Number.isFinite(a)&&a>0?a:void 0}class pi extends Nr{getCachedTheme(e){const a=null!=e?e:"default";let t=pi.cachedThemes.get(a);return t||(t=d.N8R.withParams("default"===a?di:Object.assign(Object.assign({},di),{rowHeight:`${a}px`})),pi.cachedThemes.set(a,t)),t}resolveRowHeight(e){for(const e of ci){const a=ui(this.getAttribute(e));if(a)return a}return ui(e.rowHeight)}agAttributeChangedCallback(e,a,t){var r;super.agAttributeChangedCallback(e,a,t),"rowHeight"===this.agPropertiesMap[e]&&a!==t&&(null===(r=this.gridApi)||void 0===r||r.setGridOption("theme",this.getCachedTheme(ui(t))))}set gridOptions(e){const a=Object.assign({},e);a.components=Object.assign({[m.IX.action]:qr,[m.IX.actionsMenu]:Kr,[m.IX.boolean]:Xr,[m.IX.editable]:Zr,[m.IX.select]:ai,[m.IX.selectEditor]:Pr,[m.IX.numberEditor]:Br,[m.IX.multiselectEditor]:Ur,[m.IX.dateEditor]:$r,[m.IX.stringEditor]:Yr,[m.IX.statusPill]:ri,[m.IX.icon]:oi},a.components),a.theme=this.getCachedTheme(this.resolveRowHeight(a)),super.gridOptions=a}}pi.cachedThemes=new Map,(0,r.Cg)([s.observable],pi.prototype,"provider",void 0);const hi=pi.compose(Object.assign({baseName:"grid-pro",template:gi,styles:s.css`
|
|
9531
9531
|
${Lt}
|
|
9532
9532
|
${ir}
|
|
9533
9533
|
${He}
|
|
@@ -9591,7 +9591,7 @@
|
|
|
9591
9591
|
.grid-pro-infinite .ag-header-cell-sortable:hover .ag-sort-none-icon {
|
|
9592
9592
|
opacity: 1;
|
|
9593
9593
|
}
|
|
9594
|
-
`,shadowOptions:si},gi));var mi=t(29310),fi=t(72974),bi=t(84646),wi=t(52945);(0,i.N)(rt,it,Et,v,we),fi.syG.registerModules([bi.n7,mi.Q]);class yi extends((0,o.S)(g.FoundationElement)){rowDataChanged(e,a){this.initialised&&this.gridApi&&this.gridApi.setRowData(a)}themeChanged(e,a){if(!a)return this.classNames="",void this.destroyFontFace();this.classNames=(0,te.x)((0,m.eL)(a),a),this.insertFontFace(a)}gridSlotChanged(){this.gridSlot&&!this.initialised&&this.agGridOptions&&this.initGrid()}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.cachedTotalColumnWidth=null,this.columnCount=0,this.gridErrorItems=[],this.disposed=!1,this.debouncedSaveColumnState=p()(this.saveColumnState.bind(this),400),this.debouncedSaveFilterModel=p()(this.cacheFilterConfig.bind(this),400),this.debouncedNotifyDatasourceVisibleColumns=p()(this.notifyDatasourceVisibleColumns.bind(this),400),this.autoCellRendererByType=!1,this.onlyTemplateColDefs=!1,this.gridAutosizingEnabled=!1,this.sizeColumnsToContent=!1,this.sizeColumnsToFit=!1,this.addIndex=0,this.asyncAdd=!1,this.asyncRemove=!1,this.asyncUpdate=!0,this.enableCellFlashing=!1,this.enabledRowFlashing=!1,this.enableRowFlashing=!1,this.defaultColumnConfig=[],this.gridFontFace=tr,this.columnComponentName="grid-pro-column",this.theme=m.mJ.alpine,this.themeMode="dark",this.statusBarConfig=m.o2,this.withStatusBar=!1,this.applyingDatasourceGridOptions=!1,this.rehydrationAttempted=!1,this.eventHandlers=[],this.gridEventsQueue=[],this.registeredGridEvents=new Set,this.gridEventListeners=new Map,this.boundGlobalEventListener=this.globalEventListener.bind(this),this._filterConfig=void 0,this.agAttributes={},this.agPropertiesMap=Ga.reduce((e,a)=>(e[a.toLowerCase()]=a,e[(0,Dr.w)(a)]=a,e),{});const e=this.hideDatasourceError.bind(this);this.eventHandlers.push([tt.dataInit,e],[Fa.datasourceErrorClose,e],[Qa.error,this.handleBaseDatasourceError.bind(this)],[Qa.connected,e],[Da.initialize,this.handleInitialize.bind(this)],[Da.dataLoaded,this.handleDataLoaded.bind(this)],[Da.dataChanged,this.handleDataChanged.bind(this)],[Da.schemaUpdated,this.handleSchemaUpdated.bind(this)],[Da.dataCleared,this.handleDataCleared.bind(this)],[Da.loadingStarted,this.handleLoadingStarted.bind(this)],[Da.loadingFinished,this.handleLoadingFinished.bind(this)],[Da.noDataAvailable,this.handleNoDataAvailable.bind(this)],[Da.filtersRestored,this.handleFiltersRestored.bind(this)],[Da.moreDataAvailable,this.handleMoreDataAvailable.bind(this)],[Da.error,this.handleDatasourceError.bind(this)],[Da.destroy,this.handleDatasourceDestroy.bind(this)],[Da.cacheFilterConfig,this.cacheFilterConfig.bind(this)],[Da.refreshServerSide,this.handleRefreshServerSide.bind(this)],[Da.setServerSideDatasource,this.handleSetServerSideDatasource.bind(this)],[Da.addGridCssClass,this.handleAddGridCssClass.bind(this)],[Da.removeGridCssClass,this.handleRemoveGridCssClass.bind(this)],[Da.applyServerSideTransaction,this.handleApplyServerSideTransaction.bind(this)],[Da.setInfiniteDatasource,this.refuseInfiniteDatasource.bind(this)])}refuseInfiniteDatasource(){U.error('GridProLegacy does not support the Infinite Row Model; use GridPro (AG Grid v36) with grid-pro-infinite-datasource / datasource-type="infinite".')}addEventListener(e,a,t){super.addEventListener(e,a,t),fi.kNx.PUBLIC_EVENTS.includes(e)&&(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 a=a=>{this.$emit(e,a)};this.gridEventListeners.set(e,a),this.gridApi.addEventListener(e,a)}handleError(e,a){this.gridErrorItems=[...this.gridErrorItems,{detail:a.detail,type:e}]}handleBaseDatasourceError(e){const a={detail:{message:e.detail.message},type:Pa.datasource};this.gridErrorItems=[...this.gridErrorItems,{detail:a.detail,type:a.type}]}hideDatasourceError(){this.gridErrorItems=this.gridErrorItems.filter(e=>e.type!==Pa.datasource),this.removeAttribute("ds-disconnected")}connectedCallback(){super.connectedCallback(),this.disposed=!1,this.gridAutosizingEnabled&&(this.visibilityObserverCleanup=(0,n.j)(this,e=>{e&&this.debouncedColumnAutosize()})),this.rehydrationAttempted=!1,this.eventHandlers.forEach(([e,a])=>{this.addEventListener(e,a)}),this.shouldRunConnect&&Ga.forEach(e=>{Object.defineProperty(this,e,{set:a=>{this.agAttributeChangedCallback((0,Dr.w)(e),void 0,a)},enumerable:!0,configurable:!0})})}disconnectedCallback(){this.disposed=!0,this.debouncedSaveColumnState.cancel(),this.debouncedSaveFilterModel.cancel(),this.visibilityObserverCleanup&&(this.visibilityObserverCleanup(),this.visibilityObserverCleanup=void 0),super.disconnectedCallback(),this.rehydrationAttempted=!1;const e=this.shouldRunDisconnect;this.eventHandlers.forEach(([e,a])=>{this.removeEventListener(e,a)}),e?this.performDisconnectCleanup():queueMicrotask(()=>{this.isConnected||this.performDisconnectCleanup()})}performDisconnectCleanup(){this.debounced&&(clearTimeout(this.debounced),this.debounced=null),this.initialised=!1,this.resetGridOptionsState(),this.destroyGridInstance(),this.debouncedSaveColumnState.cancel(),this.debouncedSaveFilterModel.cancel(),this.invalidateColumnWidthCache(),this.registeredGridEvents.clear(),this.gridEventsQueue=[]}destroyGridInstance(){var e,a;if(this.gridApi&&this.gridEventListeners.forEach((e,a)=>{this.gridApi.removeEventListener(a,e)}),this.gridEventListeners.clear(),this.gridApi){if(!this.isServerSide)try{null===(a=(e=this.gridApi).flushAsyncTransactions)||void 0===a||a.call(e),this.gridApi.setRowData([])}catch(e){U.debug("Grid Pro: failed to clear row data before destroy",e)}this.gridApi.destroy()}else this.agGrid&&this.agGrid.destroy();this.gridSlot&&this.gridSlot.replaceChildren(),this.gridApi=void 0,this.columnApi=void 0,this.agGrid=void 0}handleInitialize(e){const{options:a,keepColDefsOnClearRowData:t}=e.detail;let r;t&&(r=this.gridApi.getColumnDefs(),this.columnState=this.columnApi.getColumnState());const i=Object.assign(Object.assign(Object.assign({},this.userProvidedGridOptions),r&&{columnDefs:r}),a);this.applyingDatasourceGridOptions=!0;try{this.gridOptions=Object.assign({},i),this.initGrid()}finally{this.applyingDatasourceGridOptions=!1}}handleDataLoaded(e){const{data:a}=e.detail;this.gridApi&&this.gridApi.setRowData(a)}handleDataChanged(e){var a,t,r;const{changes:i}=e.detail;if(this.gridApi&&!this.isServerSide){if((null===(a=i.add)||void 0===a?void 0:a.length)>0)if(this.asyncAdd)this.gridApi.applyTransactionAsync({add:i.add,addIndex:this.addIndex},e=>{this.flashAddedCells(null==e?void 0:e.add)});else{const e=this.gridApi.applyTransaction({add:i.add,addIndex:this.addIndex});this.flashAddedCells(null==e?void 0:e.add)}(null===(t=i.update)||void 0===t?void 0:t.length)>0&&(this.asyncUpdate?this.gridApi.applyTransactionAsync({update:i.update}):this.gridApi.applyTransaction({update:i.update})),(null===(r=i.remove)||void 0===r?void 0:r.length)>0&&(this.asyncRemove?this.gridApi.applyTransactionAsync({remove:i.remove}):this.gridApi.applyTransaction({remove:i.remove}))}}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,metadata:a}){const t=this.gridApi.getColumnDefs();if(!t||0===t.length){const t=a.map(a=>{var t;return Object.assign(Object.assign({},e.find(e=>e.field===a.name)),null===(t=this.gridApi)||void 0===t?void 0:t.getColumnDef(a.name))}).map(e=>Object.assign(Object.assign({},e),{cellRenderer:this.autoCellRendererByType?e.cellRenderer:void 0,cellEditor:this.autoCellRendererByType?e.cellEditor:void 0})),r=yield this.mergeAllColumnDefsAndStates(t,!0);r&&(r.forEach(e=>{"children"in e||(e.rowGroup||(e.rowGroup=null),e.pivot||(e.pivot=null))}),this.gridApi.setColumnDefs(r),this.restoreCachedFilterConfig())}})}handleDataCleared(e){var a,t;const{includeSchema:r}=e.detail;this.gridApi&&(this.isServerSide||(this.asyncAdd||this.asyncUpdate||this.asyncRemove)&&(null===(t=(a=this.gridApi).flushAsyncTransactions)||void 0===t||t.call(a)),r&&this.gridApi.setColumnDefs([]),this.isServerSide||(this.gridApi.setRowData([]),this.gridApi.refreshCells({force:!0})))}handleLoadingStarted(){this.gridApi&&this.gridApi.showLoadingOverlay()}handleLoadingFinished(){this.gridApi&&this.gridApi.hideOverlay()}handleNoDataAvailable(){this.gridApi&&this.gridApi.showNoRowsOverlay()}handleFiltersRestored(){this.restoreCachedFilterConfig()}handleMoreDataAvailable(e){var a,t,r,i;const{hasMoreData:o,sourceRef:n}=e.detail;if(!this.gridApi)return;const l=null===(t=(a=this.gridApi).getStatusPanel)||void 0===t?void 0:t.call(a,m.k7.loadMore);l&&(null===(i=(r=l).updateParams)||void 0===i||i.call(r,{moreRows:o,sourceRef:n}))}handleDatasourceError(e){this.setAttribute("ds-disconnected","ds-disconnected")}handleDatasourceDestroy(){this.clearLocalGridOptions()}handleRefreshServerSide(e){const{purge:a}=e.detail;this.gridApi&&this.gridApi.refreshServerSide({purge:a})}handleSetServerSideDatasource(e){const{datasource:a}=e.detail;this.gridApi&&this.gridApi.setServerSideDatasource(a)}handleAddGridCssClass(e){var a;const{className:t}=e.detail,r=(null===(a=this.gridSlot)||void 0===a?void 0:a.parentElement)||this;r&&r.classList.add(t)}handleRemoveGridCssClass(e){var a;const{className:t}=e.detail,r=(null===(a=this.gridSlot)||void 0===a?void 0:a.parentElement)||this;r&&r.classList.remove(t)}handleApplyServerSideTransaction(e){var a,t;const{transaction:r,async:i,callback:o}=e.detail;if(this.gridApi)if(i)this.gridApi.applyServerSideTransactionAsync(r,e=>{var a,t;this.flashAddedCells([...null!==(a=null==e?void 0:e.add)&&void 0!==a?a:[],...null!==(t=null==e?void 0:e.update)&&void 0!==t?t:[]]),null==o||o(e)});else{const e=this.gridApi.applyServerSideTransaction(r);this.flashAddedCells([...null!==(a=null==e?void 0:e.add)&&void 0!==a?a:[],...null!==(t=null==e?void 0:e.update)&&void 0!==t?t:[]]),o&&o(e)}}combineAllGridComponents(e){const a={[m.IX.action]:H,[m.IX.actionsMenu]:q.cN,[m.IX.boolean]:Q,[m.IX.editable]:J,[m.IX.icon]:le,[m.IX.statusPill]:ce,[m.IX.select]:he,[m.IX.selectEditor]:f,[m.IX.numberEditor]:C,[m.IX.multiselectEditor]:k,[m.IX.dateEditor]:I,[m.IX.stringEditor]:P,[m.k7.labelValue]:ur,[m.k7.loadMore]:vr,[m.k7.reload]:mr,[m.k7.rowCount]:fr};return Object.assign(Object.assign(Object.assign({},a),e),this.gridComponents)}statePersistanceEnabled(){return!(!this.persistColumnStateKey||0===this.persistColumnStateKey.length)}getSelectedRows(){var e,a,t,r;try{if(!this.initialised||!this.gridApi)return[];const i=null===(e=this.gridOptions)||void 0===e?void 0:e.rowSelection;if("single"===i||"multiple"===i)return this.gridApi.getSelectedRows&&this.gridApi.getSelectedRows().length>0?this.gridApi.getSelectedRows():[];if((null===(a=this.gridApi)||void 0===a?void 0:a.getCellRanges)&&this.gridApi.getCellRanges().length>0)return this.getCellRangeRowData();if(!(null===(t=this.gridOptions)||void 0===t?void 0:t.enableRangeSelection)){const e=null===(r=this.gridApi)||void 0===r?void 0:r.getFocusedCell();if(e){const a=this.gridApi.getDisplayedRowAtIndex(e.rowIndex);if(null==a?void 0:a.data)return[a.data]}}return[]}catch(e){return U.error("Grid Pro: Error getting selected rows:",e),[]}}getCellRangeRowData(){var e;if(!(null===(e=this.gridApi)||void 0===e?void 0:e.getCellRanges))return[];const a=this.gridApi.getCellRanges();if(0===a.length)return[];const t=[];return a.forEach(e=>{const a=e.startRow.rowIndex,r=e.endRow.rowIndex;for(let e=a;e<=r;e+=1){const a=this.gridApi.getDisplayedRowAtIndex(e);(null==a?void 0:a.data)&&!t.some(e=>e===a.data)&&t.push(a.data)}}),t}hasSelectedRows(){return this.getSelectedRows().length>0}updateLabelValueStatusBar(e){var a,t;if(!this.gridApi)return void U.warn("Grid Pro: Cannot update label-value status bar - grid API not available");const r=null===(t=(a=this.gridApi).getStatusPanel)||void 0===t?void 0:t.call(a,m.k7.labelValue);r&&"function"==typeof r.updateParams?r.updateParams(e):U.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()},Na))}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.columnApi.getColumnState();e=Or(e),e=this.gridAutosizingEnabled?this.removeConfigWidthsToAutosize(e):e;const a=0===e.filter(e=>{if(e.hide)return!1;const a=this.columnApi.getColumn(e.colId);return Boolean(a.getColDef().headerName)}).length;if(0===e.length||JSON.stringify(e)===JSON.stringify(this.columnState)||a)return;yield this.statePersistence.saveColumnState(this.persistColumnStateKey,e),this.columnState=e}})}getSavedColumnState(){return(0,r.sH)(this,void 0,void 0,function*(){return this.columnState=[],this.statePersistanceEnabled()&&(this.columnState=yield this.statePersistence.getColumnState(this.persistColumnStateKey)),this.columnState})}deleteColumnState(){return(0,r.sH)(this,arguments,void 0,function*(e=!0){var a;if(this.statePersistanceEnabled()&&(yield this.statePersistence.deleteColumnState(this.persistColumnStateKey),this.columnState=[]),e&&this.columnApi){if((null===(a=this.defaultColumnConfig)||void 0===a?void 0:a.length)>0){const e=Tr(this.defaultColumnConfig);this.columnApi.applyColumnState({state:e,applyOrder:!0})}else this.columnApi.resetColumnState();this.handleColumnSizing()}})}restoreColumnState(){return(0,r.sH)(this,void 0,void 0,function*(){var e;this.rehydrationAttempted=!0;const a=Or(yield this.getSavedColumnState());a&&a.length>0&&(null===(e=this.columnApi)||void 0===e||e.applyColumnState({state:a,applyOrder:!0}))})}cacheFilterConfig(){var e;this.setFilterModel((null===(e=this.gridApi)||void 0===e?void 0:e.getFilterModel())||void 0)}restoreCachedFilterConfig(){return(0,r.sH)(this,void 0,void 0,function*(){var e,a;const t=yield this.getfilterModel();void 0!==t&&(null===(e=this.gridApi)||void 0===e||e.setFilterModel(t),null===(a=this.gridApi)||void 0===a||a.onFilterChanged())})}get gridOptions(){return this.agGridOptions}get isServerSide(){return this.gridProDatasource instanceof Et}get gridParams(){return{globalEventListener:this.boundGlobalEventListener}}get gridProDatasource(){return this.querySelector("grid-pro-genesis-datasource")||this.querySelector("grid-pro-client-side-datasource")||this.querySelector("grid-pro-server-side-datasource")}notifyDatasourceVisibleColumns(){var e,a,t,r;const i=this.gridProDatasource;if(!i)return;const o=Ce(null===(a=null===(e=this.columnApi)||void 0===e?void 0:e.getAllDisplayedColumns)||void 0===a?void 0:a.call(e),null===(r=null===(t=this.gridApi)||void 0===t?void 0:t.getColumnDefs)||void 0===r?void 0:r.call(t));o.length&&i.setVisibleColumns(o)}set gridOptions(e){!this.applyingDatasourceGridOptions&&e&&(this.userProvidedGridOptions=Object.assign({},e));const a=()=>{!this.disposed&&this.isConnected&&(this.debouncedSaveColumnState(),this.debouncedColumnAutosize(),this.invalidateColumnWidthCache())},t=()=>{!this.disposed&&this.isConnected&&this.debouncedNotifyDatasourceVisibleColumns()};Array.from(this.attributes).forEach(e=>{const a=this.agPropertiesMap[e.name];a&&(this.agAttributes[a]=e.value)});const i=e,{columnDefs:o,components:n,defaultColDef:l,getRowId:s,onGridReady:g,onFilterChanged:d,onFirstDataRendered:c}=i,u=(0,r.Tt)(i,["columnDefs","components","defaultColDef","getRowId","onGridReady","onFilterChanged","onFirstDataRendered"]),p=this.gridOptionsConfig,h=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},p),{defaultColDef:Object.assign({enableCellChangeFlash:this.enableCellFlashing,filter:!0,resizable:!0,sortable:!0},l),components:this.combineAllGridComponents(n),suppressDragLeaveHidesColumns:!0}),this.eventsAndCallbacks),{onGridReady:e=>(0,r.sH)(this,void 0,void 0,function*(){var a,t;if(this.gridApi=e.api,this.columnApi=e.columnApi,this.gridEventsQueue.length&&this.gridEventsQueue.forEach(e=>{this.addGridEventListener(e)}),this.pendingSchemaUpdate){const e=this.pendingSchemaUpdate;this.pendingSchemaUpdate=void 0,yield this.processSchemaUpdate(e)}this.rowData&&this.gridApi.setRowData(this.rowData),g&&g(e),this.columnState&&(null===(a=this.columnState)||void 0===a?void 0:a.length)>0&&this.columnApi.applyColumnState({state:this.columnState,applyOrder:!0}),this.$emit(fi.sVA.EVENT_GRID_READY,{event:e,gridId:this.id}),this.$emit(m.mr,{event:e,gridId:this.id}),this.notifyDatasourceVisibleColumns(),null===(t=this.gridProDatasource)||void 0===t||t.$emit(Da.ready),this.restoreColumnState(),this.restoreCachedFilterConfig(),this.debouncedColumnAutosize()}),onFirstDataRendered:e=>{this.handleColumnSizing(),this.notifyDatasourceVisibleColumns(),c&&c(e)},onColumnPinned:a,onColumnResized:a,onColumnMoved:a,onColumnVisible:()=>{a(),t()},onDisplayedColumnsChanged:()=>{a(),t()},onFilterChanged:e=>{!this.disposed&&this.isConnected&&(this.debouncedSaveFilterModel(),d&&d(e))},onGridSizeChanged:a,onSortChanged:a}),u),v="getRowId"in(null!=e?e:{});this.gridProDatasource?(h.columnDefs=o,v&&(h.getRowId=s),this.setupStatusBar(h),this.setLocalGridOptions(h)):this.mergeAllColumnDefsAndStates(o).then(e=>{!this.disposed&&this.isConnected&&(h.columnDefs=e,v&&(h.getRowId=s),this.setupStatusBar(h),this.setLocalGridOptions(h),this.initGrid())})}setLocalGridOptions(e){this.agGridOptions=Object.assign(Object.assign({},this.agGridOptions),Ya(e,this.agAttributes))}clearLocalGridOptions(){this.agGridOptions=void 0}resetGridOptionsState(){this.userProvidedGridOptions=void 0,this.agGridOptions=void 0}initGrid(){s.DOM.queueUpdate(()=>{!this.disposed&&this.isConnected&&this.gridSlot&&(this.initialised&&(this.destroyGridInstance(),this.gridSlot.firstChild&&this.gridSlot.removeChild(this.gridSlot.firstChild)),this.agGrid=new fi.xA9(this.gridSlot,this.agGridOptions,this.gridParams),this.initialised=!0)})}applyTemplateDefinitions(e,a=!1){return U.deprecated("applyTemplateDefinitions","Use `mergeAllColumnDefsAndStates` instead."),this.mergeAllColumnDefsAndStates(e,a)}mergeAllColumnDefsAndStates(e){return(0,r.sH)(this,arguments,void 0,function*(e,a=!1){var t;const r=e||[];r.forEach(e=>{if(this.headerCaseType&&e.field&&!e.headerName){const a=c[this.headerCaseType];a?e.headerName=a(e.field):U.warn(`Invalid header-case-type attribute value: ${this.headerCaseType}. Please use one of the following: camelCase, capitalCase, dotCase, headerCase, noCase, paramCase, pascalCase, pathCase, sentenceCase, snakeCase.`)}});const i=Array.from(this.querySelectorAll(this.columnComponentName)).map(e=>e.definition).map(e=>{var a,t;if(this.enableCellFlashing&&void 0===e.enableCellChangeFlash&&(e.enableCellChangeFlash=!0),"agSetColumnFilter"===e.filter){if(!(null!=e.filterParams&&"values"in e.filterParams)){const i=null===(t=null===(a=r.find(a=>a.field===e.field))||void 0===a?void 0:a.filterParams)||void 0===t?void 0:t.values;i&&(e.filterParams=Object.assign(Object.assign({},e.filterParams),{values:i}))}}e.editable&&(e.cellRenderer||e.cellRendererSelector||(e.cellRendererSelector=a=>{if(null==a?void 0:a.data)return a.data[m.A7]===e.field?{component:m.IX.editable}:void 0}),e.tooltipComponent||e.tooltipValueGetter||(e.tooltipComponent=Ar,e.tooltipValueGetter=a=>{if(!(null==a?void 0:a.data))return;const t=a.data[m.h1];return t&&t.column===e.field?t.message:void 0}),e.cellClassRules||(e.cellClassRules={error:e=>{var a;return!(!(null==e?void 0:e.colDef)||!(null==e?void 0:e.data))&&(null===(a=e.data[m.h1])||void 0===a?void 0:a.column)===e.colDef.field}}));const i=r.find(a=>e.field===a.field);return Object.assign(Object.assign({},i),e)}),o=i.map(e=>e.field),n=[...i,...this.onlyTemplateColDefs?[]:r.filter(e=>!o.includes(e.field))];if(this.gridProDatasource&&a){const e=yield this.getSavedColumnState();if((null==e?void 0:e.length)>0)return Ir(n,e);if((null===(t=this.gridProDatasource.deferredColumnStates)||void 0===t?void 0:t.length)>0)return Ir(n,this.gridProDatasource.deferredColumnStates)}return n})}panelExists(e,a){return a.some(a=>a.statusPanel===e)}addRowCountPanel(e,a){if(this.statusBarConfig&&!0===this.statusBarConfig.rows){const t=this.isServerSide||"serverSide"===(null==a?void 0:a.rowModelType);if(t)this.panelExists(m.k7.rowCount,e)||e.push({statusPanel:m.k7.rowCount,align:"left"});else if(!t){const a="agTotalAndFilteredRowCountComponent";this.panelExists(a,e)||e.push({statusPanel:a,align:"left"})}}}addMaxRowsPanel(e){this.statusBarConfig&&!0===this.statusBarConfig.maxRows&&(this.panelExists(m.k7.labelValue,e)||e.push({statusPanel:m.k7.labelValue,statusPanelParams:{label:"Max Rows",value:this.gridProDatasource.maxRows||xa.OD.MAX_ROWS_250,hide:!1},align:"left"}))}addAggregationPanel(e){this.statusBarConfig&&!0===this.statusBarConfig.aggregation&&(this.panelExists("agAggregationComponent",e)||e.push({statusPanel:"agAggregationComponent",align:"right"}))}addDatasourcePanels(e){if(this.gridProDatasource){const a=this.gridProDatasource.getDatasourceStatusBarPanels(this.isServerSide,this.statusBarConfig).filter(a=>!this.panelExists(a.statusPanel,e));e.push(...a)}}setupStatusBar(e){var a,t;if(this.withStatusBar&&this.statusBarConfig){const r=[...(null===(a=e.statusBar)||void 0===a?void 0:a.statusPanels)||[]];this.addRowCountPanel(r,e),this.addMaxRowsPanel(r),this.addAggregationPanel(r),this.addDatasourcePanels(r);const i=((null===(t=e.statusBar)||void 0===t?void 0:t.statusPanels)||[]).filter(e=>!this.panelExists(e.statusPanel,r));r.push(...i),e.statusBar={statusPanels:r}}}handleColumnSizing(){(this.sizeColumnsToContent||this.sizeColumnsToFit)&&(this.sizeColumnsToContent&&this.sizeColumnsToFit&&this.columnApi&&this.gridApi?this.handleBothSizingModes():this.handleIndividualSizingModes())}handleBothSizingModes(){if(this.calculateTotalColumnWidth()>this.getGridWidth()){if(!this.columnApi)return;this.columnApi.autoSizeAllColumns()}else{if(!this.gridApi)return;this.gridApi.sizeColumnsToFit()}}handleIndividualSizingModes(){this.sizeColumnsToContent&&this.columnApi&&this.columnApi.autoSizeAllColumns(),this.sizeColumnsToFit&&this.gridApi&&this.gridApi.sizeColumnsToFit()}calculateTotalColumnWidth(){if(!this.columnApi)return 0;const e=this.columnApi.getAllGridColumns(),a=e.length;return null!==this.cachedTotalColumnWidth&&this.columnCount===a||(this.cachedTotalColumnWidth=e.reduce((e,a)=>e+(a.getActualWidth()||0),0),this.columnCount=a),this.cachedTotalColumnWidth}invalidateColumnWidthCache(){this.cachedTotalColumnWidth=null,this.columnCount=0}getGridWidth(){const e=this;let a=(null==e?void 0:e.clientWidth)||0;return 0===a&&this.gridSlot&&(a=this.gridSlot.clientWidth||0),0===a&&(a=this.clientWidth||0),a}get observedAttributes(){const e=Ga.map(e=>e.toLowerCase()),a=Ga.map(e=>(0,Dr.w)(e));return e.concat(a)}agAttributeChangedCallback(e,a,t){if(a===t)return;const r=this.agPropertiesMap[e];if(r&&(this.agAttributes[r]=t,this.initialised&&this.gridApi)){const e={};e[r]={currentValue:t},fi.kNx.processOnChange(e,this.gridApi)}}globalEventListener(e,a){const t=e.toLowerCase(),r=new Event(t);r.agGridDetails=a,this.dispatchEvent(r);const i="on"+t;"function"==typeof this[i]&&this[i](r)}insertFontFace(e){const a=ar[e]||this.gridFontFace;this.destroyFontFace();const t=(0,wi.O5)(a,(0,m.b7)(e));t&&(this.fontFaceDestroy=t)}destroyFontFace(){this.fontFaceDestroy&&(this.fontFaceDestroy(),this.fontFaceDestroy=null)}}(0,r.Cg)([s.observable],yi.prototype,"columnApi",void 0),(0,r.Cg)([s.observable],yi.prototype,"gridApi",void 0),(0,r.Cg)([s.observable],yi.prototype,"gridErrorItems",void 0),(0,r.Cg)([cr],yi.prototype,"statePersistence",void 0),(0,r.Cg)([(0,s.attr)({attribute:"auto-cell-renderer-by-type",mode:"boolean"})],yi.prototype,"autoCellRendererByType",void 0),(0,r.Cg)([(0,s.attr)({attribute:"only-template-col-defs",mode:"boolean"})],yi.prototype,"onlyTemplateColDefs",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"grid-autosizing"})],yi.prototype,"gridAutosizingEnabled",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"size-columns-to-content"})],yi.prototype,"sizeColumnsToContent",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"size-columns-to-fit"})],yi.prototype,"sizeColumnsToFit",void 0),(0,r.Cg)([(0,s.attr)({attribute:"add-index"})],yi.prototype,"addIndex",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"async-add"})],yi.prototype,"asyncAdd",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"async-remove"})],yi.prototype,"asyncRemove",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"async-update"})],yi.prototype,"asyncUpdate",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"enable-cell-flashing"})],yi.prototype,"enableCellFlashing",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"enabled-row-flashing"})],yi.prototype,"enabledRowFlashing",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"enable-row-flashing"})],yi.prototype,"enableRowFlashing",void 0),(0,r.Cg)([(0,s.attr)({attribute:"persist-column-state-key"})],yi.prototype,"persistColumnStateKey",void 0),(0,r.Cg)([(0,s.attr)({attribute:"persist-filter-model-key"})],yi.prototype,"persistFilterModelKey",void 0),(0,r.Cg)([(0,s.attr)({attribute:"default-column-config"})],yi.prototype,"defaultColumnConfig",void 0),(0,r.Cg)([(0,s.attr)({attribute:"header-case-type"})],yi.prototype,"headerCaseType",void 0),(0,r.Cg)([s.observable],yi.prototype,"rowData",void 0),(0,r.Cg)([s.observable],yi.prototype,"gridFontFace",void 0),(0,r.Cg)([s.attr],yi.prototype,"columnComponentName",void 0),(0,r.Cg)([s.observable],yi.prototype,"eventsAndCallbacks",void 0),(0,r.Cg)([s.attr],yi.prototype,"headerHeight",void 0),(0,r.Cg)([s.attr],yi.prototype,"rowHeight",void 0),(0,r.Cg)([s.attr],yi.prototype,"theme",void 0),(0,r.Cg)([s.observable],yi.prototype,"classNames",void 0),(0,r.Cg)([s.observable],yi.prototype,"agGrid",void 0),(0,r.Cg)([s.observable],yi.prototype,"gridSlot",void 0),(0,r.Cg)([s.observable],yi.prototype,"themeMode",void 0),(0,r.Cg)([s.observable],yi.prototype,"gridComponents",void 0),(0,r.Cg)([s.observable],yi.prototype,"statusBarConfig",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"with-status-bar"})],yi.prototype,"withStatusBar",void 0),(0,r.Cg)([s.observable],yi.prototype,"customErrorHandlerTemplate",void 0),(0,r.Cg)([m.lz],yi.prototype,"gridOptionsConfig",void 0);const Ci=yi.compose(Object.assign({baseName:"grid-pro",styles:nr,template:sr,shadowOptions:Wa},qa));var xi=t(93188);const Si=s.css`
|
|
9594
|
+
`,shadowOptions:li},si));var vi=t(29310),mi=t(72974),fi=t(84646),bi=t(52945);(0,i.N)(rt,it,Et,v,we),mi.syG.registerModules([fi.n7,vi.Q]);class wi extends((0,o.S)(g.FoundationElement)){rowDataChanged(e,a){this.initialised&&this.gridApi&&this.gridApi.setRowData(a)}themeChanged(e,a){if(!a)return this.classNames="",void this.destroyFontFace();this.classNames=(0,te.x)((0,m.eL)(a),a),this.insertFontFace(a)}gridSlotChanged(){this.gridSlot&&!this.initialised&&this.agGridOptions&&this.initGrid()}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.cachedTotalColumnWidth=null,this.columnCount=0,this.gridErrorItems=[],this.disposed=!1,this.debouncedSaveColumnState=p()(this.saveColumnState.bind(this),400),this.debouncedSaveFilterModel=p()(this.cacheFilterConfig.bind(this),400),this.debouncedNotifyDatasourceVisibleColumns=p()(this.notifyDatasourceVisibleColumns.bind(this),400),this.autoCellRendererByType=!1,this.onlyTemplateColDefs=!1,this.gridAutosizingEnabled=!1,this.sizeColumnsToContent=!1,this.sizeColumnsToFit=!1,this.addIndex=0,this.asyncAdd=!1,this.asyncRemove=!1,this.asyncUpdate=!0,this.enableCellFlashing=!1,this.enabledRowFlashing=!1,this.enableRowFlashing=!1,this.defaultColumnConfig=[],this.gridFontFace=tr,this.columnComponentName="grid-pro-column",this.theme=m.mJ.alpine,this.themeMode="dark",this.statusBarConfig=m.o2,this.withStatusBar=!1,this.applyingDatasourceGridOptions=!1,this.rehydrationAttempted=!1,this.eventHandlers=[],this.gridEventsQueue=[],this.registeredGridEvents=new Set,this.gridEventListeners=new Map,this.boundGlobalEventListener=this.globalEventListener.bind(this),this._filterConfig=void 0,this.agAttributes={},this.agPropertiesMap=Ga.reduce((e,a)=>(e[a.toLowerCase()]=a,e[(0,Dr.w)(a)]=a,e),{});const e=this.hideDatasourceError.bind(this);this.eventHandlers.push([tt.dataInit,e],[Fa.datasourceErrorClose,e],[Qa.error,this.handleBaseDatasourceError.bind(this)],[Qa.connected,e],[Da.initialize,this.handleInitialize.bind(this)],[Da.dataLoaded,this.handleDataLoaded.bind(this)],[Da.dataChanged,this.handleDataChanged.bind(this)],[Da.schemaUpdated,this.handleSchemaUpdated.bind(this)],[Da.dataCleared,this.handleDataCleared.bind(this)],[Da.loadingStarted,this.handleLoadingStarted.bind(this)],[Da.loadingFinished,this.handleLoadingFinished.bind(this)],[Da.noDataAvailable,this.handleNoDataAvailable.bind(this)],[Da.filtersRestored,this.handleFiltersRestored.bind(this)],[Da.moreDataAvailable,this.handleMoreDataAvailable.bind(this)],[Da.error,this.handleDatasourceError.bind(this)],[Da.destroy,this.handleDatasourceDestroy.bind(this)],[Da.cacheFilterConfig,this.cacheFilterConfig.bind(this)],[Da.refreshServerSide,this.handleRefreshServerSide.bind(this)],[Da.setServerSideDatasource,this.handleSetServerSideDatasource.bind(this)],[Da.addGridCssClass,this.handleAddGridCssClass.bind(this)],[Da.removeGridCssClass,this.handleRemoveGridCssClass.bind(this)],[Da.applyServerSideTransaction,this.handleApplyServerSideTransaction.bind(this)],[Da.setInfiniteDatasource,this.refuseInfiniteDatasource.bind(this)])}refuseInfiniteDatasource(){U.error('GridProLegacy does not support the Infinite Row Model; use GridPro (AG Grid v36) with grid-pro-infinite-datasource / datasource-type="infinite".')}addEventListener(e,a,t){super.addEventListener(e,a,t),mi.kNx.PUBLIC_EVENTS.includes(e)&&(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 a=a=>{this.$emit(e,a)};this.gridEventListeners.set(e,a),this.gridApi.addEventListener(e,a)}handleError(e,a){this.gridErrorItems=[...this.gridErrorItems,{detail:a.detail,type:e}]}handleBaseDatasourceError(e){const a={detail:{message:e.detail.message},type:Pa.datasource};this.gridErrorItems=[...this.gridErrorItems,{detail:a.detail,type:a.type}]}hideDatasourceError(){this.gridErrorItems=this.gridErrorItems.filter(e=>e.type!==Pa.datasource),this.removeAttribute("ds-disconnected")}connectedCallback(){super.connectedCallback(),this.disposed=!1,this.gridAutosizingEnabled&&(this.visibilityObserverCleanup=(0,n.j)(this,e=>{e&&this.debouncedColumnAutosize()})),this.rehydrationAttempted=!1,this.eventHandlers.forEach(([e,a])=>{this.addEventListener(e,a)}),this.shouldRunConnect&&Ga.forEach(e=>{Object.defineProperty(this,e,{set:a=>{this.agAttributeChangedCallback((0,Dr.w)(e),void 0,a)},enumerable:!0,configurable:!0})})}disconnectedCallback(){this.disposed=!0,this.debouncedSaveColumnState.cancel(),this.debouncedSaveFilterModel.cancel(),this.visibilityObserverCleanup&&(this.visibilityObserverCleanup(),this.visibilityObserverCleanup=void 0),super.disconnectedCallback(),this.rehydrationAttempted=!1;const e=this.shouldRunDisconnect;this.eventHandlers.forEach(([e,a])=>{this.removeEventListener(e,a)}),e?this.performDisconnectCleanup():queueMicrotask(()=>{this.isConnected||this.performDisconnectCleanup()})}performDisconnectCleanup(){this.debounced&&(clearTimeout(this.debounced),this.debounced=null),this.initialised=!1,this.resetGridOptionsState(),this.destroyGridInstance(),this.debouncedSaveColumnState.cancel(),this.debouncedSaveFilterModel.cancel(),this.invalidateColumnWidthCache(),this.registeredGridEvents.clear(),this.gridEventsQueue=[]}destroyGridInstance(){var e,a;if(this.gridApi&&this.gridEventListeners.forEach((e,a)=>{this.gridApi.removeEventListener(a,e)}),this.gridEventListeners.clear(),this.gridApi){if(!this.isServerSide)try{null===(a=(e=this.gridApi).flushAsyncTransactions)||void 0===a||a.call(e),this.gridApi.setRowData([])}catch(e){U.debug("Grid Pro: failed to clear row data before destroy",e)}this.gridApi.destroy()}else this.agGrid&&this.agGrid.destroy();this.gridSlot&&this.gridSlot.replaceChildren(),this.gridApi=void 0,this.columnApi=void 0,this.agGrid=void 0}handleInitialize(e){const{options:a,keepColDefsOnClearRowData:t}=e.detail;let r;t&&(r=this.gridApi.getColumnDefs(),this.columnState=this.columnApi.getColumnState());const i=Object.assign(Object.assign(Object.assign({},this.userProvidedGridOptions),r&&{columnDefs:r}),a);this.applyingDatasourceGridOptions=!0;try{this.gridOptions=Object.assign({},i),this.initGrid()}finally{this.applyingDatasourceGridOptions=!1}}handleDataLoaded(e){const{data:a}=e.detail;this.gridApi&&this.gridApi.setRowData(a)}handleDataChanged(e){var a,t,r;const{changes:i}=e.detail;if(this.gridApi&&!this.isServerSide){if((null===(a=i.add)||void 0===a?void 0:a.length)>0)if(this.asyncAdd)this.gridApi.applyTransactionAsync({add:i.add,addIndex:this.addIndex},e=>{this.flashAddedCells(null==e?void 0:e.add)});else{const e=this.gridApi.applyTransaction({add:i.add,addIndex:this.addIndex});this.flashAddedCells(null==e?void 0:e.add)}(null===(t=i.update)||void 0===t?void 0:t.length)>0&&(this.asyncUpdate?this.gridApi.applyTransactionAsync({update:i.update}):this.gridApi.applyTransaction({update:i.update})),(null===(r=i.remove)||void 0===r?void 0:r.length)>0&&(this.asyncRemove?this.gridApi.applyTransactionAsync({remove:i.remove}):this.gridApi.applyTransaction({remove:i.remove}))}}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,metadata:a}){const t=this.gridApi.getColumnDefs();if(!t||0===t.length){const t=a.map(a=>{var t;return Object.assign(Object.assign({},e.find(e=>e.field===a.name)),null===(t=this.gridApi)||void 0===t?void 0:t.getColumnDef(a.name))}).map(e=>Object.assign(Object.assign({},e),{cellRenderer:this.autoCellRendererByType?e.cellRenderer:void 0,cellEditor:this.autoCellRendererByType?e.cellEditor:void 0})),r=yield this.mergeAllColumnDefsAndStates(t,!0);r&&(r.forEach(e=>{"children"in e||(e.rowGroup||(e.rowGroup=null),e.pivot||(e.pivot=null))}),this.gridApi.setColumnDefs(r),this.restoreCachedFilterConfig())}})}handleDataCleared(e){var a,t;const{includeSchema:r}=e.detail;this.gridApi&&(this.isServerSide||(this.asyncAdd||this.asyncUpdate||this.asyncRemove)&&(null===(t=(a=this.gridApi).flushAsyncTransactions)||void 0===t||t.call(a)),r&&this.gridApi.setColumnDefs([]),this.isServerSide||(this.gridApi.setRowData([]),this.gridApi.refreshCells({force:!0})))}handleLoadingStarted(){this.gridApi&&this.gridApi.showLoadingOverlay()}handleLoadingFinished(){this.gridApi&&this.gridApi.hideOverlay()}handleNoDataAvailable(){this.gridApi&&this.gridApi.showNoRowsOverlay()}handleFiltersRestored(){this.restoreCachedFilterConfig()}handleMoreDataAvailable(e){var a,t,r,i;const{hasMoreData:o,sourceRef:n}=e.detail;if(!this.gridApi)return;const l=null===(t=(a=this.gridApi).getStatusPanel)||void 0===t?void 0:t.call(a,m.k7.loadMore);l&&(null===(i=(r=l).updateParams)||void 0===i||i.call(r,{moreRows:o,sourceRef:n}))}handleDatasourceError(e){this.setAttribute("ds-disconnected","ds-disconnected")}handleDatasourceDestroy(){this.clearLocalGridOptions()}handleRefreshServerSide(e){const{purge:a}=e.detail;this.gridApi&&this.gridApi.refreshServerSide({purge:a})}handleSetServerSideDatasource(e){const{datasource:a}=e.detail;this.gridApi&&this.gridApi.setServerSideDatasource(a)}handleAddGridCssClass(e){var a;const{className:t}=e.detail,r=(null===(a=this.gridSlot)||void 0===a?void 0:a.parentElement)||this;r&&r.classList.add(t)}handleRemoveGridCssClass(e){var a;const{className:t}=e.detail,r=(null===(a=this.gridSlot)||void 0===a?void 0:a.parentElement)||this;r&&r.classList.remove(t)}handleApplyServerSideTransaction(e){var a,t;const{transaction:r,async:i,callback:o}=e.detail;if(this.gridApi)if(i)this.gridApi.applyServerSideTransactionAsync(r,e=>{var a,t;this.flashAddedCells([...null!==(a=null==e?void 0:e.add)&&void 0!==a?a:[],...null!==(t=null==e?void 0:e.update)&&void 0!==t?t:[]]),null==o||o(e)});else{const e=this.gridApi.applyServerSideTransaction(r);this.flashAddedCells([...null!==(a=null==e?void 0:e.add)&&void 0!==a?a:[],...null!==(t=null==e?void 0:e.update)&&void 0!==t?t:[]]),o&&o(e)}}combineAllGridComponents(e){const a={[m.IX.action]:H,[m.IX.actionsMenu]:q.cN,[m.IX.boolean]:Q,[m.IX.editable]:J,[m.IX.icon]:le,[m.IX.statusPill]:ce,[m.IX.select]:he,[m.IX.selectEditor]:f,[m.IX.numberEditor]:C,[m.IX.multiselectEditor]:k,[m.IX.dateEditor]:I,[m.IX.stringEditor]:P,[m.k7.labelValue]:ur,[m.k7.loadMore]:vr,[m.k7.reload]:mr,[m.k7.rowCount]:fr};return Object.assign(Object.assign(Object.assign({},a),e),this.gridComponents)}statePersistanceEnabled(){return!(!this.persistColumnStateKey||0===this.persistColumnStateKey.length)}getSelectedRows(){var e,a,t,r;try{if(!this.initialised||!this.gridApi)return[];const i=null===(e=this.gridOptions)||void 0===e?void 0:e.rowSelection;if("single"===i||"multiple"===i)return this.gridApi.getSelectedRows&&this.gridApi.getSelectedRows().length>0?this.gridApi.getSelectedRows():[];if((null===(a=this.gridApi)||void 0===a?void 0:a.getCellRanges)&&this.gridApi.getCellRanges().length>0)return this.getCellRangeRowData();if(!(null===(t=this.gridOptions)||void 0===t?void 0:t.enableRangeSelection)){const e=null===(r=this.gridApi)||void 0===r?void 0:r.getFocusedCell();if(e){const a=this.gridApi.getDisplayedRowAtIndex(e.rowIndex);if(null==a?void 0:a.data)return[a.data]}}return[]}catch(e){return U.error("Grid Pro: Error getting selected rows:",e),[]}}getCellRangeRowData(){var e;if(!(null===(e=this.gridApi)||void 0===e?void 0:e.getCellRanges))return[];const a=this.gridApi.getCellRanges();if(0===a.length)return[];const t=[];return a.forEach(e=>{const a=e.startRow.rowIndex,r=e.endRow.rowIndex;for(let e=a;e<=r;e+=1){const a=this.gridApi.getDisplayedRowAtIndex(e);(null==a?void 0:a.data)&&!t.some(e=>e===a.data)&&t.push(a.data)}}),t}hasSelectedRows(){return this.getSelectedRows().length>0}updateLabelValueStatusBar(e){var a,t;if(!this.gridApi)return void U.warn("Grid Pro: Cannot update label-value status bar - grid API not available");const r=null===(t=(a=this.gridApi).getStatusPanel)||void 0===t?void 0:t.call(a,m.k7.labelValue);r&&"function"==typeof r.updateParams?r.updateParams(e):U.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()},Na))}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.columnApi.getColumnState();e=Or(e),e=this.gridAutosizingEnabled?this.removeConfigWidthsToAutosize(e):e;const a=0===e.filter(e=>{if(e.hide)return!1;const a=this.columnApi.getColumn(e.colId);return Boolean(a.getColDef().headerName)}).length;if(0===e.length||JSON.stringify(e)===JSON.stringify(this.columnState)||a)return;yield this.statePersistence.saveColumnState(this.persistColumnStateKey,e),this.columnState=e}})}getSavedColumnState(){return(0,r.sH)(this,void 0,void 0,function*(){return this.columnState=[],this.statePersistanceEnabled()&&(this.columnState=yield this.statePersistence.getColumnState(this.persistColumnStateKey)),this.columnState})}deleteColumnState(){return(0,r.sH)(this,arguments,void 0,function*(e=!0){var a;if(this.statePersistanceEnabled()&&(yield this.statePersistence.deleteColumnState(this.persistColumnStateKey),this.columnState=[]),e&&this.columnApi){if((null===(a=this.defaultColumnConfig)||void 0===a?void 0:a.length)>0){const e=Tr(this.defaultColumnConfig);this.columnApi.applyColumnState({state:e,applyOrder:!0})}else this.columnApi.resetColumnState();this.handleColumnSizing()}})}restoreColumnState(){return(0,r.sH)(this,void 0,void 0,function*(){var e;this.rehydrationAttempted=!0;const a=Or(yield this.getSavedColumnState());a&&a.length>0&&(null===(e=this.columnApi)||void 0===e||e.applyColumnState({state:a,applyOrder:!0}))})}cacheFilterConfig(){var e;this.setFilterModel((null===(e=this.gridApi)||void 0===e?void 0:e.getFilterModel())||void 0)}restoreCachedFilterConfig(){return(0,r.sH)(this,void 0,void 0,function*(){var e,a;const t=yield this.getfilterModel();void 0!==t&&(null===(e=this.gridApi)||void 0===e||e.setFilterModel(t),null===(a=this.gridApi)||void 0===a||a.onFilterChanged())})}get gridOptions(){return this.agGridOptions}get isServerSide(){return this.gridProDatasource instanceof Et}get gridParams(){return{globalEventListener:this.boundGlobalEventListener}}get gridProDatasource(){return this.querySelector("grid-pro-genesis-datasource")||this.querySelector("grid-pro-client-side-datasource")||this.querySelector("grid-pro-server-side-datasource")}notifyDatasourceVisibleColumns(){var e,a,t,r;const i=this.gridProDatasource;if(!i)return;const o=Ce(null===(a=null===(e=this.columnApi)||void 0===e?void 0:e.getAllDisplayedColumns)||void 0===a?void 0:a.call(e),null===(r=null===(t=this.gridApi)||void 0===t?void 0:t.getColumnDefs)||void 0===r?void 0:r.call(t));o.length&&i.setVisibleColumns(o)}set gridOptions(e){!this.applyingDatasourceGridOptions&&e&&(this.userProvidedGridOptions=Object.assign({},e));const a=()=>{!this.disposed&&this.isConnected&&(this.debouncedSaveColumnState(),this.debouncedColumnAutosize(),this.invalidateColumnWidthCache())},t=()=>{!this.disposed&&this.isConnected&&this.debouncedNotifyDatasourceVisibleColumns()};Array.from(this.attributes).forEach(e=>{const a=this.agPropertiesMap[e.name];a&&(this.agAttributes[a]=e.value)});const i=e,{columnDefs:o,components:n,defaultColDef:l,getRowId:s,onGridReady:g,onFilterChanged:d,onFirstDataRendered:c}=i,u=(0,r.Tt)(i,["columnDefs","components","defaultColDef","getRowId","onGridReady","onFilterChanged","onFirstDataRendered"]),p=this.gridOptionsConfig,h=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},p),{defaultColDef:Object.assign({enableCellChangeFlash:this.enableCellFlashing,filter:!0,resizable:!0,sortable:!0},l),components:this.combineAllGridComponents(n),suppressDragLeaveHidesColumns:!0}),this.eventsAndCallbacks),{onGridReady:e=>(0,r.sH)(this,void 0,void 0,function*(){var a,t;if(this.gridApi=e.api,this.columnApi=e.columnApi,this.gridEventsQueue.length&&this.gridEventsQueue.forEach(e=>{this.addGridEventListener(e)}),this.pendingSchemaUpdate){const e=this.pendingSchemaUpdate;this.pendingSchemaUpdate=void 0,yield this.processSchemaUpdate(e)}this.rowData&&this.gridApi.setRowData(this.rowData),g&&g(e),this.columnState&&(null===(a=this.columnState)||void 0===a?void 0:a.length)>0&&this.columnApi.applyColumnState({state:this.columnState,applyOrder:!0}),this.$emit(mi.sVA.EVENT_GRID_READY,{event:e,gridId:this.id}),this.$emit(m.mr,{event:e,gridId:this.id}),this.notifyDatasourceVisibleColumns(),null===(t=this.gridProDatasource)||void 0===t||t.$emit(Da.ready),this.restoreColumnState(),this.restoreCachedFilterConfig(),this.debouncedColumnAutosize()}),onFirstDataRendered:e=>{this.handleColumnSizing(),this.notifyDatasourceVisibleColumns(),c&&c(e)},onColumnPinned:a,onColumnResized:a,onColumnMoved:a,onColumnVisible:()=>{a(),t()},onDisplayedColumnsChanged:()=>{a(),t()},onFilterChanged:e=>{!this.disposed&&this.isConnected&&(this.debouncedSaveFilterModel(),d&&d(e))},onGridSizeChanged:a,onSortChanged:a}),u),v="getRowId"in(null!=e?e:{});this.gridProDatasource?(h.columnDefs=o,v&&(h.getRowId=s),this.setupStatusBar(h),this.setLocalGridOptions(h)):this.mergeAllColumnDefsAndStates(o).then(e=>{!this.disposed&&this.isConnected&&(h.columnDefs=e,v&&(h.getRowId=s),this.setupStatusBar(h),this.setLocalGridOptions(h),this.initGrid())})}setLocalGridOptions(e){this.agGridOptions=Object.assign(Object.assign({},this.agGridOptions),Ya(e,this.agAttributes))}clearLocalGridOptions(){this.agGridOptions=void 0}resetGridOptionsState(){this.userProvidedGridOptions=void 0,this.agGridOptions=void 0}initGrid(){s.DOM.queueUpdate(()=>{!this.disposed&&this.isConnected&&this.gridSlot&&(this.initialised&&(this.destroyGridInstance(),this.gridSlot.firstChild&&this.gridSlot.removeChild(this.gridSlot.firstChild)),this.agGrid=new mi.xA9(this.gridSlot,this.agGridOptions,this.gridParams),this.initialised=!0)})}applyTemplateDefinitions(e,a=!1){return U.deprecated("applyTemplateDefinitions","Use `mergeAllColumnDefsAndStates` instead."),this.mergeAllColumnDefsAndStates(e,a)}mergeAllColumnDefsAndStates(e){return(0,r.sH)(this,arguments,void 0,function*(e,a=!1){var t;const r=e||[];r.forEach(e=>{if(this.headerCaseType&&e.field&&!e.headerName){const a=c[this.headerCaseType];a?e.headerName=a(e.field):U.warn(`Invalid header-case-type attribute value: ${this.headerCaseType}. Please use one of the following: camelCase, capitalCase, dotCase, headerCase, noCase, paramCase, pascalCase, pathCase, sentenceCase, snakeCase.`)}});const i=Array.from(this.querySelectorAll(this.columnComponentName)).map(e=>e.definition).map(e=>{var a,t;if(this.enableCellFlashing&&void 0===e.enableCellChangeFlash&&(e.enableCellChangeFlash=!0),"agSetColumnFilter"===e.filter){if(!(null!=e.filterParams&&"values"in e.filterParams)){const i=null===(t=null===(a=r.find(a=>a.field===e.field))||void 0===a?void 0:a.filterParams)||void 0===t?void 0:t.values;i&&(e.filterParams=Object.assign(Object.assign({},e.filterParams),{values:i}))}}e.editable&&(e.cellRenderer||e.cellRendererSelector||(e.cellRendererSelector=a=>{if(null==a?void 0:a.data)return a.data[m.A7]===e.field?{component:m.IX.editable}:void 0}),e.tooltipComponent||e.tooltipValueGetter||(e.tooltipComponent=Ar,e.tooltipValueGetter=a=>{if(!(null==a?void 0:a.data))return;const t=a.data[m.h1];return t&&t.column===e.field?t.message:void 0}),e.cellClassRules||(e.cellClassRules={error:e=>{var a;return!(!(null==e?void 0:e.colDef)||!(null==e?void 0:e.data))&&(null===(a=e.data[m.h1])||void 0===a?void 0:a.column)===e.colDef.field}}));const i=r.find(a=>e.field===a.field);return Object.assign(Object.assign({},i),e)}),o=i.map(e=>e.field),n=[...i,...this.onlyTemplateColDefs?[]:r.filter(e=>!o.includes(e.field))];if(this.gridProDatasource&&a){const e=yield this.getSavedColumnState();if((null==e?void 0:e.length)>0)return Ir(n,e);if((null===(t=this.gridProDatasource.deferredColumnStates)||void 0===t?void 0:t.length)>0)return Ir(n,this.gridProDatasource.deferredColumnStates)}return n})}panelExists(e,a){return a.some(a=>a.statusPanel===e)}addRowCountPanel(e,a){if(this.statusBarConfig&&!0===this.statusBarConfig.rows){const t=this.isServerSide||"serverSide"===(null==a?void 0:a.rowModelType);if(t)this.panelExists(m.k7.rowCount,e)||e.push({statusPanel:m.k7.rowCount,align:"left"});else if(!t){const a="agTotalAndFilteredRowCountComponent";this.panelExists(a,e)||e.push({statusPanel:a,align:"left"})}}}addMaxRowsPanel(e){this.statusBarConfig&&!0===this.statusBarConfig.maxRows&&(this.panelExists(m.k7.labelValue,e)||e.push({statusPanel:m.k7.labelValue,statusPanelParams:{label:"Max Rows",value:this.gridProDatasource.maxRows||xa.OD.MAX_ROWS_250,hide:!1},align:"left"}))}addAggregationPanel(e){this.statusBarConfig&&!0===this.statusBarConfig.aggregation&&(this.panelExists("agAggregationComponent",e)||e.push({statusPanel:"agAggregationComponent",align:"right"}))}addDatasourcePanels(e){if(this.gridProDatasource){const a=this.gridProDatasource.getDatasourceStatusBarPanels(this.isServerSide,this.statusBarConfig).filter(a=>!this.panelExists(a.statusPanel,e));e.push(...a)}}setupStatusBar(e){var a,t;if(this.withStatusBar&&this.statusBarConfig){const r=[...(null===(a=e.statusBar)||void 0===a?void 0:a.statusPanels)||[]];this.addRowCountPanel(r,e),this.addMaxRowsPanel(r),this.addAggregationPanel(r),this.addDatasourcePanels(r);const i=((null===(t=e.statusBar)||void 0===t?void 0:t.statusPanels)||[]).filter(e=>!this.panelExists(e.statusPanel,r));r.push(...i),e.statusBar={statusPanels:r}}}handleColumnSizing(){(this.sizeColumnsToContent||this.sizeColumnsToFit)&&(this.sizeColumnsToContent&&this.sizeColumnsToFit&&this.columnApi&&this.gridApi?this.handleBothSizingModes():this.handleIndividualSizingModes())}handleBothSizingModes(){if(this.calculateTotalColumnWidth()>this.getGridWidth()){if(!this.columnApi)return;this.columnApi.autoSizeAllColumns()}else{if(!this.gridApi)return;this.gridApi.sizeColumnsToFit()}}handleIndividualSizingModes(){this.sizeColumnsToContent&&this.columnApi&&this.columnApi.autoSizeAllColumns(),this.sizeColumnsToFit&&this.gridApi&&this.gridApi.sizeColumnsToFit()}calculateTotalColumnWidth(){if(!this.columnApi)return 0;const e=this.columnApi.getAllGridColumns(),a=e.length;return null!==this.cachedTotalColumnWidth&&this.columnCount===a||(this.cachedTotalColumnWidth=e.reduce((e,a)=>e+(a.getActualWidth()||0),0),this.columnCount=a),this.cachedTotalColumnWidth}invalidateColumnWidthCache(){this.cachedTotalColumnWidth=null,this.columnCount=0}getGridWidth(){const e=this;let a=(null==e?void 0:e.clientWidth)||0;return 0===a&&this.gridSlot&&(a=this.gridSlot.clientWidth||0),0===a&&(a=this.clientWidth||0),a}get observedAttributes(){const e=Ga.map(e=>e.toLowerCase()),a=Ga.map(e=>(0,Dr.w)(e));return e.concat(a)}agAttributeChangedCallback(e,a,t){if(a===t)return;const r=this.agPropertiesMap[e];if(r&&(this.agAttributes[r]=t,this.initialised&&this.gridApi)){const e={};e[r]={currentValue:t},mi.kNx.processOnChange(e,this.gridApi)}}globalEventListener(e,a){const t=e.toLowerCase(),r=new Event(t);r.agGridDetails=a,this.dispatchEvent(r);const i="on"+t;"function"==typeof this[i]&&this[i](r)}insertFontFace(e){const a=ar[e]||this.gridFontFace;this.destroyFontFace();const t=(0,bi.O5)(a,(0,m.b7)(e));t&&(this.fontFaceDestroy=t)}destroyFontFace(){this.fontFaceDestroy&&(this.fontFaceDestroy(),this.fontFaceDestroy=null)}}(0,r.Cg)([s.observable],wi.prototype,"columnApi",void 0),(0,r.Cg)([s.observable],wi.prototype,"gridApi",void 0),(0,r.Cg)([s.observable],wi.prototype,"gridErrorItems",void 0),(0,r.Cg)([cr],wi.prototype,"statePersistence",void 0),(0,r.Cg)([(0,s.attr)({attribute:"auto-cell-renderer-by-type",mode:"boolean"})],wi.prototype,"autoCellRendererByType",void 0),(0,r.Cg)([(0,s.attr)({attribute:"only-template-col-defs",mode:"boolean"})],wi.prototype,"onlyTemplateColDefs",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"grid-autosizing"})],wi.prototype,"gridAutosizingEnabled",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"size-columns-to-content"})],wi.prototype,"sizeColumnsToContent",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"size-columns-to-fit"})],wi.prototype,"sizeColumnsToFit",void 0),(0,r.Cg)([(0,s.attr)({attribute:"add-index"})],wi.prototype,"addIndex",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"async-add"})],wi.prototype,"asyncAdd",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"async-remove"})],wi.prototype,"asyncRemove",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"async-update"})],wi.prototype,"asyncUpdate",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"enable-cell-flashing"})],wi.prototype,"enableCellFlashing",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"enabled-row-flashing"})],wi.prototype,"enabledRowFlashing",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"enable-row-flashing"})],wi.prototype,"enableRowFlashing",void 0),(0,r.Cg)([(0,s.attr)({attribute:"persist-column-state-key"})],wi.prototype,"persistColumnStateKey",void 0),(0,r.Cg)([(0,s.attr)({attribute:"persist-filter-model-key"})],wi.prototype,"persistFilterModelKey",void 0),(0,r.Cg)([(0,s.attr)({attribute:"default-column-config"})],wi.prototype,"defaultColumnConfig",void 0),(0,r.Cg)([(0,s.attr)({attribute:"header-case-type"})],wi.prototype,"headerCaseType",void 0),(0,r.Cg)([s.observable],wi.prototype,"rowData",void 0),(0,r.Cg)([s.observable],wi.prototype,"gridFontFace",void 0),(0,r.Cg)([s.attr],wi.prototype,"columnComponentName",void 0),(0,r.Cg)([s.observable],wi.prototype,"eventsAndCallbacks",void 0),(0,r.Cg)([s.attr],wi.prototype,"headerHeight",void 0),(0,r.Cg)([s.attr],wi.prototype,"rowHeight",void 0),(0,r.Cg)([s.attr],wi.prototype,"theme",void 0),(0,r.Cg)([s.observable],wi.prototype,"classNames",void 0),(0,r.Cg)([s.observable],wi.prototype,"agGrid",void 0),(0,r.Cg)([s.observable],wi.prototype,"gridSlot",void 0),(0,r.Cg)([s.observable],wi.prototype,"themeMode",void 0),(0,r.Cg)([s.observable],wi.prototype,"gridComponents",void 0),(0,r.Cg)([s.observable],wi.prototype,"statusBarConfig",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean",attribute:"with-status-bar"})],wi.prototype,"withStatusBar",void 0),(0,r.Cg)([s.observable],wi.prototype,"customErrorHandlerTemplate",void 0),(0,r.Cg)([m.lz],wi.prototype,"gridOptionsConfig",void 0);const yi=wi.compose(Object.assign({baseName:"grid-pro",styles:nr,template:sr,shadowOptions:Wa},qa));var Ci=t(93188);const xi=s.css`
|
|
9595
9595
|
.ag-theme-genesis-rapid,
|
|
9596
9596
|
.ag-theme-genesis-rapid-dark,
|
|
9597
9597
|
.ag-theme-genesis-rapid-light {
|
|
@@ -10220,90 +10220,90 @@
|
|
|
10220
10220
|
.ag-theme-genesis-rapid-light .ag-root-wrapper {
|
|
10221
10221
|
border: 0 !important;
|
|
10222
10222
|
}
|
|
10223
|
-
`,
|
|
10224
|
-
${
|
|
10223
|
+
`,Si="ag-theme-genesis-rapid",zi=s.css`
|
|
10224
|
+
${xi}
|
|
10225
10225
|
|
|
10226
|
-
.${
|
|
10227
|
-
${(0,
|
|
10226
|
+
.${Si} {
|
|
10227
|
+
${(0,Ci.mixinRobotoFont)()}
|
|
10228
10228
|
font-family: var(--body-font);
|
|
10229
10229
|
}
|
|
10230
10230
|
|
|
10231
|
-
.${
|
|
10231
|
+
.${Si} .ag-header {
|
|
10232
10232
|
border-bottom-color: var(--neutral-stroke-rest);
|
|
10233
10233
|
font-weight: bold;
|
|
10234
10234
|
font-size: var(--type-ramp-base-font-size);
|
|
10235
10235
|
}
|
|
10236
10236
|
|
|
10237
|
-
.${
|
|
10237
|
+
.${Si} .ag-root-wrapper {
|
|
10238
10238
|
border-radius: calc(var(--ag-border-radius) * 1px);
|
|
10239
10239
|
border: 1px solid var(--rapid-ag-border-color);
|
|
10240
10240
|
}
|
|
10241
10241
|
|
|
10242
|
-
.${
|
|
10242
|
+
.${Si} .ag-cell {
|
|
10243
10243
|
font-size: var(--type-ramp-minus-1-font-size);
|
|
10244
10244
|
}
|
|
10245
|
-
`,
|
|
10246
|
-
${
|
|
10245
|
+
`,ki="ag-theme-genesis-rapid-dark",Ri=s.css`
|
|
10246
|
+
${xi}
|
|
10247
10247
|
|
|
10248
|
-
.${
|
|
10249
|
-
${(0,
|
|
10248
|
+
.${ki} {
|
|
10249
|
+
${(0,Ci.mixinRobotoFont)()}
|
|
10250
10250
|
font-family: var(--body-font);
|
|
10251
10251
|
}
|
|
10252
10252
|
|
|
10253
|
-
.${
|
|
10253
|
+
.${ki} .ag-header {
|
|
10254
10254
|
border-bottom-color: var(--neutral-stroke-rest);
|
|
10255
10255
|
font-weight: bold;
|
|
10256
10256
|
font-size: var(--type-ramp-base-font-size);
|
|
10257
10257
|
}
|
|
10258
10258
|
|
|
10259
|
-
.${
|
|
10259
|
+
.${ki} .ag-cell {
|
|
10260
10260
|
font-size: var(--type-ramp-minus-1-font-size);
|
|
10261
10261
|
}
|
|
10262
10262
|
|
|
10263
|
-
.${
|
|
10263
|
+
.${ki} .ag-root-wrapper {
|
|
10264
10264
|
border-radius: calc(var(--ag-border-radius) * 1px);
|
|
10265
10265
|
border: 1px solid var(--rapid-ag-border-color);
|
|
10266
10266
|
}
|
|
10267
10267
|
|
|
10268
|
-
.${
|
|
10268
|
+
.${ki} {
|
|
10269
10269
|
color-scheme: dark;
|
|
10270
10270
|
}
|
|
10271
|
-
`,
|
|
10272
|
-
${
|
|
10271
|
+
`,Ai="ag-theme-genesis-rapid-light",Di=s.css`
|
|
10272
|
+
${xi}
|
|
10273
10273
|
|
|
10274
|
-
.${
|
|
10275
|
-
${(0,
|
|
10274
|
+
.${Ai} {
|
|
10275
|
+
${(0,Ci.mixinRobotoFont)()}
|
|
10276
10276
|
font-family: var(--body-font);
|
|
10277
10277
|
}
|
|
10278
10278
|
|
|
10279
|
-
.${
|
|
10279
|
+
.${Ai} .ag-header {
|
|
10280
10280
|
border-bottom-color: var(--neutral-stroke-rest);
|
|
10281
10281
|
font-weight: bold;
|
|
10282
10282
|
font-size: var(--type-ramp-base-font-size);
|
|
10283
10283
|
}
|
|
10284
10284
|
|
|
10285
|
-
.${
|
|
10285
|
+
.${Ai} .ag-cell {
|
|
10286
10286
|
font-size: var(--type-ramp-minus-1-font-size);
|
|
10287
10287
|
}
|
|
10288
10288
|
|
|
10289
|
-
.${
|
|
10289
|
+
.${Ai} .ag-root-wrapper {
|
|
10290
10290
|
border-radius: calc(var(--ag-border-radius) * 1px);
|
|
10291
10291
|
border: 1px solid var(--rapid-ag-border-color);
|
|
10292
10292
|
}
|
|
10293
10293
|
|
|
10294
|
-
.${
|
|
10294
|
+
.${Ai} {
|
|
10295
10295
|
color-scheme: light;
|
|
10296
10296
|
}
|
|
10297
|
-
`,
|
|
10297
|
+
`,Ei=s.css`
|
|
10298
10298
|
/* All the AG themes */
|
|
10299
10299
|
${nr}
|
|
10300
10300
|
${Qt}
|
|
10301
10301
|
|
|
10302
10302
|
/* 100% custom, CSS based, our own name: ag-theme-genesis-rapid */
|
|
10303
|
-
${
|
|
10304
|
-
${
|
|
10305
|
-
${
|
|
10306
|
-
`;var
|
|
10303
|
+
${zi}
|
|
10304
|
+
${Ri}
|
|
10305
|
+
${Di}
|
|
10306
|
+
`;var Mi=t(83912);const Oi="#cccccc",Ti="#879ba6",Ii="#1f2126",Li="#2e3339",Ni="#2b2e34",Fi="#000000",Pi="#181d1f",Gi="#FFFFFF",Bi="#babfc7",ji="#2196f3",Ui={foregroundSwatch:l.SwatchRGB.from((0,Mi.parseColorHexRGB)(Oi)),headerForegroundSwatch:l.SwatchRGB.from((0,Mi.parseColorHexRGB)(Ti)),backgroundSwatch:l.SwatchRGB.from((0,Mi.parseColorHexRGB)(Ii)),borderSwatch:l.SwatchRGB.from((0,Mi.parseColorHexRGB)(Li)),rowHoverSwatch:l.SwatchRGB.from((0,Mi.parseColorHexRGB)(Ni))},Hi={foregroundSwatch:l.SwatchRGB.from((0,Mi.parseColorHexRGB)(Fi)),headerForegroundSwatch:l.SwatchRGB.from((0,Mi.parseColorHexRGB)(Pi)),backgroundSwatch:l.SwatchRGB.from((0,Mi.parseColorHexRGB)(Gi)),borderSwatch:l.SwatchRGB.from((0,Mi.parseColorHexRGB)(Bi)),rowHoverSwatch:l.SwatchRGB.from((0,Mi.parseColorHexRGB)(ji))},{create:$i}=g.DesignToken,Vi={backgroundColor:$i("rapid-ag-background-color").withDefault(e=>l.baseLayerLuminance.getValueFor(e)===l.StandardLuminance.LightMode?Hi.backgroundSwatch:Ui.backgroundSwatch),borderColor:$i("rapid-ag-border-color").withDefault(e=>l.baseLayerLuminance.getValueFor(e)===l.StandardLuminance.LightMode?Hi.borderSwatch:Ui.borderSwatch),foregroundColor:$i("rapid-ag-foreground-color").withDefault(e=>l.baseLayerLuminance.getValueFor(e)===l.StandardLuminance.LightMode?Hi.foregroundSwatch:Ui.foregroundSwatch),headerForegroundColor:$i("rapid-ag-header-foreground-color").withDefault(e=>l.baseLayerLuminance.getValueFor(e)===l.StandardLuminance.LightMode?Hi.headerForegroundSwatch:Ui.headerForegroundSwatch),rowHoverColor:$i("rapid-ag-row-hover-color").withDefault(e=>l.baseLayerLuminance.getValueFor(e)===l.StandardLuminance.LightMode?Hi.rowHoverSwatch:Ui.rowHoverSwatch)},Yi=()=>{const e=(0,aa.designTokensMap)();if(!e.value)return null;const{style:a,space:t}=e.value.design_tokens;return(a.baseHeightMultiplier.$value+a.density.$value)*t.designUnit.$value-8},Wi="ag-theme-genesis-rapid-dark",qi="ag-theme-genesis-rapid-light";class Qi extends wi{constructor(){super(...arguments),this.luminanceObserver={handleChange:e=>this.handleLuminanceChange(e)},this.handleLuminanceChange=e=>{const a=l.baseLayerLuminance.getValueFor(e.target);this.theme=a===l.StandardLuminance.DarkMode?Wi:qi},this.theme="light"===localStorage.getItem("luminance")?qi:Wi}connectedCallback(){var e;super.connectedCallback();const a=null!==(e=this.provider)&&void 0!==e?e:this;this.luminanceSubscription=l.baseLayerLuminance.subscribe(this.luminanceObserver,a)}disconnectedCallback(){var e;const a=null!==(e=this.provider)&&void 0!==e?e:this;l.baseLayerLuminance.unsubscribe(this.luminanceObserver,a),this.luminanceSubscription&&(this.luminanceSubscription.unsubscribe(),this.luminanceSubscription=void 0),super.disconnectedCallback()}themeChanged(e,a){(e||a===Wi)&&super.themeChanged(e,a)}set gridOptions(e){var a,t,r,i;const o=Object.assign({},e);o.components=Object.assign({[m.IX.action]:qr,[m.IX.actionsMenu]:Kr,[m.IX.boolean]:Xr,[m.IX.editable]:Zr,[m.IX.icon]:oi,[m.IX.select]:ai,[m.IX.selectEditor]:Pr,[m.IX.numberEditor]:Br,[m.IX.multiselectEditor]:Ur,[m.IX.dateEditor]:$r,[m.IX.stringEditor]:Yr,[m.IX.statusPill]:ri},o.components);(this.theme===Si||this.theme===ki||this.theme===Ai)&&(this.headerHeight=null!==(t=null!==(a=o.headerHeight)&&void 0!==a?a:Yi())&&void 0!==t?t:32,this.rowHeight=null!==(i=null!==(r=o.rowHeight)&&void 0!==r?r:Yi())&&void 0!==i?i:32),super.gridOptions=o}}(0,r.Cg)([s.observable],Qi.prototype,"provider",void 0);const Ki=Qi.compose(Object.assign({baseName:"grid-pro",template:gi,styles:Ei,shadowOptions:li},si));var _i=t(40729);class Xi extends g.FoundationElement{constructor(){super(...arguments),this.textValue="",this.textChanged=e=>{this.textValue=e.target.value,this.params.onChange(e.target.value,this.params)}}init(e){var a;e&&(this.params=e,this.textValue=""===this.textValue?pe(null===(a=null==e?void 0:e.node)||void 0===a?void 0:a.data,e.accessor):this.textValue,this.addEventListener("keydown",e=>{if(["ArrowLeft","ArrowRight"].includes(e.key)){const a=this.textField.control,t=a.selectionStart;("ArrowLeft"===e.key&&t>0||"ArrowRight"===e.key&&t<a.value.length)&&e.stopPropagation()}}))}getGui(){return this}destroy(){}refresh(e){return!0}isDisabled(e){var a;if("function"==typeof(null===(a=this.params)||void 0===a?void 0:a.isDisabled))try{return this.params.isDisabled(e)}catch(e){U.error("Error executing grid action cell renderer isDisabled callback:",e)}return!1}}(0,r.Cg)([s.observable],Xi.prototype,"textValue",void 0),(0,r.Cg)([s.observable],Xi.prototype,"params",void 0);const Ji=s.css`
|
|
10307
10307
|
:host {
|
|
10308
10308
|
display: flex;
|
|
10309
10309
|
width: 100%;
|
|
@@ -10313,7 +10313,7 @@
|
|
|
10313
10313
|
.text-renderer {
|
|
10314
10314
|
width: 100%;
|
|
10315
10315
|
}
|
|
10316
|
-
`,
|
|
10316
|
+
`,Zi=(e="foundation")=>{const a=`${e}-text-field`;return s.html`
|
|
10317
10317
|
<${a}
|
|
10318
10318
|
${(0,s.ref)("textField")}
|
|
10319
10319
|
type="text"
|
|
@@ -10323,10 +10323,10 @@
|
|
|
10323
10323
|
?hide-affix-from-screen-reader="${e=>{var a;return null===(a=e.params)||void 0===a?void 0:a.hideAffixFromScreenReader}}"
|
|
10324
10324
|
:maxlength="${e=>e.params.maxLength}"
|
|
10325
10325
|
?disabled=${e=>{var a;return e.isDisabled(null===(a=e.params)||void 0===a?void 0:a.data)}}
|
|
10326
|
-
:value="${(0,
|
|
10326
|
+
:value="${(0,_i.O)(e=>e.textValue)}"
|
|
10327
10327
|
@change="${(e,a)=>e.textChanged(a.event)}"
|
|
10328
10328
|
></${a}>
|
|
10329
|
-
`},
|
|
10329
|
+
`},eo=Xi.compose({baseName:"grid-pro-text-renderer",styles:Ji,template:Zi()});class ao extends Xi{}const to=Ji,ro=Zi,io=ao.compose({baseName:"grid-text-renderer",styles:to,template:ro()});class oo extends ao{}const no=oo.compose({baseName:"grid-text-renderer",styles:to,template:ro("rapid")});class lo extends Ze{}const so=lo.compose({baseName:"column-selection",template:$e("rapid"),styles:Ue}),go=s.css`
|
|
10330
10330
|
${Cr}
|
|
10331
10331
|
|
|
10332
10332
|
:host {
|
|
@@ -10336,7 +10336,7 @@
|
|
|
10336
10336
|
--ag-data-font-size: var(--type-ramp-minus-2-font-size);
|
|
10337
10337
|
font-family: var(--body-font);
|
|
10338
10338
|
}
|
|
10339
|
-
`;class
|
|
10339
|
+
`;class co extends kr{}const uo=co.compose({baseName:"grid-pro-status-bar",template:xr(),styles:go}),po={rapidIconRenderer:ni,rapidAgEditableRenderer:ei,rapidAgActionRenderer:Qr,rapidAgActionsMenuRenderer:_r,rapidAgBooleanRenderer:Jr,rapidAgTextRenderer:no,rapidAgSelectRenderer:ti,rapidAgDateEditor:Vr,rapidAgMultiselectEditor:Hr,rapidAgSelectEditor:Gr,rapidAgNumberEditor:jr,rapidAgStringEditor:Wr,rapidStatusPillRenderer:ii,rapidGridPro:hi,rapidColumnSelection:so,rapidGridProStatusBar:uo,register(e,...a){if(e)for(const t in this)"register"!==t&&this[t]().register(e,...a)}};var ho=t(58749),vo=t(14609),mo=t(86636);const fo={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(","):""},bo="--dropdown-width",wo="options",yo="dnone",Co=s.css`
|
|
10340
10340
|
label {
|
|
10341
10341
|
color: var(--neutral-foreground-hint, rgb(135 155 166));
|
|
10342
10342
|
font-style: normal;
|
|
@@ -10347,7 +10347,7 @@
|
|
|
10347
10347
|
line-height: var(--type-ramp-base-line-height);
|
|
10348
10348
|
}
|
|
10349
10349
|
|
|
10350
|
-
.${
|
|
10350
|
+
.${yo} {
|
|
10351
10351
|
display: none !important;
|
|
10352
10352
|
}
|
|
10353
10353
|
|
|
@@ -10355,7 +10355,7 @@
|
|
|
10355
10355
|
position: relative;
|
|
10356
10356
|
width: inherit;
|
|
10357
10357
|
min-width: 250px;
|
|
10358
|
-
${
|
|
10358
|
+
${bo}: 350px;
|
|
10359
10359
|
}
|
|
10360
10360
|
|
|
10361
10361
|
.control {
|
|
@@ -10438,9 +10438,9 @@
|
|
|
10438
10438
|
opacity: var(--disabled-opacity);
|
|
10439
10439
|
}
|
|
10440
10440
|
|
|
10441
|
-
.${
|
|
10441
|
+
.${wo} {
|
|
10442
10442
|
min-width: 100%;
|
|
10443
|
-
width: var(${
|
|
10443
|
+
width: var(${bo});
|
|
10444
10444
|
display: flex;
|
|
10445
10445
|
flex-direction: column;
|
|
10446
10446
|
position: absolute;
|
|
@@ -10472,11 +10472,11 @@
|
|
|
10472
10472
|
.visible {
|
|
10473
10473
|
visibility: visible;
|
|
10474
10474
|
}
|
|
10475
|
-
`,
|
|
10475
|
+
`,xo=(e="foundation")=>s.html`
|
|
10476
10476
|
<label
|
|
10477
10477
|
part="label"
|
|
10478
10478
|
for="control"
|
|
10479
|
-
class="label ${e=>{var a,t;return null!==(t=(0,te.x)([
|
|
10479
|
+
class="label ${e=>{var a,t;return null!==(t=(0,te.x)([yo,!(null!==(a=e.hasSlottedContent)&&void 0!==a&&a)]))&&void 0!==t?t:""}}"
|
|
10480
10480
|
>
|
|
10481
10481
|
<slot
|
|
10482
10482
|
${(0,s.slotted)({property:"defaultSlottedNodes"})}
|
|
@@ -10507,13 +10507,13 @@
|
|
|
10507
10507
|
</div>
|
|
10508
10508
|
<div
|
|
10509
10509
|
${(0,s.ref)("optionsElement")}
|
|
10510
|
-
class="${e=>{var a,t,r,i;return(0,te.x)(
|
|
10510
|
+
class="${e=>{var a,t,r,i;return(0,te.x)(wo,["visible",e.open],["dropdown-above",null!==(t=null===(a=e.dropdownPlacement)||void 0===a?void 0:a.startsWith("top"))&&void 0!==t&&t],["dropdown-left",null!==(i=null===(r=e.dropdownPlacement)||void 0===r?void 0:r.endsWith("left"))&&void 0!==i&&i])}}"
|
|
10511
10511
|
>
|
|
10512
10512
|
<${e}-text-field
|
|
10513
10513
|
id="filter-search"
|
|
10514
10514
|
part="filter-search"
|
|
10515
10515
|
placeholder="Search..."
|
|
10516
|
-
:value=${(0,
|
|
10516
|
+
:value=${(0,_i.O)(e=>e.filterSearch,"string","input")}
|
|
10517
10517
|
?hidden=${e=>!e.hasSearchKey}
|
|
10518
10518
|
@change=${(e,a)=>e.changeHandler(a.event)}
|
|
10519
10519
|
></${e}-text-field>
|
|
@@ -10525,5 +10525,5 @@
|
|
|
10525
10525
|
</div>
|
|
10526
10526
|
</div>
|
|
10527
10527
|
</div>
|
|
10528
|
-
`,zo=So(),ko={menuTabs:["filterMenuTab","generalMenuTab","columnsMenuTab"]},Ro=(e,a)=>!e.composedPath().includes(a);function Ao(e,a,t,i){return(0,r.sH)(this,void 0,void 0,function*(){var r;try{const o=function(e,a){const t=(new vo.K).withField(e).withValue(null!=a?a:"").withSerialiser(vt.n.EQ).withGroup("default").build();return t.serialiser(t)}(t,i),n=yield e.request(a,{DETAILS:{CRITERIA_MATCH:o}});return 1===(null===(r=n.REPLY)||void 0===r?void 0:r.length)?n.REPLY[0]:void 0}catch(e){return void console.error(`Failed to retrieve object from the ${a} resource: ${e instanceof Error?e.message:String(e)}`)}})}class Do extends((0,o.S)(g.FoundationElement)){constructor(){super(...arguments),this.requestSupportsAdvancedSearch=!1,this.defaultSlottedNodes=[],this.getAndSetRowsDebounce=p()(()=>this.getAndSetRows(),300),this.handleClickOutside=e=>{Ro(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 s.Observable.track(this,"value"),this._value}set value(e){e!==this._value&&(e?Ao(this.connect,this.resourceName,this.valueKey,e).then(a=>{this.value===e&&(this.selectedRow=a)}):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 a;return e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&(null===(a=e.textContent)||void 0===a?void 0:a.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:ko,onRowClicked:e=>{this.selectedRow=e.data,this.emitValue(e.data[this.valueKey]),this.toggle()}})}setGridRowData(e){var a;const t=null===(a=this.grid)||void 0===a?void 0:a.gridApi;t&&("function"==typeof t.updateGridOptions?t.updateGridOptions({rowData:e}):t.setRowData(e))}setGridColumnDefs(e){var a;const t=null===(a=this.grid)||void 0===a?void 0:a.gridApi;t&&("function"==typeof t.updateGridOptions?t.updateGridOptions({columnDefs:e}):t.setColumnDefs(e))}emitValue(e){this._value=e,this.$emit("change",e),this.$emit("input",e),s.Observable.notify(this,"value")}toggle(){this.open=!this.open}getAndSetRows(){return(0,r.sH)(this,void 0,void 0,function*(){var e,a;if(!(null===(e=this.grid)||void 0===e?void 0:e.gridApi))return;const t=this.lastRequest={},r=this.request?{REQUEST:Object.assign({},this.request)}:{},i=Array.isArray(this.searchKey)&&1===this.searchKey.length?this.searchKey[0]:this.searchKey;let o;if(i&&this.filterSearch)if(this.requestSupportsAdvancedSearch){const e=(Array.isArray(i)?i:[i]).map(e=>{var a;return(new vo.K).withField(e).withValue(null!==(a=this.filterSearch)&&void 0!==a?a:"").withSerialiser(vt.n.containsIgnoreCase).withGroup("default").build()}),a=new mo.b;a.Or(e,{join:fo.r.Or()}),o=a.build()}else{if(Array.isArray(i))throw Error("MulticolumnDropdown: Unable to search multiple keys via request; if the request is a GPAL ReqRep, set requestSupportsAdvancedSearch to true");r.REQUEST=Object.assign(Object.assign({},r.REQUEST),{[i]:`*${this.filterSearch}*`})}const n=null===(a=this.baseCriteria)||void 0===a?void 0:a.trim();n&&o?o=`(${o}) && (${n})`:n&&(o=n),o&&(r.DETAILS={CRITERIA_MATCH:o});try{const e=yield this.connect.request(this.resourceName,r);if(t!==this.lastRequest)return;const a=(null==e?void 0:e.REPLY)||[];this.setGridRowData(a),a.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,a;this.open&&(null===(a=null===(e=this.grid)||void 0===e?void 0:e.gridApi)||void 0===a||a.showLoadingOverlay(),this.getAndSetRowsDebounce())}requestChanged(){var e,a;this.open&&(null===(a=null===(e=this.grid)||void 0===e?void 0:e.gridApi)||void 0===a||a.showLoadingOverlay(),this.getAndSetRows())}columnDefinitionsChanged(){this.setGridColumnDefs(this.columnDefinitions)}openChanged(){var e,a;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===(a=this.grid)||void 0===a?void 0:a.gridApi)&&this.setGridRowData([]))}dropdownWidthChanged(){var e,a;null===(a=null===(e=this.optionsElement)||void 0===e?void 0:e.style)||void 0===a||a.setProperty(wo,this.dropdownWidth>0?`${this.dropdownWidth}px`:"inherit")}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback();const e=this.shouldRunDisconnect;s.DOM.queueUpdate(()=>{var a;e&&((null===(a=this.grid)||void 0===a?void 0:a.gridApi)&&this.setGridRowData([]),this.selectedRow=void 0,this._value=void 0)})}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}}(0,r.Cg)([za.dm],Do.prototype,"_connectDI",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean"})],Do.prototype,"disabled",void 0),(0,r.Cg)([(0,s.attr)({attribute:"resource-name"})],Do.prototype,"resourceName",void 0),(0,r.Cg)([(0,s.attr)({attribute:"search-key",converter:bo})],Do.prototype,"searchKey",void 0),(0,r.Cg)([(0,s.attr)({attribute:"advanced-search-req",mode:"boolean"})],Do.prototype,"requestSupportsAdvancedSearch",void 0),(0,r.Cg)([(0,s.attr)({attribute:"value-key"})],Do.prototype,"valueKey",void 0),(0,r.Cg)([(0,s.attr)({attribute:"label-key"})],Do.prototype,"labelKey",void 0),(0,r.Cg)([(0,s.attr)({attribute:"dropdown-placement"})],Do.prototype,"dropdownPlacement",void 0),(0,r.Cg)([s.attr],Do.prototype,"dropdownWidth",void 0),(0,r.Cg)([s.observable],Do.prototype,"request",void 0),(0,r.Cg)([s.observable],Do.prototype,"columnDefinitions",void 0),(0,r.Cg)([s.observable],Do.prototype,"baseCriteria",void 0),(0,r.Cg)([s.observable],Do.prototype,"defaultSlottedNodes",void 0),(0,r.Cg)([s.observable],Do.prototype,"filterSearch",void 0),(0,r.Cg)([s.observable],Do.prototype,"open",void 0),(0,r.Cg)([s.observable],Do.prototype,"selectedRow",void 0),(0,r.Cg)([s.volatile],Do.prototype,"displayValue",null),(0,r.Cg)([s.volatile],Do.prototype,"hasSearchKey",null),(0,r.Cg)([s.volatile],Do.prototype,"hasSlottedContent",null);const Eo=Do.compose({baseName:"multicolumn-dropdown",template:zo,styles:xo}),Mo=Do.compose({baseName:"multicolumn-dropdown",template:So("rapid"),styles:xo});class Oo{constructor(e,a){this.criteria=e,this.onActiveChanged=a,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 a;const{add:t=[],update:r=[],remove:i=[]}=null!==(a=null==e?void 0:e.changes)&&void 0!==a?a:{};for(const e of i)this.syncRow(e,!0);for(const e of t)this.syncRow(e,!1);for(const e of r)this.syncRow(e,!1);this.report()}handleDataCleared(){this.reset()}observe(e){const a=e=>{this.handleDataChanged(e.detail)},t=()=>{this.handleDataCleared()};return e.addEventListener(Da.dataChanged,a),e.addEventListener(Da.dataCleared,t),()=>{e.removeEventListener(Da.dataChanged,a),e.removeEventListener(Da.dataCleared,t)}}syncRow(e,a){var t;if(!e)return;const r=String(null!==(t=e[this.criteria.rowIdField])&&void 0!==t?t:"");r&&(!a&&Ht(this.criteria,e)?this.matchedRowIds.add(r):this.matchedRowIds.delete(r))}report(){const e=this.active;e!==this.lastReportedActive&&(this.lastReportedActive=e,this.onActiveChanged(e))}}const To={foundationIconRenderer:se,foundationGridProActionRenderer:W,foundationGridProActionsMenuRenderer:q.su,foundationAgBooleanRenderer:X,foundationAgTextRenderer:oo,foundationAgTextFieldRenderer:ao,foundationAgEditableRenderer:ae,foundationAgSelectRenderer:fe,foundationSelectEditor:y,foundationNumberEditor:z,foundationDateEditor:F,foundationMultiselectEditor:D,foundationStringEditor:j,foundationMulticolumnDropdown:Eo,foundationStatusPillRenderer:ue,StatusPillRenderer:ce,foundationGridPro:Pr,foundationColumnSelection:ea,foundationGridProStatusBar:Rr,register(e,...a){if(e)for(const t in this)"register"!==t&&this[t]().register(e,...a)}},Io=[{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)"}],Lo=[{id:"slow",label:"Slow",value:1400},{id:"normal",label:"Normal",value:1e3},{id:"fast",label:"Fast",value:500}],No=[{id:"row",label:"Whole row",value:"row"},{id:"cell",label:"Alert field cell",value:"cell"}],Fo={color:Io[0].value,durationMs:Lo[1].value,scope:"row"};function Po(e){return{color:"string"==typeof(null==e?void 0:e.color)&&e.color.trim().length>0?e.color:Fo.color,durationMs:"number"==typeof(null==e?void 0:e.durationMs)&&Number.isFinite(e.durationMs)&&e.durationMs>0?e.durationMs:Fo.durationMs,scope:"row"===(null==e?void 0:e.scope)||"cell"===(null==e?void 0:e.scope)?e.scope:Fo.scope}}const Go=new Map;function Bo(e){const{persistPreferencesKey:a,target:t,mirrorColorTo:r=[]}=e,i=a?function(e){if(e.statePersistence)return e.statePersistence;try{return g.DI.getOrCreateDOMContainer().get(cr)}catch(e){return void U.debug("Row alert preferences will not persist; no StatePersistence available",e)}}(e):void 0,o=new Set;let n=Po(Object.assign(Object.assign({},Fo),e.preferences));function l(){const e=null!=t?t:"undefined"==typeof document?void 0:document.documentElement;if(e){e.style.setProperty("--row-alert-color",n.color),e.style.setProperty("--alert-flash-duration",`${n.durationMs}ms`);for(const a of r)e.style.setProperty(a,n.color)}}function s(e,t){n=e,l();for(const e of o)e(n);t&&a&&(null==i?void 0:i.saveRowAlertPreferences)&&i.saveRowAlertPreferences(a,n).catch(e=>{U.warn("Could not save row alert preferences",e)})}return l(),a&&(null==i?void 0:i.getRowAlertPreferences)&&i.getRowAlertPreferences(a).then(e=>{s(Po(Object.assign(Object.assign({},n),e)),!1)}).catch(e=>{U.warn("Could not load row alert preferences",e)}),{get preferences(){return n},change(e){s(Po(Object.assign(Object.assign({},n),e)),!0)},subscribe:e=>(o.add(e),()=>{o.delete(e)})}}function jo(e,a={}){var t,r,i,o,n;const{colorPresets:l=Io,ratePresets:s=Lo,menuLabel:g="Alert flash"}=a,d=function(e){const{persistPreferencesKey:a}=e;if(!a)return Bo(e);let t=Go.get(a);return t||(t=Bo(e),Go.set(a,t)),t}(a),c=Yt(e)[$t],u=Wt(Object.assign(Object.assign({},e),{flashField:null!==(r=null!==(t=e.flashField)&&void 0!==t?t:e.stateField)&&void 0!==r?r:null===(n=null===(o=null===(i=e.anyOf)||void 0===i?void 0:i[0])||void 0===o?void 0:o[0])||void 0===n?void 0:n.field}))[Vt];function p(e,a,t,r){return e.map(e=>({name:e.label,checked:e.value===a,action:()=>{d.change(t(e.value)),r()}}))}const h={rowClassRules:{[$t]:e=>"row"===d.preferences.scope&&c(e)},defaultColDef:{cellClassRules:{[Vt]:e=>"cell"===d.preferences.scope&&u(e)}},get preferences(){return d.preferences},createMenuItem(e){const a=()=>{var a;return null===(a=null==e?void 0:e.redrawRows)||void 0===a?void 0:a.call(e)};return{name:g,subMenu:[{name:"Flash target",subMenu:p(No,d.preferences.scope,e=>({scope:e}),a)},{name:"Color",subMenu:p(l,d.preferences.color,e=>({color:e}),()=>{})},{name:"Flash rate",subMenu:p(s,d.preferences.durationMs,e=>({durationMs:e}),()=>{})},{name:"Reset to defaults",action:()=>{h.reset(),a()}}]}},getContextMenuItems(e){var a;return[...null!==(a=e.defaultItems)&&void 0!==a?a:[],"separator",h.createMenuItem(e.api)]},setPreferences(e){d.change(e)},reset(){d.change(Fo)},subscribe:e=>d.subscribe(e)};return h}var Uo=t(92277);const Ho=/^(?:[A-Za-z0-9+/]{4})*?(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,$o=e=>{const a=e.split(":");let t,r;2===a.length?[t,r]=a:r=e;const i=(e=>{if(Ho.test(e)){const a=atob(e),t=new Uint8Array(a.length);return[...a].forEach((e,r)=>{t[r]=a.charCodeAt(r)}),t.buffer}return e})(r);if("str"===t){return new TextDecoder("utf-8").decode(i)}return i},Vo=e=>{const a=(e=>{if("string"==typeof e)return btoa(e);if(e instanceof ArrayBuffer){const a=new Uint8Array(e).reduce((e,a)=>e+String.fromCharCode(a),"");return btoa(a)}return""})(e);return"string"==typeof e?`str:${a}`:e instanceof ArrayBuffer?`bin:${a}`:""},Yo={account:"genesis",namespace:"default",authKey:"kv-default",authEmail:void 0},Wo=g.DI.createInterface();var qo,Qo;!function(e){e.REQ_KEY_VALUE_LIST="REQ_KEY_VALUE_LIST",e.REQ_KEY_VALUE_READ="REQ_KEY_VALUE_READ"}(qo||(qo={})),function(e){e.EVENT_KEY_VALUE_PUT="EVENT_KEY_VALUE_PUT",e.EVENT_KEY_VALUE_DELETE="EVENT_KEY_VALUE_DELETE"}(Qo||(Qo={}));let Ko=class{constructor(e,a,t=Yo){this.connect=e,this.user=a,this.kvStorageConfig=t}delete(e){return(0,r.sH)(this,void 0,void 0,function*(){const a={DETAILS:{KEYS:e}},t=yield this.connect.commitEvent(Qo.EVENT_KEY_VALUE_DELETE,a);return!(!t||"EVENT_ACK"!==t.MESSAGE_TYPE)||{ERROR:t.ERROR,WARNING:t.WARNING}})}get(e){return(0,r.sH)(this,void 0,void 0,function*(){var a;const t={REQUEST:{USER_NAME:null!==(a=this.kvStorageConfig.authEmail)&&void 0!==a?a:this.user.userName,KEY:e}},r=yield this.connect.request(qo.REQ_KEY_VALUE_READ,t);if(r&&r.REPLY&&r.REPLY.length>0){const a=r.REPLY.map(e=>{const a=this.getDecodedValue(e.VALUE);return{kv:{key:e.KEY,value:a}}});return e?a[0]:a}return e?void 0:[]})}getDecodedValue(e){e.startsWith("str:")||e.startsWith("bin:")||(e=`str:${e}`);let a=$o(e);return"string"==typeof a&&a.startsWith("str:")&&(a=$o(a)),"string"==typeof a&&a.startsWith("bin:")&&(a=$o(a)),a}list(){return(0,r.sH)(this,void 0,void 0,function*(){var e;const a={REQUEST:{USER_NAME:null!==(e=this.kvStorageConfig.authEmail)&&void 0!==e?e:this.user.userName}},t=yield this.connect.request(qo.REQ_KEY_VALUE_LIST,a);if(t&&t.REPLY&&t.REPLY.length>0){return t.REPLY.map(e=>e.KEY)}return[]})}put(e){return(0,r.sH)(this,void 0,void 0,function*(){const a={DETAILS:{RECORDS:e.map(e=>({KEY:e.key,VALUE:e.base64?Vo(e.value):e.value}))}},t=yield this.connect.commitEvent(Qo.EVENT_KEY_VALUE_PUT,a);return!(!t||"EVENT_ACK"!==t.MESSAGE_TYPE)||{ERROR:t.ERROR,WARNING:t.WARNING}})}};Ko=(0,r.Cg)([(0,r.Qj)(0,za.dm),(0,r.Qj)(1,Uo.KJ),(0,r.Qj)(2,(0,g.optional)(Wo))],Ko);const _o=g.DI.createInterface(e=>e.singleton(Ko));class Xo{getColumnState(e){return(0,r.sH)(this,void 0,void 0,function*(){var a;yield this.migrateLocalStorageToKVStorage(e);const t=yield this.kvStorage.get(e),r=t?null===(a=t.kv)||void 0===a?void 0:a.value:void 0;return r?JSON.parse(r):[]})}saveColumnState(e,a){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(a)}])})}deleteColumnState(e){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.delete([e])})}migrateLocalStorageToKVStorage(e){return(0,r.sH)(this,void 0,void 0,function*(){var a;const t=yield this.kvStorage.get(e);if(t&&(null===(a=t.kv)||void 0===a?void 0:a.value))return;const r=this.session.getLocalStorageItem("gridOptions"),i=r?JSON.parse(r)[e]:void 0;i&&(U.debug(`Columns state migration for key: ${e} from LocalStorage to KV Storage`),this.kvStorage.put([{key:e,value:i}]))})}getFilterModel(e){return(0,r.sH)(this,void 0,void 0,function*(){var a;const t=yield this.kvStorage.get(e),r=t?null===(a=t.kv)||void 0===a?void 0:a.value:void 0;return r?JSON.parse(r):{}})}saveFilterModel(e,a){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(a)}])})}getRowAlertPreferences(e){return(0,r.sH)(this,void 0,void 0,function*(){var a;const t=yield this.kvStorage.get(e),r=t?null===(a=t.kv)||void 0===a?void 0:a.value:void 0;return r?JSON.parse(r):{}})}saveRowAlertPreferences(e,a){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(a)}])})}}(0,r.Cg)([_o],Xo.prototype,"kvStorage",void 0),(0,r.Cg)([gr.N],Xo.prototype,"session",void 0);const Jo=l.SwatchRGB.from((0,Oi.parseColorHexRGB)("#4c4c4c")),Zo=l.SwatchRGB.from((0,Oi.parseColorHexRGB)("#c01754")),{create:en}=g.DesignToken,an={foregroundColor:en("fui-ag-foreground-color").withDefault(Zo),backgroundColor:en("fui-ag-background-color").withDefault(Jo)},tn={processCellCallback:e=>["+","=","-","@","\t","\n"].some(a=>String(e.value).startsWith(a))?`'${e.value}`:e.value}}}]);
|
|
10529
|
-
//# sourceMappingURL=109.
|
|
10528
|
+
`,So=xo(),zo={menuTabs:["filterMenuTab","generalMenuTab","columnsMenuTab"]},ko=(e,a)=>!e.composedPath().includes(a);function Ro(e,a,t,i){return(0,r.sH)(this,void 0,void 0,function*(){var r;try{const o=function(e,a){const t=(new ho.K).withField(e).withValue(null!=a?a:"").withSerialiser(vt.n.EQ).withGroup("default").build();return t.serialiser(t)}(t,i),n=yield e.request(a,{DETAILS:{CRITERIA_MATCH:o}});return 1===(null===(r=n.REPLY)||void 0===r?void 0:r.length)?n.REPLY[0]:void 0}catch(e){return void console.error(`Failed to retrieve object from the ${a} resource: ${e instanceof Error?e.message:String(e)}`)}})}class Ao extends((0,o.S)(g.FoundationElement)){constructor(){super(...arguments),this.requestSupportsAdvancedSearch=!1,this.defaultSlottedNodes=[],this.getAndSetRowsDebounce=p()(()=>this.getAndSetRows(),300),this.handleClickOutside=e=>{ko(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 s.Observable.track(this,"value"),this._value}set value(e){e!==this._value&&(e?Ro(this.connect,this.resourceName,this.valueKey,e).then(a=>{this.value===e&&(this.selectedRow=a)}):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 a;return e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&(null===(a=e.textContent)||void 0===a?void 0:a.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:zo,onRowClicked:e=>{this.selectedRow=e.data,this.emitValue(e.data[this.valueKey]),this.toggle()}})}setGridRowData(e){var a;const t=null===(a=this.grid)||void 0===a?void 0:a.gridApi;t&&("function"==typeof t.updateGridOptions?t.updateGridOptions({rowData:e}):t.setRowData(e))}setGridColumnDefs(e){var a;const t=null===(a=this.grid)||void 0===a?void 0:a.gridApi;t&&("function"==typeof t.updateGridOptions?t.updateGridOptions({columnDefs:e}):t.setColumnDefs(e))}emitValue(e){this._value=e,this.$emit("change",e),this.$emit("input",e),s.Observable.notify(this,"value")}toggle(){this.open=!this.open}getAndSetRows(){return(0,r.sH)(this,void 0,void 0,function*(){var e,a;if(!(null===(e=this.grid)||void 0===e?void 0:e.gridApi))return;const t=this.lastRequest={},r=this.request?{REQUEST:Object.assign({},this.request)}:{},i=Array.isArray(this.searchKey)&&1===this.searchKey.length?this.searchKey[0]:this.searchKey;let o;if(i&&this.filterSearch)if(this.requestSupportsAdvancedSearch){const e=(Array.isArray(i)?i:[i]).map(e=>{var a;return(new ho.K).withField(e).withValue(null!==(a=this.filterSearch)&&void 0!==a?a:"").withSerialiser(vt.n.containsIgnoreCase).withGroup("default").build()}),a=new vo.b;a.Or(e,{join:mo.r.Or()}),o=a.build()}else{if(Array.isArray(i))throw Error("MulticolumnDropdown: Unable to search multiple keys via request; if the request is a GPAL ReqRep, set requestSupportsAdvancedSearch to true");r.REQUEST=Object.assign(Object.assign({},r.REQUEST),{[i]:`*${this.filterSearch}*`})}const n=null===(a=this.baseCriteria)||void 0===a?void 0:a.trim();n&&o?o=`(${o}) && (${n})`:n&&(o=n),o&&(r.DETAILS={CRITERIA_MATCH:o});try{const e=yield this.connect.request(this.resourceName,r);if(t!==this.lastRequest)return;const a=(null==e?void 0:e.REPLY)||[];this.setGridRowData(a),a.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,a;this.open&&(null===(a=null===(e=this.grid)||void 0===e?void 0:e.gridApi)||void 0===a||a.showLoadingOverlay(),this.getAndSetRowsDebounce())}requestChanged(){var e,a;this.open&&(null===(a=null===(e=this.grid)||void 0===e?void 0:e.gridApi)||void 0===a||a.showLoadingOverlay(),this.getAndSetRows())}columnDefinitionsChanged(){this.setGridColumnDefs(this.columnDefinitions)}openChanged(){var e,a;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===(a=this.grid)||void 0===a?void 0:a.gridApi)&&this.setGridRowData([]))}dropdownWidthChanged(){var e,a;null===(a=null===(e=this.optionsElement)||void 0===e?void 0:e.style)||void 0===a||a.setProperty(bo,this.dropdownWidth>0?`${this.dropdownWidth}px`:"inherit")}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback();const e=this.shouldRunDisconnect;s.DOM.queueUpdate(()=>{var a;e&&((null===(a=this.grid)||void 0===a?void 0:a.gridApi)&&this.setGridRowData([]),this.selectedRow=void 0,this._value=void 0)})}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}}(0,r.Cg)([za.dm],Ao.prototype,"_connectDI",void 0),(0,r.Cg)([(0,s.attr)({mode:"boolean"})],Ao.prototype,"disabled",void 0),(0,r.Cg)([(0,s.attr)({attribute:"resource-name"})],Ao.prototype,"resourceName",void 0),(0,r.Cg)([(0,s.attr)({attribute:"search-key",converter:fo})],Ao.prototype,"searchKey",void 0),(0,r.Cg)([(0,s.attr)({attribute:"advanced-search-req",mode:"boolean"})],Ao.prototype,"requestSupportsAdvancedSearch",void 0),(0,r.Cg)([(0,s.attr)({attribute:"value-key"})],Ao.prototype,"valueKey",void 0),(0,r.Cg)([(0,s.attr)({attribute:"label-key"})],Ao.prototype,"labelKey",void 0),(0,r.Cg)([(0,s.attr)({attribute:"dropdown-placement"})],Ao.prototype,"dropdownPlacement",void 0),(0,r.Cg)([s.attr],Ao.prototype,"dropdownWidth",void 0),(0,r.Cg)([s.observable],Ao.prototype,"request",void 0),(0,r.Cg)([s.observable],Ao.prototype,"columnDefinitions",void 0),(0,r.Cg)([s.observable],Ao.prototype,"baseCriteria",void 0),(0,r.Cg)([s.observable],Ao.prototype,"defaultSlottedNodes",void 0),(0,r.Cg)([s.observable],Ao.prototype,"filterSearch",void 0),(0,r.Cg)([s.observable],Ao.prototype,"open",void 0),(0,r.Cg)([s.observable],Ao.prototype,"selectedRow",void 0),(0,r.Cg)([s.volatile],Ao.prototype,"displayValue",null),(0,r.Cg)([s.volatile],Ao.prototype,"hasSearchKey",null),(0,r.Cg)([s.volatile],Ao.prototype,"hasSlottedContent",null);const Do=Ao.compose({baseName:"multicolumn-dropdown",template:So,styles:Co}),Eo=Ao.compose({baseName:"multicolumn-dropdown",template:xo("rapid"),styles:Co});class Mo{constructor(e,a){this.criteria=e,this.onActiveChanged=a,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 a;const{add:t=[],update:r=[],remove:i=[]}=null!==(a=null==e?void 0:e.changes)&&void 0!==a?a:{};for(const e of i)this.syncRow(e,!0);for(const e of t)this.syncRow(e,!1);for(const e of r)this.syncRow(e,!1);this.report()}handleDataCleared(){this.reset()}observe(e){const a=e=>{this.handleDataChanged(e.detail)},t=()=>{this.handleDataCleared()};return e.addEventListener(Da.dataChanged,a),e.addEventListener(Da.dataCleared,t),()=>{e.removeEventListener(Da.dataChanged,a),e.removeEventListener(Da.dataCleared,t)}}syncRow(e,a){var t;if(!e)return;const r=String(null!==(t=e[this.criteria.rowIdField])&&void 0!==t?t:"");r&&(!a&&Ht(this.criteria,e)?this.matchedRowIds.add(r):this.matchedRowIds.delete(r))}report(){const e=this.active;e!==this.lastReportedActive&&(this.lastReportedActive=e,this.onActiveChanged(e))}}const Oo={foundationIconRenderer:se,foundationGridProActionRenderer:W,foundationGridProActionsMenuRenderer:q.su,foundationAgBooleanRenderer:X,foundationAgTextRenderer:io,foundationAgTextFieldRenderer:eo,foundationAgEditableRenderer:ae,foundationAgSelectRenderer:fe,foundationSelectEditor:y,foundationNumberEditor:z,foundationDateEditor:F,foundationMultiselectEditor:D,foundationStringEditor:j,foundationMulticolumnDropdown:Do,foundationStatusPillRenderer:ue,StatusPillRenderer:ce,foundationGridPro:Fr,foundationColumnSelection:ea,foundationGridProStatusBar:Rr,register(e,...a){if(e)for(const t in this)"register"!==t&&this[t]().register(e,...a)}},To=[{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)"}],Io=[{id:"slow",label:"Slow",value:1400},{id:"normal",label:"Normal",value:1e3},{id:"fast",label:"Fast",value:500}],Lo=[{id:"row",label:"Whole row",value:"row"},{id:"cell",label:"Alert field cell",value:"cell"}],No={color:To[0].value,durationMs:Io[1].value,scope:"row"};function Fo(e){return{color:"string"==typeof(null==e?void 0:e.color)&&e.color.trim().length>0?e.color:No.color,durationMs:"number"==typeof(null==e?void 0:e.durationMs)&&Number.isFinite(e.durationMs)&&e.durationMs>0?e.durationMs:No.durationMs,scope:"row"===(null==e?void 0:e.scope)||"cell"===(null==e?void 0:e.scope)?e.scope:No.scope}}const Po=new Map;function Go(e){const{persistPreferencesKey:a,target:t,mirrorColorTo:r=[]}=e,i=a?function(e){if(e.statePersistence)return e.statePersistence;try{return g.DI.getOrCreateDOMContainer().get(cr)}catch(e){return void U.debug("Row alert preferences will not persist; no StatePersistence available",e)}}(e):void 0,o=new Set;let n=Fo(Object.assign(Object.assign({},No),e.preferences));function l(){const e=null!=t?t:"undefined"==typeof document?void 0:document.documentElement;if(e){e.style.setProperty("--row-alert-color",n.color),e.style.setProperty("--alert-flash-duration",`${n.durationMs}ms`);for(const a of r)e.style.setProperty(a,n.color)}}function s(e,t){n=e,l();for(const e of o)e(n);t&&a&&(null==i?void 0:i.saveRowAlertPreferences)&&i.saveRowAlertPreferences(a,n).catch(e=>{U.warn("Could not save row alert preferences",e)})}return l(),a&&(null==i?void 0:i.getRowAlertPreferences)&&i.getRowAlertPreferences(a).then(e=>{s(Fo(Object.assign(Object.assign({},n),e)),!1)}).catch(e=>{U.warn("Could not load row alert preferences",e)}),{get preferences(){return n},change(e){s(Fo(Object.assign(Object.assign({},n),e)),!0)},subscribe:e=>(o.add(e),()=>{o.delete(e)})}}function Bo(e,a={}){var t,r,i,o,n;const{colorPresets:l=To,ratePresets:s=Io,menuLabel:g="Alert flash"}=a,d=function(e){const{persistPreferencesKey:a}=e;if(!a)return Go(e);let t=Po.get(a);return t||(t=Go(e),Po.set(a,t)),t}(a),c=Yt(e)[$t],u=Wt(Object.assign(Object.assign({},e),{flashField:null!==(r=null!==(t=e.flashField)&&void 0!==t?t:e.stateField)&&void 0!==r?r:null===(n=null===(o=null===(i=e.anyOf)||void 0===i?void 0:i[0])||void 0===o?void 0:o[0])||void 0===n?void 0:n.field}))[Vt];function p(e,a,t,r){return e.map(e=>({name:e.label,checked:e.value===a,action:()=>{d.change(t(e.value)),r()}}))}const h={rowClassRules:{[$t]:e=>"row"===d.preferences.scope&&c(e)},defaultColDef:{cellClassRules:{[Vt]:e=>"cell"===d.preferences.scope&&u(e)}},get preferences(){return d.preferences},createMenuItem(e){const a=()=>{var a;return null===(a=null==e?void 0:e.redrawRows)||void 0===a?void 0:a.call(e)};return{name:g,subMenu:[{name:"Flash target",subMenu:p(Lo,d.preferences.scope,e=>({scope:e}),a)},{name:"Color",subMenu:p(l,d.preferences.color,e=>({color:e}),()=>{})},{name:"Flash rate",subMenu:p(s,d.preferences.durationMs,e=>({durationMs:e}),()=>{})},{name:"Reset to defaults",action:()=>{h.reset(),a()}}]}},getContextMenuItems(e){var a;return[...null!==(a=e.defaultItems)&&void 0!==a?a:[],"separator",h.createMenuItem(e.api)]},setPreferences(e){d.change(e)},reset(){d.change(No)},subscribe:e=>d.subscribe(e)};return h}var jo=t(92277);const Uo=/^(?:[A-Za-z0-9+/]{4})*?(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,Ho=e=>{const a=e.split(":");let t,r;2===a.length?[t,r]=a:r=e;const i=(e=>{if(Uo.test(e)){const a=atob(e),t=new Uint8Array(a.length);return[...a].forEach((e,r)=>{t[r]=a.charCodeAt(r)}),t.buffer}return e})(r);if("str"===t){return new TextDecoder("utf-8").decode(i)}return i},$o=e=>{const a=(e=>{if("string"==typeof e)return btoa(e);if(e instanceof ArrayBuffer){const a=new Uint8Array(e).reduce((e,a)=>e+String.fromCharCode(a),"");return btoa(a)}return""})(e);return"string"==typeof e?`str:${a}`:e instanceof ArrayBuffer?`bin:${a}`:""},Vo={account:"genesis",namespace:"default",authKey:"kv-default",authEmail:void 0},Yo=g.DI.createInterface();var Wo,qo;!function(e){e.REQ_KEY_VALUE_LIST="REQ_KEY_VALUE_LIST",e.REQ_KEY_VALUE_READ="REQ_KEY_VALUE_READ"}(Wo||(Wo={})),function(e){e.EVENT_KEY_VALUE_PUT="EVENT_KEY_VALUE_PUT",e.EVENT_KEY_VALUE_DELETE="EVENT_KEY_VALUE_DELETE"}(qo||(qo={}));let Qo=class{constructor(e,a,t=Vo){this.connect=e,this.user=a,this.kvStorageConfig=t}delete(e){return(0,r.sH)(this,void 0,void 0,function*(){const a={DETAILS:{KEYS:e}},t=yield this.connect.commitEvent(qo.EVENT_KEY_VALUE_DELETE,a);return!(!t||"EVENT_ACK"!==t.MESSAGE_TYPE)||{ERROR:t.ERROR,WARNING:t.WARNING}})}get(e){return(0,r.sH)(this,void 0,void 0,function*(){var a;const t={REQUEST:{USER_NAME:null!==(a=this.kvStorageConfig.authEmail)&&void 0!==a?a:this.user.userName,KEY:e}},r=yield this.connect.request(Wo.REQ_KEY_VALUE_READ,t);if(r&&r.REPLY&&r.REPLY.length>0){const a=r.REPLY.map(e=>{const a=this.getDecodedValue(e.VALUE);return{kv:{key:e.KEY,value:a}}});return e?a[0]:a}return e?void 0:[]})}getDecodedValue(e){e.startsWith("str:")||e.startsWith("bin:")||(e=`str:${e}`);let a=Ho(e);return"string"==typeof a&&a.startsWith("str:")&&(a=Ho(a)),"string"==typeof a&&a.startsWith("bin:")&&(a=Ho(a)),a}list(){return(0,r.sH)(this,void 0,void 0,function*(){var e;const a={REQUEST:{USER_NAME:null!==(e=this.kvStorageConfig.authEmail)&&void 0!==e?e:this.user.userName}},t=yield this.connect.request(Wo.REQ_KEY_VALUE_LIST,a);if(t&&t.REPLY&&t.REPLY.length>0){return t.REPLY.map(e=>e.KEY)}return[]})}put(e){return(0,r.sH)(this,void 0,void 0,function*(){const a={DETAILS:{RECORDS:e.map(e=>({KEY:e.key,VALUE:e.base64?$o(e.value):e.value}))}},t=yield this.connect.commitEvent(qo.EVENT_KEY_VALUE_PUT,a);return!(!t||"EVENT_ACK"!==t.MESSAGE_TYPE)||{ERROR:t.ERROR,WARNING:t.WARNING}})}};Qo=(0,r.Cg)([(0,r.Qj)(0,za.dm),(0,r.Qj)(1,jo.KJ),(0,r.Qj)(2,(0,g.optional)(Yo))],Qo);const Ko=g.DI.createInterface(e=>e.singleton(Qo));class _o{getColumnState(e){return(0,r.sH)(this,void 0,void 0,function*(){var a;yield this.migrateLocalStorageToKVStorage(e);const t=yield this.kvStorage.get(e),r=t?null===(a=t.kv)||void 0===a?void 0:a.value:void 0;return r?JSON.parse(r):[]})}saveColumnState(e,a){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(a)}])})}deleteColumnState(e){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.delete([e])})}migrateLocalStorageToKVStorage(e){return(0,r.sH)(this,void 0,void 0,function*(){var a;const t=yield this.kvStorage.get(e);if(t&&(null===(a=t.kv)||void 0===a?void 0:a.value))return;const r=this.session.getLocalStorageItem("gridOptions"),i=r?JSON.parse(r)[e]:void 0;i&&(U.debug(`Columns state migration for key: ${e} from LocalStorage to KV Storage`),this.kvStorage.put([{key:e,value:i}]))})}getFilterModel(e){return(0,r.sH)(this,void 0,void 0,function*(){var a;const t=yield this.kvStorage.get(e),r=t?null===(a=t.kv)||void 0===a?void 0:a.value:void 0;return r?JSON.parse(r):{}})}saveFilterModel(e,a){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(a)}])})}getRowAlertPreferences(e){return(0,r.sH)(this,void 0,void 0,function*(){var a;const t=yield this.kvStorage.get(e),r=t?null===(a=t.kv)||void 0===a?void 0:a.value:void 0;return r?JSON.parse(r):{}})}saveRowAlertPreferences(e,a){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(a)}])})}}(0,r.Cg)([Ko],_o.prototype,"kvStorage",void 0),(0,r.Cg)([gr.N],_o.prototype,"session",void 0);const Xo=l.SwatchRGB.from((0,Mi.parseColorHexRGB)("#4c4c4c")),Jo=l.SwatchRGB.from((0,Mi.parseColorHexRGB)("#c01754")),{create:Zo}=g.DesignToken,en={foregroundColor:Zo("fui-ag-foreground-color").withDefault(Jo),backgroundColor:Zo("fui-ag-background-color").withDefault(Xo)},an={processCellCallback:e=>["+","=","-","@","\t","\n"].some(a=>String(e.value).startsWith(a))?`'${e.value}`:e.value}}}]);
|
|
10529
|
+
//# sourceMappingURL=109.f9eed5fb8279bfed15f27af3c33b4d97.js.map
|