@ag-grid-enterprise/rich-select
Advanced tools
Comparing version 28.2.1 to 29.0.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RichSelectModule = void 0; | ||
var richSelectModule_1 = require("./richSelectModule"); | ||
exports.RichSelectModule = richSelectModule_1.RichSelectModule; | ||
Object.defineProperty(exports, "RichSelectModule", { enumerable: true, get: function () { return richSelectModule_1.RichSelectModule; } }); |
@@ -6,3 +6,3 @@ "use strict"; | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
@@ -23,4 +23,6 @@ }; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RichSelectCellEditor = void 0; | ||
var core_1 = require("@ag-grid-community/core"); | ||
var richSelectRow_1 = require("./richSelectRow"); | ||
var utils_1 = require("./utils"); | ||
var RichSelectCellEditor = /** @class */ (function (_super) { | ||
@@ -39,3 +41,3 @@ __extends(RichSelectCellEditor, _super); | ||
this.focusAfterAttached = params.cellStartedEdit; | ||
var icon = core_1._.createIconNoSpan('smallDown', this.gridOptionsWrapper); | ||
var icon = core_1._.createIconNoSpan('smallDown', this.gridOptionsService); | ||
icon.classList.add('ag-rich-select-value-icon'); | ||
@@ -136,5 +138,5 @@ this.eValue.appendChild(icon); | ||
data: _this.params.data, | ||
api: _this.gridOptionsWrapper.getApi(), | ||
columnApi: _this.gridOptionsWrapper.getColumnApi(), | ||
context: _this.gridOptionsWrapper.getContext() | ||
api: _this.gridOptionsService.get('api'), | ||
columnApi: _this.gridOptionsService.get('columnApi'), | ||
context: _this.gridOptionsService.get('context') | ||
}; | ||
@@ -165,3 +167,3 @@ return _this.params.colDef.keyCreator(keyParams); | ||
valueFormatted: valueFormatted, | ||
api: this.gridOptionsWrapper.getApi(), | ||
api: this.gridOptionsService.get('api'), | ||
}; | ||
@@ -171,3 +173,3 @@ var compDetails = this.userComponentFactory.getCellRendererDetails(this.params, params); | ||
if (promise) { | ||
core_1._.bindCellRendererToHtmlElement(promise, eValue); | ||
utils_1.bindCellRendererToHtmlElement(promise, eValue); | ||
promise.then(function (renderer) { | ||
@@ -174,0 +176,0 @@ _this.addDestroyFunc(function () { return _this.getContext().destroyBean(renderer); }); |
@@ -6,3 +6,3 @@ "use strict"; | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
@@ -23,3 +23,5 @@ }; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RichSelectRow = void 0; | ||
var core_1 = require("@ag-grid-community/core"); | ||
var utils_1 = require("./utils"); | ||
var RichSelectRow = /** @class */ (function (_super) { | ||
@@ -61,3 +63,3 @@ __extends(RichSelectRow, _super); | ||
valueFormatted: valueFormatted, | ||
api: this.gridOptionsWrapper.getApi() | ||
api: this.gridOptionsService.get('api') | ||
}; | ||
@@ -67,3 +69,3 @@ var compDetails = this.userComponentFactory.getCellRendererDetails(this.params, params); | ||
if (cellRendererPromise != null) { | ||
core_1._.bindCellRendererToHtmlElement(cellRendererPromise, this.getGui()); | ||
utils_1.bindCellRendererToHtmlElement(cellRendererPromise, this.getGui()); | ||
} | ||
@@ -70,0 +72,0 @@ else { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RichSelectModule = void 0; | ||
var core_1 = require("@ag-grid-community/core"); | ||
var core_2 = require("@ag-grid-enterprise/core"); | ||
var richSelectCellEditor_1 = require("./richSelect/richSelectCellEditor"); | ||
var version_1 = require("./version"); | ||
exports.RichSelectModule = { | ||
version: version_1.VERSION, | ||
moduleName: core_1.ModuleNames.RichSelectModule, | ||
@@ -8,0 +11,0 @@ beans: [], |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RichSelectModule = void 0; | ||
var richSelectModule_1 = require("./richSelectModule"); | ||
exports.RichSelectModule = richSelectModule_1.RichSelectModule; | ||
Object.defineProperty(exports, "RichSelectModule", { enumerable: true, get: function () { return richSelectModule_1.RichSelectModule; } }); |
@@ -9,4 +9,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RichSelectCellEditor = void 0; | ||
const core_1 = require("@ag-grid-community/core"); | ||
const richSelectRow_1 = require("./richSelectRow"); | ||
const utils_1 = require("./utils"); | ||
class RichSelectCellEditor extends core_1.PopupComponent { | ||
@@ -23,3 +25,3 @@ constructor() { | ||
this.focusAfterAttached = params.cellStartedEdit; | ||
const icon = core_1._.createIconNoSpan('smallDown', this.gridOptionsWrapper); | ||
const icon = core_1._.createIconNoSpan('smallDown', this.gridOptionsService); | ||
icon.classList.add('ag-rich-select-value-icon'); | ||
@@ -119,5 +121,5 @@ this.eValue.appendChild(icon); | ||
data: this.params.data, | ||
api: this.gridOptionsWrapper.getApi(), | ||
columnApi: this.gridOptionsWrapper.getColumnApi(), | ||
context: this.gridOptionsWrapper.getContext() | ||
api: this.gridOptionsService.get('api'), | ||
columnApi: this.gridOptionsService.get('columnApi'), | ||
context: this.gridOptionsService.get('context') | ||
}; | ||
@@ -147,3 +149,3 @@ return this.params.colDef.keyCreator(keyParams); | ||
valueFormatted: valueFormatted, | ||
api: this.gridOptionsWrapper.getApi(), | ||
api: this.gridOptionsService.get('api'), | ||
}; | ||
@@ -153,3 +155,3 @@ const compDetails = this.userComponentFactory.getCellRendererDetails(this.params, params); | ||
if (promise) { | ||
core_1._.bindCellRendererToHtmlElement(promise, eValue); | ||
utils_1.bindCellRendererToHtmlElement(promise, eValue); | ||
promise.then(renderer => { | ||
@@ -156,0 +158,0 @@ this.addDestroyFunc(() => this.getContext().destroyBean(renderer)); |
@@ -9,3 +9,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RichSelectRow = void 0; | ||
const core_1 = require("@ag-grid-community/core"); | ||
const utils_1 = require("./utils"); | ||
class RichSelectRow extends core_1.Component { | ||
@@ -44,3 +46,3 @@ constructor(params) { | ||
valueFormatted: valueFormatted, | ||
api: this.gridOptionsWrapper.getApi() | ||
api: this.gridOptionsService.get('api') | ||
}; | ||
@@ -50,3 +52,3 @@ const compDetails = this.userComponentFactory.getCellRendererDetails(this.params, params); | ||
if (cellRendererPromise != null) { | ||
core_1._.bindCellRendererToHtmlElement(cellRendererPromise, this.getGui()); | ||
utils_1.bindCellRendererToHtmlElement(cellRendererPromise, this.getGui()); | ||
} | ||
@@ -53,0 +55,0 @@ else { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RichSelectModule = void 0; | ||
const core_1 = require("@ag-grid-community/core"); | ||
const core_2 = require("@ag-grid-enterprise/core"); | ||
const richSelectCellEditor_1 = require("./richSelect/richSelectCellEditor"); | ||
const version_1 = require("./version"); | ||
exports.RichSelectModule = { | ||
version: version_1.VERSION, | ||
moduleName: core_1.ModuleNames.RichSelectModule, | ||
@@ -8,0 +11,0 @@ beans: [], |
@@ -5,3 +5,3 @@ var __extends = (this && this.__extends) || (function () { | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
@@ -23,2 +23,3 @@ }; | ||
import { RichSelectRow } from "./richSelectRow"; | ||
import { bindCellRendererToHtmlElement } from "./utils"; | ||
var RichSelectCellEditor = /** @class */ (function (_super) { | ||
@@ -37,3 +38,3 @@ __extends(RichSelectCellEditor, _super); | ||
this.focusAfterAttached = params.cellStartedEdit; | ||
var icon = _.createIconNoSpan('smallDown', this.gridOptionsWrapper); | ||
var icon = _.createIconNoSpan('smallDown', this.gridOptionsService); | ||
icon.classList.add('ag-rich-select-value-icon'); | ||
@@ -134,5 +135,5 @@ this.eValue.appendChild(icon); | ||
data: _this.params.data, | ||
api: _this.gridOptionsWrapper.getApi(), | ||
columnApi: _this.gridOptionsWrapper.getColumnApi(), | ||
context: _this.gridOptionsWrapper.getContext() | ||
api: _this.gridOptionsService.get('api'), | ||
columnApi: _this.gridOptionsService.get('columnApi'), | ||
context: _this.gridOptionsService.get('context') | ||
}; | ||
@@ -163,3 +164,3 @@ return _this.params.colDef.keyCreator(keyParams); | ||
valueFormatted: valueFormatted, | ||
api: this.gridOptionsWrapper.getApi(), | ||
api: this.gridOptionsService.get('api'), | ||
}; | ||
@@ -169,3 +170,3 @@ var compDetails = this.userComponentFactory.getCellRendererDetails(this.params, params); | ||
if (promise) { | ||
_.bindCellRendererToHtmlElement(promise, eValue); | ||
bindCellRendererToHtmlElement(promise, eValue); | ||
promise.then(function (renderer) { | ||
@@ -172,0 +173,0 @@ _this.addDestroyFunc(function () { return _this.getContext().destroyBean(renderer); }); |
@@ -5,3 +5,3 @@ var __extends = (this && this.__extends) || (function () { | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
@@ -22,2 +22,3 @@ }; | ||
import { _, Autowired, Component } from "@ag-grid-community/core"; | ||
import { bindCellRendererToHtmlElement } from "./utils"; | ||
var RichSelectRow = /** @class */ (function (_super) { | ||
@@ -59,3 +60,3 @@ __extends(RichSelectRow, _super); | ||
valueFormatted: valueFormatted, | ||
api: this.gridOptionsWrapper.getApi() | ||
api: this.gridOptionsService.get('api') | ||
}; | ||
@@ -65,3 +66,3 @@ var compDetails = this.userComponentFactory.getCellRendererDetails(this.params, params); | ||
if (cellRendererPromise != null) { | ||
_.bindCellRendererToHtmlElement(cellRendererPromise, this.getGui()); | ||
bindCellRendererToHtmlElement(cellRendererPromise, this.getGui()); | ||
} | ||
@@ -68,0 +69,0 @@ else { |
import { ModuleNames } from "@ag-grid-community/core"; | ||
import { EnterpriseCoreModule } from "@ag-grid-enterprise/core"; | ||
import { RichSelectCellEditor } from "./richSelect/richSelectCellEditor"; | ||
import { VERSION } from "./version"; | ||
export var RichSelectModule = { | ||
version: VERSION, | ||
moduleName: ModuleNames.RichSelectModule, | ||
@@ -6,0 +8,0 @@ beans: [], |
@@ -9,2 +9,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import { RichSelectRow } from "./richSelectRow"; | ||
import { bindCellRendererToHtmlElement } from "./utils"; | ||
export class RichSelectCellEditor extends PopupComponent { | ||
@@ -21,3 +22,3 @@ constructor() { | ||
this.focusAfterAttached = params.cellStartedEdit; | ||
const icon = _.createIconNoSpan('smallDown', this.gridOptionsWrapper); | ||
const icon = _.createIconNoSpan('smallDown', this.gridOptionsService); | ||
icon.classList.add('ag-rich-select-value-icon'); | ||
@@ -117,5 +118,5 @@ this.eValue.appendChild(icon); | ||
data: this.params.data, | ||
api: this.gridOptionsWrapper.getApi(), | ||
columnApi: this.gridOptionsWrapper.getColumnApi(), | ||
context: this.gridOptionsWrapper.getContext() | ||
api: this.gridOptionsService.get('api'), | ||
columnApi: this.gridOptionsService.get('columnApi'), | ||
context: this.gridOptionsService.get('context') | ||
}; | ||
@@ -145,3 +146,3 @@ return this.params.colDef.keyCreator(keyParams); | ||
valueFormatted: valueFormatted, | ||
api: this.gridOptionsWrapper.getApi(), | ||
api: this.gridOptionsService.get('api'), | ||
}; | ||
@@ -151,3 +152,3 @@ const compDetails = this.userComponentFactory.getCellRendererDetails(this.params, params); | ||
if (promise) { | ||
_.bindCellRendererToHtmlElement(promise, eValue); | ||
bindCellRendererToHtmlElement(promise, eValue); | ||
promise.then(renderer => { | ||
@@ -154,0 +155,0 @@ this.addDestroyFunc(() => this.getContext().destroyBean(renderer)); |
@@ -8,2 +8,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import { _, Autowired, Component } from "@ag-grid-community/core"; | ||
import { bindCellRendererToHtmlElement } from "./utils"; | ||
export class RichSelectRow extends Component { | ||
@@ -42,3 +43,3 @@ constructor(params) { | ||
valueFormatted: valueFormatted, | ||
api: this.gridOptionsWrapper.getApi() | ||
api: this.gridOptionsService.get('api') | ||
}; | ||
@@ -48,3 +49,3 @@ const compDetails = this.userComponentFactory.getCellRendererDetails(this.params, params); | ||
if (cellRendererPromise != null) { | ||
_.bindCellRendererToHtmlElement(cellRendererPromise, this.getGui()); | ||
bindCellRendererToHtmlElement(cellRendererPromise, this.getGui()); | ||
} | ||
@@ -51,0 +52,0 @@ else { |
import { ModuleNames } from "@ag-grid-community/core"; | ||
import { EnterpriseCoreModule } from "@ag-grid-enterprise/core"; | ||
import { RichSelectCellEditor } from "./richSelect/richSelectCellEditor"; | ||
import { VERSION } from "./version"; | ||
export const RichSelectModule = { | ||
version: VERSION, | ||
moduleName: ModuleNames.RichSelectModule, | ||
@@ -6,0 +8,0 @@ beans: [], |
/** | ||
* @ag-grid-enterprise/rich-select - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v28.2.1 | ||
* @ag-grid-enterprise/rich-select - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v29.0.0 | ||
* @link https://www.ag-grid.com/ | ||
@@ -13,2 +13,22 @@ * @license Commercial | ||
/** | ||
* cell renderers are used in a few places. they bind to dom slightly differently to other cell renderes as they | ||
* can return back strings (instead of html elemnt) in the getGui() method. common code placed here to handle that. | ||
* @param {AgPromise<ICellRendererComp>} cellRendererPromise | ||
* @param {HTMLElement} eTarget | ||
*/ | ||
function bindCellRendererToHtmlElement(cellRendererPromise, eTarget) { | ||
cellRendererPromise.then(function (cellRenderer) { | ||
var gui = cellRenderer.getGui(); | ||
if (gui != null) { | ||
if (typeof gui === 'object') { | ||
eTarget.appendChild(gui); | ||
} | ||
else { | ||
eTarget.innerHTML = gui; | ||
} | ||
} | ||
}); | ||
} | ||
var __extends$1 = (undefined && undefined.__extends) || (function () { | ||
@@ -18,3 +38,3 @@ var extendStatics = function (d, b) { | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
@@ -70,3 +90,3 @@ }; | ||
valueFormatted: valueFormatted, | ||
api: this.gridOptionsWrapper.getApi() | ||
api: this.gridOptionsService.get('api') | ||
}; | ||
@@ -76,3 +96,3 @@ var compDetails = this.userComponentFactory.getCellRendererDetails(this.params, params); | ||
if (cellRendererPromise != null) { | ||
core._.bindCellRendererToHtmlElement(cellRendererPromise, this.getGui()); | ||
bindCellRendererToHtmlElement(cellRendererPromise, this.getGui()); | ||
} | ||
@@ -102,3 +122,3 @@ else { | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
@@ -131,3 +151,3 @@ }; | ||
this.focusAfterAttached = params.cellStartedEdit; | ||
var icon = core._.createIconNoSpan('smallDown', this.gridOptionsWrapper); | ||
var icon = core._.createIconNoSpan('smallDown', this.gridOptionsService); | ||
icon.classList.add('ag-rich-select-value-icon'); | ||
@@ -228,5 +248,5 @@ this.eValue.appendChild(icon); | ||
data: _this.params.data, | ||
api: _this.gridOptionsWrapper.getApi(), | ||
columnApi: _this.gridOptionsWrapper.getColumnApi(), | ||
context: _this.gridOptionsWrapper.getContext() | ||
api: _this.gridOptionsService.get('api'), | ||
columnApi: _this.gridOptionsService.get('columnApi'), | ||
context: _this.gridOptionsService.get('context') | ||
}; | ||
@@ -257,3 +277,3 @@ return _this.params.colDef.keyCreator(keyParams); | ||
valueFormatted: valueFormatted, | ||
api: this.gridOptionsWrapper.getApi(), | ||
api: this.gridOptionsService.get('api'), | ||
}; | ||
@@ -263,3 +283,3 @@ var compDetails = this.userComponentFactory.getCellRendererDetails(this.params, params); | ||
if (promise) { | ||
core._.bindCellRendererToHtmlElement(promise, eValue); | ||
bindCellRendererToHtmlElement(promise, eValue); | ||
promise.then(function (renderer) { | ||
@@ -357,3 +377,7 @@ _this.addDestroyFunc(function () { return _this.getContext().destroyBean(renderer); }); | ||
// DO NOT UPDATE MANUALLY: Generated from script during build time | ||
var VERSION = '29.0.0'; | ||
var RichSelectModule = { | ||
version: VERSION, | ||
moduleName: core.ModuleNames.RichSelectModule, | ||
@@ -360,0 +384,0 @@ beans: [], |
/** | ||
* @ag-grid-enterprise/rich-select - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v28.2.1 | ||
* @ag-grid-enterprise/rich-select - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v29.0.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 v28.2.1 | ||
* @ag-grid-enterprise/rich-select - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v29.0.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"),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" role="presentation"></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.updateSelected(i)},i.prototype.updateSelected=function(e){this.addOrRemoveCssClass("ag-rich-select-row-selected",e)},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.createManagedBean(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.innerText=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.forEachRenderedRow((function(e,i){e.updateSelected(t===i)})),this.virtualList.focusRow(t))}},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);if(this.virtualList.refresh(),e>=0&&this.virtualList.ensureIndexVisible(e),this.virtualList.refresh(),this.focusAfterAttached){var t=-1!==e?e:0;this.params.values.length?this.virtualList.focusRow(t):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; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@ag-grid-community/core"),t=require("@ag-grid-enterprise/core");function i(e,t){e.then((function(e){var i=e.getGui();null!=i&&("object"==typeof i?t.appendChild(i):t.innerHTML=i)}))}var r,o=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),n=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},s=function(t){function r(e){var i=t.call(this,'<div class="ag-rich-select-row" role="presentation"></div>')||this;return i.params=e,i}return o(r,t),r.prototype.setState=function(e,t,i){this.populateWithRenderer(e,t)||this.populateWithoutRenderer(e,t),this.updateSelected(i)},r.prototype.updateSelected=function(e){this.addOrRemoveCssClass("ag-rich-select-row-selected",e)},r.prototype.populateWithoutRenderer=function(t,i){var r=null!=i?i:t;e._.exists(r)&&""!==r?this.getGui().textContent=r.toString():this.getGui().innerHTML=" "},r.prototype.populateWithRenderer=function(e,t){var r=this,o={value:e,valueFormatted:t,api:this.gridOptionsService.get("api")},n=this.userComponentFactory.getCellRendererDetails(this.params,o),s=n?n.newAgStackInstance():void 0;return null!=s?i(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)},n([e.Autowired("userComponentFactory")],r.prototype,"userComponentFactory",void 0),r}(e.Component),a=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)Object.prototype.hasOwnProperty.call(t,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)}}(),c=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},l=function(t){function r(){var e=t.call(this,r.TEMPLATE)||this;return e.selectionConfirmed=!1,e.searchString="",e}return a(r,t),r.prototype.init=function(t){this.params=t,this.selectedValue=t.value,this.originalSelectedValue=t.value,this.focusAfterAttached=t.cellStartedEdit;var i=e._.createIconNoSpan("smallDown",this.gridOptionsService);if(i.classList.add("ag-rich-select-value-icon"),this.eValue.appendChild(i),this.virtualList=this.createManagedBean(new e.VirtualList("rich-select")),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),e._.exists(this.params.cellHeight)&&this.virtualList.setRowHeight(this.params.cellHeight),this.renderSelectedValue(),e._.missing(t.values))console.warn("AG Grid: richSelectCellEditor requires values for it to work");else{var r=t.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=e._.exists(t.searchDebounceDelay)?t.searchDebounceDelay:300;this.clearSearchString=e._.debounce(this.clearSearchString,n),e._.exists(t.charPress)&&this.searchText(t.charPress)}},r.prototype.onKeyDown=function(t){var i=t.key;switch(t.preventDefault(),i){case e.KeyCode.ENTER:this.onEnterKeyDown();break;case e.KeyCode.TAB:this.confirmSelection();break;case e.KeyCode.DOWN:case e.KeyCode.UP:this.onNavigationKeyPressed(t,i);break;default:this.searchText(t)}},r.prototype.confirmSelection=function(){this.selectionConfirmed=!0},r.prototype.onEnterKeyDown=function(){this.confirmSelection(),this.params.stopEditing()},r.prototype.onNavigationKeyPressed=function(t,i){t.preventDefault();var r=this.params.values.indexOf(this.selectedValue),o=i===e.KeyCode.UP?r-1:r+1;if(o>=0&&o<this.params.values.length){var n=this.params.values[o];this.setSelectedValue(n)}},r.prototype.searchText=function(t){if("string"==typeof t)this.searchString+=t,this.runSearch(),this.clearSearchString();else{var i=t.key;if(i===e.KeyCode.BACKSPACE)this.searchString=this.searchString.slice(0,-1),i="";else if(!e._.isEventFromPrintableCharacter(t))return;this.searchText(i)}},r.prototype.runSearch=function(){var t,i=this,r=this.params.values;if("number"!=typeof r[0]&&"string"!=typeof r[0]||(t=r.map(String)),"object"==typeof r[0]&&this.params.colDef.keyCreator&&(t=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.gridOptionsService.get("api"),columnApi:i.gridOptionsService.get("columnApi"),context:i.gridOptionsService.get("context")};return i.params.colDef.keyCreator(t)}))),t){var o=e._.fuzzySuggestions(this.searchString,t,!0,!0)[0];if(o){var n=r[t.indexOf(o)];this.setSelectedValue(n)}}},r.prototype.clearSearchString=function(){this.searchString=""},r.prototype.renderSelectedValue=function(){var t=this,r=this.params.formatValue(this.selectedValue),o=this.eValue,n={value:this.selectedValue,valueFormatted:r,api:this.gridOptionsService.get("api")},s=this.userComponentFactory.getCellRendererDetails(this.params,n),a=s?s.newAgStackInstance():void 0;a?(i(a,o),a.then((function(e){t.addDestroyFunc((function(){return t.getContext().destroyBean(e)}))}))):e._.exists(this.selectedValue)?o.innerText=r:e._.clearElement(o)},r.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.forEachRenderedRow((function(e,i){e.updateSelected(t===i)})),this.virtualList.focusRow(t))}},r.prototype.createRowComponent=function(e){var t=this.params.formatValue(e),i=new s(this.params);return this.getContext().createBean(i),i.setState(e,t,e===this.selectedValue),i},r.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)},r.prototype.onClick=function(){this.confirmSelection(),this.params.stopEditing()},r.prototype.afterGuiAttached=function(){var e=this.params.values.indexOf(this.selectedValue);if(this.virtualList.refresh(),e>=0&&this.virtualList.ensureIndexVisible(e),this.virtualList.refresh(),this.focusAfterAttached){var t=-1!==e?e:0;this.params.values.length?this.virtualList.focusRow(t):this.getGui().focus()}},r.prototype.getValue=function(){return this.selectionConfirmed?this.selectedValue:this.originalSelectedValue},r.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>',c([e.Autowired("userComponentFactory")],r.prototype,"userComponentFactory",void 0),c([e.RefSelector("eValue")],r.prototype,"eValue",void 0),c([e.RefSelector("eList")],r.prototype,"eList",void 0),r}(e.PopupComponent),u={version:"29.0.0",moduleName:e.ModuleNames.RichSelectModule,beans:[],userComponents:[{componentName:"agRichSelect",componentClass:l},{componentName:"agRichSelectCellEditor",componentClass:l}],dependantModules:[t.EnterpriseCoreModule]};exports.RichSelectModule=u; |
{ | ||
"name": "@ag-grid-enterprise/rich-select", | ||
"version": "28.2.1", | ||
"version": "29.0.0", | ||
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue", | ||
@@ -50,7 +50,7 @@ "main": "./dist/cjs/es5/main.js", | ||
"dependencies": { | ||
"@ag-grid-community/core": "~28.2.1", | ||
"@ag-grid-enterprise/core": "~28.2.1" | ||
"@ag-grid-community/core": "~29.0.0", | ||
"@ag-grid-enterprise/core": "~29.0.0" | ||
}, | ||
"devDependencies": { | ||
"typescript": "~3.7.7", | ||
"typescript": "~4.0.8", | ||
"rimraf": "3.0.2" | ||
@@ -57,0 +57,0 @@ }, |
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
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
63
3412455
53682
+ Added@ag-grid-community/core@29.0.0(transitive)
+ Added@ag-grid-enterprise/core@29.0.0(transitive)
- Removed@ag-grid-community/core@28.2.1(transitive)
- Removed@ag-grid-enterprise/core@28.2.1(transitive)