Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ag-grid-enterprise/set-filter

Package Overview
Dependencies
Maintainers
0
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ag-grid-enterprise/set-filter - npm Package Compare versions

Comparing version 32.1.0 to 32.2.0

6

dist/package/main.cjs.min.js

@@ -12,3 +12,3 @@ var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var s in t)__defProp(e,s,{get:t[s],enumerable:!0})},__copyProps=(e,t,s,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of __getOwnPropNames(t))!__hasOwnProp.call(e,r)&&r!==s&&__defProp(e,r,{get:()=>t[r],enumerable:!(i=__getOwnPropDesc(t,r))||i.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),main_exports={};__export(main_exports,{SetFilter:()=>SetFilter,SetFilterModule:()=>SetFilterModule}),module.exports=__toCommonJS(main_exports);var import_core9=require("@ag-grid-community/core"),import_core10=require("@ag-grid-enterprise/core"),import_core6=require("@ag-grid-community/core"),import_core7=require("@ag-grid-enterprise/core"),SetFilterDisplayValue=class{};SetFilterDisplayValue.SELECT_ALL="__AG_SELECT_ALL__",SetFilterDisplayValue.ADD_SELECTION_TO_FILTER="__AG_ADD_SELECTION_TO_FILTER__";var DEFAULT_LOCALE_TEXT={loadingOoo:"Loading...",blanks:"(Blanks)",searchOoo:"Search...",selectAll:"(Select All)",selectAllSearchResults:"(Select All Search Results)",addCurrentSelectionToFilter:"Add current selection to filter",noMatches:"No matches."},import_core=require("@ag-grid-community/core"),SetFilterListItem=class extends import_core.Component{constructor(e){super(e.isGroup?`

<ag-checkbox data-ref="eCheckbox" class="ag-set-filter-item-checkbox"></ag-checkbox>
</div>`,[import_core.AgCheckboxSelector]),this.eCheckbox=import_core.RefPlaceholder,this.eGroupOpenedIcon=import_core.RefPlaceholder,this.eGroupClosedIcon=import_core.RefPlaceholder,this.eGroupIndeterminateIcon=import_core.RefPlaceholder,this.focusWrapper=e.focusWrapper,this.value=e.value,this.params=e.params,this.translate=e.translate,this.valueFormatter=e.valueFormatter,this.item=e.item,this.isSelected=e.isSelected,this.isTree=e.isTree,this.depth=e.depth??0,this.isGroup=e.isGroup,this.groupsExist=e.groupsExist,this.isExpanded=e.isExpanded,this.hasIndeterminateExpandState=e.hasIndeterminateExpandState}wireBeans(e){this.valueService=e.valueService,this.userComponentFactory=e.userComponentFactory}postConstruct(){this.addDestroyFunc(()=>this.destroyCellRendererComponent?.()),this.render(),this.eCheckbox.setLabelEllipsis(!0).setValue(this.isSelected,!0).setDisabled(!!this.params.readOnly).getInputElement().setAttribute("tabindex","-1"),this.refreshVariableAriaLabels(),this.isTree&&(this.depth>0&&(this.addCssClass("ag-set-filter-indent-"+this.depth),this.getGui().style.setProperty("--ag-indentation-level",String(this.depth))),this.isGroup?this.setupExpansion():this.groupsExist&&this.addCssClass("ag-set-filter-add-group-indent"),(0,import_core._setAriaLevel)(this.getAriaElement(),this.depth+1)),this.refreshAriaChecked(),!this.params.readOnly&&this.eCheckbox.onValueChange(e=>this.onCheckboxChanged(!!e))}getFocusableElement(){return this.focusWrapper}setupExpansion(){this.eGroupClosedIcon.appendChild((0,import_core._createIcon)("setFilterGroupClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild((0,import_core._createIcon)("setFilterGroupOpen",this.gos,null));const e=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(this.eGroupClosedIcon,{click:e}),this.addManagedElementListeners(this.eGroupOpenedIcon,{click:e}),this.hasIndeterminateExpandState&&(this.eGroupIndeterminateIcon.appendChild((0,import_core._createIcon)("setFilterGroupIndeterminate",this.gos,null)),this.addManagedElementListeners(this.eGroupIndeterminateIcon,{click:e})),this.setExpandedIcons(),this.refreshAriaExpanded()}onExpandOrContractClicked(){this.setExpanded(!this.isExpanded)}setExpanded(e,t){if(this.isGroup&&e!==this.isExpanded){this.isExpanded=e;const s={type:"expandedChanged",isExpanded:!!e,item:this.item};t||this.dispatchLocalEvent(s),this.setExpandedIcons(),this.refreshAriaExpanded()}}setExpandedIcons(){(0,import_core._setDisplayed)(this.eGroupClosedIcon,this.hasIndeterminateExpandState?this.isExpanded===!1:!this.isExpanded),(0,import_core._setDisplayed)(this.eGroupOpenedIcon,this.isExpanded===!0),this.hasIndeterminateExpandState&&(0,import_core._setDisplayed)(this.eGroupIndeterminateIcon,this.isExpanded===void 0)}onCheckboxChanged(e){this.isSelected=e;const t={type:"selectionChanged",isSelected:e,item:this.item};this.dispatchLocalEvent(t),this.refreshVariableAriaLabels(),this.refreshAriaChecked()}toggleSelected(){this.params.readOnly||this.setSelected(!this.isSelected)}setSelected(e,t){this.isSelected=e,this.eCheckbox.setValue(e,t),this.refreshAriaChecked()}refreshVariableAriaLabels(){if(!this.isTree)return;const e=this.localeService.getLocaleTextFunc(),t=this.eCheckbox.getValue(),s=t===void 0?e("ariaIndeterminate","indeterminate"):t?e("ariaVisible","visible"):e("ariaHidden","hidden"),i=e("ariaToggleVisibility","Press SPACE to toggle visibility");(0,import_core._setAriaLabelledBy)(this.eCheckbox.getInputElement(),void 0),this.eCheckbox.setInputAriaLabel(`${i} (${s})`)}setupFixedAriaLabels(e){if(!this.isTree)return;const s=this.localeService.getLocaleTextFunc()("ariaFilterValue","Filter Value"),i=this.getAriaElement();(0,import_core._setAriaLabel)(i,`${e} ${s}`),(0,import_core._setAriaDescribedBy)(i,this.eCheckbox.getInputElement().id)}refreshAriaChecked(){const e=this.getAriaElement();(0,import_core._setAriaChecked)(e,this.eCheckbox.getValue())}refreshAriaExpanded(){(0,import_core._setAriaExpanded)(this.getAriaElement(),!!this.isExpanded)}refresh(e,t,s){if(this.item=e,t!==this.isSelected&&this.setSelected(t,!0),this.setExpanded(s,!0),this.valueFunction){const i=this.valueFunction();this.setTooltipAndCellRendererParams(i,i),this.cellRendererComponent||this.renderCellWithoutCellRenderer()}if(this.cellRendererComponent&&!this.cellRendererComponent.refresh?.(this.cellRendererParams)){const r=this.cellRendererComponent;this.renderCell(),this.destroyBean(r)}}render(){const{params:{column:e}}=this;let{value:t}=this,s=null;typeof t=="function"?(this.valueFunction=t,s=this.valueFunction(),t=s):this.isTree?s=(0,import_core._toStringOrNull)(t):s=this.getFormattedValue(e,t),this.setTooltipAndCellRendererParams(t,s),this.renderCell()}setTooltipAndCellRendererParams(e,t){const s=this.gos.get("tooltipShowMode")==="whenTruncated";if(this.params.showTooltips&&(!s||!this.params.cellRenderer)){const i=t??(0,import_core._toStringOrNull)(e);let r;s&&(r=()=>{const l=this.eCheckbox.getGui().querySelector(".ag-label");return l?l.scrollWidth>l.clientWidth:!0}),this.setTooltip({newTooltipText:i,location:"setFilterValue",getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,shouldDisplayTooltip:r})}this.cellRendererParams=this.gos.addGridCommonParams({value:e,valueFormatted:t,colDef:this.params.colDef,column:this.params.column,setTooltip:(i,r)=>{this.setTooltip({newTooltipText:i,getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,location:"setFilterValue",shouldDisplayTooltip:r})}})}getTooltipParams(){const e=super.getTooltipParams();return e.location="setFilterValue",e.colDef=this.getComponentHolder(),this.isTree&&(e.level=this.depth),e}getFormattedValue(e,t){return this.valueService.formatValue(e,null,t,this.valueFormatter,!1)}renderCell(){const e=this.userComponentFactory.getSetFilterCellRendererDetails(this.params,this.cellRendererParams),t=e?e.newAgStackInstance():void 0;if(t==null){this.renderCellWithoutCellRenderer();return}t.then(s=>{s&&(this.cellRendererComponent=s,this.eCheckbox.setLabel(s.getGui()),this.destroyCellRendererComponent=()=>this.destroyBean(s))})}renderCellWithoutCellRenderer(){let e=(this.cellRendererParams.valueFormatted==null?this.cellRendererParams.value:this.cellRendererParams.valueFormatted)??this.translate("blanks");typeof e!="string"&&((0,import_core._warnOnce)(`Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects. See ${this.getFrameworkOverrides().getDocLink("filter-set-filter-list/#filter-value-types")}`),e=""),this.eCheckbox.setLabel(e),this.setupFixedAriaLabels(e)}getComponentHolder(){return this.params.column.getColDef()}},SetFilterModelFormatter=class{getModelAsString(e,t){const{values:s}=e||t.getModel()||{},i=t.getValueModel();if(s==null||i==null)return"";const r=s.filter(n=>i.isKeyAvailable(n)),l=r.length,a=r.slice(0,10).map(n=>t.getFormattedValue(n));return`(${l}) ${a.join(",")}${l>10?",...":""}`}},import_core2=require("@ag-grid-community/core");function processDataPath(e,t,s){let i=e;return i?(i=i.map(r=>(0,import_core2._toStringOrNull)((0,import_core2._makeNull)(r))),!t&&s&&i.some(r=>r==null)?(0,import_core2._last)(i)==null?null:i.filter(r=>r!=null):i):null}var import_core5=require("@ag-grid-community/core"),import_core3=require("@ag-grid-community/core"),ClientSideValuesExtractor=class{constructor(e,t,s,i,r,l,a,n,o,h,d){this.rowModel=e,this.filterParams=t,this.createKey=s,this.caseFormat=i,this.funcColsService=r,this.valueService=l,this.treeDataOrGrouping=a,this.treeData=n,this.getDataPath=o,this.groupAllowUnbalanced=h,this.addManagedEventListeners=d}extractUniqueValuesAsync(e,t){return new import_core3.AgPromise(s=>{if(this.rowModel.isRowDataLoaded())s(this.extractUniqueValues(e,t));else{const[i]=this.addManagedEventListeners({rowCountReady:()=>{i?.(),s(this.extractUniqueValues(e,t))}})}})}extractUniqueValues(e,t){const s=new Map,i=this.extractExistingFormattedKeys(t),r=new Set,l=this.treeData&&!!this.getDataPath,a=this.funcColsService.getRowGroupColumns(),n=(o,h)=>{const d=this.caseFormat(o);if(!r.has(d)){r.add(d);let u=o,p=(0,import_core3._makeNull)(h);const c=i?.get(d);c!=null&&(u=c,p=t.get(c)),s.set(u,p)}};return this.rowModel.forEachLeafNode(o=>{if(!o.data||!e(o))return;if(this.treeDataOrGrouping){this.addValueForTreeDataOrGrouping(o,l,a,n);return}const h=this.getValue(o);h!=null&&Array.isArray(h)?(h.forEach(d=>{n(this.createKey(d,o),d)}),h.length===0&&n(null,null)):n(this.createKey(h,o),h)}),s}addValueForTreeDataOrGrouping(e,t,s,i){let r;if(t){if(e.childrenAfterGroup?.length)return;r=this.getDataPath(e.data)}else r=s.map(a=>this.valueService.getKeyForNode(a,e)),r.push(this.getValue(e));const l=processDataPath(r,t,this.groupAllowUnbalanced);i(this.createKey(l),l)}getValue(e){return this.filterParams.getValue(e)}extractExistingFormattedKeys(e){if(!e)return null;const t=new Map;return e.forEach((s,i)=>{t.set(this.caseFormat(i),i)}),t}},SetValueModelFilteringKeys=class{constructor({caseFormat:e}){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1,this.caseFormat=e}allFilteringKeys(){return this.filteringKeys}allFilteringKeysCaseFormatted(){return this.filteringKeysCaseFormatted}noAppliedFilteringKeys(){return this.hasNoAppliedFilteringKeys}setFilteringKeys(e){this.filteringKeys=new Set(e),this.hasNoAppliedFilteringKeys=!this.filteringKeys||this.filteringKeys.size===0,this.filteringKeysCaseFormatted=new Set,this.filteringKeys.forEach(t=>this.filteringKeysCaseFormatted.add(this.caseFormat(t)))}addFilteringKey(e){this.filteringKeys==null&&(this.filteringKeys=new Set,this.filteringKeysCaseFormatted=new Set),this.filteringKeys.add(e),this.filteringKeysCaseFormatted.add(this.caseFormat(e)),this.hasNoAppliedFilteringKeys&&(this.hasNoAppliedFilteringKeys=!1)}hasCaseFormattedFilteringKey(e){return this.filteringKeysCaseFormatted.has(this.caseFormat(e))}hasFilteringKey(e){return this.filteringKeys.has(e)}reset(){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1}},FlatSetDisplayValueModel=class{constructor(e,t,s,i){this.valueService=e,this.valueFormatter=t,this.formatter=s,this.column=i,this.displayedKeys=[]}updateDisplayedValuesToAllAvailable(e,t,s){this.displayedKeys=Array.from(s)}updateDisplayedValuesToMatchMiniFilter(e,t,s,i,r){this.displayedKeys=[];for(const l of s)if(l==null)r&&this.displayedKeys.push(l);else{const a=e(l),n=this.valueService.formatValue(this.column,null,a,this.valueFormatter,!1),o=this.formatter(n);i(o)&&this.displayedKeys.push(l)}}getDisplayedValueCount(){return this.displayedKeys.length}getDisplayedItem(e){return this.displayedKeys[e]}getSelectAllItem(){return SetFilterDisplayValue.SELECT_ALL}getAddSelectionToFilterItem(){return SetFilterDisplayValue.ADD_SELECTION_TO_FILTER}getDisplayedKeys(){return this.displayedKeys}forEachDisplayedKey(e){this.displayedKeys.forEach(e)}someDisplayedKey(e){return this.displayedKeys.some(e)}hasGroups(){return!1}refresh(){}},import_core4=require("@ag-grid-community/core"),DATE_TREE_LIST_PATH_GETTER=e=>e?[String(e.getFullYear()),String(e.getMonth()+1),String(e.getDate())]:null,TreeSetDisplayValueModel=class{constructor(e,t,s,i){this.formatter=e,this.treeListPathGetter=t,this.treeListFormatter=s,this.treeDataOrGrouping=i,this.allDisplayedItemsTree=[],this.activeDisplayedItemsFlat=[],this.selectAllItem={depth:0,filterPasses:!0,available:!0,treeKey:SetFilterDisplayValue.SELECT_ALL,children:this.allDisplayedItemsTree,expanded:!0,key:SetFilterDisplayValue.SELECT_ALL,parentTreeKeys:[]},this.addSelectionToFilterItem={depth:0,filterPasses:!0,available:!0,treeKey:SetFilterDisplayValue.ADD_SELECTION_TO_FILTER,expanded:!0,key:SetFilterDisplayValue.ADD_SELECTION_TO_FILTER,parentTreeKeys:[]}}updateDisplayedValuesToAllAvailable(e,t,s,i){i==="reload"?this.generateItemTree(e,t,s):i==="otherFilter"?(this.updateAvailable(s),this.updateExpandAll()):i==="miniFilter"&&(this.resetFilter(),this.updateExpandAll()),this.flattenItems()}updateDisplayedValuesToMatchMiniFilter(e,t,s,i,r,l){l==="reload"?this.generateItemTree(e,t,s):l==="otherFilter"&&this.updateAvailable(s),this.updateFilter(i,r),this.updateExpandAll(),this.flattenItems()}generateItemTree(e,t,s){this.allDisplayedItemsTree=[],this.groupsExist=!1;const i=this.getTreeListPathGetter(e,s);for(const r of t){const l=e(r),a=i(l)??[null];a.length>1&&(this.groupsExist=!0);const n=s.has(r);let o=this.allDisplayedItemsTree,h,d=[];a.forEach((u,p)=>{o||(o=[],h.children=o),h=o.find(c=>c.treeKey?.toUpperCase()===u?.toUpperCase()),h||(h={treeKey:u,depth:p,filterPasses:!0,expanded:!1,available:n,parentTreeKeys:d},p===a.length-1&&(h.key=r),o.push(h)),o=h.children,d=[...d,u]})}this.updateAvailable(s),this.selectAllItem.children=this.allDisplayedItemsTree,this.selectAllItem.expanded=!1}getTreeListPathGetter(e,t){if(this.treeListPathGetter)return this.treeListPathGetter;if(this.treeDataOrGrouping)return i=>i;let s=!1;for(const i of t){const r=e(i);if(r instanceof Date){s=!0;break}else if(r!=null)break}return s?DATE_TREE_LIST_PATH_GETTER:((0,import_core4._warnOnce)("property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date."),i=>[String(i)])}flattenItems(){this.activeDisplayedItemsFlat=[];const e=t=>{t.forEach(s=>{!s.filterPasses||!s.available||(this.activeDisplayedItemsFlat.push(s),s.children&&s.expanded&&e(s.children))})};e(this.allDisplayedItemsTree)}resetFilter(){const e=t=>{t.children&&t.children.forEach(s=>{e(s)}),t.filterPasses=!0};this.allDisplayedItemsTree.forEach(t=>e(t))}updateFilter(e,t){const s=i=>i.available?i.treeKey==null?t:e(this.formatter(this.treeListFormatter?this.treeListFormatter(i.treeKey,i.depth,i.parentTreeKeys):i.treeKey)):!1;this.allDisplayedItemsTree.forEach(i=>this.recursiveItemCheck(i,!1,s,"filterPasses"))}getDisplayedValueCount(){return this.activeDisplayedItemsFlat.length}getDisplayedItem(e){return this.activeDisplayedItemsFlat[e]}getSelectAllItem(){return this.selectAllItem}getAddSelectionToFilterItem(){return this.addSelectionToFilterItem}getDisplayedKeys(){const e=[];return this.forEachDisplayedKey(t=>e.push(t)),e}forEachDisplayedKey(e){const t=(s,i)=>{s.children?(!s.expanded||!i)&&s.children.forEach(r=>{r.filterPasses&&t(r,!1)}):e(s.key)};this.activeDisplayedItemsFlat.forEach(s=>t(s,!0))}someDisplayedKey(e){const t=(s,i)=>{if(s.children){if(!s.expanded||!i)return s.children.some(r=>r.filterPasses?t(r,!1):!1)}else return e(s.key);return!1};return this.activeDisplayedItemsFlat.some(s=>t(s,!0))}hasGroups(){return this.groupsExist}refresh(){this.updateExpandAll(),this.flattenItems()}updateExpandAll(){const e=(s,i,r)=>{for(const l of s){if(!l.filterPasses||!l.available||!l.children)continue;if(i=i||!!l.expanded,r=r||!l.expanded,i&&r)return;const a=e(l.children,i,r);if(a===void 0)return;a?i=!0:r=!0}return i&&r?void 0:i},t=this.getSelectAllItem();t.expanded=e(t.children,!1,!1)}recursiveItemCheck(e,t,s,i){let r=!1;e.children&&e.children.forEach(a=>{const n=this.recursiveItemCheck(a,t||s(e),s,i);r=r||n});const l=t||r||s(e);return e[i]=l,l}updateAvailable(e){const t=s=>e.has(s.key);this.allDisplayedItemsTree.forEach(s=>this.recursiveItemCheck(s,!1,t,"available"))}},SetValueModel=class{constructor(e){this.localEventService=new import_core5.LocalEventService,this.miniFilterText=null,this.addCurrentSelectionToFilter=!1,this.providedValues=null,this.allValues=new Map,this.availableKeys=new Set,this.selectedKeys=new Set,this.initialised=!1;const{usingComplexObjects:t,funcColsService:s,valueService:i,treeDataTreeList:r,groupingTreeList:l,filterParams:a,gos:n,valueFormatter:o,addManagedEventListeners:h}=e,{column:d,colDef:u,textFormatter:p,doesRowPassOtherFilter:c,suppressSorting:m,comparator:E,rowModel:C,values:y,caseSensitive:V,treeList:v,treeListPathGetter:F,treeListFormatter:L}=a;this.filterParams=a,this.gos=n,this.setIsLoading=e.setIsLoading,this.translate=e.translate,this.caseFormat=e.caseFormat,this.createKey=e.createKey,this.usingComplexObjects=!!e.usingComplexObjects,this.formatter=p??(g=>g??null),this.doesRowPassOtherFilters=c,this.suppressSorting=m||!1,this.filteringKeys=new SetValueModelFilteringKeys({caseFormat:this.caseFormat});const f=E??u.comparator,S=!!r||!!l;this.compareByValue=!!(t&&f||S||v&&!F),S&&!f?this.entryComparator=this.createTreeDataOrGroupingComparator():v&&!F&&!f?this.entryComparator=([g,M],[K,A])=>(0,import_core5._defaultComparator)(M,A):this.entryComparator=([g,M],[K,A])=>f(M,A),this.keyComparator=f??import_core5._defaultComparator,this.caseSensitive=!!V;const T=n.get("getDataPath"),w=n.get("groupAllowUnbalanced");C.getType()==="clientSide"&&(this.clientSideValuesExtractor=new ClientSideValuesExtractor(C,this.filterParams,this.createKey,this.caseFormat,s,i,S,!!r,T,w,h)),y==null?this.valuesType=2:(this.valuesType=Array.isArray(y)?0:1,this.providedValues=y),this.displayValueModel=v?new TreeSetDisplayValueModel(this.formatter,F,L,r||l):new FlatSetDisplayValueModel(i,o,this.formatter,d),this.updateAllValues().then(g=>this.resetSelectionState(g||[]))}addEventListener(e,t,s){this.localEventService.addEventListener(e,t,s)}removeEventListener(e,t,s){this.localEventService.removeEventListener(e,t,s)}updateOnParamsChange(e){return new import_core5.AgPromise(t=>{const{values:s,textFormatter:i,suppressSorting:r}=e,l=this.providedValues,a=this.suppressSorting;if(this.filterParams=e,this.formatter=i??(n=>n??null),this.suppressSorting=r||!1,this.providedValues=s??null,this.providedValues!==l||this.suppressSorting!==a){!s||s.length===0?(this.valuesType=2,this.providedValues=null):this.valuesType=Array.isArray(s)?0:1;const n=this.getModel();this.updateAllValues().then(()=>{this.setModel(n).then(()=>t())})}else t()})}refreshValues(){return new import_core5.AgPromise(e=>{this.allValuesPromise.then(()=>{const t=this.getModel();this.updateAllValues(),this.setModel(t).then(()=>e())})})}overrideValues(e){return new import_core5.AgPromise(t=>{this.allValuesPromise.then(()=>{this.valuesType=0,this.providedValues=e,this.refreshValues().then(()=>t())})})}refreshAfterAnyFilterChanged(){return this.showAvailableOnly()?this.allValuesPromise.then(e=>(this.updateAvailableKeys(e??[],"otherFilter"),!0)):import_core5.AgPromise.resolve(!1)}isInitialised(){return this.initialised}updateAllValues(){return this.allValuesPromise=new import_core5.AgPromise(e=>{switch(this.valuesType){case 2:this.getValuesFromRowsAsync(!1).then(t=>e(this.processAllValues(t)));break;case 0:{e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(this.providedValues))));break}case 1:{this.setIsLoading(!0);const t=this.providedValues,{column:s,colDef:i}=this.filterParams,r=this.gos.addGridCommonParams({success:l=>{this.setIsLoading(!1),e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(l))))},colDef:i,column:s});window.setTimeout(()=>t(r),0);break}default:throw new Error("Unrecognised valuesType")}}),this.allValuesPromise.then(e=>this.updateAvailableKeys(e||[],"reload")).then(()=>this.initialised=!0),this.allValuesPromise}processAllValues(e){const t=this.sortKeys(e);return this.allValues=e??new Map,t}validateProvidedValues(e){if(this.usingComplexObjects&&e?.length){const t=e[0];t&&typeof t!="object"&&typeof t!="function"&&(this.createKey(t)==null?(0,import_core5._warnOnce)("Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See https://www.ag-grid.com/javascript-data-grid/filter-set-filter-list/#filter-value-types"):(0,import_core5._warnOnce)("Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?"))}return e}setValuesType(e){this.valuesType=e}getValuesType(){return this.valuesType}isKeyAvailable(e){return this.availableKeys.has(e)}showAvailableOnly(){return this.valuesType===2}updateAvailableKeys(e,t){const s=this.showAvailableOnly()?this.sortKeys(this.getValuesFromRows(!0)):e;this.availableKeys=new Set(s),this.localEventService.dispatchEvent({type:"availableValuesChanged"}),this.updateDisplayedValues(t,e)}sortKeys(e){const t=e??new Map;if(this.suppressSorting)return Array.from(t.keys());let s;return this.compareByValue?s=Array.from(t.entries()).sort(this.entryComparator).map(([i])=>i):s=Array.from(t.keys()).sort(this.keyComparator),this.filterParams.excelMode&&t.has(null)&&(s=s.filter(i=>i!=null),s.push(null)),s}getParamsForValuesFromRows(e=!1){if(!this.clientSideValuesExtractor)return(0,import_core5._errorOnce)("Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values"),null;const t=i=>!e||this.doesRowPassOtherFilters(i),s=e&&!this.caseSensitive?this.allValues:void 0;return{predicate:t,existingValues:s}}getValuesFromRows(e=!1){const t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValues(t.predicate,t.existingValues):null}getValuesFromRowsAsync(e=!1){const t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValuesAsync(t.predicate,t.existingValues):import_core5.AgPromise.resolve(null)}setMiniFilter(e){return e=(0,import_core5._makeNull)(e),this.miniFilterText===e?!1:(e===null&&this.setAddCurrentSelectionToFilter(!1),this.miniFilterText=e,this.updateDisplayedValues("miniFilter"),!0)}getMiniFilter(){return this.miniFilterText}updateDisplayedValues(e,t){if(e==="expansion"){this.displayValueModel.refresh();return}if(this.miniFilterText==null){this.displayValueModel.updateDisplayedValuesToAllAvailable(l=>this.getValue(l),t,this.availableKeys,e);return}const s=this.caseFormat(this.formatter(this.miniFilterText)||""),i=l=>l!=null&&this.caseFormat(l).indexOf(s)>=0,r=!!this.filterParams.excelMode&&i(this.translate("blanks"));this.displayValueModel.updateDisplayedValuesToMatchMiniFilter(l=>this.getValue(l),t,this.availableKeys,i,r,e)}getDisplayedValueCount(){return this.displayValueModel.getDisplayedValueCount()}getDisplayedItem(e){return this.displayValueModel.getDisplayedItem(e)}getSelectAllItem(){return this.displayValueModel.getSelectAllItem()}getAddSelectionToFilterItem(){return this.displayValueModel.getAddSelectionToFilterItem()}hasSelections(){return this.filterParams.defaultToNothingSelected?this.selectedKeys.size>0:this.allValues.size!==this.selectedKeys.size}getKeys(){return Array.from(this.allValues.keys())}getValues(){return Array.from(this.allValues.values())}getValue(e){return this.allValues.get(e)}setAddCurrentSelectionToFilter(e){this.addCurrentSelectionToFilter=e}isInWindowsExcelMode(){return this.filterParams.excelMode==="windows"}isAddCurrentSelectionToFilterChecked(){return this.isInWindowsExcelMode()&&this.addCurrentSelectionToFilter}showAddCurrentSelectionToFilter(){return this.isInWindowsExcelMode()&&(0,import_core5._exists)(this.miniFilterText)&&this.miniFilterText.length>0}selectAllMatchingMiniFilter(e=!1){this.miniFilterText==null?this.selectedKeys=new Set(this.allValues.keys()):(e&&this.selectedKeys.clear(),this.displayValueModel.forEachDisplayedKey(t=>this.selectedKeys.add(t)))}deselectAllMatchingMiniFilter(){this.miniFilterText==null?this.selectedKeys.clear():this.displayValueModel.forEachDisplayedKey(e=>this.selectedKeys.delete(e))}selectKey(e){this.selectedKeys.add(e)}deselectKey(e){this.filterParams.excelMode&&this.isEverythingVisibleSelected()&&this.resetSelectionState(this.displayValueModel.getDisplayedKeys()),this.selectedKeys.delete(e)}isKeySelected(e){return this.selectedKeys.has(e)}isEverythingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>!this.isKeySelected(e))}isNothingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>this.isKeySelected(e))}getModel(){if(!this.hasSelections())return null;const e=this.isAddCurrentSelectionToFilterChecked()?this.filteringKeys.allFilteringKeys():null;if(e&&e.size>0){if(this.selectedKeys){const t=new Set([...Array.from(e),...Array.from(this.selectedKeys).filter(s=>!e.has(s))]);return Array.from(t)}return Array.from(e)}return Array.from(this.selectedKeys)}setModel(e){return this.allValuesPromise.then(t=>{if(e==null)this.resetSelectionState(t??[]);else{this.selectedKeys.clear();const s=new Map;this.allValues.forEach((i,r)=>{s.set(this.caseFormat(r),r)}),e.forEach(i=>{const r=this.caseFormat((0,import_core5._makeNull)(i)),l=s.get(r);l!==void 0&&this.selectKey(l)})}})}uniqueValues(e){const t=new Map,s=new Set;return(e??[]).forEach(i=>{const r=(0,import_core5._makeNull)(i),l=this.createKey(r),a=this.caseFormat(l);s.has(a)||(s.add(a),t.set(l,r))}),t}resetSelectionState(e){this.filterParams.defaultToNothingSelected?this.selectedKeys.clear():this.selectedKeys=new Set(e)}hasGroups(){return this.displayValueModel.hasGroups()}createTreeDataOrGroupingComparator(){return([e,t],[s,i])=>{if(t==null)return i==null?0:-1;if(i==null)return 1;for(let r=0;r<t.length;r++){if(r>=i.length)return 1;const l=(0,import_core5._defaultComparator)(t[r],i[r]);if(l!==0)return l}return 0}}setAppliedModelKeys(e){this.filteringKeys.setFilteringKeys(e)}addToAppliedModelKeys(e){this.filteringKeys.addFilteringKey(e)}getAppliedModelKeys(){return this.filteringKeys.allFilteringKeys()}getCaseFormattedAppliedModelKeys(){return this.filteringKeys.allFilteringKeysCaseFormatted()}hasAppliedModelKey(e){return this.filteringKeys.hasCaseFormattedFilteringKey(e)}hasAnyAppliedModelKey(){return!this.filteringKeys.noAppliedFilteringKeys()}},SetFilter=class extends import_core6.ProvidedFilter{constructor(){super("setFilter"),this.eMiniFilter=import_core6.RefPlaceholder,this.eFilterLoading=import_core6.RefPlaceholder,this.eSetFilterList=import_core6.RefPlaceholder,this.eFilterNoMatches=import_core6.RefPlaceholder,this.valueModel=null,this.setFilterParams=null,this.virtualList=null,this.caseSensitive=!1,this.treeDataTreeList=!1,this.groupingTreeList=!1,this.hardRefreshVirtualList=!1,this.noValueFormatterSupplied=!1,this.filterModelFormatter=new SetFilterModelFormatter,this.updateSetFilterOnParamsChange=e=>{this.setFilterParams=e,this.caseSensitive=!!e.caseSensitive;const t=e.keyCreator??e.colDef.keyCreator;this.setValueFormatter(e.valueFormatter,t,!!e.treeList,!!e.colDef.refData);const s=e.column.getId().startsWith(import_core6.GROUP_AUTO_COLUMN_ID);this.treeDataTreeList=this.gos.get("treeData")&&!!e.treeList&&s,this.getDataPath=this.gos.get("getDataPath"),this.groupingTreeList=!!this.funcColsService.getRowGroupColumns().length&&!!e.treeList&&s,this.createKey=this.generateCreateKey(t,this.treeDataTreeList||this.groupingTreeList)}}wireBeans(e){super.wireBeans(e),this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.dataTypeService=e.dataTypeService}postConstruct(){super.postConstruct()}updateUiVisibility(){}createBodyTemplate(){return`
</div>`,[import_core.AgCheckboxSelector]),this.eCheckbox=import_core.RefPlaceholder,this.eGroupOpenedIcon=import_core.RefPlaceholder,this.eGroupClosedIcon=import_core.RefPlaceholder,this.eGroupIndeterminateIcon=import_core.RefPlaceholder,this.focusWrapper=e.focusWrapper,this.value=e.value,this.params=e.params,this.translate=e.translate,this.valueFormatter=e.valueFormatter,this.item=e.item,this.isSelected=e.isSelected,this.isTree=e.isTree,this.depth=e.depth??0,this.isGroup=e.isGroup,this.groupsExist=e.groupsExist,this.isExpanded=e.isExpanded,this.hasIndeterminateExpandState=e.hasIndeterminateExpandState}wireBeans(e){this.valueService=e.valueService,this.userComponentFactory=e.userComponentFactory}postConstruct(){this.addDestroyFunc(()=>this.destroyCellRendererComponent?.()),this.render(),this.eCheckbox.setLabelEllipsis(!0).setValue(this.isSelected,!0).setDisabled(!!this.params.readOnly).getInputElement().setAttribute("tabindex","-1"),this.refreshVariableAriaLabels(),this.isTree&&(this.depth>0&&(this.addCssClass("ag-set-filter-indent-"+this.depth),this.getGui().style.setProperty("--ag-indentation-level",String(this.depth))),this.isGroup?this.setupExpansion():this.groupsExist&&this.addCssClass("ag-set-filter-add-group-indent"),(0,import_core._setAriaLevel)(this.getAriaElement(),this.depth+1)),this.refreshAriaChecked(),!this.params.readOnly&&this.eCheckbox.onValueChange(e=>this.onCheckboxChanged(!!e))}getFocusableElement(){return this.focusWrapper}setupExpansion(){this.eGroupClosedIcon.appendChild((0,import_core._createIcon)("setFilterGroupClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild((0,import_core._createIcon)("setFilterGroupOpen",this.gos,null));const e=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(this.eGroupClosedIcon,{click:e}),this.addManagedElementListeners(this.eGroupOpenedIcon,{click:e}),this.hasIndeterminateExpandState&&(this.eGroupIndeterminateIcon.appendChild((0,import_core._createIcon)("setFilterGroupIndeterminate",this.gos,null)),this.addManagedElementListeners(this.eGroupIndeterminateIcon,{click:e})),this.setExpandedIcons(),this.refreshAriaExpanded()}onExpandOrContractClicked(){this.setExpanded(!this.isExpanded)}setExpanded(e,t){if(this.isGroup&&e!==this.isExpanded){this.isExpanded=e;const s={type:"expandedChanged",isExpanded:!!e,item:this.item};t||this.dispatchLocalEvent(s),this.setExpandedIcons(),this.refreshAriaExpanded()}}setExpandedIcons(){(0,import_core._setDisplayed)(this.eGroupClosedIcon,this.hasIndeterminateExpandState?this.isExpanded===!1:!this.isExpanded),(0,import_core._setDisplayed)(this.eGroupOpenedIcon,this.isExpanded===!0),this.hasIndeterminateExpandState&&(0,import_core._setDisplayed)(this.eGroupIndeterminateIcon,this.isExpanded===void 0)}onCheckboxChanged(e){this.isSelected=e;const t={type:"selectionChanged",isSelected:e,item:this.item};this.dispatchLocalEvent(t),this.refreshVariableAriaLabels(),this.refreshAriaChecked()}toggleSelected(){this.params.readOnly||this.setSelected(!this.isSelected)}setSelected(e,t){this.isSelected=e,this.eCheckbox.setValue(e,t),this.refreshAriaChecked()}refreshVariableAriaLabels(){if(!this.isTree)return;const e=this.localeService.getLocaleTextFunc(),t=this.eCheckbox.getValue(),s=t===void 0?e("ariaIndeterminate","indeterminate"):t?e("ariaVisible","visible"):e("ariaHidden","hidden"),i=e("ariaToggleVisibility","Press SPACE to toggle visibility");(0,import_core._setAriaLabelledBy)(this.eCheckbox.getInputElement(),void 0),this.eCheckbox.setInputAriaLabel(`${i} (${s})`)}setupFixedAriaLabels(e){if(!this.isTree)return;const s=this.localeService.getLocaleTextFunc()("ariaFilterValue","Filter Value"),i=this.getAriaElement();(0,import_core._setAriaLabel)(i,`${e} ${s}`),(0,import_core._setAriaDescribedBy)(i,this.eCheckbox.getInputElement().id)}refreshAriaChecked(){const e=this.getAriaElement();(0,import_core._setAriaChecked)(e,this.eCheckbox.getValue())}refreshAriaExpanded(){(0,import_core._setAriaExpanded)(this.getAriaElement(),!!this.isExpanded)}refresh(e,t,s){if(this.item=e,t!==this.isSelected&&this.setSelected(t,!0),this.setExpanded(s,!0),this.valueFunction){const i=this.valueFunction();this.setTooltipAndCellRendererParams(i,i),this.cellRendererComponent||this.renderCellWithoutCellRenderer()}if(this.cellRendererComponent&&!this.cellRendererComponent.refresh?.(this.cellRendererParams)){const r=this.cellRendererComponent;this.renderCell(),this.destroyBean(r)}}render(){const{params:{column:e}}=this;let{value:t}=this,s=null;typeof t=="function"?(this.valueFunction=t,s=this.valueFunction(),t=s):this.isTree?s=(0,import_core._toStringOrNull)(t):s=this.getFormattedValue(e,t),this.setTooltipAndCellRendererParams(t,s),this.renderCell()}setTooltipAndCellRendererParams(e,t){const s=this.gos.get("tooltipShowMode")==="whenTruncated";if(this.params.showTooltips&&(!s||!this.params.cellRenderer)){const i=t??(0,import_core._toStringOrNull)(e);let r;s&&(r=()=>{const l=this.eCheckbox.getGui().querySelector(".ag-label");return l?l.scrollWidth>l.clientWidth:!0}),this.setTooltip({newTooltipText:i,location:"setFilterValue",getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,shouldDisplayTooltip:r})}this.cellRendererParams=this.gos.addGridCommonParams({value:e,valueFormatted:t,colDef:this.params.colDef,column:this.params.column,setTooltip:(i,r)=>{this.setTooltip({newTooltipText:i,getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,location:"setFilterValue",shouldDisplayTooltip:r})}})}getTooltipParams(){const e=super.getTooltipParams();return e.location="setFilterValue",e.colDef=this.getComponentHolder(),this.isTree&&(e.level=this.depth),e}getFormattedValue(e,t){return this.valueService.formatValue(e,null,t,this.valueFormatter,!1)}renderCell(){const e=this.userComponentFactory.getSetFilterCellRendererDetails(this.params,this.cellRendererParams),t=e?e.newAgStackInstance():void 0;if(t==null){this.renderCellWithoutCellRenderer();return}t.then(s=>{s&&(this.cellRendererComponent=s,this.eCheckbox.setLabel(s.getGui()),this.destroyCellRendererComponent=()=>this.destroyBean(s))})}renderCellWithoutCellRenderer(){let e=(this.cellRendererParams.valueFormatted==null?this.cellRendererParams.value:this.cellRendererParams.valueFormatted)??this.translate("blanks");typeof e!="string"&&((0,import_core._warnOnce)(`Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects. See ${this.getFrameworkOverrides().getDocLink("filter-set-filter-list/#filter-value-types")}`),e=""),this.eCheckbox.setLabel(e),this.setupFixedAriaLabels(e)}getComponentHolder(){return this.params.column.getColDef()}},SetFilterModelFormatter=class{getModelAsString(e,t){const{values:s}=e||t.getModel()||{},i=t.getValueModel();if(s==null||i==null)return"";const r=s.filter(o=>i.isKeyAvailable(o)),l=r.length,a=r.slice(0,10).map(o=>t.getFormattedValue(o));return`(${l}) ${a.join(",")}${l>10?",...":""}`}},import_core2=require("@ag-grid-community/core");function processDataPath(e,t,s){let i=e;return i?(i=i.map(r=>(0,import_core2._toStringOrNull)((0,import_core2._makeNull)(r))),!t&&s&&i.some(r=>r==null)?(0,import_core2._last)(i)==null?null:i.filter(r=>r!=null):i):null}var import_core5=require("@ag-grid-community/core"),import_core3=require("@ag-grid-community/core"),ClientSideValuesExtractor=class{constructor(e,t,s,i,r,l,a,o,n,h,d){this.rowModel=e,this.filterParams=t,this.createKey=s,this.caseFormat=i,this.funcColsService=r,this.valueService=l,this.treeDataOrGrouping=a,this.treeData=o,this.getDataPath=n,this.groupAllowUnbalanced=h,this.addManagedEventListeners=d}extractUniqueValuesAsync(e,t){return new import_core3.AgPromise(s=>{if(this.rowModel.isRowDataLoaded())s(this.extractUniqueValues(e,t));else{const[i]=this.addManagedEventListeners({rowCountReady:()=>{i?.(),s(this.extractUniqueValues(e,t))}})}})}extractUniqueValues(e,t){const s=new Map,i=this.extractExistingFormattedKeys(t),r=new Set,l=this.treeData&&!!this.getDataPath,a=this.funcColsService.getRowGroupColumns(),o=(n,h)=>{const d=this.caseFormat(n);if(!r.has(d)){r.add(d);let u=n,p=(0,import_core3._makeNull)(h);const c=i?.get(d);c!=null&&(u=c,p=t.get(c)),s.set(u,p)}};return this.rowModel.forEachLeafNode(n=>{if(!n.data||!e(n))return;if(this.treeDataOrGrouping){this.addValueForTreeDataOrGrouping(n,l,a,o);return}const h=this.getValue(n);h!=null&&Array.isArray(h)?(h.forEach(d=>{o(this.createKey(d,n),d)}),h.length===0&&o(null,null)):o(this.createKey(h,n),h)}),s}addValueForTreeDataOrGrouping(e,t,s,i){let r;if(t){if(e.childrenAfterGroup?.length)return;r=this.getDataPath(e.data)}else r=s.map(a=>this.valueService.getKeyForNode(a,e)),r.push(this.getValue(e));const l=processDataPath(r,t,this.groupAllowUnbalanced);i(this.createKey(l),l)}getValue(e){return this.filterParams.getValue(e)}extractExistingFormattedKeys(e){if(!e)return null;const t=new Map;return e.forEach((s,i)=>{t.set(this.caseFormat(i),i)}),t}},SetValueModelFilteringKeys=class{constructor({caseFormat:e}){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1,this.caseFormat=e}allFilteringKeys(){return this.filteringKeys}allFilteringKeysCaseFormatted(){return this.filteringKeysCaseFormatted}noAppliedFilteringKeys(){return this.hasNoAppliedFilteringKeys}setFilteringKeys(e){this.filteringKeys=new Set(e),this.hasNoAppliedFilteringKeys=!this.filteringKeys||this.filteringKeys.size===0,this.filteringKeysCaseFormatted=new Set,this.filteringKeys.forEach(t=>this.filteringKeysCaseFormatted.add(this.caseFormat(t)))}addFilteringKey(e){this.filteringKeys==null&&(this.filteringKeys=new Set,this.filteringKeysCaseFormatted=new Set),this.filteringKeys.add(e),this.filteringKeysCaseFormatted.add(this.caseFormat(e)),this.hasNoAppliedFilteringKeys&&(this.hasNoAppliedFilteringKeys=!1)}hasCaseFormattedFilteringKey(e){return this.filteringKeysCaseFormatted.has(this.caseFormat(e))}hasFilteringKey(e){return this.filteringKeys.has(e)}reset(){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1}},FlatSetDisplayValueModel=class{constructor(e,t,s,i){this.valueService=e,this.valueFormatter=t,this.formatter=s,this.column=i,this.displayedKeys=[]}updateDisplayedValuesToAllAvailable(e,t,s){this.displayedKeys=Array.from(s)}updateDisplayedValuesToMatchMiniFilter(e,t,s,i,r){this.displayedKeys=[];for(const l of s)if(l==null)r&&this.displayedKeys.push(l);else{const a=e(l),o=this.valueService.formatValue(this.column,null,a,this.valueFormatter,!1),n=this.formatter(o);i(n)&&this.displayedKeys.push(l)}}getDisplayedValueCount(){return this.displayedKeys.length}getDisplayedItem(e){return this.displayedKeys[e]}getSelectAllItem(){return SetFilterDisplayValue.SELECT_ALL}getAddSelectionToFilterItem(){return SetFilterDisplayValue.ADD_SELECTION_TO_FILTER}getDisplayedKeys(){return this.displayedKeys}forEachDisplayedKey(e){this.displayedKeys.forEach(e)}someDisplayedKey(e){return this.displayedKeys.some(e)}hasGroups(){return!1}refresh(){}},import_core4=require("@ag-grid-community/core"),DATE_TREE_LIST_PATH_GETTER=e=>e?[String(e.getFullYear()),String(e.getMonth()+1),String(e.getDate())]:null,TreeSetDisplayValueModel=class{constructor(e,t,s,i){this.formatter=e,this.treeListPathGetter=t,this.treeListFormatter=s,this.treeDataOrGrouping=i,this.allDisplayedItemsTree=[],this.activeDisplayedItemsFlat=[],this.selectAllItem={depth:0,filterPasses:!0,available:!0,treeKey:SetFilterDisplayValue.SELECT_ALL,children:this.allDisplayedItemsTree,expanded:!0,key:SetFilterDisplayValue.SELECT_ALL,parentTreeKeys:[]},this.addSelectionToFilterItem={depth:0,filterPasses:!0,available:!0,treeKey:SetFilterDisplayValue.ADD_SELECTION_TO_FILTER,expanded:!0,key:SetFilterDisplayValue.ADD_SELECTION_TO_FILTER,parentTreeKeys:[]}}updateOnParamsChange(e){this.treeListFormatter=e}updateDisplayedValuesToAllAvailable(e,t,s,i){i==="reload"?this.generateItemTree(e,t,s):i==="otherFilter"?(this.updateAvailable(s),this.updateExpandAll()):i==="miniFilter"&&(this.resetFilter(),this.updateExpandAll()),this.flattenItems()}updateDisplayedValuesToMatchMiniFilter(e,t,s,i,r,l){l==="reload"?this.generateItemTree(e,t,s):l==="otherFilter"&&this.updateAvailable(s),this.updateFilter(i,r),this.updateExpandAll(),this.flattenItems()}generateItemTree(e,t,s){this.allDisplayedItemsTree=[],this.groupsExist=!1;const i=this.getTreeListPathGetter(e,s);for(const r of t){const l=e(r),a=i(l)??[null];a.length>1&&(this.groupsExist=!0);const o=s.has(r);let n=this.allDisplayedItemsTree,h,d=[];a.forEach((u,p)=>{n||(n=[],h.children=n),h=n.find(c=>c.treeKey?.toUpperCase()===u?.toUpperCase()),h||(h={treeKey:u,depth:p,filterPasses:!0,expanded:!1,available:o,parentTreeKeys:d},p===a.length-1&&(h.key=r),n.push(h)),n=h.children,d=[...d,u]})}this.updateAvailable(s),this.selectAllItem.children=this.allDisplayedItemsTree,this.selectAllItem.expanded=!1}getTreeListPathGetter(e,t){if(this.treeListPathGetter)return this.treeListPathGetter;if(this.treeDataOrGrouping)return i=>i;let s=!1;for(const i of t){const r=e(i);if(r instanceof Date){s=!0;break}else if(r!=null)break}return s?DATE_TREE_LIST_PATH_GETTER:((0,import_core4._warnOnce)("property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date."),i=>[String(i)])}flattenItems(){this.activeDisplayedItemsFlat=[];const e=t=>{t.forEach(s=>{!s.filterPasses||!s.available||(this.activeDisplayedItemsFlat.push(s),s.children&&s.expanded&&e(s.children))})};e(this.allDisplayedItemsTree)}resetFilter(){const e=t=>{t.children&&t.children.forEach(s=>{e(s)}),t.filterPasses=!0};this.allDisplayedItemsTree.forEach(t=>e(t))}updateFilter(e,t){const s=i=>i.available?i.treeKey==null?t:e(this.formatter(this.treeListFormatter?this.treeListFormatter(i.treeKey,i.depth,i.parentTreeKeys):i.treeKey)):!1;this.allDisplayedItemsTree.forEach(i=>this.recursiveItemCheck(i,!1,s,"filterPasses"))}getDisplayedValueCount(){return this.activeDisplayedItemsFlat.length}getDisplayedItem(e){return this.activeDisplayedItemsFlat[e]}getSelectAllItem(){return this.selectAllItem}getAddSelectionToFilterItem(){return this.addSelectionToFilterItem}getDisplayedKeys(){const e=[];return this.forEachDisplayedKey(t=>e.push(t)),e}forEachDisplayedKey(e){const t=(s,i)=>{s.children?(!s.expanded||!i)&&s.children.forEach(r=>{r.filterPasses&&t(r,!1)}):e(s.key)};this.activeDisplayedItemsFlat.forEach(s=>t(s,!0))}someDisplayedKey(e){const t=(s,i)=>{if(s.children){if(!s.expanded||!i)return s.children.some(r=>r.filterPasses?t(r,!1):!1)}else return e(s.key);return!1};return this.activeDisplayedItemsFlat.some(s=>t(s,!0))}hasGroups(){return this.groupsExist}refresh(){this.updateExpandAll(),this.flattenItems()}updateExpandAll(){const e=(s,i,r)=>{for(const l of s){if(!l.filterPasses||!l.available||!l.children)continue;if(i=i||!!l.expanded,r=r||!l.expanded,i&&r)return;const a=e(l.children,i,r);if(a===void 0)return;a?i=!0:r=!0}return i&&r?void 0:i},t=this.getSelectAllItem();t.expanded=e(t.children,!1,!1)}recursiveItemCheck(e,t,s,i){let r=!1;e.children&&e.children.forEach(a=>{const o=this.recursiveItemCheck(a,t||s(e),s,i);r=r||o});const l=t||r||s(e);return e[i]=l,l}updateAvailable(e){const t=s=>e.has(s.key);this.allDisplayedItemsTree.forEach(s=>this.recursiveItemCheck(s,!1,t,"available"))}},SetValueModel=class{constructor(e){this.localEventService=new import_core5.LocalEventService,this.miniFilterText=null,this.addCurrentSelectionToFilter=!1,this.providedValues=null,this.allValues=new Map,this.availableKeys=new Set,this.selectedKeys=new Set,this.initialised=!1;const{usingComplexObjects:t,funcColsService:s,valueService:i,treeDataTreeList:r,groupingTreeList:l,filterParams:a,gos:o,valueFormatter:n,addManagedEventListeners:h}=e,{column:d,colDef:u,textFormatter:p,doesRowPassOtherFilter:c,suppressSorting:m,comparator:C,rowModel:E,values:y,caseSensitive:V,treeList:v,treeListPathGetter:F,treeListFormatter:L}=a;this.filterParams=a,this.gos=o,this.setIsLoading=e.setIsLoading,this.translate=e.translate,this.caseFormat=e.caseFormat,this.createKey=e.createKey,this.usingComplexObjects=!!e.usingComplexObjects,this.formatter=p??(g=>g??null),this.doesRowPassOtherFilters=c,this.suppressSorting=m||!1,this.filteringKeys=new SetValueModelFilteringKeys({caseFormat:this.caseFormat});const f=C??u.comparator,S=!!r||!!l;this.compareByValue=!!(t&&f||S||v&&!F),S&&!f?this.entryComparator=this.createTreeDataOrGroupingComparator():v&&!F&&!f?this.entryComparator=([g,M],[K,A])=>(0,import_core5._defaultComparator)(M,A):this.entryComparator=([g,M],[K,A])=>f(M,A),this.keyComparator=f??import_core5._defaultComparator,this.caseSensitive=!!V;const T=o.get("getDataPath"),w=o.get("groupAllowUnbalanced");(0,import_core5._isClientSideRowModel)(o)&&(this.clientSideValuesExtractor=new ClientSideValuesExtractor(E,this.filterParams,this.createKey,this.caseFormat,s,i,S,!!r,T,w,h)),y==null?this.valuesType=2:(this.valuesType=Array.isArray(y)?0:1,this.providedValues=y),this.displayValueModel=v?new TreeSetDisplayValueModel(this.formatter,F,L,r||l):new FlatSetDisplayValueModel(i,n,this.formatter,d),this.updateAllValues().then(g=>this.resetSelectionState(g||[]))}addEventListener(e,t,s){this.localEventService.addEventListener(e,t,s)}removeEventListener(e,t,s){this.localEventService.removeEventListener(e,t,s)}updateOnParamsChange(e){return new import_core5.AgPromise(t=>{const{values:s,textFormatter:i,suppressSorting:r,treeListFormatter:l}=e,a=this.providedValues,o=this.suppressSorting;if(this.filterParams=e,this.formatter=i??(n=>n??null),this.suppressSorting=r||!1,this.providedValues=s??null,this.displayValueModel instanceof TreeSetDisplayValueModel&&this.displayValueModel.updateOnParamsChange(l),this.providedValues!==a||this.suppressSorting!==o){!s||s.length===0?(this.valuesType=2,this.providedValues=null):this.valuesType=Array.isArray(s)?0:1;const n=this.getModel();this.updateAllValues().then(()=>{this.setModel(n).then(()=>t())})}else t()})}refreshValues(){return new import_core5.AgPromise(e=>{this.allValuesPromise.then(()=>{const t=this.getModel();this.updateAllValues(),this.setModel(t).then(()=>e())})})}overrideValues(e){return new import_core5.AgPromise(t=>{this.allValuesPromise.then(()=>{this.valuesType=0,this.providedValues=e,this.refreshValues().then(()=>t())})})}refreshAfterAnyFilterChanged(){return this.showAvailableOnly()?this.allValuesPromise.then(e=>(this.updateAvailableKeys(e??[],"otherFilter"),!0)):import_core5.AgPromise.resolve(!1)}isInitialised(){return this.initialised}updateAllValues(){return this.allValuesPromise=new import_core5.AgPromise(e=>{switch(this.valuesType){case 2:this.getValuesFromRowsAsync(!1).then(t=>e(this.processAllValues(t)));break;case 0:{e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(this.providedValues))));break}case 1:{this.setIsLoading(!0);const t=this.providedValues,{column:s,colDef:i}=this.filterParams,r=this.gos.addGridCommonParams({success:l=>{this.setIsLoading(!1),e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(l))))},colDef:i,column:s});window.setTimeout(()=>t(r),0);break}default:throw new Error("Unrecognised valuesType")}}),this.allValuesPromise.then(e=>this.updateAvailableKeys(e||[],"reload")).then(()=>this.initialised=!0),this.allValuesPromise}processAllValues(e){const t=this.sortKeys(e);return this.allValues=e??new Map,t}validateProvidedValues(e){if(this.usingComplexObjects&&e?.length){const t=e[0];t&&typeof t!="object"&&typeof t!="function"&&(this.createKey(t)==null?(0,import_core5._warnOnce)("Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See https://www.ag-grid.com/javascript-data-grid/filter-set-filter-list/#filter-value-types"):(0,import_core5._warnOnce)("Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?"))}return e}setValuesType(e){this.valuesType=e}getValuesType(){return this.valuesType}isKeyAvailable(e){return this.availableKeys.has(e)}showAvailableOnly(){return this.valuesType===2}updateAvailableKeys(e,t){const s=this.showAvailableOnly()?this.sortKeys(this.getValuesFromRows(!0)):e;this.availableKeys=new Set(s),this.localEventService.dispatchEvent({type:"availableValuesChanged"}),this.updateDisplayedValues(t,e)}sortKeys(e){const t=e??new Map;if(this.suppressSorting)return Array.from(t.keys());let s;return this.compareByValue?s=Array.from(t.entries()).sort(this.entryComparator).map(([i])=>i):s=Array.from(t.keys()).sort(this.keyComparator),this.filterParams.excelMode&&t.has(null)&&(s=s.filter(i=>i!=null),s.push(null)),s}getParamsForValuesFromRows(e=!1){if(!this.clientSideValuesExtractor)return(0,import_core5._errorOnce)("Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values"),null;const t=i=>!e||this.doesRowPassOtherFilters(i),s=e&&!this.caseSensitive?this.allValues:void 0;return{predicate:t,existingValues:s}}getValuesFromRows(e=!1){const t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValues(t.predicate,t.existingValues):null}getValuesFromRowsAsync(e=!1){const t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValuesAsync(t.predicate,t.existingValues):import_core5.AgPromise.resolve(null)}setMiniFilter(e){return e=(0,import_core5._makeNull)(e),this.miniFilterText===e?!1:(e===null&&this.setAddCurrentSelectionToFilter(!1),this.miniFilterText=e,this.updateDisplayedValues("miniFilter"),!0)}getMiniFilter(){return this.miniFilterText}updateDisplayedValues(e,t){if(e==="expansion"){this.displayValueModel.refresh();return}if(this.miniFilterText==null){this.displayValueModel.updateDisplayedValuesToAllAvailable(l=>this.getValue(l),t,this.availableKeys,e);return}const s=this.caseFormat(this.formatter(this.miniFilterText)||""),i=l=>l!=null&&this.caseFormat(l).indexOf(s)>=0,r=!!this.filterParams.excelMode&&i(this.translate("blanks"));this.displayValueModel.updateDisplayedValuesToMatchMiniFilter(l=>this.getValue(l),t,this.availableKeys,i,r,e)}getDisplayedValueCount(){return this.displayValueModel.getDisplayedValueCount()}getDisplayedItem(e){return this.displayValueModel.getDisplayedItem(e)}getSelectAllItem(){return this.displayValueModel.getSelectAllItem()}getAddSelectionToFilterItem(){return this.displayValueModel.getAddSelectionToFilterItem()}hasSelections(){return this.filterParams.defaultToNothingSelected?this.selectedKeys.size>0:this.allValues.size!==this.selectedKeys.size}getKeys(){return Array.from(this.allValues.keys())}getValues(){return Array.from(this.allValues.values())}getValue(e){return this.allValues.get(e)}setAddCurrentSelectionToFilter(e){this.addCurrentSelectionToFilter=e}isInWindowsExcelMode(){return this.filterParams.excelMode==="windows"}isAddCurrentSelectionToFilterChecked(){return this.isInWindowsExcelMode()&&this.addCurrentSelectionToFilter}showAddCurrentSelectionToFilter(){return this.isInWindowsExcelMode()&&(0,import_core5._exists)(this.miniFilterText)&&this.miniFilterText.length>0}selectAllMatchingMiniFilter(e=!1){this.miniFilterText==null?this.selectedKeys=new Set(this.allValues.keys()):(e&&this.selectedKeys.clear(),this.displayValueModel.forEachDisplayedKey(t=>this.selectedKeys.add(t)))}deselectAllMatchingMiniFilter(){this.miniFilterText==null?this.selectedKeys.clear():this.displayValueModel.forEachDisplayedKey(e=>this.selectedKeys.delete(e))}selectKey(e){this.selectedKeys.add(e)}deselectKey(e){this.filterParams.excelMode&&this.isEverythingVisibleSelected()&&this.resetSelectionState(this.displayValueModel.getDisplayedKeys()),this.selectedKeys.delete(e)}isKeySelected(e){return this.selectedKeys.has(e)}isEverythingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>!this.isKeySelected(e))}isNothingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>this.isKeySelected(e))}getModel(){if(!this.hasSelections())return null;const e=this.isAddCurrentSelectionToFilterChecked()?this.filteringKeys.allFilteringKeys():null;if(e&&e.size>0){if(this.selectedKeys){const t=new Set([...Array.from(e),...Array.from(this.selectedKeys).filter(s=>!e.has(s))]);return Array.from(t)}return Array.from(e)}return Array.from(this.selectedKeys)}setModel(e){return this.allValuesPromise.then(t=>{if(e==null)this.resetSelectionState(t??[]);else{this.selectedKeys.clear();const s=new Map;this.allValues.forEach((i,r)=>{s.set(this.caseFormat(r),r)}),e.forEach(i=>{const r=this.caseFormat((0,import_core5._makeNull)(i)),l=s.get(r);l!==void 0&&this.selectKey(l)})}})}uniqueValues(e){const t=new Map,s=new Set;return(e??[]).forEach(i=>{const r=(0,import_core5._makeNull)(i),l=this.createKey(r),a=this.caseFormat(l);s.has(a)||(s.add(a),t.set(l,r))}),t}resetSelectionState(e){this.filterParams.defaultToNothingSelected?this.selectedKeys.clear():this.selectedKeys=new Set(e)}hasGroups(){return this.displayValueModel.hasGroups()}createTreeDataOrGroupingComparator(){return([e,t],[s,i])=>{if(t==null)return i==null?0:-1;if(i==null)return 1;for(let r=0;r<t.length;r++){if(r>=i.length)return 1;const l=(0,import_core5._defaultComparator)(t[r],i[r]);if(l!==0)return l}return 0}}setAppliedModelKeys(e){this.filteringKeys.setFilteringKeys(e)}addToAppliedModelKeys(e){this.filteringKeys.addFilteringKey(e)}getAppliedModelKeys(){return this.filteringKeys.allFilteringKeys()}getCaseFormattedAppliedModelKeys(){return this.filteringKeys.allFilteringKeysCaseFormatted()}hasAppliedModelKey(e){return this.filteringKeys.hasCaseFormattedFilteringKey(e)}hasAnyAppliedModelKey(){return!this.filteringKeys.noAppliedFilteringKeys()}},SetFilter=class extends import_core6.ProvidedFilter{constructor(){super("setFilter"),this.eMiniFilter=import_core6.RefPlaceholder,this.eFilterLoading=import_core6.RefPlaceholder,this.eSetFilterList=import_core6.RefPlaceholder,this.eFilterNoMatches=import_core6.RefPlaceholder,this.valueModel=null,this.setFilterParams=null,this.virtualList=null,this.caseSensitive=!1,this.treeDataTreeList=!1,this.groupingTreeList=!1,this.hardRefreshVirtualList=!1,this.noValueFormatterSupplied=!1,this.filterModelFormatter=new SetFilterModelFormatter,this.updateSetFilterOnParamsChange=e=>{this.setFilterParams=e,this.caseSensitive=!!e.caseSensitive;const t=e.keyCreator??e.colDef.keyCreator;this.setValueFormatter(e.valueFormatter,t,!!e.treeList,!!e.colDef.refData);const s=e.column.getId().startsWith(import_core6.GROUP_AUTO_COLUMN_ID);this.treeDataTreeList=this.gos.get("treeData")&&!!e.treeList&&s,this.getDataPath=this.gos.get("getDataPath"),this.groupingTreeList=!!this.funcColsService.getRowGroupColumns().length&&!!e.treeList&&s,this.createKey=this.generateCreateKey(t,this.treeDataTreeList||this.groupingTreeList)}}wireBeans(e){super.wireBeans(e),this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.dataTypeService=e.dataTypeService}postConstruct(){super.postConstruct()}updateUiVisibility(){}createBodyTemplate(){return`
<div class="ag-set-filter">

@@ -19,5 +19,5 @@ <div data-ref="eFilterLoading" class="ag-filter-loading ag-hidden">${this.translateForSetFilter("loadingOoo")}</div>

<div data-ref="eSetFilterList" class="ag-set-filter-list" role="presentation"></div>
</div>`}getAgComponents(){return[import_core6.AgInputTextFieldSelector]}handleKeyDown(e){if(super.handleKeyDown(e),!e.defaultPrevented)switch(e.key){case import_core6.KeyCode.SPACE:this.handleKeySpace(e);break;case import_core6.KeyCode.ENTER:this.handleKeyEnter(e);break;case import_core6.KeyCode.LEFT:this.handleKeyLeft(e);break;case import_core6.KeyCode.RIGHT:this.handleKeyRight(e);break}}handleKeySpace(e){this.getComponentForKeyEvent(e)?.toggleSelected()}handleKeyEnter(e){if(!this.setFilterParams)return;const{excelMode:t,readOnly:s}=this.setFilterParams||{};!t||s||(e.preventDefault(),this.onBtApply(!1,!1,e),this.setFilterParams.excelMode==="mac"&&this.eMiniFilter.getInputElement().select())}handleKeyLeft(e){this.getComponentForKeyEvent(e)?.setExpanded(!1)}handleKeyRight(e){this.getComponentForKeyEvent(e)?.setExpanded(!0)}getComponentForKeyEvent(e){if(!this.eSetFilterList.contains(this.gos.getActiveDomElement())||!this.virtualList)return;const t=this.virtualList.getLastFocusedRow();if(t==null)return;const s=this.virtualList.getComponentAt(t);if(s==null)return;e.preventDefault();const{readOnly:i}=this.setFilterParams??{};if(!i)return s}getCssIdentifier(){return"set-filter"}setModel(e){return e==null&&this.valueModel?.getModel()==null?(this.setMiniFilter(null),import_core6.AgPromise.resolve()):super.setModel(e)}refresh(e){return this.applyExcelModeOptions(e),!super.refresh(e)||["treeList","treeListFormatter","treeListPathGetter","caseSensitive","comparator","suppressSelectAll","excelMode"].some(s=>e[s]!==this.setFilterParams?.[s])||this.haveColDefParamsChanged(e)?!1:(super.updateParams(e),this.updateSetFilterOnParamsChange(e),this.updateMiniFilter(),(e.cellRenderer!==this.setFilterParams?.cellRenderer||e.valueFormatter!==this.setFilterParams?.valueFormatter)&&this.checkAndRefreshVirtualList(),this.valueModel?.updateOnParamsChange(e).then(()=>{this.refreshFilterValues()}),!0)}haveColDefParamsChanged(e){const{colDef:t,keyCreator:s}=e,{colDef:i,keyCreator:r}=this.setFilterParams??{},l=s??t.keyCreator;return t.filterValueGetter!==i?.filterValueGetter||l!==(r??i?.keyCreator)||!!this.dataTypeService&&this.dataTypeService.getFormatValue(t.cellDataType)===l&&t.valueFormatter!==i?.valueFormatter}setModelAndRefresh(e){return this.valueModel?this.valueModel.setModel(e).then(()=>this.checkAndRefreshVirtualList()):import_core6.AgPromise.resolve()}resetUiToDefaults(){return this.setMiniFilter(null),this.setModelAndRefresh(null)}setModelIntoUi(e){this.setMiniFilter(null);const t=e==null?null:e.values;return this.setModelAndRefresh(t)}getModelFromUi(){if(!this.valueModel)throw new Error("Value model has not been created.");const e=this.valueModel.getModel();return e?{values:e,filterType:this.getFilterType()}:null}getFilterType(){return"set"}getValueModel(){return this.valueModel}areModelsEqual(e,t){return e==null&&t==null?!0:e!=null&&t!=null&&(0,import_core6._areEqual)(e.values,t.values)}setParams(e){this.applyExcelModeOptions(e),super.setParams(e),this.updateSetFilterOnParamsChange(e);const t=e.keyCreator??e.colDef.keyCreator;this.valueModel=new SetValueModel({filterParams:e,setIsLoading:s=>this.setIsLoading(s),translate:s=>this.translateForSetFilter(s),caseFormat:s=>this.caseFormat(s),createKey:this.createKey,valueFormatter:this.valueFormatter,usingComplexObjects:!!t,gos:this.gos,funcColsService:this.funcColsService,valueService:this.valueService,treeDataTreeList:this.treeDataTreeList,groupingTreeList:this.groupingTreeList,addManagedEventListeners:s=>this.addManagedEventListeners(s)}),this.initialiseFilterBodyUi(),this.addEventListenersForDataChanges()}onAddCurrentSelectionToFilterChange(e){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.setAddCurrentSelectionToFilter(e)}setValueFormatter(e,t,s,i){let r=e;if(!r){if(t&&!s)throw new Error("AG Grid: Must supply a Value Formatter in Set Filter params when using a Key Creator");this.noValueFormatterSupplied=!0,i||(r=l=>(0,import_core6._toStringOrNull)(l.value))}this.valueFormatter=r}generateCreateKey(e,t){if(t&&!e)throw new Error("AG Grid: Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.");return e?(s,i=null)=>{const r=this.getKeyCreatorParams(s,i);return(0,import_core6._makeNull)(e(r))}:s=>(0,import_core6._makeNull)((0,import_core6._toStringOrNull)(s))}getFormattedValue(e){let t=this.valueModel.getValue(e);this.noValueFormatterSupplied&&(this.treeDataTreeList||this.groupingTreeList)&&Array.isArray(t)&&(t=(0,import_core6._last)(t));const s=this.valueService.formatValue(this.setFilterParams.column,null,t,this.valueFormatter,!1);return s??(0,import_core6._toStringOrNull)(t)??this.translateForSetFilter("blanks")}applyExcelModeOptions(e){e.excelMode==="windows"?(e.buttons||(e.buttons=["apply","cancel"]),e.closeOnApply==null&&(e.closeOnApply=!0)):e.excelMode==="mac"&&(e.buttons||(e.buttons=["reset"]),e.applyMiniFilterWhileTyping==null&&(e.applyMiniFilterWhileTyping=!0),e.debounceMs==null&&(e.debounceMs=500)),e.excelMode&&e.defaultToNothingSelected&&(e.defaultToNothingSelected=!1,(0,import_core6._warnOnce)('The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.'))}addEventListenersForDataChanges(){this.isValuesTakenFromGrid()&&(this.addManagedEventListeners({cellValueChanged:e=>{this.setFilterParams&&e.column===this.setFilterParams.column&&this.syncAfterDataChange()}}),this.addManagedPropertyListeners(["treeData","getDataPath","groupAllowUnbalanced"],()=>{this.syncAfterDataChange()}))}syncAfterDataChange(){if(!this.valueModel)throw new Error("Value model has not been created.");return this.valueModel.refreshValues().then(()=>{this.checkAndRefreshVirtualList(),(!this.applyActive||this.areModelsEqual(this.getModel(),this.getModelFromUi()))&&this.onBtApply(!1,!0)})}setIsLoading(e){(0,import_core6._setDisplayed)(this.eFilterLoading,e),e||(this.hardRefreshVirtualList=!0)}initialiseFilterBodyUi(){this.initVirtualList(),this.initMiniFilter()}initVirtualList(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const t=this.localeService.getLocaleTextFunc()("ariaFilterList","Filter List"),s=!!this.setFilterParams.treeList,i=this.virtualList=this.createBean(new import_core7.VirtualList({cssIdentifier:"filter",ariaRole:s?"tree":"listbox",listName:t})),r=this.eSetFilterList;s&&r.classList.add("ag-set-filter-tree-list"),r&&r.appendChild(i.getGui());const{cellHeight:l}=this.setFilterParams;l!=null&&i.setRowHeight(l);const a=(h,d)=>this.createSetListItem(h,s,d);i.setComponentCreator(a);const n=(h,d)=>this.updateSetListItem(h,d);i.setComponentUpdater(n);let o;this.setFilterParams.suppressSelectAll?o=new ModelWrapper(this.valueModel):o=new ModelWrapperWithSelectAll(this.valueModel,()=>this.isSelectAllSelected()),s&&(o=new TreeModelWrapper(o)),i.setModel(o)}getSelectAllLabel(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const e=this.valueModel.getMiniFilter()==null||!this.setFilterParams.excelMode?"selectAll":"selectAllSearchResults";return this.translateForSetFilter(e)}getAddSelectionToFilterLabel(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");return this.translateForSetFilter("addCurrentSelectionToFilter")}createSetListItem(e,t,s){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const i=this.valueModel.hasGroups(),{isSelected:r,isExpanded:l}=this.isSelectedExpanded(e),{value:a,depth:n,isGroup:o,hasIndeterminateExpandState:h,selectedListener:d,expandedListener:u}=this.newSetListItemAttributes(e),p={focusWrapper:s,value:a,params:this.setFilterParams,translate:m=>this.translateForSetFilter(m),valueFormatter:this.valueFormatter,item:e,isSelected:r,isTree:t,depth:n,groupsExist:i,isGroup:o,isExpanded:l,hasIndeterminateExpandState:h},c=this.createBean(new SetFilterListItem(p));return c.addEventListener("selectionChanged",d),u&&c.addEventListener("expandedChanged",u),c}newSetTreeItemAttributes(e){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const t=this.valueModel.hasGroups();return e.key===SetFilterDisplayValue.SELECT_ALL?{value:()=>this.getSelectAllLabel(),isGroup:t,depth:e.depth,hasIndeterminateExpandState:!0,selectedListener:s=>this.onSelectAll(s.isSelected),expandedListener:s=>this.onExpandAll(s.item,s.isExpanded)}:e.key===SetFilterDisplayValue.ADD_SELECTION_TO_FILTER?{value:()=>this.getAddSelectionToFilterLabel(),depth:e.depth,isGroup:!1,hasIndeterminateExpandState:!1,selectedListener:s=>{this.onAddCurrentSelectionToFilterChange(s.isSelected)}}:e.children?{value:this.setFilterParams.treeListFormatter?.(e.treeKey,e.depth,e.parentTreeKeys)??e.treeKey,depth:e.depth,isGroup:!0,selectedListener:s=>this.onGroupItemSelected(s.item,s.isSelected),expandedListener:s=>this.onExpandedChanged(s.item,s.isExpanded)}:{value:this.setFilterParams.treeListFormatter?.(e.treeKey,e.depth,e.parentTreeKeys)??e.treeKey,depth:e.depth,selectedListener:s=>this.onItemSelected(s.item.key,s.isSelected)}}newSetListItemAttributes(e){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");return this.isSetFilterModelTreeItem(e)?this.newSetTreeItemAttributes(e):e===SetFilterDisplayValue.SELECT_ALL?{value:()=>this.getSelectAllLabel(),selectedListener:t=>this.onSelectAll(t.isSelected)}:e===SetFilterDisplayValue.ADD_SELECTION_TO_FILTER?{value:()=>this.getAddSelectionToFilterLabel(),selectedListener:t=>{this.onAddCurrentSelectionToFilterChange(t.isSelected)}}:{value:this.valueModel.getValue(e),selectedListener:t=>this.onItemSelected(t.item,t.isSelected)}}updateSetListItem(e,t){const{isSelected:s,isExpanded:i}=this.isSelectedExpanded(e);t.refresh(e,s,i)}isSelectedExpanded(e){let t,s;return this.isSetFilterModelTreeItem(e)?(s=e.expanded,e.key===SetFilterDisplayValue.SELECT_ALL?t=this.isSelectAllSelected():e.key===SetFilterDisplayValue.ADD_SELECTION_TO_FILTER?t=this.valueModel.isAddCurrentSelectionToFilterChecked():e.children?t=this.areAllChildrenSelected(e):t=this.valueModel.isKeySelected(e.key)):e===SetFilterDisplayValue.SELECT_ALL?t=this.isSelectAllSelected():e===SetFilterDisplayValue.ADD_SELECTION_TO_FILTER?t=this.valueModel.isAddCurrentSelectionToFilterChecked():t=this.valueModel.isKeySelected(e),{isSelected:t,isExpanded:s}}isSetFilterModelTreeItem(e){return e?.treeKey!==void 0}initMiniFilter(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const{eMiniFilter:e,localeService:t}=this,s=t.getLocaleTextFunc();e.setDisplayed(!this.setFilterParams.suppressMiniFilter),e.setValue(this.valueModel.getMiniFilter()),e.onValueChange(()=>this.onMiniFilterInput()),e.setInputAriaLabel(s("ariaSearchFilterValues","Search filter values")),this.addManagedElementListeners(e.getInputElement(),{keydown:i=>this.onMiniFilterKeyDown(i)})}updateMiniFilter(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const{eMiniFilter:e}=this;e.isDisplayed()!==!this.setFilterParams.suppressMiniFilter&&e.setDisplayed(!this.setFilterParams.suppressMiniFilter);const t=this.valueModel.getMiniFilter();e.getValue()!==t&&e.setValue(t)}afterGuiAttached(e){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");super.afterGuiAttached(e),this.resetExpansion(),this.refreshVirtualList();const{eMiniFilter:t}=this;t.setInputPlaceholder(this.translateForSetFilter("searchOoo")),(!e||!e.suppressFocus)&&(t.isDisplayed()?t.getFocusableElement().focus():this.virtualList?.focusRow(0))}afterGuiDetached(){super.afterGuiDetached(),this.setFilterParams?.excelMode&&this.resetMiniFilter();const e=this.getModel();(this.setFilterParams?.excelMode||!this.areModelsEqual(e,this.getModelFromUi()))&&(this.resetUiToActiveModel(e),this.showOrHideResults())}applyModel(e="api"){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");this.setFilterParams.excelMode&&e!=="rowDataUpdated"&&this.valueModel.isEverythingVisibleSelected()&&this.valueModel.selectAllMatchingMiniFilter();const t=this.valueModel.showAddCurrentSelectionToFilter()&&this.valueModel.isAddCurrentSelectionToFilterChecked();if(t&&!this.getModel())return!1;const s=super.applyModel(e),i=this.getModel();return i?(t||this.valueModel.setAppliedModelKeys(new Set),i.values.forEach(r=>{this.valueModel.addToAppliedModelKeys(r)})):t||this.valueModel.setAppliedModelKeys(null),s}isModelValid(e){return this.setFilterParams&&this.setFilterParams.excelMode?e==null||e.values.length>0:!0}doesFilterPass(e){if(!this.setFilterParams||!this.valueModel||!this.valueModel.getCaseFormattedAppliedModelKeys())return!0;if(!this.valueModel.hasAnyAppliedModelKey())return!1;const{node:t,data:s}=e;if(this.treeDataTreeList)return this.doesFilterPassForTreeData(t,s);if(this.groupingTreeList)return this.doesFilterPassForGrouping(t);const i=this.getValueFromNode(t);return i!=null&&Array.isArray(i)?i.length===0?this.valueModel.hasAppliedModelKey(null):i.some(r=>this.isInAppliedModel(this.createKey(r,t))):this.isInAppliedModel(this.createKey(i,t))}doesFilterPassForTreeData(e,t){return e.childrenAfterGroup?.length?!1:this.isInAppliedModel(this.createKey(processDataPath(this.getDataPath(t),!0,this.gos.get("groupAllowUnbalanced"))))}doesFilterPassForGrouping(e){const t=this.funcColsService.getRowGroupColumns().map(s=>this.valueService.getKeyForNode(s,e));return t.push(this.getValueFromNode(e)),this.isInAppliedModel(this.createKey(processDataPath(t,!1,this.gos.get("groupAllowUnbalanced"))))}isInAppliedModel(e){return this.valueModel.hasAppliedModelKey(e)}getValueFromNode(e){return this.setFilterParams.getValue(e)}getKeyCreatorParams(e,t=null){return{value:e,colDef:this.setFilterParams.colDef,column:this.setFilterParams.column,node:t,data:t?.data,api:this.setFilterParams.api,context:this.setFilterParams.context}}onNewRowsLoaded(){this.isValuesTakenFromGrid()&&this.syncAfterDataChange()}isValuesTakenFromGrid(){return this.valueModel?this.valueModel.getValuesType()===2:!1}setFilterValues(e){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.overrideValues(e).then(()=>{this.checkAndRefreshVirtualList(),this.onUiChanged()})}resetFilterValues(){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.setValuesType(2),this.syncAfterDataChange()}refreshFilterValues(){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.isInitialised()&&this.valueModel.refreshValues().then(()=>{this.hardRefreshVirtualList=!0,this.checkAndRefreshVirtualList(),this.onUiChanged()})}onAnyFilterChanged(){setTimeout(()=>{if(this.isAlive()){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.refreshAfterAnyFilterChanged().then(e=>{e&&(this.checkAndRefreshVirtualList(),this.showOrHideResults())})}},0)}onMiniFilterInput(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.valueModel.setMiniFilter(this.eMiniFilter.getValue()))return;const{applyMiniFilterWhileTyping:e,readOnly:t}=this.setFilterParams||{};!t&&e?this.filterOnAllVisibleValues(!1):this.updateUiAfterMiniFilterChange()}updateUiAfterMiniFilterChange(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const{excelMode:e,readOnly:t}=this.setFilterParams||{};e==null||t?this.checkAndRefreshVirtualList():this.valueModel.getMiniFilter()==null?this.resetUiToActiveModel(this.getModel()):(this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged()),this.showOrHideResults()}showOrHideResults(){if(!this.valueModel)throw new Error("Value model has not been created.");const e=this.valueModel.getMiniFilter()!=null&&this.valueModel.getDisplayedValueCount()<1;(0,import_core6._setDisplayed)(this.eFilterNoMatches,e),(0,import_core6._setDisplayed)(this.eSetFilterList,!e)}resetMiniFilter(){this.eMiniFilter.setValue(null,!0),this.valueModel?.setMiniFilter(null)}resetUiToActiveModel(e,t){this.setModelAndRefresh(e==null?null:e.values).then(()=>{this.onUiChanged(!1,"prevent"),t?.()})}handleCancelEnd(e){this.setMiniFilter(null),super.handleCancelEnd(e)}onMiniFilterKeyDown(e){const{excelMode:t,readOnly:s}=this.setFilterParams||{};e.key===import_core6.KeyCode.ENTER&&!t&&!s&&this.filterOnAllVisibleValues()}filterOnAllVisibleValues(e=!0){const{readOnly:t}=this.setFilterParams||{};if(!this.valueModel)throw new Error("Value model has not been created.");if(t)throw new Error("Unable to filter in readOnly mode.");this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged(!1,e?"immediately":"debounce"),this.showOrHideResults()}focusRowIfAlive(e){e!=null&&window.setTimeout(()=>{if(!this.virtualList)throw new Error("Virtual list has not been created.");this.isAlive()&&this.virtualList.focusRow(e)},0)}onSelectAll(e){if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.virtualList)throw new Error("Virtual list has not been created.");e?this.valueModel.selectAllMatchingMiniFilter():this.valueModel.deselectAllMatchingMiniFilter(),this.refreshAfterSelection()}onGroupItemSelected(e,t){const s=i=>{i.children?i.children.forEach(r=>s(r)):this.selectItem(i.key,t)};s(e),this.refreshAfterSelection()}onItemSelected(e,t){if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.virtualList)throw new Error("Virtual list has not been created.");this.selectItem(e,t),this.refreshAfterSelection()}selectItem(e,t){t?this.valueModel.selectKey(e):this.valueModel.deselectKey(e)}onExpandAll(e,t){const s=i=>{i.filterPasses&&i.available&&i.children&&(i.children.forEach(r=>s(r)),i.expanded=t)};s(e),this.refreshAfterExpansion()}onExpandedChanged(e,t){e.expanded=t,this.refreshAfterExpansion()}refreshAfterExpansion(){const e=this.virtualList.getLastFocusedRow();this.valueModel.updateDisplayedValues("expansion"),this.checkAndRefreshVirtualList(),this.focusRowIfAlive(e)}refreshAfterSelection(){const e=this.virtualList.getLastFocusedRow();this.checkAndRefreshVirtualList(),this.onUiChanged(),this.focusRowIfAlive(e)}setMiniFilter(e){this.eMiniFilter.setValue(e),this.onMiniFilterInput()}getMiniFilter(){return this.valueModel?this.valueModel.getMiniFilter():null}checkAndRefreshVirtualList(){if(!this.virtualList)throw new Error("Virtual list has not been created.");this.virtualList.refresh(!this.hardRefreshVirtualList),this.hardRefreshVirtualList&&(this.hardRefreshVirtualList=!1)}getFilterKeys(){return this.valueModel?this.valueModel.getKeys():[]}getFilterValues(){return this.valueModel?this.valueModel.getValues():[]}getValues(){return this.getFilterKeys()}refreshVirtualList(){this.setFilterParams&&this.setFilterParams.refreshValuesOnOpen?this.refreshFilterValues():this.checkAndRefreshVirtualList()}translateForSetFilter(e){return this.localeService.getLocaleTextFunc()(e,DEFAULT_LOCALE_TEXT[e])}isSelectAllSelected(){if(!this.setFilterParams||!this.valueModel)return!1;if(this.setFilterParams.defaultToNothingSelected){if(this.valueModel.hasSelections()&&this.valueModel.isEverythingVisibleSelected())return!0;if(this.valueModel.isNothingVisibleSelected())return!1}else{if(this.valueModel.hasSelections()&&this.valueModel.isNothingVisibleSelected())return!1;if(this.valueModel.isEverythingVisibleSelected())return!0}}areAllChildrenSelected(e){const t=s=>{if(s.children){let i=!1,r=!1;return s.children.some(a=>{if(!a.filterPasses||!a.available)return!1;const n=t(a);return n===void 0?!0:(n?i=!0:r=!0,i&&r)})?void 0:i}else return this.valueModel.isKeySelected(s.key)};return this.setFilterParams.defaultToNothingSelected?this.valueModel.hasSelections()&&t(e):t(e)}destroy(){this.virtualList!=null&&(this.virtualList.destroy(),this.virtualList=null),super.destroy()}caseFormat(e){return e==null||typeof e!="string"||this.caseSensitive?e:e.toUpperCase()}resetExpansion(){if(!this.setFilterParams?.treeList)return;const e=this.valueModel?.getSelectAllItem();if(this.isSetFilterModelTreeItem(e)){const t=s=>{s.children&&(s.children.forEach(i=>t(i)),s.expanded=!1)};t(e),this.valueModel.updateDisplayedValues("expansion")}}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e,this)}getPositionableElement(){return this.eSetFilterList}},ModelWrapper=class{constructor(e){this.model=e}getRowCount(){return this.model.getDisplayedValueCount()}getRow(e){return this.model.getDisplayedItem(e)}areRowsEqual(e,t){return e===t}},ModelWrapperWithSelectAll=class{constructor(e,t){this.model=e,this.isSelectAllSelected=t}getRowCount(){const t=this.model.showAddCurrentSelectionToFilter()?2:1;return this.model.getDisplayedValueCount()+t}getRow(e){if(e===0)return this.model.getSelectAllItem();const t=this.model.showAddCurrentSelectionToFilter(),s=t?2:1;return e===1&&t?this.model.getAddSelectionToFilterItem():this.model.getDisplayedItem(e-s)}areRowsEqual(e,t){return e===t}},TreeModelWrapper=class{constructor(e){this.model=e}getRowCount(){return this.model.getRowCount()}getRow(e){return this.model.getRow(e)}areRowsEqual(e,t){return e==null&&t==null?!0:e!=null&&t!=null&&e.treeKey===t.treeKey&&e.depth===t.depth}},import_core8=require("@ag-grid-community/core"),SetFloatingFilterComp=class extends import_core8.Component{constructor(){super(`
</div>`}getAgComponents(){return[import_core6.AgInputTextFieldSelector]}handleKeyDown(e){if(super.handleKeyDown(e),!e.defaultPrevented)switch(e.key){case import_core6.KeyCode.SPACE:this.handleKeySpace(e);break;case import_core6.KeyCode.ENTER:this.handleKeyEnter(e);break;case import_core6.KeyCode.LEFT:this.handleKeyLeft(e);break;case import_core6.KeyCode.RIGHT:this.handleKeyRight(e);break}}handleKeySpace(e){this.getComponentForKeyEvent(e)?.toggleSelected()}handleKeyEnter(e){if(!this.setFilterParams)return;const{excelMode:t,readOnly:s}=this.setFilterParams||{};!t||s||(e.preventDefault(),this.onBtApply(!1,!1,e),this.setFilterParams.excelMode==="mac"&&this.eMiniFilter.getInputElement().select())}handleKeyLeft(e){this.getComponentForKeyEvent(e)?.setExpanded(!1)}handleKeyRight(e){this.getComponentForKeyEvent(e)?.setExpanded(!0)}getComponentForKeyEvent(e){if(!this.eSetFilterList.contains((0,import_core6._getActiveDomElement)(this.gos))||!this.virtualList)return;const t=this.virtualList.getLastFocusedRow();if(t==null)return;const s=this.virtualList.getComponentAt(t);if(s==null)return;e.preventDefault();const{readOnly:i}=this.setFilterParams??{};if(!i)return s}getCssIdentifier(){return"set-filter"}setModel(e){return e==null&&this.valueModel?.getModel()==null?(this.setMiniFilter(null),import_core6.AgPromise.resolve()):super.setModel(e)}refresh(e){if(this.applyExcelModeOptions(e),!super.refresh(e))return!1;const t=this.setFilterParams;return["treeList","treeListPathGetter","caseSensitive","comparator","excelMode"].some(i=>e[i]!==t?.[i])||this.haveColDefParamsChanged(e)?!1:(super.updateParams(e),this.updateSetFilterOnParamsChange(e),this.updateMiniFilter(),e.suppressSelectAll!==t?.suppressSelectAll&&this.createVirtualListModel(e),this.valueModel?.updateOnParamsChange(e).then(()=>{this.refreshFilterValues()}),!0)}haveColDefParamsChanged(e){const{colDef:t,keyCreator:s}=e,{colDef:i,keyCreator:r}=this.setFilterParams??{},l=s??t.keyCreator,a=r??i?.keyCreator,o=t.filterValueGetter!==i?.filterValueGetter,n=l!==a,h=!!this.dataTypeService&&!!l&&this.dataTypeService.getFormatValue(t.cellDataType)===l&&t.valueFormatter!==i?.valueFormatter;return o||n||h}setModelAndRefresh(e){return this.valueModel?this.valueModel.setModel(e).then(()=>{this.isAlive()&&this.checkAndRefreshVirtualList()}):import_core6.AgPromise.resolve()}resetUiToDefaults(){return this.setMiniFilter(null),this.setModelAndRefresh(null)}setModelIntoUi(e){this.setMiniFilter(null);const t=e==null?null:e.values;return this.setModelAndRefresh(t)}getModelFromUi(){if(!this.valueModel)throw new Error("Value model has not been created.");const e=this.valueModel.getModel();return e?{values:e,filterType:this.getFilterType()}:null}getFilterType(){return"set"}getValueModel(){return this.valueModel}areModelsEqual(e,t){return e==null&&t==null?!0:e!=null&&t!=null&&(0,import_core6._areEqual)(e.values,t.values)}setParams(e){this.applyExcelModeOptions(e),super.setParams(e),this.updateSetFilterOnParamsChange(e);const t=e.keyCreator??e.colDef.keyCreator;this.valueModel=new SetValueModel({filterParams:e,setIsLoading:s=>this.setIsLoading(s),translate:s=>this.translateForSetFilter(s),caseFormat:s=>this.caseFormat(s),createKey:this.createKey,valueFormatter:this.valueFormatter,usingComplexObjects:!!t,gos:this.gos,funcColsService:this.funcColsService,valueService:this.valueService,treeDataTreeList:this.treeDataTreeList,groupingTreeList:this.groupingTreeList,addManagedEventListeners:s=>this.addManagedEventListeners(s)}),this.initialiseFilterBodyUi(),this.addEventListenersForDataChanges()}onAddCurrentSelectionToFilterChange(e){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.setAddCurrentSelectionToFilter(e)}setValueFormatter(e,t,s,i){let r=e;if(!r){if(t&&!s)throw new Error("AG Grid: Must supply a Value Formatter in Set Filter params when using a Key Creator");this.noValueFormatterSupplied=!0,i||(r=l=>(0,import_core6._toStringOrNull)(l.value))}this.valueFormatter=r}generateCreateKey(e,t){if(t&&!e)throw new Error("AG Grid: Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.");return e?(s,i=null)=>{const r=this.getKeyCreatorParams(s,i);return(0,import_core6._makeNull)(e(r))}:s=>(0,import_core6._makeNull)((0,import_core6._toStringOrNull)(s))}getFormattedValue(e){let t=this.valueModel.getValue(e);this.noValueFormatterSupplied&&(this.treeDataTreeList||this.groupingTreeList)&&Array.isArray(t)&&(t=(0,import_core6._last)(t));const s=this.valueService.formatValue(this.setFilterParams.column,null,t,this.valueFormatter,!1);return s??(0,import_core6._toStringOrNull)(t)??this.translateForSetFilter("blanks")}applyExcelModeOptions(e){e.excelMode==="windows"?(e.buttons||(e.buttons=["apply","cancel"]),e.closeOnApply==null&&(e.closeOnApply=!0)):e.excelMode==="mac"&&(e.buttons||(e.buttons=["reset"]),e.applyMiniFilterWhileTyping==null&&(e.applyMiniFilterWhileTyping=!0),e.debounceMs==null&&(e.debounceMs=500)),e.excelMode&&e.defaultToNothingSelected&&(e.defaultToNothingSelected=!1,(0,import_core6._warnOnce)('The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.'))}addEventListenersForDataChanges(){this.isValuesTakenFromGrid()&&(this.addManagedEventListeners({cellValueChanged:e=>{this.setFilterParams&&e.column===this.setFilterParams.column&&this.syncAfterDataChange()}}),this.addManagedPropertyListeners(["treeData","getDataPath","groupAllowUnbalanced"],()=>{this.syncAfterDataChange()}))}syncAfterDataChange(){if(!this.valueModel)throw new Error("Value model has not been created.");return this.valueModel.refreshValues().then(()=>{this.checkAndRefreshVirtualList(),(!this.applyActive||this.areModelsEqual(this.getModel(),this.getModelFromUi()))&&this.onBtApply(!1,!0)})}setIsLoading(e){(0,import_core6._setDisplayed)(this.eFilterLoading,e),e||(this.hardRefreshVirtualList=!0)}initialiseFilterBodyUi(){this.initVirtualList(),this.initMiniFilter()}initVirtualList(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const t=this.localeService.getLocaleTextFunc()("ariaFilterList","Filter List"),s=!!this.setFilterParams.treeList,i=this.virtualList=this.createBean(new import_core7.VirtualList({cssIdentifier:"filter",ariaRole:s?"tree":"listbox",listName:t})),r=this.eSetFilterList;s&&r.classList.add("ag-set-filter-tree-list"),r&&r.appendChild(i.getGui());const{cellHeight:l}=this.setFilterParams;l!=null&&i.setRowHeight(l);const a=(n,h)=>this.createSetListItem(n,s,h);i.setComponentCreator(a);const o=(n,h)=>this.updateSetListItem(n,h);i.setComponentUpdater(o),this.createVirtualListModel(this.setFilterParams)}createVirtualListModel(e){if(!this.valueModel)return;let t;e.suppressSelectAll?t=new ModelWrapper(this.valueModel):t=new ModelWrapperWithSelectAll(this.valueModel,()=>this.isSelectAllSelected()),e.treeList&&(t=new TreeModelWrapper(t)),this.virtualList?.setModel(t)}getSelectAllLabel(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const e=this.valueModel.getMiniFilter()==null||!this.setFilterParams.excelMode?"selectAll":"selectAllSearchResults";return this.translateForSetFilter(e)}getAddSelectionToFilterLabel(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");return this.translateForSetFilter("addCurrentSelectionToFilter")}createSetListItem(e,t,s){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const i=this.valueModel.hasGroups(),{isSelected:r,isExpanded:l}=this.isSelectedExpanded(e),{value:a,depth:o,isGroup:n,hasIndeterminateExpandState:h,selectedListener:d,expandedListener:u}=this.newSetListItemAttributes(e),p={focusWrapper:s,value:a,params:this.setFilterParams,translate:m=>this.translateForSetFilter(m),valueFormatter:this.valueFormatter,item:e,isSelected:r,isTree:t,depth:o,groupsExist:i,isGroup:n,isExpanded:l,hasIndeterminateExpandState:h},c=this.createBean(new SetFilterListItem(p));return c.addEventListener("selectionChanged",d),u&&c.addEventListener("expandedChanged",u),c}newSetTreeItemAttributes(e){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const t=this.valueModel.hasGroups();return e.key===SetFilterDisplayValue.SELECT_ALL?{value:()=>this.getSelectAllLabel(),isGroup:t,depth:e.depth,hasIndeterminateExpandState:!0,selectedListener:s=>this.onSelectAll(s.isSelected),expandedListener:s=>this.onExpandAll(s.item,s.isExpanded)}:e.key===SetFilterDisplayValue.ADD_SELECTION_TO_FILTER?{value:()=>this.getAddSelectionToFilterLabel(),depth:e.depth,isGroup:!1,hasIndeterminateExpandState:!1,selectedListener:s=>{this.onAddCurrentSelectionToFilterChange(s.isSelected)}}:e.children?{value:this.setFilterParams.treeListFormatter?.(e.treeKey,e.depth,e.parentTreeKeys)??e.treeKey,depth:e.depth,isGroup:!0,selectedListener:s=>this.onGroupItemSelected(s.item,s.isSelected),expandedListener:s=>this.onExpandedChanged(s.item,s.isExpanded)}:{value:this.setFilterParams.treeListFormatter?.(e.treeKey,e.depth,e.parentTreeKeys)??e.treeKey,depth:e.depth,selectedListener:s=>this.onItemSelected(s.item.key,s.isSelected)}}newSetListItemAttributes(e){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");return this.isSetFilterModelTreeItem(e)?this.newSetTreeItemAttributes(e):e===SetFilterDisplayValue.SELECT_ALL?{value:()=>this.getSelectAllLabel(),selectedListener:t=>this.onSelectAll(t.isSelected)}:e===SetFilterDisplayValue.ADD_SELECTION_TO_FILTER?{value:()=>this.getAddSelectionToFilterLabel(),selectedListener:t=>{this.onAddCurrentSelectionToFilterChange(t.isSelected)}}:{value:this.valueModel.getValue(e),selectedListener:t=>this.onItemSelected(t.item,t.isSelected)}}updateSetListItem(e,t){const{isSelected:s,isExpanded:i}=this.isSelectedExpanded(e);t.refresh(e,s,i)}isSelectedExpanded(e){let t,s;return this.isSetFilterModelTreeItem(e)?(s=e.expanded,e.key===SetFilterDisplayValue.SELECT_ALL?t=this.isSelectAllSelected():e.key===SetFilterDisplayValue.ADD_SELECTION_TO_FILTER?t=this.valueModel.isAddCurrentSelectionToFilterChecked():e.children?t=this.areAllChildrenSelected(e):t=this.valueModel.isKeySelected(e.key)):e===SetFilterDisplayValue.SELECT_ALL?t=this.isSelectAllSelected():e===SetFilterDisplayValue.ADD_SELECTION_TO_FILTER?t=this.valueModel.isAddCurrentSelectionToFilterChecked():t=this.valueModel.isKeySelected(e),{isSelected:t,isExpanded:s}}isSetFilterModelTreeItem(e){return e?.treeKey!==void 0}initMiniFilter(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const{eMiniFilter:e,localeService:t}=this,s=t.getLocaleTextFunc();e.setDisplayed(!this.setFilterParams.suppressMiniFilter),e.setValue(this.valueModel.getMiniFilter()),e.onValueChange(()=>this.onMiniFilterInput()),e.setInputAriaLabel(s("ariaSearchFilterValues","Search filter values")),this.addManagedElementListeners(e.getInputElement(),{keydown:i=>this.onMiniFilterKeyDown(i)})}updateMiniFilter(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const{eMiniFilter:e}=this;e.isDisplayed()!==!this.setFilterParams.suppressMiniFilter&&e.setDisplayed(!this.setFilterParams.suppressMiniFilter);const t=this.valueModel.getMiniFilter();e.getValue()!==t&&e.setValue(t)}afterGuiAttached(e){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");super.afterGuiAttached(e),this.resetExpansion(),this.refreshVirtualList();const{eMiniFilter:t}=this;t.setInputPlaceholder(this.translateForSetFilter("searchOoo")),(!e||!e.suppressFocus)&&(t.isDisplayed()?t.getFocusableElement().focus():this.virtualList?.focusRow(0))}afterGuiDetached(){super.afterGuiDetached(),this.setFilterParams?.excelMode&&this.resetMiniFilter();const e=this.getModel();(this.setFilterParams?.excelMode||!this.areModelsEqual(e,this.getModelFromUi()))&&(this.resetUiToActiveModel(e),this.showOrHideResults())}applyModel(e="api"){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");this.setFilterParams.excelMode&&e!=="rowDataUpdated"&&this.valueModel.isEverythingVisibleSelected()&&this.valueModel.selectAllMatchingMiniFilter();const t=this.valueModel.showAddCurrentSelectionToFilter()&&this.valueModel.isAddCurrentSelectionToFilterChecked();if(t&&!this.getModel())return!1;const s=super.applyModel(e),i=this.getModel();return i?(t||this.valueModel.setAppliedModelKeys(new Set),i.values.forEach(r=>{this.valueModel.addToAppliedModelKeys(r)})):t||this.valueModel.setAppliedModelKeys(null),s}isModelValid(e){return this.setFilterParams&&this.setFilterParams.excelMode?e==null||e.values.length>0:!0}doesFilterPass(e){if(!this.setFilterParams||!this.valueModel||!this.valueModel.getCaseFormattedAppliedModelKeys())return!0;if(!this.valueModel.hasAnyAppliedModelKey())return!1;const{node:t,data:s}=e;if(this.treeDataTreeList)return this.doesFilterPassForTreeData(t,s);if(this.groupingTreeList)return this.doesFilterPassForGrouping(t);const i=this.getValueFromNode(t);return i!=null&&Array.isArray(i)?i.length===0?this.valueModel.hasAppliedModelKey(null):i.some(r=>this.isInAppliedModel(this.createKey(r,t))):this.isInAppliedModel(this.createKey(i,t))}doesFilterPassForTreeData(e,t){return e.childrenAfterGroup?.length?!1:this.isInAppliedModel(this.createKey(processDataPath(this.getDataPath(t),!0,this.gos.get("groupAllowUnbalanced"))))}doesFilterPassForGrouping(e){const t=this.funcColsService.getRowGroupColumns().map(s=>this.valueService.getKeyForNode(s,e));return t.push(this.getValueFromNode(e)),this.isInAppliedModel(this.createKey(processDataPath(t,!1,this.gos.get("groupAllowUnbalanced"))))}isInAppliedModel(e){return this.valueModel.hasAppliedModelKey(e)}getValueFromNode(e){return this.setFilterParams.getValue(e)}getKeyCreatorParams(e,t=null){return{value:e,colDef:this.setFilterParams.colDef,column:this.setFilterParams.column,node:t,data:t?.data,api:this.setFilterParams.api,context:this.setFilterParams.context}}onNewRowsLoaded(){this.isValuesTakenFromGrid()&&this.syncAfterDataChange()}isValuesTakenFromGrid(){return this.valueModel?this.valueModel.getValuesType()===2:!1}setFilterValues(e){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.overrideValues(e).then(()=>{this.checkAndRefreshVirtualList(),this.onUiChanged()})}resetFilterValues(){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.setValuesType(2),this.syncAfterDataChange()}refreshFilterValues(){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.isInitialised()&&this.valueModel.refreshValues().then(()=>{this.hardRefreshVirtualList=!0,this.checkAndRefreshVirtualList(),this.onUiChanged()})}onAnyFilterChanged(){setTimeout(()=>{if(this.isAlive()){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.refreshAfterAnyFilterChanged().then(e=>{e&&(this.checkAndRefreshVirtualList(),this.showOrHideResults())})}},0)}onMiniFilterInput(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.valueModel.setMiniFilter(this.eMiniFilter.getValue()))return;const{applyMiniFilterWhileTyping:e,readOnly:t}=this.setFilterParams||{};!t&&e?this.filterOnAllVisibleValues(!1):this.updateUiAfterMiniFilterChange()}updateUiAfterMiniFilterChange(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const{excelMode:e,readOnly:t}=this.setFilterParams||{};e==null||t?this.checkAndRefreshVirtualList():this.valueModel.getMiniFilter()==null?this.resetUiToActiveModel(this.getModel()):(this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged()),this.showOrHideResults()}showOrHideResults(){if(!this.valueModel)throw new Error("Value model has not been created.");const e=this.valueModel.getMiniFilter()!=null&&this.valueModel.getDisplayedValueCount()<1;(0,import_core6._setDisplayed)(this.eFilterNoMatches,e),(0,import_core6._setDisplayed)(this.eSetFilterList,!e)}resetMiniFilter(){this.eMiniFilter.setValue(null,!0),this.valueModel?.setMiniFilter(null)}resetUiToActiveModel(e,t){this.setModelAndRefresh(e==null?null:e.values).then(()=>{this.onUiChanged(!1,"prevent"),t?.()})}handleCancelEnd(e){this.setMiniFilter(null),super.handleCancelEnd(e)}onMiniFilterKeyDown(e){const{excelMode:t,readOnly:s}=this.setFilterParams||{};e.key===import_core6.KeyCode.ENTER&&!t&&!s&&this.filterOnAllVisibleValues()}filterOnAllVisibleValues(e=!0){const{readOnly:t}=this.setFilterParams||{};if(!this.valueModel)throw new Error("Value model has not been created.");if(t)throw new Error("Unable to filter in readOnly mode.");this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged(!1,e?"immediately":"debounce"),this.showOrHideResults()}focusRowIfAlive(e){e!=null&&window.setTimeout(()=>{if(!this.virtualList)throw new Error("Virtual list has not been created.");this.isAlive()&&this.virtualList.focusRow(e)},0)}onSelectAll(e){if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.virtualList)throw new Error("Virtual list has not been created.");e?this.valueModel.selectAllMatchingMiniFilter():this.valueModel.deselectAllMatchingMiniFilter(),this.refreshAfterSelection()}onGroupItemSelected(e,t){const s=i=>{i.children?i.children.forEach(r=>s(r)):this.selectItem(i.key,t)};s(e),this.refreshAfterSelection()}onItemSelected(e,t){if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.virtualList)throw new Error("Virtual list has not been created.");this.selectItem(e,t),this.refreshAfterSelection()}selectItem(e,t){t?this.valueModel.selectKey(e):this.valueModel.deselectKey(e)}onExpandAll(e,t){const s=i=>{i.filterPasses&&i.available&&i.children&&(i.children.forEach(r=>s(r)),i.expanded=t)};s(e),this.refreshAfterExpansion()}onExpandedChanged(e,t){e.expanded=t,this.refreshAfterExpansion()}refreshAfterExpansion(){const e=this.virtualList.getLastFocusedRow();this.valueModel.updateDisplayedValues("expansion"),this.checkAndRefreshVirtualList(),this.focusRowIfAlive(e)}refreshAfterSelection(){const e=this.virtualList.getLastFocusedRow();this.checkAndRefreshVirtualList(),this.onUiChanged(),this.focusRowIfAlive(e)}setMiniFilter(e){this.eMiniFilter.setValue(e),this.onMiniFilterInput()}getMiniFilter(){return this.valueModel?this.valueModel.getMiniFilter():null}checkAndRefreshVirtualList(){if(!this.virtualList)throw new Error("Virtual list has not been created.");this.virtualList.refresh(!this.hardRefreshVirtualList),this.hardRefreshVirtualList&&(this.hardRefreshVirtualList=!1)}getFilterKeys(){return this.valueModel?this.valueModel.getKeys():[]}getFilterValues(){return this.valueModel?this.valueModel.getValues():[]}getValues(){return this.getFilterKeys()}refreshVirtualList(){this.setFilterParams&&this.setFilterParams.refreshValuesOnOpen?this.refreshFilterValues():this.checkAndRefreshVirtualList()}translateForSetFilter(e){return this.localeService.getLocaleTextFunc()(e,DEFAULT_LOCALE_TEXT[e])}isSelectAllSelected(){if(!this.setFilterParams||!this.valueModel)return!1;if(this.setFilterParams.defaultToNothingSelected){if(this.valueModel.hasSelections()&&this.valueModel.isEverythingVisibleSelected())return!0;if(this.valueModel.isNothingVisibleSelected())return!1}else{if(this.valueModel.hasSelections()&&this.valueModel.isNothingVisibleSelected())return!1;if(this.valueModel.isEverythingVisibleSelected())return!0}}areAllChildrenSelected(e){const t=s=>{if(s.children){let i=!1,r=!1;return s.children.some(a=>{if(!a.filterPasses||!a.available)return!1;const o=t(a);return o===void 0?!0:(o?i=!0:r=!0,i&&r)})?void 0:i}else return this.valueModel.isKeySelected(s.key)};return this.setFilterParams.defaultToNothingSelected?this.valueModel.hasSelections()&&t(e):t(e)}destroy(){this.virtualList!=null&&(this.virtualList.destroy(),this.virtualList=null),super.destroy()}caseFormat(e){return e==null||typeof e!="string"||this.caseSensitive?e:e.toUpperCase()}resetExpansion(){if(!this.setFilterParams?.treeList)return;const e=this.valueModel?.getSelectAllItem();if(this.isSetFilterModelTreeItem(e)){const t=s=>{s.children&&(s.children.forEach(i=>t(i)),s.expanded=!1)};t(e),this.valueModel.updateDisplayedValues("expansion")}}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e,this)}getPositionableElement(){return this.eSetFilterList}},ModelWrapper=class{constructor(e){this.model=e}getRowCount(){return this.model.getDisplayedValueCount()}getRow(e){return this.model.getDisplayedItem(e)}areRowsEqual(e,t){return e===t}},ModelWrapperWithSelectAll=class{constructor(e,t){this.model=e,this.isSelectAllSelected=t}getRowCount(){const t=this.model.showAddCurrentSelectionToFilter()?2:1;return this.model.getDisplayedValueCount()+t}getRow(e){if(e===0)return this.model.getSelectAllItem();const t=this.model.showAddCurrentSelectionToFilter(),s=t?2:1;return e===1&&t?this.model.getAddSelectionToFilterItem():this.model.getDisplayedItem(e-s)}areRowsEqual(e,t){return e===t}},TreeModelWrapper=class{constructor(e){this.model=e}getRowCount(){return this.model.getRowCount()}getRow(e){return this.model.getRow(e)}areRowsEqual(e,t){return e==null&&t==null?!0:e!=null&&t!=null&&e.treeKey===t.treeKey&&e.depth===t.depth}},import_core8=require("@ag-grid-community/core"),SetFloatingFilterComp=class extends import_core8.Component{constructor(){super(`
<div class="ag-floating-filter-input ag-set-floating-filter-input" role="presentation">
<ag-input-text-field data-ref="eFloatingFilterText"></ag-input-text-field>
</div>`,[import_core8.AgInputTextFieldSelector]),this.eFloatingFilterText=import_core8.RefPlaceholder,this.availableValuesListenerAdded=!1,this.filterModelFormatter=new SetFilterModelFormatter}wireBeans(e){this.columnNameService=e.columnNameService}destroy(){super.destroy()}init(e){this.params=e,this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams(e)}setParams(e){const t=this.columnNameService.getDisplayNameForColumn(e.column,"header",!0),s=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setInputAriaLabel(`${t} ${s("ariaFilterInput","Filter Input")}`)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams(e)}onParentModelChanged(e){this.updateFloatingFilterText(e)}parentSetFilterInstance(e){this.params.parentFilterInstance(t=>{if(!(t instanceof SetFilter))throw new Error("AG Grid - SetFloatingFilter expects SetFilter as its parent");e(t)})}addAvailableValuesListener(){this.parentSetFilterInstance(e=>{const t=e.getValueModel();t&&this.addManagedListeners(t,{availableValuesChanged:()=>this.updateFloatingFilterText()})}),this.availableValuesListenerAdded=!0}updateFloatingFilterText(e){this.availableValuesListenerAdded||this.addAvailableValuesListener(),this.parentSetFilterInstance(t=>{this.eFloatingFilterText.setValue(this.filterModelFormatter.getModelAsString(e,t))})}},VERSION="32.1.0",SetFilterCoreModule=(0,import_core9._defineModule)({version:VERSION,moduleName:`${import_core9.ModuleNames.SetFilterModule}-core`,userComponents:[{name:"agSetColumnFilter",classImp:SetFilter}],dependantModules:[import_core10.EnterpriseCoreModule,import_core9._ColumnFilterModule]}),SetFloatingFilterModule=(0,import_core9._defineModule)({version:VERSION,moduleName:"@ag-grid-enterprise/set-floating-filter",userComponents:[{name:"agSetColumnFloatingFilter",classImp:SetFloatingFilterComp}],dependantModules:[SetFilterCoreModule,import_core9._FloatingFilterModule]}),SetFilterModule=(0,import_core9._defineModule)({version:VERSION,moduleName:import_core9.ModuleNames.SetFilterModule,dependantModules:[SetFilterCoreModule,SetFloatingFilterModule]});
</div>`,[import_core8.AgInputTextFieldSelector]),this.eFloatingFilterText=import_core8.RefPlaceholder,this.availableValuesListenerAdded=!1,this.filterModelFormatter=new SetFilterModelFormatter}wireBeans(e){this.columnNameService=e.columnNameService}destroy(){super.destroy()}init(e){this.params=e,this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams(e)}setParams(e){const t=this.columnNameService.getDisplayNameForColumn(e.column,"header",!0),s=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setInputAriaLabel(`${t} ${s("ariaFilterInput","Filter Input")}`)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams(e)}onParentModelChanged(e){this.updateFloatingFilterText(e)}parentSetFilterInstance(e){this.params.parentFilterInstance(t=>{if(!(t instanceof SetFilter))throw new Error("AG Grid - SetFloatingFilter expects SetFilter as its parent");e(t)})}addAvailableValuesListener(){this.parentSetFilterInstance(e=>{const t=e.getValueModel();t&&this.addManagedListeners(t,{availableValuesChanged:()=>this.updateFloatingFilterText()})}),this.availableValuesListenerAdded=!0}updateFloatingFilterText(e){this.availableValuesListenerAdded||this.addAvailableValuesListener(),this.parentSetFilterInstance(t=>{this.eFloatingFilterText.setValue(this.filterModelFormatter.getModelAsString(e,t))})}},VERSION="32.2.0",SetFilterCoreModule=(0,import_core9._defineModule)({version:VERSION,moduleName:`${import_core9.ModuleNames.SetFilterModule}-core`,userComponents:[{name:"agSetColumnFilter",classImp:SetFilter}],dependantModules:[import_core10.EnterpriseCoreModule,import_core9._ColumnFilterModule]}),SetFloatingFilterModule=(0,import_core9._defineModule)({version:VERSION,moduleName:"@ag-grid-enterprise/set-floating-filter",userComponents:[{name:"agSetColumnFloatingFilter",classImp:SetFloatingFilterComp}],dependantModules:[SetFilterCoreModule,import_core9._FloatingFilterModule]}),SetFilterModule=(0,import_core9._defineModule)({version:VERSION,moduleName:import_core9.ModuleNames.SetFilterModule,dependantModules:[SetFilterCoreModule,SetFloatingFilterModule]});
{
"name": "@ag-grid-enterprise/set-filter",
"version": "32.1.0",
"version": "32.2.0",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",

@@ -16,4 +16,4 @@ "main": "./dist/package/main.cjs.js",

"dependencies": {
"@ag-grid-community/core": "32.1.0",
"@ag-grid-enterprise/core": "32.1.0"
"@ag-grid-community/core": "32.2.0",
"@ag-grid-enterprise/core": "32.2.0"
},

@@ -20,0 +20,0 @@ "devDependencies": {

{
"name": "@ag-grid-enterprise/set-filter",
"version": "32.1.0",
"version": "32.2.0",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",

@@ -16,4 +16,4 @@ "main": "./src/main.js",

"dependencies": {
"@ag-grid-community/core": "32.1.0",
"@ag-grid-enterprise/core": "32.1.0"
"@ag-grid-community/core": "32.2.0",
"@ag-grid-enterprise/core": "32.2.0"
},

@@ -20,0 +20,0 @@ "devDependencies": {

@@ -60,2 +60,3 @@ import type { BeanCollection, ComponentSelector, IAfterGuiAttachedParams, IDoesFilterPassParams, ISetFilter, SetFilterModel, SetFilterModelValue, SetFilterParams } from '@ag-grid-community/core';

private initVirtualList;
private createVirtualListModel;
private getSelectAllLabel;

@@ -62,0 +63,0 @@ private getAddSelectionToFilterLabel;

@@ -6,3 +6,3 @@ import type { TextFormatter } from '@ag-grid-community/core';

private readonly treeListPathGetter?;
private readonly treeListFormatter?;
private treeListFormatter?;
private readonly treeDataOrGrouping?;

@@ -17,2 +17,3 @@ /** all displayed items in a tree structure */

constructor(formatter: TextFormatter, treeListPathGetter?: ((value: V | null) => string[] | null) | undefined, treeListFormatter?: ((pathKey: string | null, level: number, parentPathKeys: (string | null)[]) => string) | undefined, treeDataOrGrouping?: boolean | undefined);
updateOnParamsChange(treeListFormatter?: (pathKey: string | null, level: number, parentPathKeys: (string | null)[]) => string): void;
updateDisplayedValuesToAllAvailable(getValue: (key: string | null) => V | null, allKeys: Iterable<string | null> | undefined, availableKeys: Set<string | null>, source: 'reload' | 'otherFilter' | 'miniFilter'): void;

@@ -19,0 +20,0 @@ updateDisplayedValuesToMatchMiniFilter(getValue: (key: string | null) => V | null, allKeys: Iterable<string | null> | undefined, availableKeys: Set<string | null>, matchesFilter: (valueToCheck: string | null) => boolean, nullMatchesFilter: boolean, source: 'reload' | 'otherFilter' | 'miniFilter'): void;

@@ -1,1 +0,1 @@

export declare const VERSION = "32.1.0";
export declare const VERSION = "32.2.0";
{
"name": "@ag-grid-enterprise/set-filter",
"version": "32.1.0",
"version": "32.2.0",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",

@@ -16,4 +16,4 @@ "main": "./dist/package/main.cjs.js",

"dependencies": {
"@ag-grid-community/core": "32.1.0",
"@ag-grid-enterprise/core": "32.1.0"
"@ag-grid-community/core": "32.2.0",
"@ag-grid-enterprise/core": "32.2.0"
},

@@ -20,0 +20,0 @@ "devDependencies": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc