@ag-grid-enterprise/rich-select
Advanced tools
Comparing version 27.0.0 to 27.1.0
/** | ||
* @ag-grid-enterprise/rich-select - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v27.0.0 | ||
* @link http://www.ag-grid.com/ | ||
' * @license Commercial | ||
*/ | ||
* @ag-grid-enterprise/rich-select - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v27.1.0 | ||
* @link http://www.ag-grid.com/ | ||
* @license Commercial | ||
*/ | ||
'use strict'; | ||
@@ -8,0 +7,0 @@ |
/** | ||
* @ag-grid-enterprise/rich-select - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v27.0.0 | ||
* @link http://www.ag-grid.com/ | ||
' * @license Commercial | ||
*/ | ||
* @ag-grid-enterprise/rich-select - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v27.1.0 | ||
* @link http://www.ag-grid.com/ | ||
* @license Commercial | ||
*/ | ||
/** | ||
* @ag-grid-enterprise/rich-select - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v27.0.0 | ||
* @link http://www.ag-grid.com/ | ||
' * @license Commercial | ||
*/ | ||
* @ag-grid-enterprise/rich-select - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v27.1.0 | ||
* @link http://www.ag-grid.com/ | ||
* @license Commercial | ||
*/ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("@ag-grid-community/core"),i=require("@ag-grid-enterprise/core"),r=(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)},function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}),o=function(e,t,i,r){var o,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s},n=function(e){function i(t){var i=e.call(this,'<div class="ag-rich-select-row"></div>')||this;return i.params=t,i}return r(i,e),i.prototype.setState=function(e,t,i){this.populateWithRenderer(e,t)||this.populateWithoutRenderer(e,t),this.addOrRemoveCssClass("ag-rich-select-row-selected",i)},i.prototype.populateWithoutRenderer=function(e,i){var r=null!=i?i:e;t._.exists(r)&&""!==r?this.getGui().textContent=r.toString():this.getGui().innerHTML=" "},i.prototype.populateWithRenderer=function(e,i){var r=this,o={value:e,valueFormatted:i,api:this.gridOptionsWrapper.getApi()},n=this.userComponentFactory.getCellRendererDetails(this.params,o),s=n?n.newAgStackInstance():void 0;return null!=s?t._.bindCellRendererToHtmlElement(s,this.getGui()):this.getGui().innerText=null!=o.valueFormatted?o.valueFormatted:o.value,!!s&&(s.then((function(e){r.addDestroyFunc((function(){r.getContext().destroyBean(e)}))})),!0)},o([t.Autowired("userComponentFactory")],i.prototype,"userComponentFactory",void 0),i}(t.Component),s=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),a=function(e,t,i,r){var o,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s},c=function(e){function i(){var t=e.call(this,i.TEMPLATE)||this;return t.selectionConfirmed=!1,t.searchString="",t}return s(i,e),i.prototype.init=function(e){this.params=e,this.selectedValue=e.value,this.originalSelectedValue=e.value,this.focusAfterAttached=e.cellStartedEdit;var i=t._.createIconNoSpan("smallDown",this.gridOptionsWrapper);if(i.classList.add("ag-rich-select-value-icon"),this.eValue.appendChild(i),this.virtualList=this.getContext().createBean(new t.VirtualList("rich-select")),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),t._.exists(this.params.cellHeight)&&this.virtualList.setRowHeight(this.params.cellHeight),this.renderSelectedValue(),t._.missing(e.values))console.warn("AG Grid: richSelectCellEditor requires values for it to work");else{var r=e.values;this.virtualList.setModel({getRowCount:function(){return r.length},getRow:function(e){return r[e]}}),this.addGuiEventListener("keydown",this.onKeyDown.bind(this));var o=this.virtualList.getGui();this.addManagedListener(o,"click",this.onClick.bind(this)),this.addManagedListener(o,"mousemove",this.onMouseMove.bind(this));var n=t._.exists(e.searchDebounceDelay)?e.searchDebounceDelay:300;this.clearSearchString=t._.debounce(this.clearSearchString,n),t._.exists(e.charPress)&&this.searchText(e.charPress)}},i.prototype.onKeyDown=function(e){var i=e.key;switch(e.preventDefault(),i){case t.KeyCode.ENTER:this.onEnterKeyDown();break;case t.KeyCode.TAB:this.confirmSelection();break;case t.KeyCode.DOWN:case t.KeyCode.UP:this.onNavigationKeyPressed(e,i);break;default:this.searchText(e)}},i.prototype.confirmSelection=function(){this.selectionConfirmed=!0},i.prototype.onEnterKeyDown=function(){this.confirmSelection(),this.params.stopEditing()},i.prototype.onNavigationKeyPressed=function(e,i){e.preventDefault();var r=this.params.values.indexOf(this.selectedValue),o=i===t.KeyCode.UP?r-1:r+1;if(o>=0&&o<this.params.values.length){var n=this.params.values[o];this.setSelectedValue(n)}},i.prototype.searchText=function(e){if("string"==typeof e)this.searchString+=e,this.runSearch(),this.clearSearchString();else{var i=e.key;if(i===t.KeyCode.BACKSPACE)this.searchString=this.searchString.slice(0,-1),i="";else if(!t._.isEventFromPrintableCharacter(e))return;this.searchText(i)}},i.prototype.runSearch=function(){var e,i=this,r=this.params.values;if("number"!=typeof r[0]&&"string"!=typeof r[0]||(e=r.map(String)),"object"==typeof r[0]&&this.params.colDef.keyCreator&&(e=r.map((function(e){var t={value:e,colDef:i.params.colDef,column:i.params.column,node:i.params.node,data:i.params.data,api:i.gridOptionsWrapper.getApi(),columnApi:i.gridOptionsWrapper.getColumnApi(),context:i.gridOptionsWrapper.getContext()};return i.params.colDef.keyCreator(t)}))),e){var o=t._.fuzzySuggestions(this.searchString,e,!0,!0)[0];if(o){var n=r[e.indexOf(o)];this.setSelectedValue(n)}}},i.prototype.clearSearchString=function(){this.searchString=""},i.prototype.renderSelectedValue=function(){var e=this,i=this.params.formatValue(this.selectedValue),r=this.eValue,o={value:this.selectedValue,valueFormatted:i,api:this.gridOptionsWrapper.getApi()},n=this.userComponentFactory.getCellRendererDetails(this.params,o),s=n?n.newAgStackInstance():void 0;s?(t._.bindCellRendererToHtmlElement(s,r),s.then((function(t){e.addDestroyFunc((function(){return e.getContext().destroyBean(t)}))}))):t._.exists(this.selectedValue)?r.innerHTML=i:t._.clearElement(r)},i.prototype.setSelectedValue=function(e){if(this.selectedValue!==e){var t=this.params.values.indexOf(e);-1!==t&&(this.selectedValue=e,this.virtualList.ensureIndexVisible(t),this.virtualList.refresh())}},i.prototype.createRowComponent=function(e){var t=this.params.formatValue(e),i=new n(this.params);return this.getContext().createBean(i),i.setState(e,t,e===this.selectedValue),i},i.prototype.onMouseMove=function(e){var t=this.virtualList.getGui().getBoundingClientRect(),i=this.virtualList.getScrollTop(),r=e.clientY-t.top+i,o=Math.floor(r/this.virtualList.getRowHeight()),n=this.params.values[o];void 0!==n&&this.setSelectedValue(n)},i.prototype.onClick=function(){this.confirmSelection(),this.params.stopEditing()},i.prototype.afterGuiAttached=function(){var e=this.params.values.indexOf(this.selectedValue);this.virtualList.refresh(),e>=0&&this.virtualList.ensureIndexVisible(e),this.virtualList.refresh(),this.focusAfterAttached&&this.getGui().focus()},i.prototype.getValue=function(){return this.selectionConfirmed?this.selectedValue:this.originalSelectedValue},i.TEMPLATE='<div class="ag-rich-select" tabindex="-1">\n <div ref="eValue" class="ag-rich-select-value"></div>\n <div ref="eList" class="ag-rich-select-list"></div>\n </div>',a([t.Autowired("userComponentFactory")],i.prototype,"userComponentFactory",void 0),a([t.RefSelector("eValue")],i.prototype,"eValue",void 0),a([t.RefSelector("eList")],i.prototype,"eList",void 0),i}(t.PopupComponent),l={moduleName:t.ModuleNames.RichSelectModule,beans:[],userComponents:[{componentName:"agRichSelect",componentClass:c},{componentName:"agRichSelectCellEditor",componentClass:c}],dependantModules:[i.EnterpriseCoreModule]};exports.RichSelectModule=l; |
{ | ||
"name": "@ag-grid-enterprise/rich-select", | ||
"version": "27.0.0", | ||
"version": "27.1.0", | ||
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue", | ||
@@ -46,4 +46,4 @@ "main": "./dist/cjs/es5/main.js", | ||
"dependencies": { | ||
"@ag-grid-community/core": "~27.0.0", | ||
"@ag-grid-enterprise/core": "~27.0.0" | ||
"@ag-grid-community/core": "~27.1.0", | ||
"@ag-grid-enterprise/core": "~27.1.0" | ||
}, | ||
@@ -50,0 +50,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64483
273805
2258
1
0
+ Added@ag-grid-community/core@27.1.0(transitive)
+ Added@ag-grid-enterprise/core@27.1.0(transitive)
- Removed@ag-grid-community/core@27.0.1(transitive)
- Removed@ag-grid-enterprise/core@27.0.1(transitive)