@ag-grid-enterprise/rich-select
Advanced tools
Comparing version 30.1.0 to 30.2.0
@@ -11,2 +11,3 @@ import { ICellEditor, PopupComponent, RichCellEditorParams } from "@ag-grid-community/core"; | ||
private buildRichSelectParams; | ||
private getSearchStringCallback; | ||
afterGuiAttached(): void; | ||
@@ -13,0 +14,0 @@ getValue(): any; |
@@ -26,4 +26,5 @@ "use strict"; | ||
RichSelectCellEditor.prototype.init = function (params) { | ||
var _this = this; | ||
this.params = params; | ||
var cellStartedEdit = params.cellStartedEdit, values = params.values, cellHeight = params.cellHeight; | ||
var cellStartedEdit = params.cellStartedEdit, cellHeight = params.cellHeight, values = params.values; | ||
if (core_1._.missing(values)) { | ||
@@ -33,5 +34,14 @@ console.warn('AG Grid: richSelectCellEditor requires values for it to work'); | ||
} | ||
var richSelectParams = this.buildRichSelectParams(); | ||
var _a = this.buildRichSelectParams(), richSelectParams = _a.params, valuesPromise = _a.valuesPromise; | ||
this.richSelect = this.createManagedBean(new core_1.AgRichSelect(richSelectParams)); | ||
this.appendChild(this.richSelect); | ||
if (valuesPromise) { | ||
valuesPromise.then(function (values) { | ||
_this.richSelect.setValueList({ valueList: values, refresh: true }); | ||
var searchStringCallback = _this.getSearchStringCallback(values); | ||
if (searchStringCallback) { | ||
_this.richSelect.setSearchStringCreator(searchStringCallback); | ||
} | ||
}); | ||
} | ||
this.addManagedListener(this.richSelect, core_1.Events.EVENT_FIELD_PICKER_VALUE_SELECTED, this.onEditorPickerValueSelected.bind(this)); | ||
@@ -54,7 +64,5 @@ this.addManagedListener(this.richSelect.getGui(), 'focusout', this.onEditorFocusOut.bind(this)); | ||
RichSelectCellEditor.prototype.buildRichSelectParams = function () { | ||
var _this = this; | ||
var _a = this.params, cellRenderer = _a.cellRenderer, value = _a.value, values = _a.values, colDef = _a.colDef, formatValue = _a.formatValue, searchDebounceDelay = _a.searchDebounceDelay, valueListGap = _a.valueListGap; | ||
var _a = this.params, cellRenderer = _a.cellRenderer, value = _a.value, values = _a.values, formatValue = _a.formatValue, searchDebounceDelay = _a.searchDebounceDelay, valueListGap = _a.valueListGap, valueListMaxHeight = _a.valueListMaxHeight, valueListMaxWidth = _a.valueListMaxWidth, allowTyping = _a.allowTyping, filterList = _a.filterList, searchType = _a.searchType, highlightMatch = _a.highlightMatch, valuePlaceholder = _a.valuePlaceholder; | ||
var ret = { | ||
value: value, | ||
valueList: values, | ||
cellRenderer: cellRenderer, | ||
@@ -66,23 +74,48 @@ searchDebounceDelay: searchDebounceDelay, | ||
pickerType: 'virtual-list', | ||
pickerGap: valueListGap, | ||
allowTyping: allowTyping, | ||
filterList: filterList, | ||
searchType: searchType, | ||
highlightMatch: highlightMatch, | ||
maxPickerHeight: valueListMaxHeight, | ||
maxPickerWidth: valueListMaxWidth, | ||
placeholder: valuePlaceholder | ||
}; | ||
if (valueListGap != null) { | ||
ret.pickerGap = valueListGap; | ||
var valuesResult; | ||
var valuesPromise; | ||
if (typeof values === 'function') { | ||
valuesResult = values(this.params); | ||
} | ||
if (typeof values[0] === 'object' && colDef.keyCreator) { | ||
ret.searchStringCreator = function (values) { return values.map(function (value) { | ||
var keyParams = { | ||
value: value, | ||
colDef: _this.params.colDef, | ||
column: _this.params.column, | ||
node: _this.params.node, | ||
data: _this.params.data, | ||
api: _this.gridOptionsService.api, | ||
columnApi: _this.gridOptionsService.columnApi, | ||
context: _this.gridOptionsService.context | ||
}; | ||
return colDef.keyCreator(keyParams); | ||
}); }; | ||
else { | ||
valuesResult = values; | ||
} | ||
return ret; | ||
if (Array.isArray(valuesResult)) { | ||
ret.valueList = valuesResult; | ||
ret.searchStringCreator = this.getSearchStringCallback(valuesResult); | ||
} | ||
else { | ||
valuesPromise = valuesResult; | ||
} | ||
return { params: ret, valuesPromise: valuesPromise }; | ||
}; | ||
RichSelectCellEditor.prototype.getSearchStringCallback = function (values) { | ||
var _this = this; | ||
var colDef = this.params.colDef; | ||
if (typeof values[0] !== 'object' || !colDef.keyCreator) { | ||
return; | ||
} | ||
return function (values) { return values.map(function (value) { | ||
var keyParams = { | ||
value: value, | ||
colDef: _this.params.colDef, | ||
column: _this.params.column, | ||
node: _this.params.node, | ||
data: _this.params.data, | ||
api: _this.gridOptionsService.api, | ||
columnApi: _this.gridOptionsService.columnApi, | ||
context: _this.gridOptionsService.context | ||
}; | ||
return colDef.keyCreator(keyParams); | ||
}); }; | ||
}; | ||
// we need to have the gui attached before we can draw the virtual rows, as the | ||
@@ -104,3 +137,3 @@ // virtual row logic needs info about the gui state | ||
if ((eventKey === null || eventKey === void 0 ? void 0 : eventKey.length) === 1) { | ||
_this.richSelect.searchText(eventKey); | ||
_this.richSelect.searchTextFromString(eventKey); | ||
} | ||
@@ -107,0 +140,0 @@ } |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "30.1.0"; | ||
export declare const VERSION = "30.2.0"; |
@@ -5,2 +5,2 @@ "use strict"; | ||
// DO NOT UPDATE MANUALLY: Generated from script during build time | ||
exports.VERSION = '30.1.0'; | ||
exports.VERSION = '30.2.0'; |
@@ -11,2 +11,3 @@ import { ICellEditor, PopupComponent, RichCellEditorParams } from "@ag-grid-community/core"; | ||
private buildRichSelectParams; | ||
private getSearchStringCallback; | ||
afterGuiAttached(): void; | ||
@@ -13,0 +14,0 @@ getValue(): any; |
@@ -11,3 +11,3 @@ "use strict"; | ||
this.params = params; | ||
const { cellStartedEdit, values, cellHeight } = params; | ||
const { cellStartedEdit, cellHeight, values } = params; | ||
if (core_1._.missing(values)) { | ||
@@ -17,5 +17,14 @@ console.warn('AG Grid: richSelectCellEditor requires values for it to work'); | ||
} | ||
const richSelectParams = this.buildRichSelectParams(); | ||
const { params: richSelectParams, valuesPromise } = this.buildRichSelectParams(); | ||
this.richSelect = this.createManagedBean(new core_1.AgRichSelect(richSelectParams)); | ||
this.appendChild(this.richSelect); | ||
if (valuesPromise) { | ||
valuesPromise.then((values) => { | ||
this.richSelect.setValueList({ valueList: values, refresh: true }); | ||
const searchStringCallback = this.getSearchStringCallback(values); | ||
if (searchStringCallback) { | ||
this.richSelect.setSearchStringCreator(searchStringCallback); | ||
} | ||
}); | ||
} | ||
this.addManagedListener(this.richSelect, core_1.Events.EVENT_FIELD_PICKER_VALUE_SELECTED, this.onEditorPickerValueSelected.bind(this)); | ||
@@ -38,6 +47,5 @@ this.addManagedListener(this.richSelect.getGui(), 'focusout', this.onEditorFocusOut.bind(this)); | ||
buildRichSelectParams() { | ||
const { cellRenderer, value, values, colDef, formatValue, searchDebounceDelay, valueListGap } = this.params; | ||
const { cellRenderer, value, values, formatValue, searchDebounceDelay, valueListGap, valueListMaxHeight, valueListMaxWidth, allowTyping, filterList, searchType, highlightMatch, valuePlaceholder } = this.params; | ||
const ret = { | ||
value: value, | ||
valueList: values, | ||
cellRenderer, | ||
@@ -49,23 +57,47 @@ searchDebounceDelay, | ||
pickerType: 'virtual-list', | ||
pickerGap: valueListGap, | ||
allowTyping, | ||
filterList, | ||
searchType, | ||
highlightMatch, | ||
maxPickerHeight: valueListMaxHeight, | ||
maxPickerWidth: valueListMaxWidth, | ||
placeholder: valuePlaceholder | ||
}; | ||
if (valueListGap != null) { | ||
ret.pickerGap = valueListGap; | ||
let valuesResult; | ||
let valuesPromise; | ||
if (typeof values === 'function') { | ||
valuesResult = values(this.params); | ||
} | ||
if (typeof values[0] === 'object' && colDef.keyCreator) { | ||
ret.searchStringCreator = (values) => values.map((value) => { | ||
const keyParams = { | ||
value: value, | ||
colDef: this.params.colDef, | ||
column: this.params.column, | ||
node: this.params.node, | ||
data: this.params.data, | ||
api: this.gridOptionsService.api, | ||
columnApi: this.gridOptionsService.columnApi, | ||
context: this.gridOptionsService.context | ||
}; | ||
return colDef.keyCreator(keyParams); | ||
}); | ||
else { | ||
valuesResult = values; | ||
} | ||
return ret; | ||
if (Array.isArray(valuesResult)) { | ||
ret.valueList = valuesResult; | ||
ret.searchStringCreator = this.getSearchStringCallback(valuesResult); | ||
} | ||
else { | ||
valuesPromise = valuesResult; | ||
} | ||
return { params: ret, valuesPromise }; | ||
} | ||
getSearchStringCallback(values) { | ||
const { colDef } = this.params; | ||
if (typeof values[0] !== 'object' || !colDef.keyCreator) { | ||
return; | ||
} | ||
return (values) => values.map((value) => { | ||
const keyParams = { | ||
value: value, | ||
colDef: this.params.colDef, | ||
column: this.params.column, | ||
node: this.params.node, | ||
data: this.params.data, | ||
api: this.gridOptionsService.api, | ||
columnApi: this.gridOptionsService.columnApi, | ||
context: this.gridOptionsService.context | ||
}; | ||
return colDef.keyCreator(keyParams); | ||
}); | ||
} | ||
// we need to have the gui attached before we can draw the virtual rows, as the | ||
@@ -86,3 +118,3 @@ // virtual row logic needs info about the gui state | ||
if ((eventKey === null || eventKey === void 0 ? void 0 : eventKey.length) === 1) { | ||
this.richSelect.searchText(eventKey); | ||
this.richSelect.searchTextFromString(eventKey); | ||
} | ||
@@ -89,0 +121,0 @@ } |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "30.1.0"; | ||
export declare const VERSION = "30.2.0"; |
@@ -5,2 +5,2 @@ "use strict"; | ||
// DO NOT UPDATE MANUALLY: Generated from script during build time | ||
exports.VERSION = '30.1.0'; | ||
exports.VERSION = '30.2.0'; |
@@ -11,2 +11,3 @@ import { ICellEditor, PopupComponent, RichCellEditorParams } from "@ag-grid-community/core"; | ||
private buildRichSelectParams; | ||
private getSearchStringCallback; | ||
afterGuiAttached(): void; | ||
@@ -13,0 +14,0 @@ getValue(): any; |
@@ -23,4 +23,5 @@ var __extends = (this && this.__extends) || (function () { | ||
RichSelectCellEditor.prototype.init = function (params) { | ||
var _this = this; | ||
this.params = params; | ||
var cellStartedEdit = params.cellStartedEdit, values = params.values, cellHeight = params.cellHeight; | ||
var cellStartedEdit = params.cellStartedEdit, cellHeight = params.cellHeight, values = params.values; | ||
if (_.missing(values)) { | ||
@@ -30,5 +31,14 @@ console.warn('AG Grid: richSelectCellEditor requires values for it to work'); | ||
} | ||
var richSelectParams = this.buildRichSelectParams(); | ||
var _a = this.buildRichSelectParams(), richSelectParams = _a.params, valuesPromise = _a.valuesPromise; | ||
this.richSelect = this.createManagedBean(new AgRichSelect(richSelectParams)); | ||
this.appendChild(this.richSelect); | ||
if (valuesPromise) { | ||
valuesPromise.then(function (values) { | ||
_this.richSelect.setValueList({ valueList: values, refresh: true }); | ||
var searchStringCallback = _this.getSearchStringCallback(values); | ||
if (searchStringCallback) { | ||
_this.richSelect.setSearchStringCreator(searchStringCallback); | ||
} | ||
}); | ||
} | ||
this.addManagedListener(this.richSelect, Events.EVENT_FIELD_PICKER_VALUE_SELECTED, this.onEditorPickerValueSelected.bind(this)); | ||
@@ -51,7 +61,5 @@ this.addManagedListener(this.richSelect.getGui(), 'focusout', this.onEditorFocusOut.bind(this)); | ||
RichSelectCellEditor.prototype.buildRichSelectParams = function () { | ||
var _this = this; | ||
var _a = this.params, cellRenderer = _a.cellRenderer, value = _a.value, values = _a.values, colDef = _a.colDef, formatValue = _a.formatValue, searchDebounceDelay = _a.searchDebounceDelay, valueListGap = _a.valueListGap; | ||
var _a = this.params, cellRenderer = _a.cellRenderer, value = _a.value, values = _a.values, formatValue = _a.formatValue, searchDebounceDelay = _a.searchDebounceDelay, valueListGap = _a.valueListGap, valueListMaxHeight = _a.valueListMaxHeight, valueListMaxWidth = _a.valueListMaxWidth, allowTyping = _a.allowTyping, filterList = _a.filterList, searchType = _a.searchType, highlightMatch = _a.highlightMatch, valuePlaceholder = _a.valuePlaceholder; | ||
var ret = { | ||
value: value, | ||
valueList: values, | ||
cellRenderer: cellRenderer, | ||
@@ -63,23 +71,48 @@ searchDebounceDelay: searchDebounceDelay, | ||
pickerType: 'virtual-list', | ||
pickerGap: valueListGap, | ||
allowTyping: allowTyping, | ||
filterList: filterList, | ||
searchType: searchType, | ||
highlightMatch: highlightMatch, | ||
maxPickerHeight: valueListMaxHeight, | ||
maxPickerWidth: valueListMaxWidth, | ||
placeholder: valuePlaceholder | ||
}; | ||
if (valueListGap != null) { | ||
ret.pickerGap = valueListGap; | ||
var valuesResult; | ||
var valuesPromise; | ||
if (typeof values === 'function') { | ||
valuesResult = values(this.params); | ||
} | ||
if (typeof values[0] === 'object' && colDef.keyCreator) { | ||
ret.searchStringCreator = function (values) { return values.map(function (value) { | ||
var keyParams = { | ||
value: value, | ||
colDef: _this.params.colDef, | ||
column: _this.params.column, | ||
node: _this.params.node, | ||
data: _this.params.data, | ||
api: _this.gridOptionsService.api, | ||
columnApi: _this.gridOptionsService.columnApi, | ||
context: _this.gridOptionsService.context | ||
}; | ||
return colDef.keyCreator(keyParams); | ||
}); }; | ||
else { | ||
valuesResult = values; | ||
} | ||
return ret; | ||
if (Array.isArray(valuesResult)) { | ||
ret.valueList = valuesResult; | ||
ret.searchStringCreator = this.getSearchStringCallback(valuesResult); | ||
} | ||
else { | ||
valuesPromise = valuesResult; | ||
} | ||
return { params: ret, valuesPromise: valuesPromise }; | ||
}; | ||
RichSelectCellEditor.prototype.getSearchStringCallback = function (values) { | ||
var _this = this; | ||
var colDef = this.params.colDef; | ||
if (typeof values[0] !== 'object' || !colDef.keyCreator) { | ||
return; | ||
} | ||
return function (values) { return values.map(function (value) { | ||
var keyParams = { | ||
value: value, | ||
colDef: _this.params.colDef, | ||
column: _this.params.column, | ||
node: _this.params.node, | ||
data: _this.params.data, | ||
api: _this.gridOptionsService.api, | ||
columnApi: _this.gridOptionsService.columnApi, | ||
context: _this.gridOptionsService.context | ||
}; | ||
return colDef.keyCreator(keyParams); | ||
}); }; | ||
}; | ||
// we need to have the gui attached before we can draw the virtual rows, as the | ||
@@ -101,3 +134,3 @@ // virtual row logic needs info about the gui state | ||
if ((eventKey === null || eventKey === void 0 ? void 0 : eventKey.length) === 1) { | ||
_this.richSelect.searchText(eventKey); | ||
_this.richSelect.searchTextFromString(eventKey); | ||
} | ||
@@ -104,0 +137,0 @@ } |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "30.1.0"; | ||
export declare const VERSION = "30.2.0"; |
// DO NOT UPDATE MANUALLY: Generated from script during build time | ||
export var VERSION = '30.1.0'; | ||
export var VERSION = '30.2.0'; |
@@ -11,2 +11,3 @@ import { ICellEditor, PopupComponent, RichCellEditorParams } from "@ag-grid-community/core"; | ||
private buildRichSelectParams; | ||
private getSearchStringCallback; | ||
afterGuiAttached(): void; | ||
@@ -13,0 +14,0 @@ getValue(): any; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "30.1.0"; | ||
export declare const VERSION = "30.2.0"; |
/** | ||
* @ag-grid-enterprise/rich-select - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.1.0 | ||
* @ag-grid-enterprise/rich-select - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.2.0 | ||
* @link https://www.ag-grid.com/ | ||
@@ -34,4 +34,5 @@ * @license Commercial | ||
RichSelectCellEditor.prototype.init = function (params) { | ||
var _this = this; | ||
this.params = params; | ||
var cellStartedEdit = params.cellStartedEdit, values = params.values, cellHeight = params.cellHeight; | ||
var cellStartedEdit = params.cellStartedEdit, cellHeight = params.cellHeight, values = params.values; | ||
if (core._.missing(values)) { | ||
@@ -41,5 +42,14 @@ console.warn('AG Grid: richSelectCellEditor requires values for it to work'); | ||
} | ||
var richSelectParams = this.buildRichSelectParams(); | ||
var _a = this.buildRichSelectParams(), richSelectParams = _a.params, valuesPromise = _a.valuesPromise; | ||
this.richSelect = this.createManagedBean(new core.AgRichSelect(richSelectParams)); | ||
this.appendChild(this.richSelect); | ||
if (valuesPromise) { | ||
valuesPromise.then(function (values) { | ||
_this.richSelect.setValueList({ valueList: values, refresh: true }); | ||
var searchStringCallback = _this.getSearchStringCallback(values); | ||
if (searchStringCallback) { | ||
_this.richSelect.setSearchStringCreator(searchStringCallback); | ||
} | ||
}); | ||
} | ||
this.addManagedListener(this.richSelect, core.Events.EVENT_FIELD_PICKER_VALUE_SELECTED, this.onEditorPickerValueSelected.bind(this)); | ||
@@ -62,7 +72,5 @@ this.addManagedListener(this.richSelect.getGui(), 'focusout', this.onEditorFocusOut.bind(this)); | ||
RichSelectCellEditor.prototype.buildRichSelectParams = function () { | ||
var _this = this; | ||
var _a = this.params, cellRenderer = _a.cellRenderer, value = _a.value, values = _a.values, colDef = _a.colDef, formatValue = _a.formatValue, searchDebounceDelay = _a.searchDebounceDelay, valueListGap = _a.valueListGap; | ||
var _a = this.params, cellRenderer = _a.cellRenderer, value = _a.value, values = _a.values, formatValue = _a.formatValue, searchDebounceDelay = _a.searchDebounceDelay, valueListGap = _a.valueListGap, valueListMaxHeight = _a.valueListMaxHeight, valueListMaxWidth = _a.valueListMaxWidth, allowTyping = _a.allowTyping, filterList = _a.filterList, searchType = _a.searchType, highlightMatch = _a.highlightMatch, valuePlaceholder = _a.valuePlaceholder; | ||
var ret = { | ||
value: value, | ||
valueList: values, | ||
cellRenderer: cellRenderer, | ||
@@ -74,23 +82,48 @@ searchDebounceDelay: searchDebounceDelay, | ||
pickerType: 'virtual-list', | ||
pickerGap: valueListGap, | ||
allowTyping: allowTyping, | ||
filterList: filterList, | ||
searchType: searchType, | ||
highlightMatch: highlightMatch, | ||
maxPickerHeight: valueListMaxHeight, | ||
maxPickerWidth: valueListMaxWidth, | ||
placeholder: valuePlaceholder | ||
}; | ||
if (valueListGap != null) { | ||
ret.pickerGap = valueListGap; | ||
var valuesResult; | ||
var valuesPromise; | ||
if (typeof values === 'function') { | ||
valuesResult = values(this.params); | ||
} | ||
if (typeof values[0] === 'object' && colDef.keyCreator) { | ||
ret.searchStringCreator = function (values) { return values.map(function (value) { | ||
var keyParams = { | ||
value: value, | ||
colDef: _this.params.colDef, | ||
column: _this.params.column, | ||
node: _this.params.node, | ||
data: _this.params.data, | ||
api: _this.gridOptionsService.api, | ||
columnApi: _this.gridOptionsService.columnApi, | ||
context: _this.gridOptionsService.context | ||
}; | ||
return colDef.keyCreator(keyParams); | ||
}); }; | ||
else { | ||
valuesResult = values; | ||
} | ||
return ret; | ||
if (Array.isArray(valuesResult)) { | ||
ret.valueList = valuesResult; | ||
ret.searchStringCreator = this.getSearchStringCallback(valuesResult); | ||
} | ||
else { | ||
valuesPromise = valuesResult; | ||
} | ||
return { params: ret, valuesPromise: valuesPromise }; | ||
}; | ||
RichSelectCellEditor.prototype.getSearchStringCallback = function (values) { | ||
var _this = this; | ||
var colDef = this.params.colDef; | ||
if (typeof values[0] !== 'object' || !colDef.keyCreator) { | ||
return; | ||
} | ||
return function (values) { return values.map(function (value) { | ||
var keyParams = { | ||
value: value, | ||
colDef: _this.params.colDef, | ||
column: _this.params.column, | ||
node: _this.params.node, | ||
data: _this.params.data, | ||
api: _this.gridOptionsService.api, | ||
columnApi: _this.gridOptionsService.columnApi, | ||
context: _this.gridOptionsService.context | ||
}; | ||
return colDef.keyCreator(keyParams); | ||
}); }; | ||
}; | ||
// we need to have the gui attached before we can draw the virtual rows, as the | ||
@@ -112,3 +145,3 @@ // virtual row logic needs info about the gui state | ||
if ((eventKey === null || eventKey === void 0 ? void 0 : eventKey.length) === 1) { | ||
_this.richSelect.searchText(eventKey); | ||
_this.richSelect.searchTextFromString(eventKey); | ||
} | ||
@@ -128,3 +161,3 @@ } | ||
// DO NOT UPDATE MANUALLY: Generated from script during build time | ||
var VERSION = '30.1.0'; | ||
var VERSION = '30.2.0'; | ||
@@ -131,0 +164,0 @@ var RichSelectModule = { |
/** | ||
* @ag-grid-enterprise/rich-select - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.1.0 | ||
* @ag-grid-enterprise/rich-select - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.2.0 | ||
* @link https://www.ag-grid.com/ | ||
@@ -7,6 +7,6 @@ * @license Commercial | ||
/** | ||
* @ag-grid-enterprise/rich-select - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.1.0 | ||
* @ag-grid-enterprise/rich-select - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.2.0 | ||
* @link https://www.ag-grid.com/ | ||
* @license Commercial | ||
*/ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("@ag-grid-community/core"),r=require("@ag-grid-enterprise/core"),i=(e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),o=function(e){function r(){return e.call(this,'<div class="ag-cell-edit-wrapper"></div>')||this}return i(r,e),r.prototype.init=function(e){this.params=e;var r=e.cellStartedEdit,i=e.values,o=e.cellHeight;if(t._.missing(i))console.warn("AG Grid: richSelectCellEditor requires values for it to work");else{var c=this.buildRichSelectParams();this.richSelect=this.createManagedBean(new t.AgRichSelect(c)),this.appendChild(this.richSelect),this.addManagedListener(this.richSelect,t.Events.EVENT_FIELD_PICKER_VALUE_SELECTED,this.onEditorPickerValueSelected.bind(this)),this.addManagedListener(this.richSelect.getGui(),"focusout",this.onEditorFocusOut.bind(this)),this.focusAfterAttached=r,t._.exists(o)&&this.richSelect.setRowHeight(o)}},r.prototype.onEditorPickerValueSelected=function(e){this.params.stopEditing(!e.fromEnterKey)},r.prototype.onEditorFocusOut=function(e){this.richSelect.getGui().contains(e.relatedTarget)||this.params.stopEditing(!0)},r.prototype.buildRichSelectParams=function(){var e=this,t=this.params,r=t.cellRenderer,i=t.value,o=t.values,c=t.colDef,n=t.formatValue,a=t.searchDebounceDelay,s=t.valueListGap,l={value:i,valueList:o,cellRenderer:r,searchDebounceDelay:a,valueFormatter:n,pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"virtual-list"};return null!=s&&(l.pickerGap=s),"object"==typeof o[0]&&c.keyCreator&&(l.searchStringCreator=function(t){return t.map((function(t){var r={value:t,colDef:e.params.colDef,column:e.params.column,node:e.params.node,data:e.params.data,api:e.gridOptionsService.api,columnApi:e.gridOptionsService.columnApi,context:e.gridOptionsService.context};return c.keyCreator(r)}))}),l},r.prototype.afterGuiAttached=function(){var e=this,t=this.focusAfterAttached,r=this.params;setTimeout((function(){if(e.isAlive()){t&&e.richSelect.getFocusableElement().focus(),e.richSelect.showPicker();var i=r.eventKey;i&&1===(null==i?void 0:i.length)&&e.richSelect.searchText(i)}}))},r.prototype.getValue=function(){return this.richSelect.getValue()},r.prototype.isPopup=function(){return!1},r}(t.PopupComponent),c={version:"30.1.0",moduleName:t.ModuleNames.RichSelectModule,beans:[],userComponents:[{componentName:"agRichSelect",componentClass:o},{componentName:"agRichSelectCellEditor",componentClass:o}],dependantModules:[r.EnterpriseCoreModule]};exports.RichSelectModule=c; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("@ag-grid-community/core"),r=require("@ag-grid-enterprise/core"),i=(e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),a=function(e){function r(){return e.call(this,'<div class="ag-cell-edit-wrapper"></div>')||this}return i(r,e),r.prototype.init=function(e){var r=this;this.params=e;var i=e.cellStartedEdit,a=e.cellHeight,o=e.values;if(t._.missing(o))console.warn("AG Grid: richSelectCellEditor requires values for it to work");else{var c=this.buildRichSelectParams(),n=c.params,l=c.valuesPromise;this.richSelect=this.createManagedBean(new t.AgRichSelect(n)),this.appendChild(this.richSelect),l&&l.then((function(e){r.richSelect.setValueList({valueList:e,refresh:!0});var t=r.getSearchStringCallback(e);t&&r.richSelect.setSearchStringCreator(t)})),this.addManagedListener(this.richSelect,t.Events.EVENT_FIELD_PICKER_VALUE_SELECTED,this.onEditorPickerValueSelected.bind(this)),this.addManagedListener(this.richSelect.getGui(),"focusout",this.onEditorFocusOut.bind(this)),this.focusAfterAttached=i,t._.exists(a)&&this.richSelect.setRowHeight(a)}},r.prototype.onEditorPickerValueSelected=function(e){this.params.stopEditing(!e.fromEnterKey)},r.prototype.onEditorFocusOut=function(e){this.richSelect.getGui().contains(e.relatedTarget)||this.params.stopEditing(!0)},r.prototype.buildRichSelectParams=function(){var e,t,r=this.params,i=r.cellRenderer,a=r.value,o=r.values,c=r.formatValue,n=r.searchDebounceDelay,l=r.valueListGap,s=r.valueListMaxHeight,u=r.valueListMaxWidth,h={value:a,cellRenderer:i,searchDebounceDelay:n,valueFormatter:c,pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"virtual-list",pickerGap:l,allowTyping:r.allowTyping,filterList:r.filterList,searchType:r.searchType,highlightMatch:r.highlightMatch,maxPickerHeight:s,maxPickerWidth:u,placeholder:r.valuePlaceholder};return e="function"==typeof o?o(this.params):o,Array.isArray(e)?(h.valueList=e,h.searchStringCreator=this.getSearchStringCallback(e)):t=e,{params:h,valuesPromise:t}},r.prototype.getSearchStringCallback=function(e){var t=this,r=this.params.colDef;if("object"==typeof e[0]&&r.keyCreator)return function(e){return e.map((function(e){var i={value:e,colDef:t.params.colDef,column:t.params.column,node:t.params.node,data:t.params.data,api:t.gridOptionsService.api,columnApi:t.gridOptionsService.columnApi,context:t.gridOptionsService.context};return r.keyCreator(i)}))}},r.prototype.afterGuiAttached=function(){var e=this,t=this.focusAfterAttached,r=this.params;setTimeout((function(){if(e.isAlive()){t&&e.richSelect.getFocusableElement().focus(),e.richSelect.showPicker();var i=r.eventKey;i&&1===(null==i?void 0:i.length)&&e.richSelect.searchTextFromString(i)}}))},r.prototype.getValue=function(){return this.richSelect.getValue()},r.prototype.isPopup=function(){return!1},r}(t.PopupComponent),o={version:"30.2.0",moduleName:t.ModuleNames.RichSelectModule,beans:[],userComponents:[{componentName:"agRichSelect",componentClass:a},{componentName:"agRichSelectCellEditor",componentClass:a}],dependantModules:[r.EnterpriseCoreModule]};exports.RichSelectModule=o; |
{ | ||
"name": "@ag-grid-enterprise/rich-select", | ||
"version": "30.1.0", | ||
"version": "30.2.0", | ||
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue", | ||
@@ -49,4 +49,4 @@ "main": "./dist/esm/es6/main.mjs", | ||
"dependencies": { | ||
"@ag-grid-community/core": "~30.1.0", | ||
"@ag-grid-enterprise/core": "~30.1.0" | ||
"@ag-grid-community/core": "~30.2.0", | ||
"@ag-grid-enterprise/core": "~30.2.0" | ||
}, | ||
@@ -53,0 +53,0 @@ "devDependencies": { |
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 too big to display
Sorry, the diff of this file is too big to display
3124287
51218
+ Added@ag-grid-community/core@30.2.1(transitive)
+ Added@ag-grid-enterprise/core@30.2.1(transitive)
- Removed@ag-grid-community/core@30.1.0(transitive)
- Removed@ag-grid-enterprise/core@30.1.0(transitive)